cancel
Showing results for 
Search instead for 
Did you mean: 

steps to create a sap script

Former Member
0 Kudos

Please i want one sample with steps to create a sap script .

girish

Accepted Solutions (0)

Answers (7)

Answers (7)

Former Member
0 Kudos
Former Member
0 Kudos

Hi Girish,

go to se71->first u create the form.

there from PAGES AND WINDOWS OPTION , PLACE THE CONTROL ON MAIN WINDOW->EDIT->TEXT ELMENTS.

GOTO->CHANGE EDITOR

THERE GIVE FOLLOWING.

/E ELE1

  • &ITAB-VBELN&

  • &ITAB-ERDAT&

  • &ITAB-NETWR&.

F3->SAVE AND ACTIVATE

AND IN THE PRINT PROGRAM

EXECUTE THE FOLLOWING CODE

REPORT ZUSC.

tables:vbak.

parametrs:ordno for vbak-vbeln.

data:begin of itab occurs 0,

vbeln like vbak-vbeln,

erdat like vbak-erdat,

netwr like vbak-netwr,

end of itab.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

FORM = 'form name '

LANGUAGE = SY-LANGU.

select vbeln erdat netwr from vbak into table itab where vben = ordno.

loop at itab.

CALL FUNCTION 'START_FORM'

EXPORTING

FORM = ' ' "GIVE U R FORM NAME ,LANGUAGE,START PAGE

LANGUAGE = ' '

STARTPAGE = ' '.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ele1 ' (this one u have to give in mainwindow->edit->text elements)

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN'.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'ELE1 '

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN'.

CALL FUNCTION 'END_FORM'.

ENDLOOP.

CALL FUNCTION 'CLOSE_FORM'.

save,activate and execute

I think it will useful for u.

Reward points if useful.

Thanks,

Usha.

Former Member
0 Kudos
Former Member
0 Kudos

Hi

This is very good and helpful

Link for SAP Scripts (step by step procedure)

<b>http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Create_A_SAPSCRIPT_Form/How_to_Create_SAPSCRIPT.html</b>

Regards

Anji

Former Member
0 Kudos

Hi

GO to this link YOu will get the steps HOw to create script.

http://sap-img.com/sapscripts.htm

THnaks,

Prashant.

Former Member
0 Kudos

Hi,

check this link

http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp

For the sapscript tutorial

Thanks

Naren