cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in SAPScript.....

Former Member
0 Kudos

Hi all,

I have a requirement in cheque printing where i have to print the accounting line items. I created a new window after the main window and passed these details to the from, but nothing got displayed in the form. But when i removed the element in the script, and called the write_function without an element, only the last iem was printed. What should i do?>.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

The MAIN window is the only one that scrolls. If you feed anything else with a loop it will just print the last entry. You'll need to pass each line of the table as an individually named parameter.

i.e.

Print program

read table itab index 1 into wa1.

read table itab index 2 into wa2.

read table itab index 3 into wa3.

SAPScript

/E Accounting line items

AL &wa1&

AL &wa2&

AL &wa3&

Former Member
0 Kudos

Hi,

Why you are not printing line items in Main Window it self?

Have you entered the Element name correctly?

Former Member
0 Kudos

I cant print in the main window because i have to restrictions as i am using a preprinted stationary.

I have given the correct name for the element.

*print the line item

LOOP at t_ac_final.

*pass to the form

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ZAC'

WINDOW = 'WINDOW6'

EXCEPTIONS

OTHERS = 10.

endloop.