Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

SAP script import from memory id

former_member599326
Participant
0 Likes
1,081

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,

1 ACCEPTED SOLUTION
Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
864

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

7 REPLIES 7
Read only

bruno_esperanca
Contributor
0 Likes
864

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

Read only

0 Likes
864

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

Read only

davis_raja
Active Participant
0 Likes
864

Why do you need to IMPORT in SAPSCRIPT where you can pass the internal table easily.

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
865

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

Read only

0 Likes
864

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.

Read only

0 Likes
864

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

Read only

0 Likes
864

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