Skip to Content
author's profile photo Former Member
Former Member

Different output in different systems

I have a question that when I write the following LOC in my smart form the output is correctly visible in the development system (my system) but not in the user system (a different server):

"here>> g_po and w_curr_desc is

"of type vbak-vbeln and vbak-waerk

"respectively.

-


set country space.

g_po = wa_vbak-vbeln.

w_curr_desc = wa_vbak-waerk.

select single dcpfm from usr01 into (w_dec_note)

where bname = sy-uname.

-


" here>>W_DEC_NOTE TYPE XUDCPFM

" here>> l_char type char20

-


<i>MOVE w_total_vat to l_char.</i>

condense l_char no-gaps.

if w_dec_note = 'X'.

replace all occurences of ',' in l_char with ''.

elseif w_dec_note = 'Y'.

replace all occurences of ',' in l_char with '.'.

condense l_char no-gaps.

elseif w_dec_note = space.

replace all occurences of '.' in l_char with ''.

replace all occurences of ',' in l_char with '.'.

endif.

condense l_char no-gaps.

-


Now instead of the code line mentioned above in italics I write the following code-linethe problem goes away,I did that to recrify the problem but dont know the reason for it:

<i>write w_total_vat to l_char currency wa_vbak-waerk.</i>

1.Can anybody please explain me the reason for exactly what happened before and after theis change is made?

If the output is say as '180' 'currency' which we see on our systems.The user sees it as '18000' 'currency'.

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 12, 2007 at 07:36 AM

    Whenever currency is involved, the system determines the number of decimal places in the output according to the currency , say C, If the contents of C exist in table TCURX as currency key CURRKEY, the system sets the number of decimal places according to the entry CURRDEC in TCURX. Otherwise, it uses the default setting of two decimal places. This means that table TCURX must contain only exceptions where the number of decimal places is unequal to 2.

    The output format for currencies does not depend on the decimal places of a number that may exist in the program. The system uses only the sequence of digits. This sequence of digits thus represents an amount specified in the smallest unit of the currency in use, for example Cents for US Dollar (USD) or Francs for Belgian Francs (BEF). For processing currency amounts in ABAP programs, SAP therefore recommends that you use data type P without decimal places.

    I think that for the currencies you use, there is an entry in your TCURX table and none in your client end, may be thats why this addition of two zeros occur.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.