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

refreshing global data

Former Member
0 Likes
1,362

Hello Expertz,

In my Program im using function module Z_L_TO_CONFIRM in that therez a BDC(call transaction) which updates the delivery with special delivery number and lotcodes.Now my problem is when i come out of the function module temporary table BDCDATA is not clearing out and it holding old data because of this it updates only for the first delivery and its doing nothing to deliveries after it.It helps me if i use <REFRESH BDCDATA> inside the function module but i want to keep function module as it is now and do something in my program.Any Ideas how to clear bdcdata in the program outside function module ?

Thanks in Advance.

regards

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,206

Hi,

If you don't want to touch the function module 'confirm' to clear the bdcdata, you can create another function module which is only for clearing the BDCDATA and call it whenever it is required to be cleared.

Regards,

Siddarth

8 REPLIES 8
Read only

Former Member
0 Likes
1,206

Hi,

Starting loop you can use below statement to CLEAR, FREE & REFRESH BDCDATA. Check in debug mode what value is coming when second record procceessing.

Regards

Md.MahaboobKhan

Read only

0 Likes
1,206

Hi there,

Thanks for your reply but bdcdata is globally declared within the function module.so if i refresh it in my local program it doesnt effect the table in function module and it doesnt allow me do it in the firstplace.

Thanks

Edited by: BrightSide on Feb 3, 2009 11:09 AM

Read only

0 Likes
1,206

Hi

Is the temporary BDC table a parameter in the FM or is it populated from the data passed to the FM?

If yes then maybe you could try making a dummy call to the FM when you want to refresh the table and you can pass all the parameters with their initial values there.

Pushpraj

Read only

0 Likes
1,206

Hi there,

thanks for ur reply.bdcdata is populated with the data passed to the function module.

Read only

Former Member
0 Likes
1,207

Hi,

If you don't want to touch the function module 'confirm' to clear the bdcdata, you can create another function module which is only for clearing the BDCDATA and call it whenever it is required to be cleared.

Regards,

Siddarth

Read only

0 Likes
1,206

well, if u do that, it goes into that function module. i want to refresh table bdcdata in different one.

Read only

0 Likes
1,206

Hi

One more possible way

Now the bdctable here should be a global variable in the main program of your zFM.

Now create another zFM in the same Function Group as of the previous zFM. Write the statement CLEAR <bdctable>[] inside this FM. Being in the same Function Group and hence the same main program the global table should be recognized and cleared.

Pushpraj

Read only

0 Likes
1,206

Hi,

You can call that function module through the program whenever you want to clear the bdcdata, so your purpose of not writing the code refresh bdcdata in the function module Z_L_TO_CONFIRM is resolved and you can as well clear the bdcdata whenever you want to from the program just by calling that function module

Regards,

Siddarth