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

problem with SET GET parameters

Former Member
0 Likes
726

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

5 REPLIES 5
Read only

Sandeep_Panghal
Product and Topic Expert
Product and Topic Expert
0 Likes
686

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.

Read only

Former Member
0 Likes
686

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'

Read only

0 Likes
686

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.

Read only

Former Member
0 Likes
686

Hi,

Problem with SET GET parameters

Regarding on your query. Follow this below link.

It will help you.

I Hope it will helps to you.

Regards,

Sekhar

Read only

Former Member
0 Likes
686

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