CL_GUI_ALV_GRID problem: editable quantity field

Hi,
I have this ALV with editable quantity field type MEINS.
The quantity is displayed with 3 decimals.
eg. 1.000
when I try to change the value to 99
and call method CHECK_CHANGED_DATA to get the updated value.
it turns into 0.099 in my internal table.
same thing happens when i change the value to 99.000.
Did i miss out anything?
Please help.

Hi Jeff,
This can be done by setting ref_fieldname and ref_tabname in the field catalogue for Currency and Quantity fields .
Hope this helps.

Similar Messages

  • Regarding Editable Quantity field in ALV Grid

    Hi Experts,
    I need your advice in this 2 scenarios.
    1.I have a scenario where quantity field in output is editable and the user wants the quantity field printed without thousand separator. If i take a char field and display the field is editable then user may mistakenly type a,bcd...z/ special characters which it should not capture. Is there any char data type data element which accepts only integers. Because after that i need to save that value in z database table quantity field.
    2. when there i raised an error message after validation of that editable field in alv output(by events), the user wants all other rows in that grid as uneditable except the row which has got error till this error is solved. Is this possible. If yes how.
    Please share your valuable suggestions.

    Hi abilash n      
    as in dictionary, all quantity fields should have a reference to the unit field which then defines the number of decimals.
    The rest is done automatically as long as you do it standard way. In field catalog you have to set the fcat-qfieldname to the name of the field that has the unit.
    If you do so, also totals will be grouped by unit.
    SAP has really done a great thing by inventing  units for quantities (and currency keys for currency amounts). Only developers do not understand and thus refuse to use it.
    Regards,
    Clemens

  • Problem with quantity field in BDC

    hi experts,
                   i am trying to upload  data from internal table to SAP using BDC, but while uploading quantity fields it is giving error as "Input fields is longer than screen field", Is there any method to upload quantity fields to SAP.
                     thanks in adancae,

    Hi,
    Before passing the value to perform bdc_field, convert that value to char type
    For eg.
    DATA :        v_val(10)               TYPE c,
      v_val = wa_operation-std_value_01. CONDENSE v_val.
      CONCATENATE 'PLPOD-VGW01(' n_linecount1 ')' INTO v_para.
      PERFORM f_bdc_field       USING v_para           v_val.
    FORM f_bdc_field  USING fnam fval.
      CLEAR wa_bdctab.
      wa_bdctab-fnam = fnam.
      wa_bdctab-fval = fval.
      APPEND wa_bdctab TO it_bdctab.
    ENDFORM.                    " f_bdc_field
    check this it would be useful.

  • Sales order quantity field editable even when billed.

    Hi Gurus,
    Good Day to you all!
    We have this sales order that is already delivered and billed. I was just wondering why the sales order 'order quantity' field can still be changed or is still editable? Is it standard procedure that it would be disabled and uneditable? Is there a configuration behind this?
    We have some sales orders that are directly billed without any need for delivery. These sales orders shows the order quantity as disabled and uneditable unlike the one stated above. Anyone can please help regarding this problem
    Thank you very much!
    Best Regards,
    JV Nunez

    Dear,
    User exits in the program MV45AFZZ - USEREXIT_FIELD_MODIFICATION or USEREXIT_SAVE_DOCUMENT
    SEREXIT_FIELD_MODIFICATION -> you can disable/enable screen fields by using this user exit as you want quantity in VA02.
    screen-name = 'RV45A-KWMENG' OR " Order quantity
    screen-name = 'VBEP-WMENG' OR " Order qty in Schedule Lines
    screen-name = 'RV45A-KMPMG'. " Order quantity in "Structure" tab
    SCREEN-INPUT = 0.
    Please check with ABAPr.
    Regards,
    R.Brahmankar

  • Problem with the quantity field

    hi every one
    i am facing a problem with the quantity field (vbap-kwmeng)
    as per my requirement i need to display this quantity field along with some other item fields from VBAP in an alv grid.
    among all the fields displayed in the alv grid only this quantity field is editable(end user can change this quantity)
    once end user changes this quantity and press save button i need to capture this new quantity in my internaltable.
    problem is input of length of quantity is 15 and the output length is 19
    so when i am pressing save
    say my quantity is 50 when i am pressing save '0.050' is coming because of the length difference
    how can i capture the original changed value.
    vamsi

    what about define two fields in  you inner table ,one as char and the other as vbap-kwmeng, you can show the char one in the ALV gird , when user input value and press SAVE ,you can move the value to vbap-kwmeng.
    you can test it,mybe some one has one better idea.

  • Editable ALV- Quantity field value is getting changed while double clicking

    Hi all,
         I have created Editable ALV grid using Class concepts. Quantity field is editable in dat. but after changing value and if im double clicking on that field, value is getting changed. eg: 45 is changing to .045. How can i resolve this problem.
    Could u plz help.

    Hi Anu,
    One question from my side.
    U have displayed the ALV.In that grid u have quantity field.U have changed the value of that field to 45.
    When u press enter the value has been changed to .045.Is this u r problem.
    U can do onething anu.
    Declare one varaible with the local field.
    Pass u r quantity field value into that variable.
    While displaying thriugh SET_TABLE_FIRST_DISPLAY in your internal table pass this variable.
    It will solve u r problem.I think.
    Let me if yu have any problem
    IF u want u can refer to the program BCALV_EDIT* in se38.
    There also u have needful info
    Thanks,

  • Make quantity field of Free goods as non-editable.

    Hie!
    I have free goods scheme of 9 + 1 .If quantity of main material is 10 then it will split into 9 + 1 where 1 is free of cost.
    While making the sales order the free goods quantity field is editable. So the users are able to change the free goods quantity. I want to make this field as non-editable.
    Please suggest how to do this.
    Thankyou.

    Hi Pallavi
    If you change the manual qty which is automatically determined by the system then there will be a message thrown by the system
    Suppse in your case if 9+1 you change the qty manually to 2 from 1 there is a message V1 no 737 thrown by the system
    You need to change the message class thro ABAP development only not possible thro customization
    Not only this in delivery also it is possible to change the free qty and this also has to be controlled by the ABAPer only
    Regards
    Raja

  • Problem with currency and quantity field

    Hi,
    I have done a couple of BDC and watched that if some currency or quantity field is there and i want to run the BDC the particular currency/quantity field will not populate the value inspite of i have declared the same table field that it refers to in the screen in the internal table.
        But, if i declare a character string in the internal field having same length as the screen field it will populate at run time. Why so?
    Regards
    Sandeep

    Hi,
    Even i have experienced the same problem many a times and use a character string as a work around to solve it.
    I guess one reason for it is for the currency and quantity fields, the actual defined length and the output length are different with output length being 3 or 4 bytes greater than that of actual lenght and also the fact that these fields are always right justified. hence some bytes of the field is getting truncated which the system does not allow and discards the whole value.
    regards,
    Mahesh

  • Problem in currency and quantity field

    Hi,
    I have done a couple of BDC and watched that if some currency or quantity field is there and i want to run the BDC the particular currency/quantity field will not populate the value inspite of i have declared the same table field that it refers to in the screen in the internal table.
    But, if i declare a character string in the internal field having same length as the screen field it will populate at run time. Why so?
    Regards
    Sandeep

    Hi Sandeep,
    This is a common problem, when carrying out BDC.
    For example, while recording you met with the 2 fields --> MSEG-DMBTR (Curr) and MSEG-MENGE(Quantity).
    Go to SE11 --> MSEG --> Search for DMBTR --> Double click on the Data Element i.e. DMBTR --> Double Click on the domain WERTZ --> You can see under the block Output Characteristics : Output Length = 16.
    While declaring the TYPES Structure, make it CHAR(16).
    Similarly for MENGE --> Data Element : MENGE_D --> Domain : MENGE13 --> Output Length = 17.
    Make it CHAR(17).
    Consider this technique as the Rule-of-Thumb while doing BDC.
    Regards,
    Abir
    Don't forget to award points *

  • Quantity field conversion problem in SAP script

    Hi experts,
    I have problem with sap script quantity field conversion.
    In purchase order the actual value of field( MDPM-ERFMG) is 3,500.
    But in Print preview it is showing only 3.5
    Any one Please help me in this problem
    thanks in advance
    murali

    Hello,
    check this:
    Number of Decimal Places
    A program symbol of one of the data types DEC, QUAN, and FLTP can contain decimal place data. Use the option below to override the Dictionary definition for the number of decimal places for the formatting of this symbol value.
    Syntax
    &symbol(.N)&
    The EKPO-MENGE field contains the value 1234.56. The Dictionary definition specifies 3 decimal places and an output length of 17.
    &EKPO-MENGE& -> 1,234.560
    &EKPO-MENGE(.1) -> 1,234.6
    &EKPO-MENGE&(.4) -> 1,234.5600
    &EKPO-MENGE&(.0) -> 1,235
    REgards,
    Vasanth

  • Currency and Quantity fields problem in FM

    Hi ALL
    <b>Can anyone help me on this. Very Urgent</b>
    I created a FM, in that i used NETPR,MENGE,WEMNG.(CURRENCY , QUANTITY )  fields.
    When i am trying to activate, it is asking for reference fields.
    I don't know how to resolve it...
    Regards
    Prabhakar

    hi,
    pls refer to this thread for use...
    how can create a function module for currency and quantity fields
    Message was edited by: Ganesh Sundarakrishnan

  • How to make quantity field in puplic templates editable?

    Hi SDN,
    we are implementing SRM 5.0.
    We have a change request to make the quantity field in public templates  (or when you chose approved (old) shopping carts for a new order) ready for input.
    What I tried so far is to go to the corresponding template, which is
    SAPLBBP_PDH_SEARCH 4001 and exchange
    `SUBLIST-QUANTITY[n].value`
    by
    <input type="text" name="SUBLIST-QUANTITY[n]" value="`SUBLIST-QUANTITY[n].value`">
    Debugging the corresponding dynpro 4001 of function group BBP_PDH_SEARCH
    PAI: MODULE mark_read_from_web. 
    there:
    LOOP AT <sublist> INTO <lfs_sub_wa>.
    shows, that the new quantity I might set on the webfrontend does not get transferred to <sublist>-quantity in the dynpro.
    Even though in the debugger I manually changed the incoming quantity, it does not show up on the next webscreen with the shopping cart...
    any ideas welcome,
    regards, matthias

    Hi Atul,
    the need for the requirement is very obvious, also we had this modification in the old release - and I am merely trying to rebuild it.
    But for the business case: Just imagine you have 100 or more articles in a public template and maybe you have to chose new articles from different public templates. Then it is really painful if you have to recheck the shopping cart after you have filled it, just to change the quantities. This modification saves a lot of time and work for the users. Also I am wondering why it is not already standard behaviour.
    regards, matthias

  • Problem with  the quantity field in bdc?

    Hi,
    i have to populate a quantity field in bdc .
    for ex 123.00. but the bdc accepting only in the form of 123,00.
    How can I do this .
    I tried by changing the user profile, but went in vain.
    Suggest me how to convert ?
    Thanks.

    Hi,
    Create a variable of TYPE CHAR.Write your quantity field value into this variable and pass this variable to the BDC. This is the way of passing quantity fields to BDC.
    DATA: V_AMOUNT(22) TYPE C.
    WRITE ITAB-DMBTR INTO V_AMOUNT.
    Pass this V_AMOUNT to BDC flow.
    Hope this helps.
    ashish

  • I am looking at a personalization where I want to make the quantity field on a PO not editable. I need this only for certain lines.

    I need to disable quantity field on a PO based on a condition.
    My current approach is to keep the line number in local variable and disable the quantity on that line itself using forms personalization.
    I could succeed to an extent where I could store the line number in local variable but I am not able to proceed beyond that. Please help.

    Hi,
    Have tried with following setting ?
    Trigger Event = WHEN-NEW-RECORD-INSTANCE trigger  or WHEN-VALIDATE-RECORD trigger
    Trigger Object = PO_LINES
    Condition  =  < as per business need >

  • Problem in smartform...quantity field....have ur points..

    HI ALL,
    I m transferring my itab from main program to SMARTFORMS...itab has a quantity type field.
    When i execute my program, i get error message "Reference field WA-CR is unknown in form".
    <b>Have ur points..</b>
    Regards,

    Every quantity field has a reference field.
    Check the reference field in the table through SE11 transaction & click on REFERENCE tab. Trace your quantity field & corresponding reference field.
    In the Smartform mention the same reference field against the quantity field declaration & activate it.

Maybe you are looking for