cancel
Showing results for 
Search instead for 
Did you mean: 

problem in sap script

former_member209914
Participant
0 Kudos

Hi All,

I am working on check printing. I am working on RFFOUS_C and my form name is F110_PRENUM_CHECK.

I copied the both to Z programs.

My requirement is to print the line items twice. LIke below

Line Item1

Line Item2

Line Item3

Line Item4

-


Gap

-


Gap

-


Gap

-


Gap

Line Item1

Line Item2

Line Item3

Line Item4

Items logic is there in main window.

I am able to print the line items only once.

Wht I have to do now to print the items second time?.

Please help me....

Regards,

vinod.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vinod,

Since it has to be printed like

Line Item1

Line Item2

Line Item3

Line Item4

-


Gap

-


Gap

-


Gap

-


Gap

Line Item1

Line Item2

Line Item3

Line Item4

Use the code as shown below:

In the SE38 Driver Program:

Loop at it_items into wa_items.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = OPER1

window = MAIN

Endloop.

Loop at it_items into wa_items.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = OPER2

window = MAIN

Endloop.

In the SAP SCRIPT:

Inside main window:

/E OPER1

&wa_items-line1&

&wa_items-line2&

&wa_items-line3&

&wa_items-line4&

*

*

*

*

/E OPER2

&wa_items-line1&

&wa_items-line2&

&wa_items-line3&

&wa_items-line4&

The reason im calling two elements inside the Main window is to bring the space between the two line items.

please REWARD Points if useful.

Thanks,

karthik

Former Member
0 Kudos

Hi,

Call the Line items twice in the Driver program, you have WRITE_FORM function module in the driver program which will call the data in the Layout, call the Elements(which are in the Layout) in the Driver program twice

Regards

Sudheer