Dependency to change BOM quantity + 1

Hi,
I have a scenario, where we want to change the quantity of BOM item to original quantity + 1 if a certain characteristic is fulfilled. Now I have tried $self.stpo_menge = 1 + mdata $self.stpo_menge, but what happens, is that i get multiples of the original quantity. Eg. if in BOM quantity is 1 pc and in order 2 pc, my component requirement should be 1 + 2 = 3 pc, but currently it is (1+1)*2 = 4 pc. Can you please help, which formula do I require to make the adding of the 1 pc to the final quantity?
Thanks in advance!
Anu

Hi Anu
based on your furmula it is working fine
it will not work with Order qnty , if we use AFKO_GAMNG then  we need to match the material number also with STPO which is difficult
what you can do is you fix it in formula with help of IF and ELSE
if it is useful reward
Thanks
Bala

Similar Messages

  • BOM quantity changes tracking issue - please help

    hi,
    we use Engineering change management and change BOM with reference to a change number .
    we need to have a report to know by inputtig the date and know on that date what are all the BOM changes are done using change number.
    if we only add a new BOM component we are getting the details ,
    when we modify the BOM component quantity we need to track the new quantity added and old quantity deleted with reference to that change number.
    example : for a BOM component  A, using some change number N if we modify the quantity from 0.5 to 
                   1 .
                   then we should get in our report with reference to the change number  N added quantity is 1 and deleted quantity is 0.5 . when we go by the tables AENR,STAS and STPO , against the change number N we are getting only the added quantity of 1 and we are not able to get the deleted quantity 0.5
    we input the  date in to table AENR and get change number AENNR for the selected date .Input this change number  to STAS  here we are able to see one record with X in the field LKENZ and one with out. from here we take STLTY,STLNR,STLKN and pass to STPO to get IDNRK,Quantity referring to the same change number .
    here in this table STPO we are not getting any record with field LKENZ=X,
    only added quantity record is there
    deleted quantity reference record is not there
    please help
    MADHU KIRAN

    hi,
    AUT10 is not giving the quantity deleted or added and coponent
    our major requirement is we need to have an ABAP report whose input is date and during that date using change number what changes ae doen to BOM we need to get as output
    AENR table gives AENNR -change number using which on the selected date BOM changes are done
    taking this AENNR from STAS table we can get the added , deleted details with respect to BOM number , etc..
    using this from STPO table if i try to get
    there i am getting only added components its quantity details only
    about deleted  with reference to the details available in STAS , in STPO  table entries are not getting updated
    today if i change BOM quantity using one change number , again the same components quantity i change after some days that addition onlly getting stored , deleted quantity(means old quantity ) is not getting stored against the change number
    plz help
    regards,
    madhu kiran.

  • BOM quantity change (STPO-MENGE) resulting quantity less than 1

    Hi,
      Anyone have done a BOM quantity change (STPO-MENGE) where the resulting quantity is less than 1.  Please help.
      Thanks,
         Hazel

    Do you mean base quantity by saying header quantity?  I'm running variant configuration.  The base quantity is restricted to 1.  Moreover, changing the unit of measure is not an option.  Each is the official base unit of measure.
    Sample Scenario/Requirement:
    An order for a qty of 1000 requires a total 84 plates.  Each plate can yield a qty of 12.
    SAP uses the equation -->
    Current Component Qty =
                (required qty/base qty) * saved component qty
    Calculations:
    Step 1) Derive Current Component Qty
    Let required qty = order qty (VBAP-KWMENG),
              base qty = max yield per plate (given)
    Current Component Qty =
                 ceiling (VBAP-KWMENG/max yield per plate)
              = ceiling (1000/12)
              = ceiling (83.333333)
              = 84
    The Current Component Qty (84) is the qty used production orders and is equal to the Requirements Qty of the component (RESBD-MENGE)
    Step 2) Derive save component qty.  In Variant Configuration, save component qty is equal to STPO-MENGE.  Base quantity of 1 is assigned to the KMAT (configurable material).
    Since Current Component Qty =
          (required qty/base qty) * saved component qty
    by substitution -->
        84 = (1000/1) * saved component qty
    saved component qty = (84/1000)
    saved component qty = .084
    Issue/Problem:
    I have the above calculations correct in Variant Configuration.  To run a check, I do a production order simulation (CO01S) for a Total order qty of 1000 with today's Finish date.  When I click for components overview, it gives me a Requirements qty of the component of 83 and NOT 84.
    I'm not sure how SAP does the calculation in the background, but I was thinking; maybe, by increasing the number of decimals from 3 (.083) to 6 (.083333) would give me the 84 that I needed.
    Roberto

  • Sales BOM: Quantity correlation for deliv.group 001

    When creating a delivery for a sales BOM material assigned to delivery group, I'm getting a partial quantity. 
    Example is sales BOM material A requires 4 EA of subitem B.  Order created for 1 EA of material A, which requires 4 EA subitem B but there are only 2 EA of B in stock.  The corresponding delivery is created with a quantity of .5 for material A.  I get the following message in the delivery log:
    "Quantity correlation for deliv.group 001 from sls.order 0004831194 for deliv.item 000010"
    I'm expecting the quantity to be 1 on the sales order.  Any help is appreciated.

    Hi,
    I guess not. Obviously, if you don't have enough to deliver in full, then you can do one of the two; either deliver less (in this case half), or deliver none (maybe you can't deliver half because it is impossible).
    Here's something from the online documentation:
    Correlating Delivery Groups
    Items in delivery groups can be combined in the sales order to synchronize their delivery. You will receive a warning message when creating a delivery for a sales order if all items belonging to such a group cannot be delivered. If you then create deliveries using a delivery due list, all orders whose delivery groups cannot be completely delivered will be ignored in this process. In this case, the log supplies all appropriate information. If the delivery quantity is changed or if such an item is deleted in a delivery item belonging to a delivery group, you will receive a warning message. For further information on delivery groups, refer to Combining Sales Document Items for Delivery.
    In addition, the system will carry out a quantity correlation for groups of items when they are classified together by one of the following requirements:
    the items belong to a common delivery group
    the items have a bill of material structure
    If the order structure arose from a bill of material explosion, the relations in quantity of the items is based on component quantity. If this is not the case, it is based on the relation of the order quantities. The system does not correlate items classified as having fixed quantities.
    When creating deliveries, the system automatically carries out a quantity correlation. If you change a higher level itemu2019s quantity, the quantities in the dependent items will be adjusted on all levels if necessary. When you change a dependent itemu2019s quantity, the system generates a warning message. When you delete a higher level item, all subordinate items are deleted as well. When you delete a dependent item, the system generates a warning message. If the dependent item contains a quantity to correlate and is the main item of a batch split, you receive a note. You must decide manually for which batches the quantity change is to take place.
    The question really is, from a business point of view, in your example what would you like to do? Deliver 1 A or none?
    Regards,
    Mario

  • Update weight and volume when changing the quantity

    Hello ALL,
    For some configurable items, those whose weight and volume depends on configuration, when changing the quantity at set level, weights and volumes are not calculated again and order item is saved with wrong data about weights and volume.
    when ever changing the quantity we will get a message - " Changing date/quantity may result in different BOM Please configure"
    if we do explicitly by clicking "Item Details Configuration' then Weight and Volume will get update automatically.
    my requirement is Weight and volume should get update automatically when changing the quantity with clicking on "Item Details Configuration'.
    could you provide any OSS notes available for this or any help to achieve this functionality.

    Dear Prathap Naidu P,
    Did you solve this issue?
    Because I have the same problem, and I was looking for hints.
    Thank you so much for any help.
    Best regards,
    J.Flanders

  • Change order quantity in sales order

    Hi,
    I have a sales order created. Now i want to change the Order qty depending on certain conditions through  an ABAP Program. Can any one tell me how to change it? I tried bapi SD_SALESDOCUMENT_CHANGE ..but couldn't succeed. I tried passing field to  req_qty in table ITEMS_EX and update flag in table ITEM_INX along with item number.please correct me where i went wrong?
    Thanks,
    Bhaskar.

    i stand in awe ... is such a thing legal in your country? you create a sales-order, probably sent a confirmation document (including quantities, prices and so on) to the customer and then you change the quantity according to some constructed logic?
    would you care to describe what the business-process exactly demands at this stage?

  • Can not put decimal quantity in BOM quantity

    Hi all,
                 while go to put decimal quantity in BOM quantity, sytem is not allowing me. It is only allowing me to put only integer number.
    with regards,
    partha

    Partha,
    Is it an error or warning message. Like Suhas said it might be due to User settings. Change the format for numbers to decimal (middle one) in User settings.
    IF it is a warning message it may be that the UOm does not support decimals as per customizing. Check in CUNI.
    Regards
    Ram

  • Subcontracting GR creation without changing component quantity

    We are using subcontracting process in SAP. When GR document is created the user sometime by mistake changes the quantity of component that is going to be consumed through material movement 543. Is there any setting through which we can restrict user from changing quantity of the component

    Hi
    Why user will change the quantity for BOM component?
    If you are using BOM for sub contract process, I hope you can't change the BOM items.
    Otherwise check function module EXIT_SAPLMBMB_001 with the help of developer.
    regards
    Srinivas

  • PO issue :What should we do to close the PO or change item quantity?

    Hi Everyone,
    I am new to MM.I got an issue saying that there is some mismatch with quantity in the particular PO. User wants to cancel/close the PO system but it is not allowing to do so. To change the quantity is also  good, but while trying to change item quantity system is giving the following error message.
    Quantity 1000 is smaller than quantity issued 2000.
    To close the PO or change item quantity what should I need to do?
    A help will be highly appreciated
    Regards,
    sharon.

    Hi,
    It is of the standard functionality of SAP to verify the GR and IR against PO quantity when you try to close your related PO line item.  It ensures data consistency for your PO and PO history.  What you should do is very much subject to the status of your PO history (i.e. how many you have already GRed and/or IRed).  Check it again in your PO history tab of the PO item details level prior to making any further action on how your PO line item quantity shall be adjusted.  A particular example is if GR was done for the quantity of 2,000, you can't simply adjust your PO quantity into 1,000 as it goes against the logic whereby the GR quantity (and/or IR quantity) must be no larger than PO quantity.
    Cheers,
    HT

  • Error while changing BOM with change number

    Hi ALL, Please help me with followed error message, I am using ECM. I created ECR and converted to ECO and then released.
    Object management record cannot be generated
    Message no. 29046
    Diagnosis
    You want to change the BOM with the entered change number.
    One of the following situations triggered this error message:
    1. The indicator that allows automatic generation is not set for object type BOM in the change master.
    2. The indicator generation only on initial creation is set for object type BOM
    3. You are processing a change request.
    System response
    The system checks whether the indicator object management record will be generated is set in the change master.
    If the indicator generation only on initial creation is set, the system checks whether the BOM exists in the system.
    Procedure
    If you are authorized to change the change master, execute the following steps:
    For 1.)
    Set this indicator for object type BOM or create the control record in the change master.
    For 2.)
    If the BOM already exists in the system and the generation only on initial creation indicator is set, the system can no longer generate the control record automatically.
    In this case you have to add the object control record to the change master first, then you can change the BOM in relation to the change number.
    For 3.)
    You cannot generate any object control records for a change request.

    Hi
    With your question regarding changing BOM with change number  it looks lke there may be problem in defining the Object types,objects.Moreover whenever converted to ECO you need to enter into cs02 tcode for changing the bom with relevant change number and valid from date.
    Hope this gives you a clear idea.let me know if you need anyfurther inputs.
    Regards
    Praveen

  • Changing the quantity of Schedule line for an product runtime

    Hi CRM friends,
    When I am saving the Order after changing the quantity (say from <b>5 to 10</b>); Now base on some conditions, quantity must be reverted back to the original quantity (i.e to 5). This has to be done while saving the order in a Call back function module. I have the following parameters:
    1. Item Guid
    2. Old Value (i.e 5)
    3. Header Guid
    I have tried using FM “CRM_SCHEDLIN_I_MAINTAIN_OW” using the following code:
    DATA: LS_FIELDS TYPE CRMT_INPUT_FIELD,
    LT_FIELDS TYPE CRMT_INPUT_FIELD_TAB,
    LS_QTY TYPE CRMT_SCHEDLIN_EXTD,
    LS_SCHEDLIN TYPE CRMT_SCHEDLIN_I_COM,
    LT_SCHEDLIN TYPE CRMT_SCHEDLIN_I_COMT.
    LS_FIELD_NAMES-FIELDNAME = 'QUANTITY'.
    LS_FIELD_NAMES-CHANGEABLE = 'X'.
    INSERT LS_FIELD_NAMES INTO TABLE LS_FIELDS-FIELD_NAMES.
    LS_FIELDS-REF_HANDLE = 1.
    LS_FIELDS-REF_GUID = IV_OBJECT_GUID.” A88DE289D91D464C81052646DB6856BB
    LS_FIELDS-REF_KIND = 'B'.
    LS_FIELDS-OBJECTNAME = 'SCHEDLIN_I'.
    INSERT LS_FIELDS INTO TABLE LT_FIELDS.
    LS_QTY-GUID = ls_schedlin_i_new-GUID. “A88DE289D91D464C81052646DB6856BB / 1D72D133BF86FC4F81BC8F0F88438136(From table CRMD_SCHEDLIN passing the item guid )
    LS_QTY-ITEM_GUID =  IV_OBJECT_GUID. “A88DE289D91D464C81052646DB6856BB
    LS_QTY-QUANTITY = lV_OLD_ORDER_QTY.
    LS_QTY-MODE = 'B'.
    LS_QTY-EVENT_TYPE_APPL = 'CRMS'.
    LS_QTY-EVENT_TYPE = 'ORDER'.
    LS_QTY-SCHED_NO_EXT = '0001'.
    LS_SCHEDLIN-REF_GUID = IV_OBJECT_GUID.
    LS_SCHEDLIN-REF_HANDLE = 1.
    LS_SCHEDLIN-MODE = 'B'.
    INSERT LS_QTY INTO TABLE LS_SCHEDLIN-SCHEDLINES.
    CALL FUNCTION 'CRM_SCHEDLIN_I_MAINTAIN_OW'
    CHANGING
    CS_SCHEDLIN_I_COM = LS_SCHEDLIN
    CT_INPUT_FIELDS = LT_FIELDS.
    The code is executing fine, but the quantity changes to new one (i.e. <b>10</b>) Please tell me whether there is a mistake in passing the parameters. For LS_QTY-guid I have tried passing with item guid as well as schedule line guid from the table CRMD_SCHEDLIN.
    Also tell me there is any other way.
    Regards
    Naveen.

    hi use this code in
    order_save-prepare method
    The refrence code is from FM 'CRM_COMP_PROD_INS_AS_SUBITEMS' and include LCRM_COMP_PROD_UIF13
    It does work. I am copying the main line item in sub line item and changing the quantity.
    regards
    M
      cs_schedlin_i-ref_handle        = iv_handle.
    fill input_field
      ls_input_field-ref_handle       = iv_handle.
      ls_input_field-ref_kind         = gc_object_ref_kind-orderadm_i.
      ls_input_field-objectname       = gc_object_name-schedlin.
      get handle
        CALL FUNCTION 'CRM_INTLAY_GET_HANDLE'
          IMPORTING
            ev_handle = ls_schedlines-handle.
        ls_schedlines-mode             = gc_mode-create.
        ls_schedlines-parent_sdln_guid = iv_own_item_guid.
        ls_schedlines-logical_key      = ls_schedlines-handle.
        ls_schedlines-quantity         = 1.
        INSERT ls_schedlines INTO TABLE cs_schedlin_i-schedlines.
        ls_input_field_names-fieldname  = gc_fld_schedlin-handle.
        INSERT ls_input_field_names INTO
                                    TABLE ls_input_field-field_names.
        ls_input_field_names-fieldname  = gc_fld_schedlin-parent_sdln_guid.
        INSERT ls_input_field_names INTO
                                    TABLE ls_input_field-field_names.
        ls_input_field_names-fieldname  = gc_fld_schedlin-logical_key.
        INSERT ls_input_field_names INTO
                                    TABLE ls_input_field-field_names.
        ls_input_field_names-fieldname  = gc_fld_schedlin-quantity.
        INSERT ls_input_field_names INTO
                                    TABLE ls_input_field-field_names.
        ls_input_field-logical_key = ls_schedlines-handle.
        INSERT ls_input_field INTO TABLE ct_input_field.

  • How to change the Quantity in Excise Invoice where PART1&2 are posted

    Dear Gurus
    I have a PO with 2 Qty
    Where i have received GR for  1 QTY with excise invoice for 1 Qty
    now the User is done GR for 2 Qty with excise details of 1 where Part 1&2 are posted
    now i want to change the quantity from 2 to 1 in Excise Document and the GR
    how to solve this issue
    Please help me

    Hi,
    As you needed, 1st reverse GR document in 102 Movement type in t.code: MIGO and cancel the excise entries with t.code: J1IEX, go for post and then cancel for excise amount with entering Rejection Code in miscellaneous TAB.
    Regards,
    Biju K

  • How to change the Quantity in the Credit Memo using BAPI

    Hi All,
    I have a requirement in which i need to change the Quantity Value field available in the Credit Memo using BAPI.
    Can anyone help me out to get any available BAPI to perform this action or any Solution to change the Quantity in the Credit Memo ?.
    Regards,
    Muruganand.K

    Hi,
    Try using BAPI_SALESORDER_CHANGE.
    DATA: s_order_header_in LIKE bapisdh1.
    DATA: s_order_header_inx LIKE bapisdh1x.
    DATA: BEGIN OF i_order_item_in OCCURS 0.
    INCLUDE STRUCTURE bapisditm.
    DATA: END OF i_order_item_in.
    DATA: BEGIN OF i_order_item_inx OCCURS 0.
    INCLUDE STRUCTURE bapisditmx.
    DATA: END OF i_order_item_inx.
    DATA: BEGIN OF it_return OCCURS 0.
    INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_return.
    DATA: BEGIN OF i_sched OCCURS 10.
    INCLUDE STRUCTURE bapischdl.
    DATA: END OF i_sched.
    DATA: BEGIN OF i_schedx OCCURS 10.
    INCLUDE STRUCTURE bapischdlx.
    DATA: END OF i_schedx.
    s_order_header_inx-updateflag = 'U'.
    i_order_item_in-itm_number = vbap-posnr.
    i_order_item_in-TARGET_QTY = rv45a-zzqty.
    i_order_item_inx-updateflag = 'U'.
    i_order_item_inx-itm_number = vbap-posnr.
    i_order_item_inx-TARGET_QTY = 'X'.
    APPEND: i_order_item_in, i_order_item_inx.
    i_sched-itm_number = vbap-posnr.
    i_sched-sched_line = '0002'.
    i_sched-req_qty = rv45a-zzqty.
    APPEND i_sched.
    i_schedx-itm_number = vbap-posnr.
    i_schedx-sched_line = '0002'.
    i_schedx-updateflag = 'U'.
    i_schedx-req_qty = 'X'.
    APPEND i_schedx.
    IF sy-subrc = 0.
    CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
    EXPORTING
    salesdocument = xvbap-vbeln
    order_header_in = s_order_header_in
    order_header_inx = s_order_header_inx
    behave_when_error = 'P'
    TABLES
    return = it_return
    order_item_in = i_order_item_in
    order_item_inx = i_order_item_inx
    schedule_lines = i_sched
    schedule_linesx = i_schedx.
    CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
    ENDIF.
    Change the fields as per your logic before populating orders item and schedule line data.
    You have to pass the quantity in schedule line items as well in case you want to change quanity in order.
    KR Jaideep,
    Edited by: Jaideep Sharma on Jun 22, 2009 7:35 PM

  • How to change actual quantity in Outbound delivery User exit

    hi all ,
    My requirement is to change the quantity of outboud delivery according to some logic .but my issue is after writing the code MV50AFZ1 , system is not considering the quantity changed by me , it is taking the quanity directly from sales order confirmed quantity .
    please anybody help on this issue  .

    Hi,
    Under which user exit have your written your code:
    USEREXIT_MOVE_FIELD_TO_LIKP or
    USEREXIT_MOVE_FIELD_TO_LIPS or
    USEREXIT_SAVE_DOCUMENT or
    USEREXIT_SAVE_DOCUMENT_PREPARE
    I think if you write your code within the USEREXIT_SAVE_DOCUMENT, it should work.
    Regards,
    Subramanian

  • Change Item Quantity in the Billing Document ( Proforma Invoice )

    Hi,
    There is a requirement from the client to change the quantity at item level in the billing document ( Order based Proforma Invoice ) after it is saved.
    As SAP does not allow to change in the VF02 transaction, Please let me how to change quantity at the item level of the billing document.
    Please let us know if we need to use any user exit or any other system modification.
    Regards
    V R Reddy

    Hi Venkat Rama Reddy
    First of all Welcome to SDN forum
    Now coming to your query , your requirement cannot be fulfilled  as standard SAP doesn't .Because ,First of all at billing level you cant change the item quantity , then in VF02 it is not possible.But if your clients requirement is to change the item quantity in VF02 , then first of all do VF11->VL09->VL02N and here you can change the picking quantity and then do the billing ,as once if you change the picking quantity then at billing item  level also the item quantity will change
    Check with the following user-exit  USEREXIT_SAVE_DOCUMENT_PREPARE. Here with the help of the Technical consultant include the requirement that after saving the billing document we can change the item quantity
    But it is not suggestible to change the item quantity at billing level . As once you save the billing document , an accounting document will be getting created.
    Regards
    Srinath

Maybe you are looking for

  • Migration set up two accounts. How do I share them?

    Hello, Just bought my first Mac. I used migration assistant to transfer things. First I transferred all my folders, files, and photos. Then later, overnight, I transferred all my music. It appears that Migration Assistant has now set up two "users" f

  • Web Service with Crystal Reports

    Post Author: ZugDav CA Forum: Deployment Hi, I have a problem with the development of a Report Webservice. I have read this tutorial: http://msdn2.microsoft.com/en-us/library/ms225510(VS.80).aspx The problem is that from the Visual Studio 2005 IDE th

  • Problem with Entity PK Attributes & VO inputListOfValues

    Hello, im using Jdev 11.1.1.3.0 and have this issue. Use Case: 4 PK Entity Attributes that are used in a view object as Input List of Values. On a JSPx, there's a table where LOVs are located, The problem appears when i call createInsert method and s

  • Interactive Report Webclient issue:

    Hi, We are facing starnge Issue in IR Web client report.We have IR report filter at leaf level.When we select 4 or 5 filters then we are genaratig the report and Query results 5 laks records.When we are selcting 9 Id's the Query processed in 10 mints

  • Transport org. unit & position to another system

    Hi, I modified some org. units and positions in development and system did not ask for a transport request. How can I move my objects into test system ??