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

SAP script Problem

Former Member
0 Likes
1,054

Hi Friends,

We are facing a problem in Invoice Printing. We have values in an internal table VAT1.

 
1       KSCHL   C       4       MWST
2       KOEIN   C       5       %
3       KBETR   P       6             200.00
4       KURRF   C       12       1,00000
5       MWSKZ   C       2        V2
6       KAWRT   P       8                72.40
7       KWERT   P       7                14.48    

We are printing all these values in the script.

KBETR needs to be displayed as 20.00. But, we don't know where this manipulation is going on. For, all other Invoices it is printed in that way only.

But, for this particular Invoice, KBETR is displayed as 200 and KAWRT as 7.240

Can anyone pls help in resolving this problem?

Thanks & Regards,

Sharmila

11 REPLIES 11
Read only

Former Member
0 Likes
1,020

go to attribute of programm and check fixed point arithmatic is checked or not....

Read only

0 Likes
1,020

Hi Friends,

1. The fixed point arithmetic is checked

2. I've debugged both the main program and the script. In the main program, the value is as shown in the table. But in the script, it is dividing by 10 for certain Invoices and not doing so for Invoices with a particular distribution channel

3. The format we have used is &vat1-kbetr(sc.2)&

Still, I am not able to resolve this problem. Can u pls help to solve this issue?

Thanks & Regards,

Sharmila

Read only

0 Likes
1,020

Hi Sharmila,

i feel the problem may be due to the no. of decimal places..chk if the value is 20.000 in the print program..due to this the sapscript may have taken last 2 zeroes for the decimals n the remaining values as the amount...this happens in some cases...

hope it helps..

Read only

0 Likes
1,020

Hi Sharmila,

you wrote the format is &vat1-kbetr(sc.2)&. What is the Content

of

sc

? And do you have any special

Format for the Output-Line

?

Regards, Dieter

Message was edited by: Dieter Gröhn

Read only

0 Likes
1,020

Hi Bikash,

This printing problem occurs only if the distribution channel is 'S1'. For other distribution channels the values are getting printed correctly. For both the Invoices, the value is 200.00 in the program. But, the script shows 200.00 for distribution channel 'S1' and 20.00 for others.

Thanks & Regards,

Sharmila

Read only

0 Likes
1,020

u said the value is 200.00 in the program. so where is it getting divided for other-than S1 dist channel?? have u tried with other documents with dist channel S1 n cross checked if this really happens only in case of S1?? if yes, then i think u can consult ur Functional guy over ther n relate the matter... also, if u r sure aboout this, then u can manually code to divide the value for dist channel S1 to get 20.00.

but i seriously feel something else is the reason...maybe some more research will be able to help u find out..

Read only

Former Member
0 Likes
1,020

Activate Debugger of the Sapscript and check at which point it is happening

Read only

Former Member
0 Likes
1,020

Hello Sharmila,

Is this customer belong to some other country??

Read only

Former Member
0 Likes
1,020

I believe it's the probelm with formating options. Use the correct formatting option (.N) with the respective field.

Cheers,

Thomas.

Read only

0 Likes
1,020

Hi,

If you have the time, please do debug your main program and your sapscript. you can debug your sapscript by going to t-code SE71 then utilities->activate debugger to see both sides. Also, as said by previous posts, check the formatting.

Regards!

Read only

Former Member
0 Likes
1,020

Hi Sharmila,

i format the output in the script like this

<b>&ITAB-WEMNG(10.2)&</b>

In your Exapmple like <b>&VAT1-KBETR(10.2)&</b>.

Hope i can help you.

Regards, Dieter