cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Script .........Need Example

Former Member
0 Kudos

Hii Guyz..

Can anybody tell me how to print line items one by one from internal table into SAP script....

eg.

No. name quant..

1 xyz 5

2 sdf 7

etc.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You have to create a Text Element and under it write the value that u want to print.

And call this part of Form using the FM

WRITE_FORM and pass the Text Element name in Export Parameter

Former Member
0 Kudos

/E ITEM -


Start of Text Element

/: TOP

/: POSITION WINDOW

/: BOX WIDTH '185' MM HEIGHT '10' MM FRAME 10 TW

P3 ,,Qty,,Description/Invoice for Customs,,Product Ref/Serial No.,,Unit

Price,,Net Amount,,Vat Rate

/: IF &PAGE& = '1'

/: BOX YPOS '10' MM WIDTH '185' MM HEIGHT '97' MM FRAME 10 TW

/: ELSE

/: BOX YPOS '10' MM WIDTH '185' MM HEIGHT '220' MM FRAME 10 TW

/: ENDIF

/

/

/: ENDTOP

/: BOTTOM

/* IF &W_FLAG8& = ''

P7 ,,,,,,,,,,,,,,,,,,,,,,,,Transactions continue on Page &NEXTPAGE&

/* ENDIF

/: ENDBOTTOM

/: PROTECT

M1 ,,&w_vbrp-fkimg1&,,&w_vbrp-arktx&,,&w_vbrp-matnr&,,&W_VBRp-KZWI2&,,

the above logic has to be written in a SAPSCRIPT Form and below u have to write in the calling program

LOOP...

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'ITEM'

window = 'MAIN'.

ENDLOOP.

Make sure u use Main Window for printing it.

Message was edited by:

Utsah Garg

Former Member
0 Kudos

Thnx.......the code i knew....but which window to write i didn't knw....

Thnx.

Answers (1)

Answers (1)

former_member673464
Active Contributor
0 Kudos

Hi..,

You can use header line or work area for displaying the table contents .In main area declare a text element and use header line or work area fields over there.In your pront program in loop at use function module <b>write_form</b> to display it using the same text element .

regards,

veeresh