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 parameter ID

Former Member
0 Likes
2,059

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.

14 REPLIES 14
Read only

Former Member
0 Likes
1,782

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]

Read only

Former Member
0 Likes
1,782

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

Read only

Former Member
0 Likes
1,782

Hi,

use UNPACK istruction.

Regards,

Leo.

Read only

Former Member
0 Likes
1,782

Hi,

Move i_emplist to a char datatype and then use get statement.

Read only

Former Member
0 Likes
1,782

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.

Read only

0 Likes
1,782

Hi Priya,

How to know the data structure of parameter ID 'ZID'.

Read only

0 Likes
1,782

You cannot get or set

structures/tables

only

char type fields less than 20 chars

can be set or get .

Rhea.

Read only

0 Likes
1,782

Rhea, we can pas structure in field.

Length 20 needs to maintained for parameter ID <PID>.

PID should not exceed length 20 char.

Read only

0 Likes
1,782

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

Read only

0 Likes
1,782

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.

Read only

0 Likes
1,782

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.

Read only

0 Likes
1,782

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 ?

Read only

0 Likes
1,782

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?

Read only

Former Member
0 Likes
1,782

Yes Avinash is right, Maximum char lengh can be 20.