‎2012 Feb 22 6:23 AM
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.
‎2012 Feb 22 6:35 AM
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
‎2012 Feb 22 6:33 AM
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.
‎2012 Feb 22 6:35 AM
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
‎2012 Feb 22 6:36 AM
Hi,
Try giving Get.... in PBO(or in case of normal report, in INITIALIZATION)
Regards,
Harsh Bansal
‎2012 Feb 22 7:22 AM
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.