Application Development 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: 

Set and Get Parameter ID

Former Member
0 Kudos

Hi All,

I have two Abap programs and in one program I was set the value Globally. The code is,

DATA: para1(10) VALUE 'DATA',
        para2(10).

  SET PARAMETER ID: 'zgbl' FIELD para1.

In the second program I used the Get parameter ID.

data : para2(10).
get PARAMETER ID 'zgbl' field para2.

if sy-subrc eq 0.
write : para2.
ELSEIF sy-subrc eq 4.
write : 'Not Found'.
  endif.

But it didnt work and the Sy-subrc is always 4.

Can any one Help Me.

Helps will be appreciated.

1 ACCEPTED SOLUTION

former_member209217
Active Contributor
0 Kudos

Hi Nandini,

I executed the same program in my system.Its working Fine.

Use 'ZGBl' in between quotes.

But it wont make any difference since ur using 'zgbl' in both programs.

Regards,

Lakshman.

Edited by: Lakshman N on Jun 25, 2009 2:03 PM

8 REPLIES 8

Former Member
0 Kudos

Dnt know hw exactly u using the get and set para

Use 'ZGBL' instead of zgbl

if doesnt works paste your code

Bhanu

0 Kudos

Thanks For the reply Bhanu. I changed it to Upper case. But Still it didn't work.

former_member209217
Active Contributor
0 Kudos

Hi Nandini,

I executed the same program in my system.Its working Fine.

Use 'ZGBl' in between quotes.

But it wont make any difference since ur using 'zgbl' in both programs.

Regards,

Lakshman.

Edited by: Lakshman N on Jun 25, 2009 2:03 PM

former_member555112
Active Contributor
0 Kudos

Hi,

Is the parameter id zgbl created.

Also type the parameter id name in capital

Do F1 help of parameter id. It is mentioned.

"For a SPA/GPA parameter specified in pid to match a name in the database table TPARA, it must be entered in upper case. "

Regards,

Ankur Parab

0 Kudos

Hi All,

Thanks for the replies. I changed it to Caps and I checked the Tpara table too. It has the Entery. But still the problem is there.

Thanks.

Former Member
0 Kudos

Hi,

SET PARAMETER ID: 'zgbl' FIELD para1.

In the above statement enter the PID in upper case ie. 'ZGBL'. Do the same for GET PARAMETER ID as well.

Hope this will work.

Also do the extended prog check for your program.

Also check if entry exists in table TPARA.

If there is no entry in TPARA then there is some thing going wrong with the coding which you can trace out with EPC check.

Regards

Kiran.

Edited by: kiran Pasala on Jun 25, 2009 2:08 PM

0 Kudos

Hi,

Just debug and check if the value is present in the SPA/GPA memory.

Regards,

Ankur Parab

Former Member
0 Kudos

Thanks All. Now suddenly its working Fine. I need to do some research on it. Thanks.