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

Importing value from memory id

former_member199650
Participant
0 Likes
2,251

Hi everyone,

Please guide me how to retrieve a value from a memory id as given below:

SELECT-OPTIONS ableinh FOR eabld-ableinh

MEMORY ID tae.

Please guide me how to retrieve the value from memory id.

I am writing the following the statement for the above purpose:

import tae from memory to v_ableinh.

Please guide me for the same.

Thanks and Regards

1 ACCEPTED SOLUTION
Read only

venkat_o
Active Contributor
0 Likes
2,047

Hi, <li>When you give MEMORY <mid> to SELECT-OPTIONS is equivalent to the below statement.


GET PARAMETER ID 'TAE' FIELD ableinh-low.
<li>The value in the memory id TAE is displayed on SELECT-OPTIONS when this program is called after setting the below one in some other program.

 SET PARAMETER ID 'TAE'  FIELD ableinh-low. 
 CALL TRANSACTION 'XYZ' AND SKIP FIRST SCREEN. 
<li>Check the link below for reference. [http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba6eb35c111d1829f0000e829fbfe/content.htm|http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba6eb35c111d1829f0000e829fbfe/content.htm] Thanks Venkat.O

16 REPLIES 16
Read only

venkat_o
Active Contributor
0 Likes
2,048

Hi, <li>When you give MEMORY <mid> to SELECT-OPTIONS is equivalent to the below statement.


GET PARAMETER ID 'TAE' FIELD ableinh-low.
<li>The value in the memory id TAE is displayed on SELECT-OPTIONS when this program is called after setting the below one in some other program.

 SET PARAMETER ID 'TAE'  FIELD ableinh-low. 
 CALL TRANSACTION 'XYZ' AND SKIP FIRST SCREEN. 
<li>Check the link below for reference. [http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba6eb35c111d1829f0000e829fbfe/content.htm|http://help.sap.com/saphelp_47x200/helpdata/en/9f/dba6eb35c111d1829f0000e829fbfe/content.htm] Thanks Venkat.O

Read only

0 Likes
2,047

Thanks for your reply please.

Please guide me with some example that how to use the value of this selection parameter in a different exit which indirectly being called by this program.

Actually when we use t code EL35, we provide the MRUs in the field for MRUs, along with a form for Downloading MROs.

In the form, i want the selected MRUs information from selection screen, but i have not been able to find the information.

The selection parameter for MRU is as follows:

field name: ABLEINH

Parameter Id: TAE.

In the standard program RELEABL1, it is defined as

SELECT-OPTIONS ableinh FOR eabld-ableinh

MEMORY ID tae.

Please guide me how can i use ableinh in my Z form for Meter Reading Download. As there, if i try to mention this variable, it is not recognizing it.

Please guide.

Thanks and Regards

Edited by: MP Vashishth on Mar 6, 2010 1:01 PM

Edited by: MP Vashishth on Mar 6, 2010 1:02 PM

Read only

0 Likes
2,047

Hi,

You need to use the get parameter ID statement to retreive the values. Data is placed in SAP memory.

Thanks,

Vinod.

Read only

0 Likes
2,047

Thanks for your reply please.

Now i am able to fetch one value from the parameter id.

But if multiple values are passed in the PARAMETER then, i am able to get only one value there. Please help and guide me, how can i fetch all the values passed in the selection parameter whose parameter id we know.

Screen-field for batch input is : EABLD-ABLEINH

field name: ABLEINH

Parameter Id: TAE.

In the standard program RELEABL1, it is defined as

SELECT-OPTIONS ableinh FOR eabld-ableinh

MEMORY ID tae.

Please guide.

Thanks and Regards

Edited by: MP Vashishth on Mar 6, 2010 2:16 PM

Edited by: MP Vashishth on Mar 6, 2010 2:17 PM

Read only

venkat_o
Active Contributor
0 Likes
2,047

Hi Vashishth, <li>Using SET/GET PARAMETER ID, we can pass only one value . That is for sure. You can't pass multiple values. <li>How are you calling RELEABL1 from your Z* program. Are you calling RELEABL1 program using SUBMIT statement or CALL TRANSACTION statement ? Thanks Venkat.O

Read only

0 Likes
2,047

Hi,

If you want to get multiple values, then instead of using parameter ID in the definition use EXPORT and IMPORT statements.

eg:

EXPORT so_matnr[] TO MEMORY ID 'MATNR1'.

IMPORT so_matnr[] FROM MEMORY ID 'MATNR1'.

There are various additions of export/import. Please check F1 help for more details.

thanks,

Vinod.

Read only

Former Member
0 Likes
2,047

Hi,

If you would like to exchange Multiple line items of data, better to use EXPORT, IMPORT statements;

Using Export and Import you can exchange a Internal table with any number of records., through out the memory........

Press F1 on EXPORT statement for exact syntax.........

Regards,

Shravs

Read only

0 Likes
2,047

Hi,

Thanks for your reply please.

But my Z form is being called by RELEABL1.

Please guide.

Thanks and Regards

Read only

Clemenss
Active Contributor
0 Likes
2,047

Hi MP,

use this:

field-symbols:
  <ABLEINH> type table.
data:
  lt_r_ABLEINH type range of ABLEINH.
ASSIGN '('RELEABL1')ABLEINH[]' TO <ABLEINH>.
 lt_r_ABLEINH = <ABLEINH>.

lt_r_ABLEINH is the selection-screen range of Meter Reading Units.

Regards,

Clemens

Read only

0 Likes
2,047

Hi,

Thanks for your reply please.

But i am getting the following error message in my program 'RELEABL1 ')ABLEINH[]'" is not expected" and "After "'('", there must be a space or equivalent character (":", ",","

Please guide me should i need to include the RELEABL1 program in my Z Program to access these values if yes then please guide me how to do it.

Please guide.

Thanks and Regards

Edited by: MP Vashishth on Mar 8, 2010 1:43 PM

Edited by: MP Vashishth on Mar 8, 2010 1:44 PM

Edited by: MP Vashishth on Mar 8, 2010 2:14 PM

Edited by: MP Vashishth on Mar 8, 2010 2:51 PM

Edited by: MP Vashishth on Mar 8, 2010 3:44 PM

Read only

Former Member
0 Likes
2,047

Hi,

Please check the type of 'RELEABL1' like I guess it may type range .

then you have to convert the value you are getting through memory to the type of parameter RELEABL1' .

also think you are getting the value from memory is in the format of Select options .i.e

low,high ,value ,sign ,once you check this your problem will get solved.

Regards,

Kiran Kumar

Read only

Former Member
0 Likes
2,047

Hi,

Please check the type of 'RELEABL1' like I guess it may type range .

then you have to convert the value you are getting through memory to the type of parameter RELEABL1' .

also think you are getting the value from memory is in the format of Select options .i.e

low,high ,value ,sign ,once you check this your problem will get solved.

Regards,

Kiran Kumar

Read only

Clemenss
Active Contributor
0 Likes
2,047

Hi,

sorry, my fault. I was confused:

field-symbols:
  <ABLEINH> type any.
data:
  lt_r_ABLEINH type range of ABLEINH.
ASSIGN ('(RELEABL1)ABLEINH[]') TO <ABLEINH>.
 lt_r_ABLEINH = <ABLEINH>.

This is an undocumented form of dynamic ASSIGN. There was documentation in earlier releases stating that you should not use it because it can be changed incompatibly by SAP at any time. That was more than 10 years ago.

Regards,

Clemens

Read only

0 Likes
2,047

Hi,

Thanks for your reply please.

Many thanks to you and everybody whoever give time to help me.

Thanks to everybody.

The goal is acheived. All your suggestions are highly appreciated.

Thanks and Regards

MP Vashishth

Edited by: MP Vashishth on Mar 9, 2010 6:13 AM

Read only

Clemenss
Active Contributor
0 Likes
2,047

Hi MP Vashishth,

Try F1. What do you see?

Regards,

Clemens

Read only

0 Likes
2,047

Hi,

I want to access the selection parameters values passed through MRU field in transaction code: EL35.

There we provide a form for MRO Download as selection parameter.

I want to find all the selection parameter values passed through field MRU in tcode el35 in my MRO Download program.

In the program it runs for each MRU one by one but i want to know all the values of MRUs passed in the MRU field at one go.

Please guide.

Thanks and Regards

Edited by: MP Vashishth on Mar 8, 2010 12:02 PM