‎2011 Feb 22 4:59 PM
Hi all,
I am facing a problem using SET and GET parameters.
There is a Z transaction(Dialog program) where some fields of screen are having parameter ID's. That transaction is designed to diaplay/change status of only one inspection lot at a time.
Now I need to call that transaction in a loop using BDC. I mean i need to update the status of multiple inspection lots(one after the other). Before calling the transaction I am using
SET PARAMETER ID 'QLS' FIELD lv_prueflos.Unfortunately the transaction is only changing the first inspection lot. When I debugged I found that the screen field is changing in PAI. Even though in PBO it shows the next value, when it goes to PAI it is automatically changing to the first value(inspection lot).
Example: Inspection Lots : 4100000234
4100000235
4100000236
Now first time when the call transaction is being made the status of insp lot 4100000234 is changed. For the second time when insp lot 4100000235 is being passed in PBO ican see this. But the moment it enters PAI the screen field changes to 4100000234.
Could you pls help me in solving this issue.
Thanks,
Aravind
‎2011 Feb 22 5:30 PM
You can try clearing the parameter id before each iteration and set paramter again .
Inside loop at the end : SET PARAMETER ID 'QLS' FIELD space.
and again set id : SET PARAMETER ID 'QLS' FIELD value.
‎2011 Feb 23 2:42 AM
why dont you use
free memory id 'XXX' after the job is over so that set next will have the current iteration value ..
'XXX' = 'QLS'
‎2011 Feb 23 9:14 AM
hi Sandeep and Sniper,
Thanks for your reply. I have tried both the ways.
Even if I free or set the memory if to space and later set it to new value as soon as the call transaction is being made in PBO i can see the current value where as in PAI i can see the previous value only.
kindly let me know if there is any other way of solving it.
‎2011 Mar 03 6:08 PM
‎2011 Mar 03 6:31 PM
Hello Aravind,
Not a biggest Fan of parameters unless you are using this in different programs. I would like to suggest a more radical approach if you are in the same program.
Create a function group. Declare a global variable in the function group. Now create function modules to set and get the values.
Use these function modules inside the program. The values are retained since within a program its sinle LUW.
Regards
Amit