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

Where to clear variable

Anja292027
Explorer
0 Likes
690

Hello Experts,

I have a requirement, it is FI interface where need to calculate CR ,Dr Amount.

Let say i have total 10 line items fora invoices... based on total amount i need to calculate if it is +ve amount it would be DR or if total amount is -ve than it would be credit... after calculating  the amount i am generating an output file in XML format. in XML file if tolal amount i-ve it should not show the -ve amount.

Can anybody help me here... where to clear this filed.

Regards

Hello Experts,

I have a requirement, it is FI interface where need to calculate CR ,Dr Amount.

Let say i have total 10 line items fora invoices... based on total amount i need to calculate if it is +ve amount it would be DR or if total amount is -ve than it would be credit... after calculating  the amount i am generating an output file in XML format. in XML file if tolal amount i-ve it should not show the -ve amount.

Can anybody help me here... where to clear this filed.

Regards

3 REPLIES 3
Read only

Former Member
0 Likes
660

Did not understand your query. Could you please reframe it.

Thanks,

MAAUS.

Read only

0 Likes
660

Hi Aziz,

My requirement is let say in one invoice there are 10 line items, for every line item there is amount filed... it can be +ve amount in Debit case or -ve in credit case... i need to calculate the total amount of a invoice... if the total amount it -ve... than in the output file...which is in XML format... -ve amount should not be seen...

Let me know if some more details are required.

Regards. 

Read only

0 Likes
660

Hi Anjana

If i get you right you must have an internal table with you line items(the +ve and -ve records).

You must then be looping at that table and summing the values.  Once summed you check that value against the value you should have in your XML file...so i would suggest clearing the value of the invoice after you check it against the file value.

loop at lt_invoices assinging <lt_invoices>.

at end of <lt_invoices>-belnr.

*...check total value against XML

*...clear your variable here

endat.

lv_tot = lv_tot + <lt_invoices>-amount.

endloop.

   

regards

Prince Isaac