2005 Dec 08 6:07 AM
Hi Experts,
Pls help me in solving this problem.
I have a standard transaction VT03N for shipments. I have written a custom ABAP program and SAP SCRIPT(custom) to give the details of the Shipment. I am taking a sum of all the deliveries and producing the output with net wt and gross wt of the shipment.
My problem is the first time when i am calling the program and scrpit the output is correct. for the second time(i am not coming out of the transaction VT03N) when i execute for the same shipment the output is just double the pervious one(net wt = netwtprevious2, gross = grossprevious2). however if i terminate the transaction it is working fine. but my scenario is the first one. i should not terminate the tranactions. I am clearing, refreshing the internal tables and workareas after calling "close_form" function module.
Pls help me - its urgent
Arul Jothi
2005 Dec 08 6:11 AM
Hi There is clearing Problem.
you try to clear the variables/refresh the itabs Before populating .
vijay
2005 Dec 08 6:10 AM
Hi,
Refresh every thing before START OF SELECTION.
Check with this.
Thanks.
If this helps you reward with points.
2005 Dec 08 6:11 AM
Hi There is clearing Problem.
you try to clear the variables/refresh the itabs Before populating .
vijay
2005 Dec 08 6:16 AM
Hi,
Clear & refresh the variables before you move any data to it, this should help.
Rgds,
2005 Dec 08 6:51 AM
Hi all,
Thanks for ur replies. But my problem is not yet solved.
Can there be any other way to solve this. Something to do with the SAP script?. Can I clear there?. Pls throw some light on this.
Arul Jothi
2005 Dec 08 6:53 AM
2005 Dec 08 7:05 AM
Hi,
The standard program should take care of clearing variables, etc, if it is not so, then you may have to write a routine in your script to clear the variables, the syntax for writing the routines is the following,
Perform clear_variables in program zprog( This should be a subroutine pool program)
using &var1&
using &var2&
changing &var1&
changing &var2&
In ZProg, clear the variable var1 & var2.
Hope this helps,
Rgds,