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

selection screen

Former Member
0 Likes
565

hello!

I have created a program with selection screen.

I used the export command and sent the values to memory id xxx.

Now on my other program i want to get the values to my selection screen.

in the second prog in the initialization i used the import command ,but it doesn't work.

How can i get the values of the fields from my first prog and show them in the selection screen of my second prog?

regards

yifat

6 REPLIES 6
Read only

Former Member
0 Likes
536

u r transfering the data from one session to another session so use SAP memory.

in first selection program use

SET PARAMETER ID 'AAA' FIELD '<fieldname>'.

In the second selection program use.

GET PARAMETER ID 'AAA' FIELD '<fieldname>'.

Read only

Former Member
0 Likes
536

hi!

If i have created the fields also the data element,

how can i use the SET//GET parameter option.

regards

yifat

Read only

0 Likes
536

Rather than going for the global SAP memory, I would rather use the EXPORT / IMPORT commands.

In the program that is setting the values, use the EXPORT command to set the values in the memory.

In the selection screen of the second program, use the IMPORT command, get the values and assign the same to selection screen fields.

Note the names of the variables in the both programs should be exactly the same.

Help for the same

http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3bd1358411d1829f0000e829fbfe/content.htm

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
536

hello ravi!

thanks for your answer.

thats excatly what i did. in the first program i used the export and in the second program i used the import. everything is exactly the same also the name of the memory fields, and also the name of the fields in the selection screen.

but at the import i didnt gat any values!!! what might be the problem?

also how do i assign the fields after the import commant ( in initialization phase)

regards

yifat

Read only

0 Likes
536

Try this

TEXT2 is the variable that you have used in the EXPORT program

'text' is the MEMORY ID in the export program.

IMPORT TEXT2 TO TEXT1 FROM MEMORY ID 'text'.

Now, in the intializations to the set the value of parameter P_PARAMETER

P_PARAMETER = TEXT1.

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

Former Member
0 Likes
536

hi ,

<b>in prog a</b> ..maintain like this ..


DATA  matnr  like mara-matnr VALUE 'compaq'.
SET PARAMETER ID 'V01' FIELD matnr.   "setting up the id ..

<b>in prog b</b> , maintian like this.

parameters : p_matnr like mara-matnr.  " value captured over here
initialization.                       "----> u need to place this
DATA : matnr LIKE mara-matnr.
GET PARAMETER ID 'V01' FIELD MATNR.
p_matnr = matnr.
write:/ MATNR.

just take two temp programs and execute the code .

hope this helps ,

regards,

vijay