cancel
Showing results for 
Search instead for 
Did you mean: 

Import values from memory id in SAPSCRIPT

Former Member
0 Kudos

Hi,

Is it somehow possible to import values from a memory id in a sapscript form.

The print program in my case is std prg for label printing. One of the fields used to display some info at output, is cleared in std driver program so I cannot modify that in driver program. As a remedy I was trying to export the value to a memory id in an enhancement point in driver prg & reading the memory in text-element within FORM logic. I am able to export values to memory id but "IMPORT from memory id" is not importing the values memory id while inside the form. Any other way to import some value in script other than sending it via driver prg. I have already checked for OSS notes but nothing exists.

I am working on a critical object & would highly appreciate any quick responses.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Amit,

You can import values from memory ID using the subroutine.

Create a subroutine in subroutine pool/report for that,

Use below syntax in Script

/: DEFINE &VAR&

/: PERFORM ABC IN PROGRAM 'ZSUBROUTINE_POOL'

/: CHANGING &VAR&

In Subroutine pool/Report Write below logic

FORM ABCTABLES in_tab STRUCTURE itcsy

out_tab STRUCTURE itcsy.

*Import value here

out_tab-value = imported value.

MODIFY out_tab FROM out_tab TRANSPORTING value WHERE name = 'VAR'.

Endform.

Edited by: Anil Mane on Jan 19, 2010 11:36 AM

shaik_sajid
Active Contributor
0 Kudos

hi,

i am not sure if my solution will work.but may be u can give a try.

In the sapscript, when you go inside window and click on text elements and then to change editor.

there is a command line which looks like this /:

Give this command line and write import.

try out, if it works then its good.

Regards

Sajid