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

Varaible format for profit&loss

Hi All,

Requirement is for particular Country(example:HK) they need the balance column field like 6,000.00

And for other country like (MY) the balance column has to show space(means without any values).

I followed like this:But I'm getting the balance column is :6000.00.

DATA :l_val type char15.

data:tax(15) TYPE p DECIMALS 2 .

If Country EQ 'X'.

move tax to l_val.

ELSE.

Clear l_val.

ENDIF.

Thank you,

Srii..

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 04, 2009 at 02:33 AM

    Hi Sridhar,

    Try below.

    DATA :l_val type DMBTR.   "Amount in Local Currency 
    data:tax(15) TYPE WERT7 . 
    If Country EQ 'X'.
    move tax to l_val.  "Here you wil get the comma in the amount filed
    ELSE.
    Clear l_val.
    ENDIF.

    solves your problem

    Thanks!

    Edited by: Prasanth on Mar 4, 2009 8:04 AM

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Mar 04, 2009 at 03:14 AM

    try to use SET COUNTRY statement...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 04, 2009 at 02:38 PM

    Hi Sridhar,

    for other country you are getting 0.. but you want 0.00

    then do below

    move that value to the packed with decimal 2...

    like below

    DATA :l_val type DMBTR.   "Amount in Local Currency 
    data:tax(15) TYPE WERT7 . 
    data:l_final_val type p DECIMALS 2.
    
    If Country EQ 'X'.
    move tax to l_val.  "Here you wil get the comma in the amount filed
    ELSE.
    Clear l_val.
    move l_val to l_final_val.   " Here you have to do....
    ENDIF.

    solves your problem

    Thanks!

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 06, 2009 at 06:37 AM

    any suggestions from you..

    Thank you..

    srii

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 01, 2009 at 01:29 AM

    thank q all..

    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.