‎2009 Apr 09 10:26 AM
Hi,
I am getting syntax error while using get parameter ID.
Statement used is:
Get parameter ID 'ZID' field l_emplist.
l_emplist is the structure in which some fields are of type packed decimal.
How to convert packed decimal to char type fields.
Please help.
‎2009 Apr 09 10:29 AM
HI,
l_emplist should be of char data type.
Refer to thsi link..[PARAMETER ID |http://help.sap.com/saphelp_nw70/helpdata/en/9f/db9e0435c111d1829f0000e829fbfe/frameset.htm]
‎2009 Apr 09 10:29 AM
Try passing the value as:
DATA: p_id TYPE tpara-paramid VALUE 'XYZ'
then...
GET PARAMETER ID p_id FIELD <field>.
Regards.
Edited by: rajan roy on Apr 9, 2009 11:36 AM
‎2009 Apr 09 10:30 AM
‎2009 Apr 09 10:32 AM
Hi,
Move i_emplist to a char datatype and then use get statement.
‎2009 Apr 09 10:33 AM
Hi, You are trying to get the data and store it in i_emplist right? Please have the data types of i_emplist similar to the of the data stored in ZID.
‎2009 Apr 09 10:52 AM
Hi Priya,
How to know the data structure of parameter ID 'ZID'.
‎2009 Apr 09 10:59 AM
You cannot get or set
structures/tablesonly
char type fields less than 20 charscan be set or get .
Rhea.
‎2009 Apr 09 11:05 AM
Rhea, we can pas structure in field.
Length 20 needs to maintained for parameter ID <PID>.
PID should not exceed length 20 char.
‎2009 Apr 09 11:11 AM
Check F1 help.
Syntax
GET PARAMETER ID pid FIELD dobj.
Effect
This statement sets the content of the data object dobj to the content of the SPA/GPA parameter
specified in pid. pid must be a flat character-type field that contains no more than 20 characters and
does not consist solely of blanks; it is also case-sensitive. dobj must be a flat and (as of Release 6.10)
character-type field into which the binary content of the SPA/GPA parameter is transferred unconverted.
Rhea.
Edited by: rhea on Apr 9, 2009 12:12 PM
‎2009 Apr 09 11:53 AM
Thanks for clarification Rhea.
I am also saying the same thing.
PID can be only 20 char length but dobj passed is structure in my case.
Please let me know how can I resolve this issue.
can we use Import Export statements instead of SPA/GPA.
‎2009 Apr 09 11:59 AM
u missed this part.
dobj must be a flat and (as of Release 6.10)
character-type field into which the binary content of the SPA/GPA parameter is transferred unconverted.
Rhea.
‎2009 Apr 09 12:01 PM
HI,
Generally Parameters are assigned to the Data Elements. So you cannot get the data from the parameter id to the structure.
If you want to import the data then some where data need's to be exported in that case you can use the import/export statements.
What exactly is your requirement ?
‎2009 Apr 09 12:06 PM
Hi Avinash,
In my program set and get parameter IDs are used passing structure in the field.
But that structure is not having all the fields as char type, some of them are packed decimal.
So it gives syntax error.
Do we have any other way around instead of passing the structure fields to char type fields and then passing that char type structure to SPA/GPA statements?
‎2009 Apr 09 10:34 AM