cancel
Showing results for 
Search instead for 
Did you mean: 

Writing multiple line in SAPScript Subwindow

Former Member
0 Kudos

Hi,

I am using "WRITE_FORM" to print multiple lines of an internal table in SAPScript as follows:

LOOP AT it_bseg.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ITEM_LINE'

*

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'Sub_Window' "Secondary window

ENDLOOP.

In "Sub_Window" (In SE71), I have used /E ITEM_LINE and AS &it_bseg-dmbtr& ,, &it_bseg-prctr" .

But the problem is that I get only the last item_line as output of the internal table (it_bseg).

How can I get printed all the item_lines?

I have already searched this problem, but they didnt solve my problem.

Thanks in advance.

A.

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Refer the below thread, it may help you to close the thread.

[Only Last Line item is printing|;

Regards,

SaiRam

Answers (1)

Answers (1)

Former Member
0 Kudos

At the time you enter the loop, in debug, how many rows are in it_bseg? One or ??

Former Member
0 Kudos

There are three lines in the internal tables. In debug it repeats 3 times, but in the fom, only last line is shown.

brad_bohn
Active Contributor
0 Kudos

That's the way page rendering works in SAPScript with a non-MAIN window. Why don't you use a MAIN window for that loop?

Former Member
0 Kudos

Hi Brad,

Now I am using Main window to write multiple lines. For that, I have made a Z copy of RFFORI01 "ZRFFORI01" and put my code there. But the content of the new windows is not shown.

Thanks

A.

brad_bohn
Active Contributor
0 Kudos

So you're working with the payment print program? Why can't you use the REGUP values? Why do you have a custom copy of the program and an internal for writing lines?

Former Member
0 Kudos

The problem is resolved. I added the code in the include file "ZRFFORI01" of "ZRFFOUS_C".

Thanks

Alam