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

select-options

Former Member
0 Likes
912

Hi Guys,

can anyone tell me what is the use of <b>memory id</b> in select-options.

e.g -- SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.

please reply its urgent.

8 REPLIES 8
Read only

anversha_s
Active Contributor
0 Likes
881

hi,

1. When u use memory id, make sure of the

following points.

a) The memory id is SAME as the variable name

b) Memory id should be in CAPITAL

c) When u want to import,

the variable name should be same as original one,

and should be declared in the same fashion only.

*-------- for Z1
report zmem_sha.
DATA : PERNR LIKE P0001-PERNR.
PERNR = '00004556'.
EXPORT PERNR TO MEMORY ID 'PERNR'.
CALL TRANSACTION 'ZTR01'.

*-------- For Z2 (having tcode ZTR01)
report abc.
DATA : PERNR LIKE P0001-PERNR.
IMPORT PERNR FROM MEMORY ID 'PERNR'.
BREAK-POINT.

Regards,

Anver

Read only

Former Member
0 Likes
881

Hi......

If u assign a memory id for a select-option, that select-option will get the value stored in that select memory id when the program is executed.......

To export a value to a memory id(SAP Memory) use the statement:

SET PARAMETER ID.....

statement.

Reward points if useful.

Suresh......

Read only

Former Member
0 Likes
881

here s_mblnr-low is associated with the sap memory id 001. so the value it will set and get from the last value in memory id . in a easy way when you are running a report after report display if you come back the select-option will be blank but if you are using memory id for the select option and running the report and come back it will contain the data that you have entered last in that select option.

the data is comming from the memory id.

regards

shiba dutta

Read only

Former Member
0 Likes
881

Hi,

Assigns the memory ID PID to the parameter. When selection screen appears, the input field contains the last value entered by the user in a filed with memory ID PID.

Please allot the points if it's usefull.

Regards,

Raja

Read only

Former Member
0 Likes
881

Hello ,

It is used to retrieve last field value, each time you call particular pgm .

For eg if you run pgm with below code , on selection screen you will get the

name of the last program ran ..try it

SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.

Thanks .

Read only

Former Member
0 Likes
881

hi,

The use of memory-id is,

Input fields on screens can be linked with parameters in the SAP memory, which allows you to preassign values to the input fields on initial screens.

With general screens ( without memory-id ), the linking takes place during the definition of the screen using the Screen Painter tool.

jus go thru' this simple program...

REPORT ZTESTING .

PARAMETERS test(16) TYPE c MEMORY ID rid.

WRITE TEST.

Thanks & Regards,

Senthil kumar...

Read only

Former Member
0 Likes
881

p347633,

When you give the memory id ,it will assign that screen with given ID no. to screen group in memory.when you want dynamic screen validations you can use this id and do the cahnges on scree.

Ex : you have 2 radio button "A" and "B".

Input fields " 1" and " 2" on selection screen.

rerquirement is, when you click radio button "A" only input field "1" has to display on selection screen. Input field "2" should disable.

when you click radio button "B" only input field "2" has to display on selection screen. Input field "1" should disable.

Pls. mark if useful

Read only

Former Member
0 Likes
881

Hi,

The statement:

SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.

links the field s_mblnr with the parameter 001. Any value stored in the memory id 001 is reflected in the select options input field. This value is stored in the SAP global memory hence, it is available to a user during the entire duration of a terminal session. This allows you to preassign values to the input fields on initial screens.

Please award points if found useful.