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 not working

Former Member
0 Likes
3,694

i have used SET PARAMETER ID 'CAR' FIELD wa_sflight-carrid in PAI

this is working fine with sy-subrc = 0.

I am then using the below statement

load-of-program.

GET PARAMETER ID'CAR' FIELD wa_sflight-carrid.

however it is giving sy-subrc 4....what may be the reason...

parameterid is also OK for both set and get.

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,639

i have used SET PARAMETER ID 'CAR' FIELD wa_sflight-carrid in PAI

> this is working fine with sy-subrc = 0.

Afaik SET PARAMETER ID doesn't set the value of SY-SUBRC.

SY-SUBRC = 4, after GET PARAMETER ID => the parameter id doesn't exists in the SAP Memory for the current user.

Did you check the SAP Memory contents in the debugger? Does param id 'CAR' exist?

Please remember that LOAD-OF-PROGRAM event is triggered only once, when the program(executable program, module pool, function group, subroutine-pool) is loaded into the internal session.

BR,

Suhas

Edited by: Suhas Saha on Feb 22, 2012 12:12 PM

4 REPLIES 4
Read only

Former Member
0 Likes
1,639

Hi,

The SET and GET PARAMETER ID works as below:

SET PARAMETER ID 'CAR' FIELD wa_sflight-carrid

where wa_sflight-carrid is the field value that you want to store in the memory.

GET PARAMETER ID 'CAR' FIELD l_carrid.

where l_carrid is the field where you want to pass the value that was stored in the memory.This variable (l_carrid) must be of type C.

Check the above and i hope it serves useful to you.

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,640

i have used SET PARAMETER ID 'CAR' FIELD wa_sflight-carrid in PAI

> this is working fine with sy-subrc = 0.

Afaik SET PARAMETER ID doesn't set the value of SY-SUBRC.

SY-SUBRC = 4, after GET PARAMETER ID => the parameter id doesn't exists in the SAP Memory for the current user.

Did you check the SAP Memory contents in the debugger? Does param id 'CAR' exist?

Please remember that LOAD-OF-PROGRAM event is triggered only once, when the program(executable program, module pool, function group, subroutine-pool) is loaded into the internal session.

BR,

Suhas

Edited by: Suhas Saha on Feb 22, 2012 12:12 PM

Read only

Harsh_Bansal
Contributor
0 Likes
1,639

Hi,

Try giving Get.... in PBO(or in case of normal report, in INITIALIZATION)

Regards,

Harsh Bansal

Read only

Former Member
0 Likes
1,639

I too think the same i.e. check in SAP memory if the parameter ID 'CAR' is getting allocted.

run the debugger and please Check in SAP Memory contents.