Populating Quantity field in BAPI : "BAPI_OPPORTUNITY_CREATEMULTI"

I want to populate quantity field for an Item while creating Opportunity using BAPI_OPPORTUNITY_CREATEMULTI.
along with other data, I am populating BAPI internal table required for quantity as below, opportunity is being created with item. But quantity field is blank. Can anyone advise what I have been doing wrong or what’s right way of populating this table parameter.
Appreciate help on this.
    s_scheduleline-item_handle = ‘0000000002’.
    s_scheduleline-handle = ‘0000000001’.
    s_scheduleline-quantity = s_valid-est_qty.  " Quantity
    APPEND s_scheduleline TO it_scheduleline.
    s_input-ref_handle = ‘0000000002’
    s_input-ref_kind    = 'B'.
    s_input-objectname  = 'SCHEDLIN'.
    s_input-fieldname  = 'QUANTITY'.
    APPEND s_input TO it_input.
    CALL FUNCTION 'BAPI_OPPORTUNITY_CREATEMULTI'
      TABLES
        header        = it_header
        opportunity   = it_opp
        partner       = it_partner
        appointment   = it_appointment
        status        = it_status
        customer_head = it_cust_h
        text          = it_text
        item          = it_item
        product       = it_product
        scheduleline  = it_scheduleline
        pricing_item  = it_price_i
        input_fields  = it_input
        saved_process = it_saved
        return        = it_return.

Be sure to reset logical_key field from input_fields structure after inserting partner data.
    ls_fields-objectname = 'PARTNER'.
    ls_fields-logical_key = '0000'.
    ls_fields-fieldname   = gc_fieldname-partner_no.
    APPEND ls_fields TO lt_fields.
    ls_fields-logical_key = ''.
Edited by: Dalibor Riger on Nov 29, 2011 5:09 PM

Similar Messages

  • Populating Quantity fields in Table Maintainance generator Events.

    Hi all,
    I have a custom table, in that i have to check the material number and the quantity of the previously present entries and current entry which i am adding in the before save event.
    However in the total table.... The value of material is getting populated correctly but the value of the quantity is not the actual one which i have entered, It is taking the value 0.00 at runtime.
    Please suggest me the approach when we have to deal with the Quantity fields in the table events.
    Thanks in advance for your help.
    Regards,
    Anuja

    Hi,
    The reference for the Quantity field is provided in the Custom table. However the value of the Quantity is taken as 0.00 at run time.
    Please refer to the below code.
    LOOP AT total.
        IF <action> EQ space.
          l_wa_temp-matnr = total+3(18).
        l_wa_temp-bmenge = total+95(13).
          APPEND  l_wa_temp TO l_i_temp.
          CLEAR l_wa_temp .
        ENDIF.
      ENDLOOP.
    however the  l_wa_temp-bmenge is getting populated as 0.00 however the actual value entered for it is 10
    Regards,
    Anuja

  • Doubt regarding populating a field in BAPI

    Hi guys,
    I'm doin a JDBC to RFC scenario.
    My JDBC output returns a field which contains carriage returns. For example my tag would look like...
              <LONG_DESCRIPTION>WIRE/CABLE:ELECTRICAL,POWER,600V,TEXT: OKONITE;500&apos;/  ROLL  STRUXURE
    Varun
    Mukund
    SAP
    Exchange
    Infrastructure</LONG_DESCRIPTION>
    Currently i did one to one mapping to my input field in the BAPI.
    Now when i view this material after its creation through XI, I find this text as continuos and without new line.
    Should i include some extra character while populating the corresponding field in BAPI for new line???
    Thanks guys
    Varun

    Hey Sumit,
    I'm using BAPI_MATERIAL_SAVEDATA...
    I'm trying to populate the field TEXT_LINE under MATERIALLONGTEXT
             <MATERIALLONGTEXT>
                <item>
                   <APPLOBJECT/>
                   <TEXT_NAME/>
                   <TEXT_ID/>
                   <LANGU/>
                   <LANGU_ISO/>
                   <FORMAT_COL/>
                   <TEXT_LINE/>
                   <DEL_FLAG/>
                </item>
             </MATERIALLONGTEXT>

  • Quantity field in bapi  BAPI_PO_CREATE

    Hi ,
    What is the filed name to pass the QUANTITY in the lineitems table*(PO_ITEMS) for the Bapi BAPI_PO_CREATE
    FIleld name DISP_QUAN is not accepting the Quantity and showing the error as  ENTER QUANTITY
    when BAPI is executed.
    Regards
    Ajay

    Hai.
    check this.
    REPORT zpo_bapi_purchord_tej.
    DATA DECLARATIONS *
    TYPE-POOLS slis.
    TYPES: BEGIN OF ty_table,
    v_legacy(8),
    vendor TYPE bapimepoheader-vendor,
    purch_org TYPE bapimepoheader-purch_org,
    pur_group TYPE bapimepoheader-pur_group,
    material TYPE bapimepoitem-material,
    quantity(13),
    delivery_date TYPE bapimeposchedule-delivery_date,
    net_price(23),
    plant TYPE bapimepoitem-plant,
    END OF ty_table.
    TYPES: BEGIN OF ty_alv,
    v_legs(8),
    success(10),
    v_legf(8),
    END OF ty_alv.
    TYPES: BEGIN OF ty_alv1,
    v_legf1(8),
    v_msg(500),
    END OF ty_alv1.
    *-----Work area declarations.
    DATA: x_table TYPE ty_table,
    x_header TYPE bapimepoheader,
    x_headerx TYPE bapimepoheaderx,
    x_item TYPE bapimepoitem,
    x_itemx TYPE bapimepoitemx,
    x_sched TYPE bapimeposchedule,
    x_schedx TYPE bapimeposchedulx,
    x_commatable(255),
    x_alv TYPE ty_alv,
    x_alv1 TYPE ty_alv1,
    x_alv2 TYPE ty_alv1.
    *-----Internal table declarations.
    DATA: it_table TYPE TABLE OF ty_table,
    it_commatable LIKE TABLE OF x_commatable,
    it_item TYPE TABLE OF bapimepoitem,
    it_itemx TYPE TABLE OF bapimepoitemx,
    it_sched TYPE TABLE OF bapimeposchedule,
    it_schedx TYPE TABLE OF bapimeposchedulx,
    it_alv TYPE TABLE OF ty_alv,
    it_alv1 TYPE TABLE OF ty_alv1,
    it_alv2 TYPE TABLE OF ty_alv1.
    DATA: po_number TYPE bapimepoheader-po_number,
    x_return TYPE bapiret2,
    it_return TYPE TABLE OF bapiret2,
    v_file TYPE string,
    v_temp(8),
    v_succsount TYPE i VALUE 0,
    v_failcount TYPE i VALUE 0,
    v_total TYPE i.
    DATA: v_temp1(5) TYPE n VALUE 0.
    DATA: x_event TYPE slis_t_event,
    x_fieldcat TYPE slis_t_fieldcat_alv,
    x_list_header TYPE slis_t_listheader,
    x_event1 LIKE LINE OF x_event,
    x_layout1 TYPE slis_layout_alv,
    x_variant1 TYPE disvariant,
    x_repid2 LIKE sy-repid.
    DATA : it_fieldcat TYPE TABLE OF slis_t_fieldcat_alv.
    SELECTION-SCREEN *
    SELECTION-SCREEN BEGIN OF BLOCK v_b1 WITH FRAME.
    *-----To fetch the flat file.
    PARAMETERS: p_file TYPE rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK v_b1.
    AT SELECTION-SCREEN *
    AT SELECTION-SCREEN.
    IF p_file IS INITIAL.
    MESSAGE text-001 TYPE 'E'.
    ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    *-----To use F4 help to find file path.
    CALL FUNCTION 'F4_FILENAME'
    EXPORTING
    program_name = syst-cprog
    dynpro_number = syst-dynnr
    IMPORTING
    file_name = p_file.
    v_file = p_file.
    START-OF-SELECTION *
    START-OF-SELECTION.
    PERFORM gui_upload.
    LOOP AT it_table INTO x_table.
    PERFORM header_details.
    v_temp = x_table-v_legacy.
    LOOP AT it_table INTO x_table WHERE v_legacy = v_temp.
    PERFORM lineitem.
    PERFORM schedule.
    ENDLOOP.
    DELETE it_table WHERE v_legacy = v_temp.
    PERFORM bapicall.
    MOVE po_number TO x_alv-success.
    APPEND x_alv TO it_alv.
    CLEAR x_alv.
    *-----To clear the item details in internal table after the operation for a header.
    REFRESH: it_item,
    it_itemx,
    it_sched,
    it_schedx.
    CLEAR: v_temp1.
    ENDLOOP.
    v_total = v_succsount + v_failcount.
    PERFORM display_alv.
    FORM GUI_UPLOAD *
    FORM gui_upload .
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = v_file
    filetype = 'ASC'
    TABLES
    data_tab = it_commatable
    EXCEPTIONS
    file_open_error = 1
    file_read_error = 2
    no_batch = 3
    gui_refuse_filetransfer = 4
    invalid_type = 5
    no_authority = 6
    unknown_error = 7
    bad_data_format = 8
    header_not_allowed = 9
    separator_not_allowed = 10
    header_too_long = 11
    unknown_dp_error = 12
    access_denied = 13
    dp_out_of_memory = 14
    disk_full = 15
    dp_timeout = 16
    OTHERS = 17
    IF sy-subrc = 0.
    *-----To fetch the comma seperated flat file into an internal table.
    LOOP AT it_commatable INTO x_commatable.
    IF x_commatable IS NOT INITIAL.
    SPLIT x_commatable AT ',' INTO
    x_table-v_legacy
    x_table-vendor
    x_table-purch_org
    x_table-pur_group
    x_table-material
    x_table-quantity
    x_table-delivery_date
    x_table-net_price
    x_table-plant.
    APPEND x_table TO it_table.
    ENDIF.
    CLEAR x_table.
    ENDLOOP.
    ENDIF.
    ENDFORM. " gui_upload
    FORM HEADER_DETAILS *
    FORM header_details .
    MOVE 'NB' TO x_header-doc_type.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-vendor
    IMPORTING
    output = x_table-vendor
    MOVE x_table-vendor TO x_header-vendor.
    MOVE x_table-purch_org TO x_header-purch_org.
    MOVE x_table-pur_group TO x_header-pur_group.
    x_headerx-doc_type = 'X'.
    x_headerx-vendor = 'X'.
    x_headerx-purch_org = 'X'.
    x_headerx-pur_group = 'X'.
    ENDFORM. " header_details
    FORM LINEITEM *
    FORM lineitem .
    v_temp1 = v_temp1 + 10.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_temp1
    IMPORTING
    output = v_temp1.
    MOVE v_temp1 TO x_item-po_item.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = x_table-material
    IMPORTING
    output = x_table-material.
    MOVE x_table-material TO x_item-material.
    MOVE x_table-quantity TO x_item-quantity.
    MOVE x_table-net_price TO x_item-net_price.
    MOVE x_table-plant TO x_item-plant.
    x_itemx-po_item = v_temp1.
    x_itemx-material = 'X'.
    x_itemx-quantity = 'X'.
    x_itemx-net_price = 'X'.
    x_itemx-plant = 'X'.
    APPEND x_item TO it_item.
    APPEND x_itemx TO it_itemx.
    CLEAR: x_item, x_itemx.
    ENDFORM. " lineitem1
    FORM SCHEDULE *
    FORM schedule .
    MOVE x_table-delivery_date TO x_sched-delivery_date.
    MOVE v_temp1 TO x_sched-po_item.
    x_schedx-delivery_date = 'X'.
    x_schedx-po_item = v_temp1.
    APPEND x_sched TO it_sched.
    APPEND x_schedx TO it_schedx.
    CLEAR: x_sched, x_schedx.
    ENDFORM. " schedule
    FORM BAPICALL *
    FORM bapicall .
    CALL FUNCTION 'BAPI_PO_CREATE1'
    EXPORTING
    poheader = x_header
    poheaderx = x_headerx
    IMPORTING
    exppurchaseorder = po_number
    TABLES
    return = it_return
    poitem = it_item
    poitemx = it_itemx
    poschedule = it_sched
    poschedulex = it_schedx.
    IF po_number IS NOT INITIAL.
    v_succsount = v_succsount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legs.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ELSE.
    v_failcount = v_failcount + 1.
    MOVE x_table-v_legacy TO x_alv-v_legf.
    MOVE x_table-v_legacy TO x_alv1-v_legf1.
    LOOP AT it_return INTO x_return.
    IF x_alv1-v_msg IS INITIAL.
    MOVE x_return-message TO x_alv1-v_msg.
    ELSE.
    CONCATENATE x_alv1-v_msg x_return-message INTO x_alv1-v_msg SEPARATED BY space.
    ENDIF.
    ENDLOOP.
    APPEND x_alv1 TO it_alv1.
    CLEAR x_alv1.
    ENDIF.
    ENDFORM. " bapicall
    FORM DISPLAY_ALV *
    FORM display_alv .
    PERFORM x_list_header.
    PERFORM build_fieldcat CHANGING x_fieldcat.
    x_repid2 = sy-repid.
    x_event1-name = 'TOP_OF_PAGE'.
    x_event1-form = 'TOP_OF_PAGE'.
    APPEND x_event1 TO x_event.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = x_fieldcat
    i_callback_user_command = 'USER_COMMAND'
    i_callback_top_of_page = 'TOP_OF_PAGE'
    i_save = 'A'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    ENDFORM. " display_master_data
    FORM USER_COMMAND *
    FORM user_command USING ucomm LIKE sy-ucomm selfield
    TYPE slis_selfield.
    READ TABLE it_alv INTO x_alv INDEX selfield-tabindex.
    CLEAR : x_alv2,it_alv2[].
    LOOP AT it_alv1 INTO x_alv1 WHERE v_legf1 = x_alv-v_legf.
    x_alv2 = x_alv1.
    APPEND x_alv2 TO it_alv2 .
    ENDLOOP.
    DATA : it_fieldcat TYPE slis_t_fieldcat_alv.
    DATA : x3_fieldcat LIKE LINE OF it_fieldcat.
    CLEAR : x3_fieldcat,it_fieldcat[].
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_LEGF1'.
    x3_fieldcat-reptext_ddic = text-111.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    CLEAR x3_fieldcat.
    x3_fieldcat-col_pos = '1'.
    x3_fieldcat-fieldname = 'V_MSG'.
    x3_fieldcat-reptext_ddic = text-112.
    x3_fieldcat-ref_tabname = 'IT_ALV2'.
    APPEND x3_fieldcat TO it_fieldcat.
    CLEAR x3_fieldcat.
    x_layout1-colwidth_optimize = 'X'.
    x_layout1-zebra = 'X'.
    IF it_alv2[] IS NOT INITIAL.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = x_repid2
    is_layout = x_layout1
    it_fieldcat = it_fieldcat
    i_save = 'A'
    i_callback_top_of_page = 'TOP'
    is_variant = x_variant1
    it_events = x_event
    TABLES
    t_outtab = it_alv2
    EXCEPTIONS
    program_error = 1
    OTHERS = 2.
    ENDIF.
    ENDFORM.
    FORM USER_COMMAND *
    FORM top.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = 'Commentry'.
    ENDFORM.
    FORM BUILD_FIELDCAT *
    FORM build_fieldcat CHANGING et_fieldcat TYPE slis_t_fieldcat_alv.
    DATA: x1_fieldcat TYPE slis_fieldcat_alv.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '1'.
    x1_fieldcat-fieldname = 'V_LEGS'.
    x1_fieldcat-reptext_ddic = text-108.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '2'.
    x1_fieldcat-fieldname = 'SUCCESS'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-109.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    x1_fieldcat-col_pos = '3'.
    x1_fieldcat-fieldname = 'V_LEGF'.
    x1_fieldcat-key = 'X'.
    x1_fieldcat-reptext_ddic = text-110.
    x1_fieldcat-ref_tabname = 'IT_ALV'.
    APPEND x1_fieldcat TO et_fieldcat.
    CLEAR x1_fieldcat.
    ENDFORM. " build_fieldcat
    FORM BUILD_LIST_HEADER *
    FORM x_list_header.
    DATA: x_list_header1 TYPE slis_listheader.
    *-----List Header: type H
    CLEAR x_list_header1 .
    x_list_header1-typ = 'H'.
    x_list_header1-info = text-105.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: type S
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-106.
    x_list_header1-info = v_total.
    APPEND x_list_header1 TO x_list_header.
    *-----List Key: Type S
    CLEAR x_list_header1 .
    x_list_header1-typ = 'S'.
    x_list_header1-key = text-107.
    x_list_header1-info = v_succsount.
    APPEND x_list_header1 TO x_list_header.
    ENDFORM. " build_list_header
    FORM TOP_OF_PAGE *
    FORM top_of_page.
    CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
    EXPORTING
    it_list_commentary = x_list_header.
    ENDFORM. " TOP_OF_PAGE
    regards.
    sowjanya.b

  • BAPI BAPI_OPPORTUNITY_CREATEMULTI - Problem with Quantity and Unit

    Hi,
    I have the requirement for creating multiple line items in Oppurtunity with BAPI BAPI_OPPORTUNITY_CREATEMULTI, I am able to create multiple line items in product tab in Oppurtunity.
    But now those line items are stored Without Quantity and Units.
    I have passed units in product table at fields : volume_unit, process_qty_unit, process_volume_unit_iso.
    I have passed quantity in product table at fields : process_qty_unit, process_qty_num, process_qty_den.
    Same quantity is also passed at schedule line item field : quantity
    Can any1 please suggest?
    I tried with all combinations of above possible fields.
    I am not sure If i have mistaken in Input fields being passed to this bapi?
    Thanks in advance.
    Regards,
    Narendra.

    Quantity is maintained under scheduling, so you must include in 'CRM_ORDER_MAINTAIN' under exporting parameters also...
    EXPORTING
         it_schedlin_i     = lt_schedlin_i
    Coding for lt_schedlin_i is...
    ls_schedlin_i-ref_handle = "counter".
    ls_crmt_schedlin_extd-quantity = "quantity".
    INSERT ls_crmt_schedlin_extd INTO TABLE ls_schedlin_i-
    Coding for input fields is...
    ls_input_field-ref_handle = "counter".
    ls_input_field-ref_kind  = 'B'.
    ls_input_field-objectname  = 'SCHEDLIN'.
    ls_input_names-fieldname  = 'QUANTITY'.
    INSERT ls_input_names INTO TABLE ls_input_field-field_names.
    INSERT ls_input_field INTO TABLE lt_input_field.
    Regards.

  • Sales Order is getting created without quantity field getting populated?

    Hi All,
    I am creating sales order with the help of IDocs. Here I am using the standard function module IDOC_INPUT_ORDERS.
    But, when I execute this function module idocs are getting generated successfully but the quantity field is not getting updated. It is getting populates as Zero.
    With in this function module there is a perform to check_idoc_orders, when the data flow comes to this point quantity field MENGE is getting cleared.
    So just want to know what could be the reason why quantity field is getting cleared.
    Raghu

    Hello
    Q1 )
    If I change option 1 or 2 :
    1 User decides on creation if material is missing
    Answer:If Material is not Created the system wont allow to add you that material until unless you create the material master created.I am considering here that you don't have material master
    2 Creation even though no material is available
    Answer:It will allow you to create the work order.i am considering here that you don't have sufficient stock.
    Q2) what should be the expected Status for Option 1 or 2.
    Before Config it was showing
    Status is showing Mat.availability not checked ( MANC ).
    After Option 1 or 2, Expected Status ?
    Answer: You need to enter value 02 on the Availability Check field on the MRP3 tab of Material Master via TC MM02.
    you will be  get Material committed MACM after Saving the Order.
    Br
    Rakesh

  • How can we remove the following zeros from quantity field ?

    Hi All.
    how can we remove the following zeros from quantity field while populating ALV by using FM REUSE_ALV_GRID_DISPLAY ?
    eg:getting output zqty = 2.000
    but i need           zqty = 2.
    help me to reslove this issue.
    Regards.
    jay

    Hi,
      While populating the field catlog do the following thing to   avoid zeros.
      wa_fieldcat-tabname = 'I_OUTPUT'.    " Curr
      wa_fieldcat-fieldname = 'FWAER'.
      wa_fieldcat-seltext_l = text-023.
      wa_fieldcat-no_zero = 'X'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR  wa_fieldcat.
    Thanks,
    Khushbu.

  • Passing custom fields to BAPI

    Hi All,
    How can i handle the Quantity field using BAPIPAREX?
    EX.
    I have added the following custom fields to the standard table EKKO.   
        zf_base        (Price per ton, CURRENCY)
        zreq_tons      (Tons Required,QUANTITY)
        zpo_issue_date (PO Issue date,Date)
    Here I am using the bapi 'BAPI_PO_CREATE1' to create Purchase Order. How can i pass the above fields to BAPI.

    U dont have to create a Z verion. u can use extensionIN parameter. take a look at the bapi funtion module documentation. here is the hint,
    <b>Customer's Own Fields (Import Parameters)</b>
    This table allows you to add to the import parameters of the BAPI without modifying it.
    The customer enhancement SAPL2012 allows you to add to or modify the PurchaseOrder.Change and PurchaseOrder.CreateFromData1BAPIs by:
    •     Adapting existing SAP database tables
    o     Adding customer-specific fields to SAP tables
    o     Including existing database fields
    •     Including additional customer-specific database tables
    The following BAPI Table Extensions are available:
    •     BAPI_TE_MEPOHEADER
    •     BAPI_TE_MEPOHEADERX
    •     BAPI_TE_MEPOITEM
    •     BAPI_TE_MEPOITEMX
    •     BAPI_TE_MEPOACCOUNTING
    •     BAPI_TE_MEPOACCOUNTINGX

  • Reg: Quantity field taking as decimal values

    Dear Experts
    In the Bapi BAPI_SALESORDER_SIMULATE the structure BAPIITEMIN contains a field Req_qty that has the data element WMENGC which is taking the input with 3 decimal points even though the domain doesnt contains any decimals, because of this im facing the problem while giving the input.
    Is there any functional requirement to avoid that quantity field taking those 3 decimals
    eg: Original Value: 1000
          Input Value(Converted Value)    : 1.000
    Kindly suggest me a solution to sort out the issue.
    Regards
    Arun.P

    well i suspect that this bapi also has a currency field, which you should fill.
    If he knows the currency he should be able to find out how much decimals there are customized for this currency, and then probably he will do it right.
    oh lol you are talking of quantities and not values... sorry forget about my comment...
    Edited by: Florian Kemmer on Jul 22, 2010 2:37 PM

  • ALV Display for Quantity Field

    Hi All,
    I am working on ALV classes.
    I have a quantity field which needs to be displayed without decimals.
    When I declare the data type as type p decimals 0,It is displayed correctly but when I change the field with a value using the method handle_data_changed it gives a value multiplied by 10 always. i.e., when the new value is 5 it gives the value as 50.
    I tried referencing the Unit value but it doesn't work.
    Any views on suppressing the decimal values without getting the value multiplied by 10 is highly appreciated.
    Thank you in advance.
    Regards,
    K.S.

    Hello Kandasamy,
                                 Change the reference field that points to the ALV display field to a non decimal field and then use the Integer variable assignment for  removing the decimals  during teh BAPi or database fetch.
    Hope this answers your question.
    Thanks,
    Greetson

  • Order qty field in bapi and exit

    Hi All,
    Pls resolve my issue......
    I am creating the sales order through 'VA01' t-code.Now based on some conditions I will create a new sales order through BAPI_SALESDOCU_CREATEFROMDATA1 in t-code. I could not found the order quantity field in tables of BAPI thus I am not able to update the order quatity(kwmeng in vbap) for new sales order. Somebody suggested me that I need to update the schedule line item req_qty(its not working).
    *Second Issues:*++
    I am writing the code in SAVE DOCUMENT user exit , this is going into infinite loop. Can anybody suggest me the correct EXIT too.
    Points will be given
    Thanks in advance.

    Hi Friend,
    For the first point:
    Pass quantity in TARGET_QTY of ITEM parameter
    and REQ_QTY of SCHEDULE line parameter of the specified BAPI.
    It will solve ur problem.
    Please clarify little bit on second point.
    Regards
    Krishnendu

  • Passing quantity field into RF Module

    Hi,
        From java application we are passing quantity field (parameters) to bapi goods mvt create . we have applied all right justified , mulitiplying options but unable to post a document. they are using string datatype & we r using the quant ..we have tried with all options with string datatype it is accepting at our end but from java side when they are passing Func. module is not accepting...any clue on it..any fm
    Thanks & Regards
    Gaurav Saxena

    Yes U r right but I had made it string datatype and then right alligned and then again pass it to quantity field it is accepting at our end but failing while java application execution. it is giving the error " Maintain serial number for total quantity " that means it is taking some more quantity instead of 1 ( while  passing i serial no.) something like 10,100.... so any suggestion..

  • Quantity fields not getting displayed in the second total row

    Hi,
    As per the requirement I have to display 2 total rows for an ALV report using CL_GUI_ALV_GRID. I am able to get the first total row properly using method get_subtotal(). However for the next total row only the character fields are getting displayed and the quantity fields are coming blank.
    The second total row will have different values based on a formula.
    Please help me out in resolving the issue.
    Thanks,
    Abhishek

    You can provide first row as the SUBTOTAL and next row as the TOTAL.
    Get one extra column on which you can do the SUBTOTAL.
    Regards,
    Naimesh Patel

  • 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

  • ALV QUANTITY field Geting converted into decimals ?

    Hi All ,
    I have developed an alv report .In that the quantity field is made editable after editing the quantity when i save it .It gets converted into decimals.Suppose if i give 77 its getting reflected as .077 all the field name ,table name ,reference field name, reference table name, quantity field data type has been passed but the problem persists.If there is any one whos has come across this kind of scenario please share your thoughts on this.
    Best Regards,
    Sreeram

    Hi Sreeram,
    I am not gettin this issue. See below code :
    If you are gettiing the same issue with the below code then it has something to do with your user settings.
    Go to Menu Item System -> User Profile -> Own Data -> Defaults ->Decimal Notation.
    Set it to 1,234,567.89 and save. Now try the program again.
    REPORT z_test.
    TYPE-POOLS: slis.
    TYPES : BEGIN OF ty_ekpo,
              ebeln TYPE ebeln,
              ebelp TYPE ebelp,
              ktmng TYPE ktmng,
              menge TYPE bstmg,
            END OF ty_ekpo.
    DATA: it_ekpo TYPE TABLE OF ty_ekpo,
          it_fieldcat TYPE slis_t_fieldcat_alv.
    SELECT ebeln ebelp ktmng menge
      FROM ekpo
      INTO TABLE it_ekpo
      UP TO 20 ROWS.
    PERFORM add_fieldcat USING 'EBELN'.
    PERFORM add_fieldcat USING 'EBELP'.
    PERFORM add_fieldcat USING 'KTMNG'.
    PERFORM add_fieldcat USING 'MENGE'.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                = sy-repid
       it_fieldcat                       = it_fieldcat
      TABLES
        t_outtab                          = it_ekpo
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    FORM add_fieldcat  USING  p_fieldname TYPE slis_fieldcat_alv-fieldname.
      DATA: wa_fieldcat TYPE slis_fieldcat_alv.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = p_fieldname.
      wa_fieldcat-tabname = 'IT_EKPO'.
      wa_fieldcat-ref_fieldname = p_fieldname.
      wa_fieldcat-ref_tabname = 'EKPO'.
      IF p_fieldname EQ 'KTMNG'.
        wa_fieldcat-edit = 'X'.
      ENDIF.
      APPEND wa_fieldcat TO it_fieldcat.
    ENDFORM.                    " ADD_FIELDCAT
    Regards,
    Jovito

Maybe you are looking for

  • Flex Builder 3 vs Flash Builder 4

    Is there much difference between Flex Builder 3 and Flash Builder 4? Just that I got them both through the student online form but since FB4 is newer, should I still keep Flex in my laptop?

  • Drag&Drop using Repeater

    Does anyone know how to do drag & drop using a Repeater component? Sample? Thanks,

  • Export and import a list in sharepoint 2013

    Hi Team, I have an share point 2013 application which is an input wizard that allows user to enter some employe information and after user submits the same. these records are stored in form of sharepoint list. as part of load testing , I need to crea

  • Computer won't recognize my new ipod

    I just got the fifth gen ipod and I am trying transfer my music from my old ipod and the computer won't recognize my new ipod.

  • Replaced Hard Drive, Now Password is Incorrect

    I upgraded my hard drive from a 500 GB hard drive to a 1TB hard drive in my MacBook Pro, I reinstalled Lion and restored the data from the other hard drive. Now when I try to login to my account, it's as though my password is incorrect. I'm certain i