‎2006 Mar 21 8:33 AM
Hello experts,
can I put in a SAPscript window codes like read table, select statement, call function, etc?if not, where would I put conditions like if sy-subrc = 0? because I have a conditon that after calling function 'READ_TEXT' I would check if the sy-subrc = 0 else I would do another select statement and check again its sy-subrc. Thanks guys!
‎2006 Mar 21 8:41 AM
u can not use code like read table or select in sap script form...
for select and all the coding driver program is present..
either u used perform statement ....
Message was edited by: kishan negi
‎2006 Mar 21 8:46 AM
hi viray,
u can't use these codes like READ , CALL FUNCTIONS in sap script windows..
u can use these functions in a separate driver program in se38 and link to the sap script form using the function OPEN_FORM..
CALL FUNCTION 'OPEN_FORM'
EXPORTING
dialog = 'X'
form = '<form name>'
language = sy-langu.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
<b>reward if useful...</b>
Message was edited by: Ashok Kumar Prithiviraj
‎2006 Mar 21 8:53 AM
Hi Vijay,
You can call performs inside your Script. inside the subroutine you can write what ever you want you can place. since the subroutine will be called from SAP SCRIPT only.
Regards
Vjay
‎2006 Mar 21 8:59 AM
Hi,
you can actually call form routines from your SAPscript window. Combined with IF statements (also available in SAPscript) you maybe able to accomplish what you need to do.
You can find information on all available SAPscript control commands in <a href="http://help.sap.com/saphelp_46c/helpdata/en/d2/cb3d07455611d189710000e8322d00/frameset.htm">help.sap.com</a>.
If you open <i>SAPscript Control Commands</i> you find the following 2 commands that may help you:
- Conditional Text: IF
- Call ABAP Subroutines: PERFORM
Regards,
Claus
‎2006 Mar 21 9:09 AM
Just to add to the previous comments slightly.
You can include text objects (rather than use the READ_TEXT FMs)to make your life easier, if you want to do calculations do them in your print program and remember that PERFORMS are done at runtime so can affect performance.
Hope this helps.
Rgds
Rosie Brent