Update Sales Order line item field

Need to update a field mfrgr of VBAP table with some user defined values on selection screen parameter.
I have selected all the Sales order line items in an internal table which need to be updated.
How can I use the update command with set expression to do the same ? If yes how ? if no what is the best way to do the same.

I am using the following command and it doesnt work as it says cannot use AND command.
          loop at it_vbfa.
                UPDATE  VBAP
                WHERE VBELN = it_vbfa-vbeln
                and   posnr = it_vbfa-vbelv
                SET MFRGR = P_MFRGR.
                IF SY-SUBRC = '0'.
                   COMMIT WORK.
                ENDIF.
          endloop.
Any pointers ? What am I doing wrong.

Similar Messages

  • 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

  • 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

  • I need to add fields in additional fields B the sales order line item

    i  need to add fields in additional fields B beside the field (icon_val_quantity_ structure) in the sales order line item, How to achicve this? please help me..

    Please fined the below solution for achieving your requirement.
    1. Add new filed "B" in table VBAP.
      a) T.code  SE11 --> Enter structure name VBAP --> display
      b) Goto --> Append Structure --> Enter Structure name and new field "B"
    2. request your basis team and take the access key for modification of stabdard program SAPMV45A & Screen: 8459
       a) After receiving access key for standard program then got o SE51 --> enter program name  SAPMV45A & Screen: 8459
       b) click change Button
       c) click layout button
       d) add new field "B" below of the screen (F6 -> enter table name : VBAP --> get from dictionary --> selet new field and past in screen )
    3) write below code in flow logic
    PROCESS BEFORE OUTPUT.
                               Verarbeitung vor der Ausgabe
      MODULE ZZPB_INITIALIZE_8459.
      MODULE ZZPB_OUTPUT_8459.
    PROCESS AFTER INPUT.
      CHAIN.
        FIELD VBAP-New field name "B".
        FIELD ZVC_SALES_EXPORT-ZZAPLHENKO.
      ENDCHAIN.
      MODULE ZZPA_OUTPUT_8459.
    4. functin Module code
    module ZZPB_OUTPUT_8459 output.
      Data: l_v_actve type ale_active,
            l_v_ttyp  type c.
      Data: l_v_tragr type tragr.
    l_v_ttyp = t180-trtyp.
      if l_v_actve is initial.
        l_v_ttyp = 'A'.
      endif.
      LOOP AT SCREEN.
        CASE l_v_ttyp.
          WHEN 'A' OR 'C'.
            SCREEN-INPUT = 0.
        ENDCASE.
      ENDLOOP.

  • Add field to Sales Order line item

    I need to add a field to Sales Order line item, can you tell me a user exit??

    Hi,
    You can a new field in the additional data B tab of the sales order line item..
    Check the program SAPMV45A and screen number 8459
    Thanks,
    Naren

  • 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

  • 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

  • Material Variant configuration in sales order line item from Ztable

    Hello Experts,
    we have configurable material and and creating sales order. from sales order line item if we goto configuration we can maintain variant configurations. My requirement is that when i click on configuration after selecting a line item i need to check ztable where i have material no and and relable text. if an entry exists i have to populate this relable text in one of the configuration filed. Can any one help how can i read and update configuration in sales order level and where to do this coding so that when i click on configuration the value from ztable populated in a field.
    Many thanks in advance.

    Hi Senthil,
    It is simple.
    When you create a characteristic which should have the value maintained in the Z table, go to the tab values. Here you have a push button called "Other Value check". Here you click this button and select the function module option. Now, in the window, you will have a place where you can mention the name of teh function module.
    You create a function module with the help of your developer to find out the text maintained in the Z table using teh rules you have in your mind and update that logic in the characteristic. In the earlier screen, you just have to mention the name of the function module, thats all, your work is done.
    Now when you configure, for this characteristic, the value will be automatically determined using teh function module. You have to create such characteristics as "Not ready for input" ones in additional data for which you cannot enter values manually.
    Hope this helps.

  • 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.

  • Deleting Sales order line item

    Hi,
    The sales order line item deletion should not be allowed after accouting of the advance payment is happened.
    How to achieve this.

    Hi Seema
    As far as I could guess you need to grey out VBAP-ABGRU field once you have posted payment for the sales order line item. Since this is a SD related process no validation or substitution would work in this. In this case when posting the incoming down payment through F-29 internally you need to call the user exit in the sales document to update the status of VBAP-ABGRU.
    Thanks
    Indranil

  • Default Functional Area in Sales Order Line Items

    Hi,
    Is there any user exit that can be used to default Functional Area in Sales Order Line Items.
    I tried mv45afzz but not working. Any idea and do let me know the field or structure effected.
    Thanks.

    Hi Sathish
    You can update table XVBAP from program SAPMV45A in program mv45afzz like code below:
    FIELD-SYMBOL: <mytab> LIKE STANDRD TABLE OF VBAP.
       ASSIGN (SAPMV45A)XVBAP TO <mytab>.
       LOOP AT <mytab>.
       ENDLOOP.
    I hop it helps .
    Kind regards
    Carlos Machado

  • 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

  • Cannot reject/delete sales order line item due to del.date in 2210

    Hi all,
    not sure if anyone else had this issue already....
    Situation :
    Sales order line item entered with delivery date in 2210.    We would like to correct this order but can't....
    every time SAP issues error :
    Error determining posting period (info
    S008, variant GL, RC 3)               
    I believe this is because we haven't maintained our calendars yet for 2210 :-D
    Question : without us having to load/define the calendar...is there a utility/oss program which we can use to delete the line item, or reject it...or even update the delivery date?
    Thanks for your help!

    If the system pop ups the error message M2012, then please refer note 10891 or 37532.  If the error message number is different, please update the forum.
    thanks
    G. Lakshmipathi

Maybe you are looking for

  • Custom exit or badi for changing the user fields in operation of process order

    Hi all     I want to find a exit or badi to set default value to the user fields in operation of process order when COR1.     I have tried exit 'PPCO0001', but this exit is call after commit work, so I can not change any thing     I also tried to use

  • Mail won't open following update

    A few weeks ago I got a pop up asking me to update mail. I did this but since then it won't open properly. It either freezes without any viewer window showing or a viewer window comes up but is completely blank. Anybody have any suggestions? I book  

  • 2 iPhones, 1 Itunes....problems?

    My husband and I have iPhones but we only have one iTunes account. He had the iPhone 4, and recently updated his phone to the most recent OS. Now, he can iMessage, but the only problem is that when i receive his message it is coming from my email add

  • Signature with graphics

    How can you set up the auto email signature to display graphics? (i.e. company logo)

  • Why does Firefox try to open PDF with Acrobat 8 when I have Properties set to use Reader 9.1?

    If I click a link to a PDF from Firefox 3.6.10 it tries to open it with Acrobat 8 and fails, while if I double-click in a folder it correctly opens with Reader 9.1 If I try to open with Acrobat 8 from folder it won't work either, but why doesn't Fire