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

OOPs ALV report Fieldcatalog Editing a currency field

Hi all,

I have created an OOP's ALV report. I have made one of the currency field editable. when I am changing the value in any cell and go out of the cell(or move to other cell using arrow keys or click some were in the grid) it is taking '.' after 2 digits from the right.

for example if I take 10 it is converting to 0.10, if I take 100 it is becomnig 1.00, if I take 100.00 it is becoming 1.00. If I take 123.45 I am getting a pop up box with message "Too many decimal places"

the fieldcatalog values are as follows

WA_FIELDCAT-FIELDNAME = 'ORD_VAL'.

WA_FIELDCAT-SCRTEXT_M = 'Ord Value'.

WA_FIELDCAT-COL_POS = 11.

  • wa_fieldcat-no_zero = 'X'.

  • WA_FIELDCAT-OUTPUTLEN = 14.

WA_FIELDCAT-CURRENCY = 'INR'.

wa_fieldcat-decimals_o = '2'.

wa_fieldcat-no_zero = 'X'.

WA_FIELDCAT-EDIT = 'X'.

APPEND WA_FIELDCAT TO IT_FIELDCAT.

CLEAR WA_FIELDCAT.

Can anybody please help me. As If I edit the field it should take the values what I input.

Thanks in Advance.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2009 at 10:41 AM

    Thanks to all,

    The Problem is solved on my own.

    I have taken

    WA_FIELDCAT-REF_FIELD = 'KTWRT'.

    WA_FIELDCAT-REF_TABLE = 'EKKO'.

    this solved my problem

    Add a comment
    10|10000 characters needed characters exceeded

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

    Hi,

    in the fieldcat, also mention these attributes

    fcat-cfieldname = 'ITAB'.

    fcat-ctabname = 'CURR.

    The CURR field is the currency unit field in the table ITAB.

    Hope this helps.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi ,

      The CURR field is the currency unit field in the table ITAB.

      I am just confused with your answer. in my case the final internal table is T_CHKQTY1 shall I take that or anything else. I have taken WA_FIELDCAT-CTABNAME = 'CURR'. but the system is thrownig an error as The data object has no component with CTABNAME but there is a component called TABNAME.

      Can you please currect me.

  • author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2009 at 10:17 AM

    hi

    remove this

    wa_fieldcat-decimals_o = '2'.

    reg

    Ramya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Mar 19, 2009 at 10:41 AM

    The Problem is solved on my own.

    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.