on 07-31-2007 4:23 PM
Hi all,
How do I pass the object key information when calling a sapscript form in a Zprogram. For example, where do I indicate the Po number or PR requisition when calling the form.
Thank you.
Monica.
Hi Monica,
You cant directly pass the value of PO, PR or any other value directly to the SAP script. You need to mention those as symbols in the SAP Script editor and use appropriate function modules in your print program (zprogram).
1. Populate all the PO numbers and PR Numbers in an internal table it_tab
2. As usual, use OPEN_FORM, START_FORM to call the SAP script Layout.
3. Later on Loop at the it_Tab and use WRITE FORM.
Loop at it_tab.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'NUM'
WINDOW = 'MAIN' .
ENDLOOP.
4. Call END_FORM, CLOSE_FORM to close the SAP script layout.
4. In your SAP script MAIN window, write something like this..
/E NUM
&it_tab-PONUM& &it_Tab-PRNUM&
This should work. If so , pls reward points.
Regards,
Prasad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Rough idea, to call SAPScript from your program
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = 'XXX' "GIVe your form name
LANGUAGE = SY-LANGU.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = ELEMENT "IF you have any elements
WINDOW = WINDOW . "your window names, you can call write form many number of times and give all your window names
CALL FUNCTION 'CLOSE_FORM'
.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Monica,
You have to pass the value through a 'Text Element' by using the 'write_form' FM in the Zprogram.
For example, code in Zprogram:
number = 12345.
call function 'WRITE_FORM'
exporting
element = 'ZZ'.
Code in SapScrpt:
/E ZZ "ZZ is the text element
AB The PO is &number& "AB is the paragraph
Hope this helps.
Please reward if useful.
Thanks,
Srinivasa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
These values should be passed to the script through fucnction module WRITE_FORM.
http://www.allsaplinks.com/sap_script_made_easy.html
http://esnips.com/doc/1ff9f8e8-0a4c-42a7-8819-6e3ff9e7ab44/sapscripts.pdf
http://esnips.com/doc/1e487f0c-8009-4ae1-9f9c-c07bd953dbfa/script-command.pdf
http://esnips.com/doc/64d4eccb-e09b-48e1-9be9-e2818d73f074/faqss.pdf
http://esnips.com/doc/cb7e39b4-3161-437f-bfc6-21e6a50e1b39/sscript.pdf
http://esnips.com/doc/fced4d36-ba52-4df9-ab35-b3d194830bbf/symbols-in-scripts.pdf
Reward if helpful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.