Application Development 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: 

Pls help me in this - urgent

aaruljothi
Participant
0 Kudos
123

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

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos
97

Hi There is clearing Problem.

you try to clear the variables/refresh the itabs Before populating .

vijay

6 REPLIES 6

Former Member
0 Kudos
97

Hi,

Refresh every thing before START OF SELECTION.

Check with this.

Thanks.

If this helps you reward with points.

former_member188685
Active Contributor
0 Kudos
98

Hi There is clearing Problem.

you try to clear the variables/refresh the itabs Before populating .

vijay

Former Member
0 Kudos
97

Hi,

Clear & refresh the variables before you move any data to it, this should help.

Rgds,

0 Kudos
97

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

0 Kudos
97

Hi Using Perform option you can do that...

vijay

0 Kudos
97

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,