Display 3 decimal in ALV for data element KBETR

Hi experts,
I've got an ALV report that reports, besides other things, the values stored in KONP-KBETR. The values from KONP-KBETR are passed across to an internal table field which is defined as type KONP-KBETR.
The problem is that KONP-KBETR is displayed to 2 decimal places and this is what the ALV grid shows e.g. 0.05
The users now want the field in the ALV to show the values to 3 decimal places so 0.05 should now appear as 0.053.
Any advice of how to do it?
Thanks all in advance....

Hi,
When populating the fieldcat set decimals_out to '3' for the desired field entry.
See here: Re: decimal  values for a field in ALV
Here's a sample program I wrote to output KBETR from KONP with three decimal places:
report zz_test_alv.
type-pools: slis.
tables: konp.
data:
      it_etab type standard table of konp,
      it_fieldcat type slis_t_fieldcat_alv,
      wa_fieldcat type slis_fieldcat_alv.
selection-screen begin of block sel with frame title text-t01.
  select-options:
    s_knumh for konp-knumh,
    s_kopos for konp-kopos.
selection-screen end of block sel.
perform select.
perform build_fcat.
perform display.
form build_fcat.
  wa_fieldcat-fieldname = 'KBETR'.
  wa_fieldcat-decimals_out = '3'.
  wa_fieldcat-seltext_l = wa_fieldcat-seltext_m = wa_fieldcat-seltext_s = wa_fieldcat-reptext_ddic = 'Amount'.
  append wa_fieldcat to it_fieldcat.
  clear wa_fieldcat.
endform.
form display.
  call function 'REUSE_ALV_LIST_DISPLAY'
    exporting
      i_callback_program = 'zz_test_alv'
      it_fieldcat        = it_fieldcat
    tables
      t_outtab           = it_etab.
endform.
form select.
  select * from konp into table it_etab
    where
      knumh in s_knumh and
      kopos in s_kopos.
endform.

Similar Messages

  • F1 Help for Data elements

    Hi All,,
    i want to add F1 help for data elements.How can i do this.Kindly suggest me the steps to perform this.

    hi
    use this link
    http://help.sap.com/saphelp_nw04/helpdata/en/a4/d47ee849e111d189730000e8322d00/frameset.htm
    http://help.sap.com/saphelp_nw04s/helpdata/en/45/11e39c459d7201e10000000a155369/frameset.htm
    Cheers
    Snehi
    Edited by: snehi chouhan on Jul 24, 2008 11:10 AM

  • Field names for data element are not displayed in selection box

    Hallo zusammen,
    ich habe ein Selektionsfeld definiert und einen Parameter erzeugt, der auf ein Tabellenfeld verweist. Der Feldbezeichner für das Datenelement aus der Tabelle wird nun aber nicht angezeigt, sondern ausschließlich der Variablenname.
    Woran kanndas liegen?
    Danke!
    Edited by: Matt on Feb 9, 2010 1:41 PM - translated subject

    I created data elements and use them in a db table. I've added this data elements as parameters of a selection screen in a function group top include but when I test my function module with this selection screen I see only the field names and not my field captions of my data elements.
    While editing report choose Goto->Text elements->Selection Texts-> select Dictionary checkebox next to your parameters ->activate. The caption will be used then.
    And another question: I have defined and activated a search helper which I can call in my selection screen with F4 but I don't see the symbol behind the text-field. What is the reason?
    Refer standard program DEMO_DYNPRO_F4_HELP_DICTIONARY to see various techniques of attaching input help to screen field, together with search help
    Regards
    Marcin

  • Need new description for Data Element based on Company Code.

    Hi,
    Requirement: The data element AUFNR which has the description "Order Number" needs to have description as "Engagement Number" for a specific company code. All other company codes to retain the description "Order Number".
    Example: There are three company codes: AAAA, BBBB and CCCC. The company code CCCC wants the description of data element: AUFNR as "Engagement Number" while AAAA and BBBB wants to retain the standard description: "Order Number".
    Pre-Work: Before posting this question, i did search however have not found a solution for this.
    In SAP i tried to create an Implicit Enhancement at:
    Program: RADBTDDF
    Sub Routine: SE_DD04T_ROLLNAME_ROLLNAME
    However, as the program is SAP Basis program, i was not successful.
    Any hints are appreciated and solution is rewarded.
    Thanks for your time.
    With Regards,
    Goutham.

    Dear Matthew,
    Thank you for the reply.
    I am giving some more details into the requirement.
    If a user assigned to company code: CCCC (may not be directly, relationship will be drawn) has logged into the SAP system. If he opens the transaction related to Internal Order, like KO01, KO02, KO03 etc. He should be able to see the description of field: "Order Type" as "Engagement Type".
    Similarly in the next screen the field "Order" needs to be displayed as "Engagement Number".
    However, for users who belong to company codes: AAAA and BBBB the SAP Standard Descriptions will be shown.
    Please let me know if this is possible or any inputs in that direction are highly appreciated.
    Let me know if further details are required.
    Best Regards,
    Goutham.
    P.S: As far as i know, Anees Jawad proposal would work if it is required to change the description at the system level.

  • Problem when define Value range for data element

    Dear
    When I define a new data element in ABAP Dictionary, for example, ZDATA_ELEMENT_TEST.
    I use domain ZDOMAIN_TEST.
    (Data type is DEC, the length is 10, and decimals is 2 with sign.)
    Now, I want to restrict that, user can ONLY input the value from 10 to 100.
    From ABAP course and the Internet, I switch to "Value Range" tab, and define 10 for Lower Limit, 100 for Upper Limit in Intervals section.
    And write the simple program.
    PARAMETERS test TYPE ZDATA_ELEMENT_TEST.
    WRITE: test.
    And run it.
    Line: -
    But, there is a problem.
    When I input 200 for test, the program still run and display 200 to screen without any error report or notification. The ABAP runtime system doesn't check the input value.
    I want to config for the domain that can satisfies, if the user input the wrong value (e.g: 200 in the previous case), the program will auto raise the error report, or exception, or sth like that.
    Any help is welcome.

    Hi Hanni,
    Welcome to forum.
    Try to attach key word VALUE CHECK to your PARAMETER statement.
    I.e:
    PARAMETERS test TYPE ZDATA_ELEMENT_TEST VALUE CHECK.
    Note: The addition VALUE CHECK cannot be used together with the additions AS CHECKBOX, RADIOBUTTON, or NO-DISPLAY.
    Regards,

  • Changing Field Label length for Data Element using ABAP code.

    Hi Experts,
    We have a scenario where we have to update the maximum length of the various Field Labels (Short, Medium, Long..) for a Data Element using ABAP code.
    Does anyone know how to do this ? Is there a Function Module available for this purpose ?
    Appreciate your valuable inputs.

    Hi ,
    Use the view
    DD03M
    Give
    TABNAME as table name,
    DDLANGUAGE = EN / sy-langu
    and order by position. (for correct sequencing)
    You will get description of the fields (short,medium, long etc). You will also get the length and other details.

  • How to search for Data elements...

    Hai friends,
         I have the 'short descriptions' of some fields and I need data elements relating to those short descriptions.
         I searched using se12 transaction. But the result is not upto the mark. Is there any other way of searching..? If yes, please tell me.
                         Thank You

    Hi,
      Go to Tcode se15 and expand ABAP Dictionary and then double click Data Elements, on the right hand side you will get Standard Selections, give ur description there and then press enter...
    hope this will give you solution.
    Regards,
    Ramesh.

  • How to display this 2 character for date field (    \   \       )

    hi friends
    it's possible to display the character format in text field after you run the form
    plz I need your help
    thanks

    Hello,
    So you mean for the date field you want to show slashes by default. I don't think that forms will support this type of things.
    BTW may i know what is the purpose to show like this?
    If you use the normal format which is DD/MM/RRRR it will add the slashes automatically. When user will enter date like this 01012010.
    -Ammad

  • How to activte no bidi filtering option for dat element matnr

    Dear All
    I want to activate no bidi filtring option for dataelement matnr in table amra
    But iam unable to do this.I got acess key and try to change but it not comes to edit mode
    it is in display mode only.Iam not able to select the checkbox.

    Hi,
    Are you sure you want to activate Bidirectional flag for MARA-MATNR ?
    If so, you need not register it.
    It should be done via Report program - I18N_SET_DATAELEMENT_FLAGS
    Cheers,
    Kothand

  • Mechanism for Info Object Data elements inherit source documentation?

    Say I am in ECC. I go to SE11, give table name MARA and then doubleclick on the dataelement 'MATNR'. Then I click on documentation. I get a popup with Short text " Material Number" and Definition "Alphanumeric key uniquely identifying the material'.
    I am interested in the latter information that is 'Definition' - &  in general whatever documentation comes up for data element in ECC/CRM/SCM/SRM.
    Now I log into SAP BI. I find that under characteristic 0Material, the data element is /BI0/oimaterial. When I double-click this datamaterial and press the documentation button, the system says 'No documentation'.
    My Questions:
      1. IS there a switch we could turn on in source [ECC/SRM/CRm/SRM] so that the data element in SAP BI inherits the original source field data element documentation.
    { I am not too convinced of the argument- that in BI we have info objects in ECC we have fields - since I am talking of data element level information- I would tend to think of this as an oversight of the designers [or de-prioritization] !!}.
    2. Could we have an ABAP workaround? That is, in BI we identify the tables that house the mapping between the source and destination data elementsa and take out this information. Then we extract the dataelement documentation [by function DOCU_GET] and use the mapping info above to link SAP BI data element with source data element documentation.
    WHY do I want to punish myself as above? My use case is, we take out SAP BI Table, field, metadata etc and create a model in a modeling tool and physical implementation in a 3rd party DW database as our own canonical, application-agnostic corporate datawarehouse. I would want the source data element documentation to flow to this last system as well as the modeling tool.
    Regards
    Sasanka

    go through this links:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/9214b1e5-0601-0010-fdb0-ec32d43b06e0
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8d7cc990-0201-0010-27a3-d0f74b75a1ee

  • Data element for new column

    Hi All
    I have to add one column in exisitng custom table. the new column is SRFLAG which will contain value Y or N.
    Can any one suggest me what will be data element? I want to use existing data element?
    please suggest existing table also in which it is used?

    Hi Dude,
    I will tell u a way to find the answer on your own.
    Go to SE11,choose DATA TYPE radio and press F4.
    Press Search for Data elements.
    Enter a relevant short desc., with asterisk.
    For eg., yesno*
    Then  enter the Data Type as 'char' and Length as 1 and press continue.
    A list appears containing the relevant DEs.From there choose
    the required one.
    Change your search options and try till you get the required one.
    To find the Table enter the name of the DE in the Data Type field and choose the where-used list icon.
    <REMOVED BY MODERATOR>
    Regards,
    Lakshmanan
    Edited by: Alvaro Tejada Galindo on Feb 14, 2008 11:26 AM

  • What is domain and dataelement.....diff b/w domain and data element

    dear all
    what is domain?
    what is data element?
    In one domain how many data elements are possible to used?
    with out data element how can u create a table? explain briefly.

    To clarify it little further the Data element and Domains are used in combination where similiar type of data fields are to be used with some more additional characteristics to each Data element.
    For example consider creating a table which contains Employee details. The Columns Name1 and Name2 are to be of type char and length 40. There are 2 ways to do this,
    1. You can assign the fields Name1 and Name2 directly to CHAR40(as the data element) in SE11. But this will make both the fields to have same characteristics with no difference among them.
    2. The other way is to assign the columns Name1 and Name2 to seperate Data elements say DE_NAME1 and DE_NAME2. This method has tha advantage of adding further charectristics and labels to the data element. Hence in this case you can add a label "Name1" for the data element DE_NAME1 and "Name2" for data element DE_NAME2. And both these data element will point to the same domain CHAR40, hence length and type is same.
    Hope this helps.
    Thanks,
    Prasath N

  • How to make BI Info obj Data element in-herit source DE documntn?

    Say I am in ECC. I go to SE11, give table name MARA and then doubleclick on the dataelement 'MATNR'. Then I click on documentation. I get a popup with Short text " Material Number" and Definition "Alphanumeric key uniquely identifying the material'.
    I am interested in the latter information that is 'Definition' - & in general whatever documentation comes up for data element in ECC.CRM.SCM,SRM.
    Now I log into SAP BI. I find that under characteristic 0Material, the data element is /BI0/oimaterial. When I double-click this datamaterial and press the documentation button, the system says 'No documentation'.
    My Questions:
    1. IS there a switch we could turn on in source ECC/SRM/CRM/SRM so that the data element in SAP BI inherits the original source field data element documentation.
    { I am not too convinced of the argument- that in BI we have info objects in ECC we have fields - since I am talking of data element level information- I would tend to think of this as an oversight of the designers or de-prioritization !!}.
    2. Could we have an ABAP workaround? That is, in BI we identify the tables that house the mapping between the source and destination data elementsa and take out this information. Then we extract the dataelement documentation by function DOCU_GET (from eCC) and use the mapping info above to link SAP BI data element with source data element documentation.
    WHY do I want to punish myself as above? My use case is, we take out SAP BI Table, field, metadata etc and create a model in a modeling tool and physical implementation in a 3rd party DW database as our own canonical, application-agnostic corporate datawarehouse. I would want the source data element documentation to flow to this last system as well as the modeling tool.
    Regards
    Sasanka

    That is, in BI we identify the tables that house the mapping between the source and destination data elementsa and take out this information. Then we extract the dataelement documentation by function DOCU_GET (from eCC) and use the mapping info above to link SAP BI data element with source data element documentation.
    1) SAP don't supply this, I would imagine, because R/3 isn't the only possible source of data.  I'm currently working on an app that extracts from R/3, an Oracle database and APO.  From whence should I take the documentation for my MATERIAL info object?  While being able to transfer the documentation of data elements might be very useful for your app, I can't see that generally it would be of interest to clients - I've certainly never heard of such a requirement.  So, my opinion at least, it isn't a design flaw.
    2) As you've pointed out, you can get the tables that do the mapping, so you know the source data elements, so you can get the documentation.  I'm not sure of how to store the documentation, but the obvious candidate for a link between infoobject and dataelement would be master data of an own infoobject.  You could wrap DOCU_GET in an RFC (if it isn't RFC enabled), and do a direct call between your 3rd party app and r/3 to get the documentation.  For information about the mapping tables, I'd suggest asking that question specifically in one of the BI forums.
    matt

  • Internal length ( dd03l-intlen ) of data element

    Hi Experts,
    I have created structure using data elements.
    intlen  updated in table dd03l is double than Whatever length I defined for data elements.
    e.g.
    I defined custom data element ZDEPOT  of domain type WERKS of type char 4.
    but it's length in table DD03L-INTLEN is 8 char.
    Please let me know what is the connection of data element and DD03L-INTLEN
    and how we can control it as per the length of domain.
    Thanks,
    Yogesh.

    Hmm, everything I can find in table DD03L with the domain WERKS shows up with INTLEN of 4 and INTTYPE of C.  Our custom data elements and structures appear to all have INTLEN values that match our LENG values.  Have you saved and activated your custom data element and your structure?
    - April King

  • FM to lock data element and messages

    Hi All,
    I need a FM to enque data element and messages for translation.
    I have found out one FM for ABAP program texts - ENQUEUE_EABAPTEXTE.
    Can you please tell me the corresponding ones for data element and messages.
    Thank you.
    Ajith

    Hi Krishna,
    Use function modules    enqueue_<<lock object>>u2019 and dequeue_<<lock object>>u2019
    With Regard's
    SHAIK.

Maybe you are looking for

  • Boot Camp not recognizing disc

    Alright, so it seems as though I have had problem after problem trying to setup my Windows 7 boot camp. Normally I don't actually create new posts but with this issue I have not been able to find any solid answer yet. I have tried multiple times to b

  • Itunes 11.1.4.62 now screen resolution problems

    downloaded itunes 11.1.4.62 now screen has resolution problems

  • How to create dynamic properties in java

    Hi All Let me give a breif intro of what i am tryng to do....... I want to write a jsp page where the data would be coming from JDBC. I have abt 18 columns in my oracle table. Out of which i am only configured 7 fields on my jsp page. I want to creat

  • Auto focus in Safari Yosemite does not work on new tab.

    Creating a new tab in Safari does not auto focus the address bar. I need to Cmd-L to activate the address bar. This is annoying because I usually create a new tab to enter a search. Is this a bug or working as intended?

  • A problem

    Hi, I got this issue Error report: ORA-22288: file or LOB operation FILEOPEN failed The filename, directory name, or volume label syntax is incorrect. ORA-06512: at "SYS.DBMS_LOB", line 716 ORA-06512: at line 6 22288. 00000 - "file or LOB operation %