‎2009 Feb 03 10:51 AM
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
‎2009 Feb 03 11:29 AM
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
‎2009 Feb 03 11:01 AM
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
‎2009 Feb 03 11:05 AM
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
‎2009 Feb 03 11:28 AM
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
‎2009 Feb 03 11:30 AM
Hi there,
thanks for ur reply.bdcdata is populated with the data passed to the function module.
‎2009 Feb 03 11:29 AM
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
‎2009 Feb 03 11:35 AM
well, if u do that, it goes into that function module. i want to refresh table bdcdata in different one.
‎2009 Feb 03 11:40 AM
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
‎2009 Feb 03 11:42 AM
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