2013 Apr 17 10:46 AM
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.
2013 Apr 17 10:58 AM
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
2013 Apr 17 10:58 AM
Hi Lotfi,
you better to post your code for better understanding and it will help to give the solution ASAP.
Regards,
Sravan
2013 Apr 17 11:26 AM
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!
2013 Apr 17 12:25 PM
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
2013 Apr 17 1:37 PM
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
2013 Apr 17 1:54 PM
Parameter ID only contains (at most) one value, where SELECT-OPTIONS are an internal table with header line ()
So either
SELECT-OPTIONS so FOR xxxx MEMORY ID pid .
GET PARAMTER ID TO so-LOW.
so-SIGN = 'I'.
so-OPTIONS = 'EQ'.
APPEND so TO so.
Regards,
Raymond
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |