cancel
Showing results for 
Search instead for 
Did you mean: 

2 Script Obj in One program

Former Member
0 Kudos

Hi,

I have create two Script Object - ZSCR_OBJ1 for Header Details and ZSCR_OBJ2 for Item Details. I want to use Both Object are One ZProgram. if Use can run the program two Spool request will create - one for header and 2 for item. but Use will give print in one time only. ie. i want use OPEN_FROM one time only in program.

How i can use 2 Obj at time ?

Give a sample Code.

Thanks,

Durai.V

Accepted Solutions (0)

Answers (2)

Answers (2)

valter_oliveira
Active Contributor
0 Kudos

Hello.

I'm not sure if I got your requirement clearly.

I think you want your program to print only one spool request (with both outputs of scritps). If so try this.

In header one, in itcpo structure, choose to create a new spool, and NOT to print immediately.

To all item ones (except last one), maintain NOT to print immediately, but choose NOT to create a new spool (this will make the output be in same request).

When printing the last item file, maintain NOT to create a new spool but make it print immediately. IT will print one spool only.

Regards.

Valter Oliveira.

Former Member
0 Kudos

Hi,

Open the first SAP Script using OPEN_FORM. Then print the second form using START_FORM and END_FORM for printing the second SAP Script. Finally close using CLOSE_FORM.