2013 Nov 21 8:23 AM
Hi,
I have given below command in SAP script main window.
/: IMPORT WA_FINAL FROM MEMORY ID 'CTAB'.
But it is not importing WA_FINAL values from memory.
Is there any other way to import from memory in sapscript?
Regards,
2013 Nov 21 8:48 AM
Hi Santosh
You can do as follow.
Create subroutine pool and define a subrotuine which will do this import stuff. Then in your SAP script use program syntax for perform f_get_import using abc changing .
by the way where are you exporting the values..we can do through other means. Please tell us about what you intend to do
Nabheet
2013 Nov 21 8:46 AM
Hi Santosh,
You cannot simply write ABAP code in an SAP Script.
Only a few commands are available, or, in my opinion, the best you can do is call a subroutine in an external program and perform the IMPORT command in that subroutine.
Please follow this link for available statements in SAP Script and an example of what I just mentioned.
http://wiki.scn.sap.com/wiki/display/ABAP/SAP+Scripts+in+Detail
Kind regards,
Bruno Esperança
2013 Nov 21 8:49 AM
Or, now that I think about it, even better would be to do that in the printing program into a global variable that you would simply use in the SAP Script. Why would you need to perform the IMPORT in the SAP Script?
Kind regards,
Bruno
2013 Nov 21 8:47 AM
Why do you need to IMPORT in SAPSCRIPT where you can pass the internal table easily.
2013 Nov 21 8:48 AM
Hi Santosh
You can do as follow.
Create subroutine pool and define a subrotuine which will do this import stuff. Then in your SAP script use program syntax for perform f_get_import using abc changing .
by the way where are you exporting the values..we can do through other means. Please tell us about what you intend to do
Nabheet
2013 Nov 21 10:33 AM
I am using one standard program where I will do export in user exit. In sapscript i m using few fields which are not there in standard structure. So from standard program user exit I will export the work area and import the same work area in sapscript. This way I dont need to append the standard structure.
2013 Nov 21 10:45 AM
Santosh
Simple approach is Create a custom subroutine pool. add a subroutine there which will fetch this exported values.
You call this subroutine in your Script using PERFORM statement. It will work
Nabheet
2013 Nov 21 12:40 PM
It is common practice to copy the standard printing program to a Z (custom) printing program. The program that is called to perform the output is customizable through configuration (SPRO). It seems to me that this would be much simpler (and easier) to maintain if you performed what you are trying to achieve through the printing program.
Just a suggestion.
Kind regards,
Bruno Esperança