cancel
Showing results for 
Search instead for 
Did you mean: 

SAPSCRIPT

vallamuthu_madheswaran2
Active Contributor
0 Kudos

hai,

i am new in the script, now i want to print the multiple line item in the ouput. where to use loop/select-endselect

thanks & regards

vallamuthu

Accepted Solutions (0)

Answers (7)

Answers (7)

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Solved myself

Former Member
0 Kudos

Hello,

To print multiple line items,

1.Move all the line items into a internal table.

2.In the Script form u have to display all the line items fields u want, u should place a text element before the line items.

Example:Itab consists of line items

/e Line_items

p1 itab-lineitem1

3.Coming to program u have to loop the write_form with text element line_items.

Example:

loop at itab.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = line_item

window = main

EXCEPTIONS

element = 1

function = 2

type = 3

unopened = 4

unstarted = 5

window = 6

bad_pageformat_for_print = 7

OTHERS = 8.

IF sy-subrc <> 0.

PERFORM protocol_update.

ENDIF.

endloop.

Hope this helps.Let me know if u still face any problem

Regards

Former Member
0 Kudos

The below should be the general logic using the below function.

OPEN_FORM.

Loop at itab.

at first.

START_FORM.

endat.

WRITE_FORM.

at last.

END_FORM.

endat.

endloop.

CLOSE_FORM.

Former Member
0 Kudos

Hi vallamuthu madheswaran

Sorry by mistake i gave solution of some others problem.

Regards

Kapil

dani_mn
Active Contributor
0 Kudos

HI,

FOR SAPSCRIPT.

1. using tcode 'SE71' create a sapscript form.

2. create text-elements using '\E' in the main window or where you required.

FOR driver program.

1. fill your internal table using select.

2. use 'OPEN_FORM' to open the sapscript form.

3. Loop through your internal table and use 'WRITE_FORM' to print the data. mention the window name and

'Text Element' to be used.

4. use 'CLOSE_FORM' at end.

REgards,

Former Member
0 Kudos

Hi ,

To fina a enhacment for a specific Tcode.

get the dev class of tcode from se93 tcode

goto tcode SMOD , enter f4 on enhacment enetr the dev class u will find all the enhancment related to that tcode.

then reading the description u can decide which enhamcment is useful.

reward points if helpful

Regards

Kapil

Former Member
0 Kudos

Hi,

In your driver program 'wrire_form' should be in loop endloop.

Thank you,

Ramu N.