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

Mismatch between data sent from print program and SAP script.

Former Member
0 Likes
3,088

Hello Experts,

I have an issue in which the value of wrbtr (which is being fetched from BSEG table in print program) is getting changed when read in SAP script. The value which is being fetched is 10000.00 and when it reaches sap script it becomes 1.000.000. I debugged and didn't find any code to change the value from 10000.00 to 1.000.000 and when i changed the value to a random value say 8765433.00 in print program then in sap script it is being read as 876.543.300. I am not getting what is making this value to change. Only similarity between these values is total number of digits.

Thank,

Aparajita.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,979

hi Aparajita,

This may be due to Currency settings in User profile.

You can check this at Main menu -> system settings...here, just see the current decimal notation maintained, accordingly the conversion is happening.

Change the required selection here and check your print.

Regards,

Suren.

20 REPLIES 20
Read only

Former Member
0 Likes
2,979

Hi Aparajita,

From the thing you explained it seems that difference is due to the currency conversion. May be your document contains the wrbtr in some other currency and due to this you are getting this result.So do a check on this and do paste a screenshot for us to understand better.

Regards

Nav

Read only

Former Member
0 Likes
2,980

hi Aparajita,

This may be due to Currency settings in User profile.

You can check this at Main menu -> system settings...here, just see the current decimal notation maintained, accordingly the conversion is happening.

Change the required selection here and check your print.

Regards,

Suren.

Read only

0 Likes
2,979

Also,  the fact that there is 3 dp's seems to suggest that the field is being written without a reference field containing the currency or that it is being written (by a WRITE statement) without a CURRENCY clause.

Regards,

Rich

Read only

Former Member
0 Likes
2,979

Check table TCURX you will get a list of decimal places for currencies of different countries .

Read only

Former Member
0 Likes
2,979

mostly this happens when moving values between field of different types.

also check conversion.

what is the output command in the sapscript text?

regards

Stefan Seeburger

Read only

RaymondGiuseppi
Active Contributor
0 Likes
2,979

Is the currency field associated in ddic (e.g. T001-WAERS, BKPF-WAERS or BKPF-HWAER) available in the SAPscript form ?

Regards,

Raymond

Read only

Former Member
0 Likes
2,979

Hello everyone,

Thanks for the responses. I am still looking for the cause. Some more input from my side.Here wrbtr (se11) is 10.000,00

but when I select one record  and display it, it appears as 1.000.000. Very strange



Thanks,

Aparajita.

Read only

0 Likes
2,979

Looks the same to  me.

Read only

JL23
Active Contributor
0 Likes
2,979

This is a stone old problem.

The currency JPY does not have any decimals, nevertheless it is stored with decimals in the tables, as the field has 2 decimals by definition.

Have a look into OSS note 1176399 , its has a table with examples

Read only

0 Likes
2,979

In SE16/SE16N

  • WRBTR is associated to BKPF-WAERS, not available, so displayed with default values of most currencies (2 decimals)
  • PSWBT is associated to BSEG-PSWSL, available, so displayed without decimal (JPY, check table TCURX)

Hint: Better look with FB03 or another FI transaction as FBL3N.

Regards,

Raymond

Read only

0 Likes
2,979

Hi Jurgen,

Thanks for your response. Do you mean that, this may be the cause of my problem? And there is problem in standard code?

Aparajita

Read only

0 Likes
2,979

Sorry my mistake, m refering to pswbt

Read only

0 Likes
2,979

Hello raymond,

Doess it means, what is appearing in se16n shouldn't impact the my output of sapscript?

Aparajita.

Read only

JL23
Active Contributor
0 Likes
2,979

No there is not a problem in standard code, the problem is that the person who is looking into the table with a table browser has trouble to understand the SAP design. SAP is using conversion routines according to the currency decimals to display it right in any functional transaction. This is not the case in SE16, as this is not an end user transaction, here you are supposed to see the values how they are stored in the table.

Read only

0 Likes
2,979

Ok. Still the earlier problem is unresolved. Why is there a difference between wrbtr value in pp and sap script for jpy but no problem exists for usd.

Read only

JL23
Active Contributor
0 Likes
2,979

Because JPY has 2 decimals in the table and 0 in the reality and hence on the documents.

and USD has 2 decimals in the table and 2 decimals in reality.

Just remove the decimal delimiter from your mind when reading a JPY value in a table and everything is in order, isn't it?

Read only

0 Likes
2,979

SE16/SE16N are only developpert/support tool, there are not intended to replace an actual display transaction, so as already written try FB03 on document.

Hint: Try some search at help.sap.com with keywords: SAPscript Fields Currencies Quantities

Regards,

Raymond

Read only

Former Member
0 Likes
2,979

For me it is working as expected since the currency is JPY as already explained by Jürgen L

Check the FI doc via FB03 / Any standard transaction and I am sure you will get the same result.

Read only

Former Member
0 Likes
2,979

Hi Aparajita,

As explained by everyone here you are having 5 decimal places in the currency so if you want to get it upto 2 decimal places then multiply it by 1000.

Regards

Nav

Read only

Former Member
0 Likes
2,979

Thanks a lot everyone. Now the picture is quite clear to me and I have found solution to my problem as well.