Skip to Content
0
Former Member
Apr 05, 2007 at 12:03 PM

Printing different values for same variable in variable window of SAPScript

29 Views

Hello All,

In a variable window of a SAP Script, I need to print call an element multiple times from the print program and print a variable value.

Print Program

______________

Loop at itab.

var1 = itab-f1.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

window = p_window

element = p_element

function = c_append

EXCEPTIONS

element = 1

window = 2.

Endloop.

_______________

SAP Script

_______________

/E p_element

  • var1

But the problem happening with this is - since for a variable window, elements are not starightaway printed when write_form is called, but before close_form is called, only the latest value of var1 (i.e. for the last row of itab) is getting printed

in all cases instaed of the different values.

Could anyone please suggest a workaround for this.

Regards

Indrajit