Can we modify sales order line item before its booked through API?

can we modify sales order line item before its booked through process_order API?
here we have a situation where related item should be substituted for actual order item when user selects the related item , So looking for a way to modify the ordered item on sales order line .
Thanks,

Hi
There is an API to update the Related Item on the line level in the Sales Order.
PROCESS_ORDER API can be used for this purpose. It is part of OE_ORDER_PUB.
Below are the fields on line table type that will be assigned to create an order line with related item and original ordered item.
ORIGINAL_ORDERED_ITEM : Original Item
ORDERED_ITEM : Related Item
ITEM_RELATIONSHIP_TYPE : Type of Relationship.
Please go ahead and try to create it like this. I am pretty sure that it will get the order created with related items.
Note: Please make sure the profile option
OM: Enable Related Items
should be enabled.
Please mark the response as helpful or correct if it provides you the solution.
Thanks
Mirza Tanzeel

Similar Messages

  • Modify Sales order line item Type

    Hey Guys,
    I was wondering if there is a way through the DI or UI that I can change the type of a line item in a sales order matrix. I can change it through the Business One client to sub total or text on a line item and add comments. Is it possible to do this through code via DI or UI?
    Any examples would be helpful.

    Something like this.
    ComboBox cb = (ComboBox)oMatrix.Columns.Item("COLUID").Cells.Item("row").Specific;
    cb.Select("ValueToSelect",BoSearchKey.psk_ByValue);
    Normal lines have "" (empty) value
    Textlines have "T" value
    Subtotals have "S" value

  • Can sales order line item text be replicated into production order

    Hi
    Can sales order line item text be replicated to production order through standard PP configuration? If so how can it be done?
    If that is not possible through standard configuration then can it be possible to read both sales order line item information and production order information using a BAPI or a program?
    Please help me, i have been trying hard for this and also searches sdn for relevant posts but could not find any, I thank all people who can help me with some information on this.
    Regards,
    Jessica

    Sample code:
    DATA:
      wa_order_objects    TYPE bapi_pp_order_objects.
    DATA:
      it_order_header     TYPE STANDARD TABLE OF bapi_order_header1.
    *--Setting Flag to get details of BAPI
      wa_order_objects-header         = c_x.
      CALL FUNCTION 'BAPI_PRODORD_GET_DETAIL'
        EXPORTING
          number           =  "Order number"
          order_objects    = wa_order_objects
        TABLES
          header           = it_order_header.

  • Sales order line item user exit?

    Hi Folks,
    Can any one of you suggest me an user exit in sales order line item level?
    I want something which stops before/ or just after entering the quantity in the item level.
    We wanted to set up a issue which deals with rounding profile comming from CMIR record to take from Ship-to rather than standard Sold-to party functionality.
    Thanks a TON in advance.
    Praveen.

    Praveen,
    Check this post
    https://forums.sdn.sap.com/click.jspa?searchID=7098802&messageID=1674246
    Regards,
    Satish

  • Field added in Aditional data tab of sales order line item at screen 8459

    Hi all,
    My problem is .
    I have appended one field in VBAP table, given it a name "WBS ELEMENT"
    The field is getting displayed in VA23 as well as VA02 Transaction.
    when i create sales order with the quotation reference,
    the "WBS Element"  of line item of quotation should get updated in "WBS Eleement "  of sales order line item
             This i am doing by triggering user exit.
    Problem is:
    Once Quotation  line item get copied to the sales order line item
    and the screen is in front of you with those details,
    before saving sales order .
    if you go at the sales order line item withou saving the document
    The field i have created in the screen 8459 i.e WBS Element ,doesnt get displayed.
    how could i retain the field Ihave created on screen 8459
    while creating the sales order from quotation before saving that sales order.
    Pleas help .

    Hi Vikram,
    It seems as it has been coded only to save the values into the new field that you have appended to VBAP. But before saving if the user wants to see the field, it is blank. You can try coding in PBO (process before output) of the relevant screen as follows:
    1. Get the reference of the quotation. Something like XVBAP-VGBEL will give this number.
    2. Get the value of Z field in VBAP by passing this quotation.
    3. Copy the above value to the corresponding Z field in XVBAP (or any internal table which holds VBAP data before saving)
    Please reward if helpful.
    Regards,
    Krishna

  • Sales Order Line item category not getting Re detemining Correctly

    Dear all,
                I need  help regarding the Sales order item category redetermination.
                we are having two item categories YNAE and YNAG and it contains schedule  line categories CP and CB ( i.e for item         category  YNAE schedule line category is CP and for item category YNAG schedule line category is CB),
    for YNAG Purchase Requisition is automatically created becz of functional setting on save and it is working fine.
    For every line item in sales order line item level item category YNAE will be determined by default as per functional settings.
             Now my requirement is that, if sales order line item doesn't contain 100% confirmed quantity, than i needs to change the default line item category YNAE to YNAG which i am trying to do it in USEREXIT_PRICING_PREPARE_TKOMP becz in this exit i am getting the values in XVBAP and XVBEP and  it is working fine .
             But schedule line category is not getting redetermined automatically what i mean is, if i change the item category to YNAG from YNAE in user exit corresponding schedule line category CB of YNAG is getting determined automatically at the schedule line level and if ichange the schedule line categories in XVBEP in exit USEREXIT_PRICING_PREPARE_TKOMP, changes are reflecting at the schedule line level but Purchase requisation is not getting created for schedule line on SAVE and its delivary dates are also not getting determined properly. If i press the option ATP check at the schedule line level than very things will getting corrected.
       I feel that i am not doing this in proper way, do u have any idea about how to redetermine item category. please let me know if u have any idea .
    Regards,
    Vaddepally Manoj

    USEREXIT_PRICING_PREPARE_TKOMP is the wrong location - that exit is for pricing communication preparation only.  Your primary location for item category determination is USEREXIT_SOURCE_DETERMINATION (MV45AFZB).  In your simple scenario, you could consider making an availability check at this point with some assumptions and then assign the item category accordingly.  Otherwise, you can re-assign item category and schedule line category in USEREXIT_MOVE_FIELD_TO_VBEP.  The exit is called once before ATP (for ATP-relevant schedule line categories) and once afterwards.  The call is recursive if you re-assign another ATP-relevant category.

  • Transaction VKM1 - Changes Sales Order Line Items Custom Fileds

    Hi,
    I have a challenge to indentify the impact of VKM1 on a Sales Order Line Item Customer Enhanced Fields. When credit hold for the customer is released in VKM1, I want to prevent some of the changes to the line items in the User Exit. The Problems I am not sure, How VKM1 is calling the Transaction VA02 or those Sales Order User Exits to modify certain customer enhanced fields. I tried Activation of Break Point in Update Task but did not stop at the Break points set up in the User Exit. How does Transaction VKM1 call the Sales Orders to execute changes? Is it through BAPI or Call Transaction VA02 or some thing else.
    Can any One please help me? Appreciate Your Help in advance.
    Thanks,
    Kannan

    VKM1 uses FM SD_ORDER_CREDIT_RELEASE to release orders on credit.

  • Select aentries from table Z-Table for all sales order line items

    Hi friends,
    can anyone please explain me about the "Select entries from table Z-Table for all sales order line items".
    Thanks.

    Moderator message - Welcome to SCN.
    But
    Moderator message - Please search before asking. Press F1 on SELECT and look at the FOR ALL ENTRIES addition. - post locked             
    Rob

  • Third Party GRN Posting Date to be Copied to Sales Order Line item Billing Date

    Hello Experts
    I have a client requirement where in they want to bill line items in the sales order ( third party process ) to the end customer in sync with the GRN posting dates happened in the PO
    For EG if GRN happened on 1st July 2014 then Billing Date should come in as 31st July 2014 so when they execute VF04 giving from and to dates as 1st july to 31st corresponding sales order can be invoiced
    Actual problem is for suppose if i create a sales order in the month of june say 26th basing on the factory calendar setting and invoicing list maintained in the customer master system defaults the billing date to 30th June 2014 , and the same when user runs VF04 from 1st June to 30th June this sales order shows as due and mistakenly end user invoices the customer ( whereas logical GR would have only received in July 1st )
    My requirement is similar to below threads but i am unable to find answer how to copy GR Posting date to Billing Date of the sales order line item
    use GR Doc date as billing date
    3rd party sales process (w/o ship notif) - Billing

    Hi Lakshmipathi ji,
    As my requirement is to update the billing date at the sales order line item level , As a process user goes in executes VF04
    For Ex
    Sales Order Created Date is 1st June 2014 then System Defaults Billing Date at line item to 30th June 2014
    Now when i do GRN suppose on 1st July 2014 for that line item , system should trigger a code where in check the posting date of the GRN and override the same in the Biiling Date field of the sales order line item
    So when VF04 is run for a month All the GRN which are recieved in the month of July are invoiced in July
    Please share me your thoughts do we need to check any userexits from MM side which reads the posting date of GRN and then copies in to my third party sales order
    Regards
    Hiba

  • Sales order line items delivery cancelled but still appears in MD04.

    Hi PP Gurus,
    In the sales there are 6 line items are there out of which for 1 line item delivery and PGI happened. And for remaining line items delivery got cancelled, but these line items for which delivery cancelled appearing in the MD04, I have rejected the sales order line items but these line items still shows in MD04. Please advise how to remove these line items from MD04.
    Thanks and Regards,
    SHARAN.

    Hi
    Pl refer SAP Note : 1166713 for the Problem which says " You have posted goods issue and therefore the delivery requirements should no longer be existing. These inconsistencies can be seen using report SDRQCR21"
    Regards
    Brahmaji

  • How to Find Out The Production Order Number For The Sales Order Line Items

    Hi All,
    I want to know the number of production orders for each sales order line item. I know the sales order number .Can anyone tell me how the tables can be linked to get all the production order numbers for each sales order line item.

    I think it depends on your configuration. But check fields KDAUF and KDPOS in table AUFK.  or in table AFPO.
    Regards,
    Rich HEilman

  • I have a problem regarding sales order line item with confimed quanity

    Hi Experts,
    I have a problem regarding sales order line item with confimed quanity with '0'  with delivery block but confirming the sales order quantity once the order is released from credit check.
    The situation arises as per the below scenarios.
    Scenario - 1 -  When the sales order has two line item - one line item with confirmed qunaity in the schedule line and for the 2nd line item there is no available stock for the Material xxxxxx.
    Initially the sales order is created for the line item 2 with confirmed quantity = 0, and having the delivery block = 01 for the Material xxxxxx  and the order is set with credit check.  Once the order is relased from the credit check.  The quanity for the item 2 where the confirmed quantity will be = 0 ( Where it is not changing the confirmed quantity)
    Scenario -2-  Updating the order qunaity for the line item 2 as (9Pcs) it will goes to credit check and save the order.
    Maintain the stock for the line item 2 ( 5 Pcs).
    Once the order is released from the credit check.  Then  for the line item 2 the confirm quanity will be seting to 5 Pcs with Delivery blcok 01.
    This should not happen, When the credit check is released even though if it has stock based on the delivery blockl it should set the confirmed quanity to Zero.
    Can you please help me how to solve this issue.
    Looking forward for your reply.
    Thanks and Regards,

    Hi,
    I agree with your point.  In the sales order When the complete delivery check box is enabled where the confimed qty is set to zero, it is fine but when we save the orderr it goes to credit check.  Once we release the order using VKM3 where in the sales order the confimed quantity is setting to 5,  But it should set to Zero quantity.  Quatity should not be get confirmed it should be Zero Quantity. 
    Further in SPRO - customizing in the deliveries blocking reasons - It has a tick mark in the confirmation blcok.  But we dont want to remove the - Confirmation Block tick mark
    Please any one can help me if you have any solution to solve this problem.
    Thanks and Regards.

  • Change the Profit Center in Sales Order line item's Account assignment tab

    Hi Gurus,
    I need to change the Profit Center at Sales order Line item in Account Assignment Tab. Currently  The Profit center is coming from Material Master for the Line Item's Material as default but I have to change / overwrite  that.
    Can any body provide me how can i achive that means
    Any User exits, substitution or any thing ?
    I tried MV45AFZZ but i am not able to find out the right place where I can change COBL-PRCTR.
    Sony

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

  • Restrict deletion of sales order line items

    Hi,
    I need to restrict deleting of sales order line item, I think we can use the user exit, MV45AFZB, USEREXIT_CHECK_XVBAP_FOR_DELE.
    But when i set the flag to 'X', even though it does not delete at tht instance when the sales order save is clicked again the line item gets deleted.
    ANy idea , to prevent that?
    Thanks
    Keshi

    Hi Keshi,
    That is the correct exit, we are using the same without any problem. Just set US_EXIT  = CHARX.
    Regards,
    John.

  • Add field 'asset' in sales order line item account assignment tab

    Hi,
    I would like to add the following field: 'asset' in sales order line item account assignment tab.
    I can enter order, or wbs, but not Asset.
    How can I make this field visable?
    Anybody?
    thanks,
    klundert
    Edited by: Eric Van Zundert on Oct 30, 2010 8:43 AM

    Hi
    There is perform which moves the values to VBAP field.
    This PRCTR field is stored in VBAP (i.e., SO line item table)
    USEREXIT_MOVE_FIELD_TO_VBAP
    Hope it works.
    VVR

Maybe you are looking for