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

get paramater id with type range ?

LGA
Participant
0 Likes
1,043

Hello,

I have a selection screens that contains a field of type SELECT-OPTIONS and I'd like to retrieve the value of this field.
I declared a variable Range but when I use the instruction
get paramater id 'XX' FIELD l_var, it shows me an error saying that the variable should be type c, d or p.

thanks.

Hello,

I have a selection screens that contains a field of type SELECT-OPTIONS and I'd like to retrieve the value of this field.
I declared a variable Range but when I use the instruction
get paramater id 'XX' FIELD l_var, it shows me an error saying that the variable should be type c, d or p.

thanks.

6 REPLIES 6
Read only

Former Member
0 Likes
947

Hi,

You can only assign the value of the PID to a single field, not a structure (which is what your range is).

Use l_var-low to assign the PID value, then set l_var-sign to I and l_var-option to EQ.

Regards,

Nick

Read only

Former Member
0 Likes
947

Hi Lotfi,

you better to post your code for better understanding and it will help to give the solution ASAP.

Regards,

Sravan

Read only

Former Member
0 Likes
947

Hi,

Is the field declared as Select-Options of a standard type?

For example : for material number we use MATNR as the data element. If you go to SE11 -> Data Type -> MATNR ->Further Characteristics -> Parameter ID you will see 'MAT'. In this case you can use SET PARAMETER/GET PARAMETER.

Else you will have to declare a Memory ID and using Export/Import you will have to get the value. But first let us know what type is the select-option field as it can be only C, P or D as per the error its throwing for you.

Hope this helps!

Read only

Former Member
0 Likes
947

Hi,

Set parameter & Get parameter are used for single variable assignment.

Use Import & Export Parameters for range of data

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

Read only

Clemenss
Active Contributor
0 Likes
947

Hi galouul,

if you want to retrieve from inside the program, the select-options is a global internal table with header line and can be used anywhere.

if you wanna know from outside the program, please describe what you want to achieve and find some consultance here.

Regards

Clemens

Read only

RaymondGiuseppi
Active Contributor
0 Likes
947

Parameter ID only contains (at most) one value, where SELECT-OPTIONS are an internal table with header line ()

So either

  • Attach parameter ID to definition  and let SAP do the job.

SELECT-OPTIONS so FOR xxxx  MEMORY ID pid .

  • Or, in INITIALIZATION use the header work area before appending it to internal table

GET PARAMTER ID TO so-LOW.

so-SIGN = 'I'.

so-OPTIONS = 'EQ'.

APPEND so TO so.

Regards,

Raymond