‎2012 Mar 27 5:11 PM
Hi experts,
In the PAI , I have written the following -
SET PARAMETER ID:
'CAR' FIELD sdyn_conn-carrid,
'CON' FIELD sdyn_conn-connid,
'DAY' FIELD sdyn_conn-fldate.
and in the load-of-program i have written -
GET PARAMETER ID:
'CAR' FIELD sdyn_conn-carrid,
'CON' FIELD sdyn_conn-connid,
'DAY' FIELD sdyn_conn-fldate.
However the GET parameter id is not working I mean the value is not getting read back when the program is executed again .
PS: CAR / CON ETC are paramter ids mentioned in the data elements carrid / connid etc
‎2012 Mar 28 7:21 AM
Donot SET & GET programatically. In the screen attributes of that field mark the two check boxes "SET Parameter & GET Parameter" in the dictionary tab.
SAP Help Says - The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event
‎2012 Mar 27 5:26 PM
You are talking about PAI and then LOAD OF PROGRAM. Is it module pool or Report? can you give more details - PAI of what screen is setting the parameter.
One thing you can do. Put hardcoded break-point. after SET parameters and GET parameters and tell me the sequence in which they are getting triggered. Also post the value of the variables sdyn_conn-carrid connid fldate at these two points.
‎2012 Mar 27 6:16 PM
Hi
SAP will use different parameter ids based on the transaction codes for the same data element.
For example if you use VA01 the parameter id for VBELN might might be X1 and the parameter id for VBELN in VA05 might be X2. This is very much possible when we use call transaction from custom codes.
In your case I think that you are using the custom program. Check if the screen fields 'sdyn_conn-carrid' and other have the right parameter ids assigned .
Also in debugging check if the parameter ids are being assigned properly in the SAP memory area.
Br,
Vijay V
‎2012 Mar 28 5:51 AM
hi,
now what is happening is that it worked for one set of values like AA / 0017 / 25.12.2009
but when i run for the new set of values like LH/0040/19.02.2008 ...i checked the SAP memory in debugging and it is setting the new values properly
but when the GEt PARAMTER runs again it fetches the previous values only AA / 0017 / 25.12.2009
note that this is a module pool program and get parameter is called in LOAD-OF-PROGRAM
and set paramter is called in PAI of screen 100 which gets called when i press enter
‎2012 Mar 28 6:22 AM
Hi,
Use set parameter in PBO(not in load program) ,that will hold the values
and In PAI use get parameters to exract that values.
Thank and Regards
‎2012 Mar 28 6:34 AM
i have to use get parameter in load-of-program as i need the program to extract the values only once when the prog is loaded...
i am setting the paramter values in PAI...i checked the SAP memory and the values are getting set OK.
ALso the control goes to load-of program at the start but the get paramter only reads the older values and not the new values set in PAI ...what may be the reason
‎2012 Mar 28 6:41 AM
Hi,
You might have to clear the values after use.
try,
FREE MEMORY ID 'XXXX'.
‎2012 Mar 28 6:44 AM
but this is not the ABAP memory this is the SAP memory...
still should i use FREE MEMORY ID 'XXXX'
‎2012 Mar 28 7:21 AM
Donot SET & GET programatically. In the screen attributes of that field mark the two check boxes "SET Parameter & GET Parameter" in the dictionary tab.
SAP Help Says - The SET parameter and GET parameter checkboxes allow you to specify whether the field should be filled from the corresponding SPA/GPA parameter in the PBO event, and whether the SPA/GPA parameter should be filled with the value from the screen in the PAI event
‎2012 Mar 28 7:45 AM
Hi Hema,
As per your requirement the best approach would be what Kesav suggested.
But in case you still want to go with your approach. You need to put set parameter in PBO (also).
In your case this is how the program flows
1) LOAD-OF-PROGRAM => Get Parameter : You get the values from memory in your variable. Eg. Your screen variable say sdyn_conn-carrid is set to AA
2) PBO => No changes Your variable and memor is STILL AA is still same.
3) PAI => SET parameter : you set the values from here to the memory from screen variable sdyn_conn-carrid ( say CC)
Now if you run the T-Code again load-of-program should trigger and you should get CC.
The only reason I think is location where you PAI module is getting called. Are you calling the module for setting parameter befor the FIELDS statements are triggered? If yes chances are you are setting the old values.