2009 Jan 26 9:56 PM
Hi,
Please help in regards to the following:
From the SAPscript form, I need to obtain 2 things using the PERFORM command:
1) Address of the company code, passing BKPF-BUKRS
2) 2 fields from table EINE, passing EINA-INFNR
How do I get these?
I have looked at several online tutorials on calling a subroutine from a SAPscript.
However, I do not understand them.
Please help.
Thanks,
John
2009 Jan 26 10:34 PM
Hi John,
Inside your SAPScript you can use PERFORM command like given below
/: PERFORM <form> IN PROGRAM <prog>
/: USING &INVAR1&
/: USING &INVAR2&
.....
/: CHANGING &OUTVAR1&
/: CHANGING &OUTVAR2&
.....
/: ENDPERFORM
<prog> mentioned in the above PERFORM command refers to the print program and subroutine exits in the print program.
Make sure you enter subroutine name, print program name and parameters correctly. Parameters can be USING or CHANGING parameters based on your requirement.
Please create sub-routine in your print program which perform data fetching company address and fields from EINE.
Best Regards,
Krishna
2009 Jan 26 10:36 PM
How do you pass address information to a table of structure ITCSY?
From http://help.sap.com/saphelp_46c/helpdata/en/d1/803279454211d189710000e8322d00/frameset.htm
Definition in the SAPscript form:
/: PERFORM GET_BARCODE IN PROGRAM QCJPERFO
/: USING &PAGE&
/: USING &NEXTPAGE&
/: CHANGING &BARCODE&
/: ENDPERFORM
/
/ &BARCODE&
Coding of the calling ABAP program:
REPORT QCJPERFO.
FORM GET_BARCODE TABLES IN_PAR STUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
2009 Jan 26 10:45 PM
Hi John,
Can you please tell me in your PERFORM command in sap-script what you wish to pass and what you are expecting back from sub-routine.
Regards
Krishna
2009 Jan 26 11:19 PM
Well, from the perform I will pass the company code.
In the form, I will need to go to V001, get the address number and then get the address details from ADRC.
While I can pass each field one by one to the SAPscript, can't I just pass the full ADRC record?
2009 Jan 27 12:30 AM