Incoming Order IDOC - updating VBKD-IHREZ_E at item level

Hi all,
I am trying to update field VBKD-IHREZ_E at item level from an incoming Idoc with no success yet.
Here is first exit to store requested data from the idoc ZXVEDU03
IF segment-segnam =  'E1EDP19'.
    xvbap = dxvbap.
    MOVE segment-sdata TO lo_e1edp19 .
    IF lo_e1edp19-qualf = '001'.
      xvbap-ihrez_e = lo_e1edp19-idtnr.
      dxvbap = xvbap.
    ENDIF.
ENDIF.
Here is second exit to update the sales order field ZXVEDU04:
CASE dlast_dynpro.
  WHEN '4002'.
WHEN '4003'.
    READ TABLE dxbdcdata WITH KEY fnam = 'VBKD-IHREZ_E'.
    IF sy-subrc NE 0.
     DATA wa_tabix TYPE syst-tabix.
      MOVE sy-tabix TO wa_tabix.
     DATA wa_dxbdcdata TYPE bdcdata.
      MOVE 'VBKD-IHREZ_E' TO wa_dxbdcdata-fnam.
      MOVE zzxvbap-ihrez_e TO wa_dxbdcdata-fval.
      INSERT wa_dxbdcdata INTO dxbdcdata INDEX wa_tabix.
    ENDIF.
  ENDIF.
ENDCASE.
Field is not updated in sales order. I tried to put the same logic at header lever (dynpro 4002) and it does work (though all items have the same value)
If a good soul could help, it would be very much appreciated.
regards,
Bruno
Edited by: Bruno Monconduit on Mar 8, 2011 1:08 PM

Hi all,
actually I had to add some extra logic in the exit to go update IHREZ_E in another dynpro 5003.
Hereafter code implemented (works fine)
Regards,
Bruno
WHEN '5003'.
        DATA: lt_vbap LIKE xvbap.
        lt_vbap = dxvbap.
changing screen to update field
        PERFORM dynpro_setzen IN PROGRAM saplveda
        USING 'BDC_OKCODE' '=T\11'.
       PERFORM dynpro_new(saplveda) USING programm_auftrag
       '4003' CHANGING dlast_dynpro.
        PERFORM dynpro_setzen IN PROGRAM saplveda
        USING 'BDC_OKCODE' '=/00'.
        PERFORM dynpro_setzen(saplveda) USING 'VBKD-IHREZ_E'
        lt_vbap-ihrez_e.
        PERFORM dynpro_setzen IN PROGRAM saplveda
        USING 'BDC_OKCODE' '=T\06'.
back to screen 5003
        PERFORM dynpro_new IN PROGRAM saplveda
                           USING 'SAPMV45A'
                                    '5003'
                           CHANGING last_dynpro.
       PERFORM dynpro_setzen IN PROGRAM saplveda
       USING 'BDC_OKCODE' '/EBABA'.
Edited by: Bruno Monconduit on May 25, 2011 6:32 PM

Similar Messages

  • Updating a Salesorder at Item level

    Hi All
    I am trying to update a saleorder at item level(order quantity field) thru the function module BAPI_SALEORDER_CHANGE. I have 3 items in my saleorder. I am able to update the first item but I am unable to update the schedule_lines-req_qty(order quantity field) of the second and third item.
    Can anyone plz suggest me how 2 overcome this prob.??
    Thanks in Advance
    Vijay.

    Hi Kevin
    Here is the code you were asking for.  I will repeat my problem.  The prob is: I am able to update the first item level but I am unable to update the req_qty field of the subsequent item levels.
    Expecting an early reply.....
    CODE:
    data: salesdocument like bapivbeln occurs 0 with header line,
          order_header_in like bapisdh1 occurs 0 with header line,
          order_header_inx like bapisdh1x occurs 0 with header line,
          order_item_in like bapisditm occurs 0 with header line,
          order_item_inx like bapisditmx occurs 0 with header line,
          partners like bapiparnr occurs 0 with header line,
          schedule_lines like bapischdl occurs 0 with header line,
          schedule_linesx like bapischdlx occurs 0 with header line,
          partnerchanges like BAPIPARNRC occurs 0 with header line,
          return like bapiret2 occurs 0 with header line.
    data : pur_ord_no like vbkd-vbeln.
    parameters : puro_num like vbkd-bstkd.
    start-of-selection.
    *Retrieving salesorder number by passing the purchase order number.
    select single vbeln from vbkd into pur_ord_no where bstkd = puro_num.
    salesdocument-vbeln = pur_ord_no.
    append salesdocument.
    order_header_inx-updateflag = 'U'.
    order_header_inx-sales_org = 'X'.
    order_header_inx-distr_chan = 'X'.
    order_header_inx-division = 'X'.
    order_header_inx-sales_off = 'X'.
    order_header_inx-purch_no_c = 'X'.
    order_header_inx-req_date_h = 'X'.
    order_header_inx-purch_date = 'X'.
    append order_header_inx.
    order_header_in-sales_org = 'JNJ1'.
    order_header_in-distr_chan = '02'.
    order_header_in-division = 'J1'.
    order_header_in-sales_off = 'JNJ1'.
    order_header_in-purch_no_c = 'XMLFileUpload6'.
    order_header_in-purch_date = '20060101'.
    order_header_in-req_date_h = '20060202'.
    append order_header_in.
    *partnerchanges-itm_number = '000030'.
    *partnerchanges-updateflag = 'X'.
    *partnerchanges-partn_role = 'AG'.
    *partnerchanges-p_numb_old = '0000000011'.
    *partnerchanges-p_numb_new = '0000000011'.
    *append partnerchanges.
    order_item_inx-updateflag = 'U'.
    order_item_inx-material = 'X'.
    order_item_inx-plant = 'X'.
    order_item_inx-itm_number = '000020'.
    append order_item_inx.
    schedule_linesx-updateflag = 'U'.
    schedule_linesx-req_qty = 'X'.
    schedule_linesx-itm_number = '000020'.
    SCHEDULE_LINESx-SCHED_LINE  = '0001'.
    append schedule_linesx.
    order_item_in-itm_number = '000020'.
    order_item_in-material = '000000000000000877'.
    order_item_in-plant = 'JNJ1'.
    append order_item_in.
    schedule_lines-sched_line = '0001'.
    schedule_lines-itm_number = '20'.
    schedule_lines-req_qty = 64.
    append schedule_lines.
    Calling the function module updating the salesorder.
    call function 'BAPI_SALESORDER_CHANGE'
      exporting
        salesdocument               = salesdocument
        order_header_in             = order_header_in
        order_header_inx            = order_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
      tables
        return                      = return
        order_item_in               = order_item_in
        order_item_inx              = order_item_inx
      PARTNERS                    =
       PARTNERCHANGES              = partnerchanges
      PARTNERADDRESSES            =
      ORDER_CFGS_REF              =
      ORDER_CFGS_INST             =
      ORDER_CFGS_PART_OF          =
      ORDER_CFGS_VALUE            =
      ORDER_CFGS_BLOB             =
      ORDER_CFGS_VK               =
      ORDER_CFGS_REFINST          =
        SCHEDULE_LINES              = schedule_lines
        SCHEDULE_LINESX             = schedule_linesx
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN                = conditions_in
      CONDITIONS_INX               = conditions_inx
      EXTENSIONIN                 =
        if sy-subrc ne 0.
          write: return-message,return-number,return-type.
        else.
          write: return-message,return-number,return-type.
          call function 'BAPI_TRANSACTION_COMMIT'
           EXPORTING
             WAIT          =
             IMPORTING
             RETURN        =
        endif.
    Thanks,
    Vijay.

  • Updating a Saleorder at Item Level

    Hi All
    I am trying to update a saleorder at item level(order quantity field) thru the function module BAPI_SALEORDER_CHANGE.  I have 3 items in my saleorder.  I am able to update the first item but I am unable to update the schedule_lines-req_qty(order quantity field) of the second and third item.
    Can anyone plz suggest me how 2 overcome this prob.??
    Thanks in Advance
    Vijay.

    Hi All
    I am trying to update a saleorder at item level(order quantity field) thru the function module BAPI_SALEORDER_CHANGE.  I have 3 items in my saleorder.  I am able to update the first item but I am unable to update the schedule_lines-req_qty(order quantity field) of the second and third item.
    Can anyone plz suggest me how 2 overcome this prob.??
    Thanks in Advance
    Vijay.

  • User Exit for Updating Delivery Plant at Item Level in Sales Order

    Hello Experts
    There is a requirement to determine the delivery plant for each item level and than update the items with newly determined plant.  There is a user exit MV45AFZZ routine FORM USEREXIT_MOVE_FIELD_TO_VBAP. to update the item level entries in Sales Order in VA01 or VA02. Is this the right place to do this?, if yes , do i need to perform any other standard logic (like re determine Shipping points , schedule lines ) for newly determined plant? If not , can you please suggest any other place , BADI or user exit to change the delivery plant of sales order.
    Thanks a lot....
    -Harkamal

    Best place is MV45AFZZ-USEREXIT_SAVE_DOCUMENT_PREPARE. Populates the values just before saving the document. You can have your own deriving logic. Make sure that peice of code is trigger only for Sales Order create or change (VA01/VA02).
    Are you kidding???  You do realize that this is AFTER all validations against configuration, ATP, pricing, etc. have been performed??!!!  Never, ever change a critical value like plant in the SAVE user exits...

  • Service Orders gets saved but text at item level are not saved for all item

    Hi All,
    We have configured service order scenario. The service order gets saved in GUI and in WebUI. But we are facing issue that not all the text entered at item level are getting saved.
    Example if we maintained text for 4 line items and save the SO.
    We open the saved SO, we get only 3 line items with proper text
    one of the line item text is not getting saved.
    The issue happens at both GUI and WebUI.
    Any pointers to fix this issue?
    Thanks and Regards,
    Gauri.

    Hi,
    You can try clearing the buffer using 'CRM_ORDER_INITIALISE' followed by CRM_ORDER_MAINTAIN" or TEXT_SAVE and TEXT_COMMIT, followed by BAPI_TRANSACTION_COMMIT with wait.
    Prerna

  • Sales order condition change for Header and Item level..

    Hi Gurus,
    My requirement is as below..
    Business wants to create new sales order from reference.. While creating slaes order fron reference , need to populate header/Item level condition tab data from originally paid by the invoice for that refence sales order not from refence sales order condition price.
    I would like to how to bring this one, any user exit or copy control and any VOFm routine need to populate this kind of requirement.
    Any one have any idea please let me know.. It very urgent, give reward points for right solution..
    thanks,

    Hi,
    Here are the answers to your question
    > Is it possible to add/change condition types on the sales order (header and item level) for which invoice has been created already?
    I mean is it possible to add some surcharge condition to already invoiced order and than as result debit memo?
    The answer is No. You cannot add or change the condition once it is invoiced.
    > And one more question : Are there some time restrictions when debit/credit memo can be created? (I believe not, but I would like to have this confirmed, as I am not SD expert.)
    The answer is No again. There is no time restriction and you can create debit or credit memo immediately when the invoice is released to accounting.
    Hope this helps
    Thanks
    Mukund S

  • Updating Ekpo by adding item level Screen Exit

    Hi,
    I added 2 fields at the item level of the ME21N  Screen using the following screen exit.
    ( SAPMM06E 0111 CUSTSCR1 SAPLXM06 0111 Subscreen: PO item. )
    Now I just want to update EKPO table.,. How to proceed. any body know guide me.
    Thanks & Regards.
    Balajee.J

    Hi Mou,
    In this there are four methods
    1)ACTIVATE_TAB_PAGE
    2)TRANSFER_DATA_TO_SUBSCREEN
    3)TRANSFER_DATA_FROM_SUBSCREEN
    4)PASS_FCODE_TO_SUBSCREEN
    In thw first method pass the tabname,screen no,position all.
    fcaption = 'C Form Details'.
    fprogram = 'Z_VLO1N_HEAD'.
    fdynpro = '0200'. This is the screen created and kept all custom fields
    Here you the concept set and get data and move and get the values.
    TRANSFER_DATA_TO_SUBSCREEN
    set PARAMETER ID 'Z' FIELD  f_vbrk-ZCF.
    TRANSFER_DATA_FROM_SUBSCREEN
    get PARAMETER ID 'Z' FIELD   fvbrk-ZCF.
    Pass all these parameters it will resolve your issue.Check and post if need help.
    Regards,
    Madhu.

  • Purchase order ship to party no at item level

    Hi All,
    I am able to get Ship To Party Address from ADRC table(Iam getting ADRNR from EKPO) But my client requirement is to get the KUNNR and not the address.
    Is there any way to get KUNNR based on ADRNR at item level .I have search through the (KNA1 , LFA1 , VBPA , EKPA , EKPV ) But I couldn't get the relationship (KUNNR).
    Actually Iam not able to get who the Ship To Party is at item level.
    If we take it as shipping address of the purchasing party i could't find it in T001W.Where as if it is header it is maintained in T001W.
    Do we have to take it as Third Party Ship to Party (i.e purchasing for a third party and shipping it directly to them).
    Can anybody help me on this.PLZ.This is very urgent.
    Thanks,
    Saritha.

    Hi,
    Thank you for ur response.
    ADRNR address value is not maintained in  KNA1 table.
    Thanks,
    Saritha.

  • Updating Administrators(built-in) with item-level targeting on an enforced policy

    I need help with this. 
    In our Computers OU, we have an enforced GPO with a computer policy that adds local admins to the computers on our network. The policy is Computer Configuration >> Policies >> Windows Settings >> Security Settings >> Local Policies/User
    Rights Assignment >> Restricted Groups >> Group (BUILTIN\Administrators). For this example, we'll call this GPO #1.
    I need to add another user account as a local admin, but targeted to certain computers.
    I tried to edit GPO #1. I went into Computer Configuration >> Control Panel Settings > Local Users and Groups, and then added a Group with the settings >> Updating >> Administrators (built-in) & item-level targeting to the computers
    I wanted, but the setting always gets over-written by the setting that adds local admins. 
    I then tried to create a GPO with the Group update. Lets call this GPO #2. I enforced this rule, linked it to the OU, changed the order so that GPO #2 is above GPO #1, but this doesn't seem to be working.
    Is my inheritance order incorrect?
    1 is GPO #2
    2 is GPO #1
    Ideas anyone?

    > In our Computers OU, we have an enforced GPO with a computer policy that
    > adds local admins to the computers on our network. The policy is
    > Computer Configuration >> Policies >> Windows Settings >> Security
    > Settings >> Local Policies/User Rights Assignment >> Restricted Groups
    >  >> Group (BUILTIN\Administrators).
    Restricted Groups has 2 operation modes: Members and Member of. The
    first one clears out any existing members, and that's what you use right
    now. The second simply adds a group to another group and keeps all
    existing members, that's what you want to use for your additional computers.
     > I need to add another user account as a local admin, but targeted to
     > certain computers.
    To do so, you need to create a domain group that contains the related
    account(s). This domain group is "member of" local admins. And make sure
    this second GPO is linked higher (so it is processed _after_ the first
    one that clears out existing members).
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))
    Yes I know I can do this, but I can't use item-level targeting with this setup. I don't want the user account to be local admins for all computers. I only want it to be local admins for 4 of them.
    Wouldn't precedence take place in this OU if I have the GPO that adds another member as #1, and the GPO that deletes and adds as #2? It isn't working as I had thought it would.

  • Delivery block at item level in sales order,Qty should not be confirmed

    Dear all
    We have a below requirment
    We will have multiple line items in sales order and put delivery block at item level.If delivery block is put at item level it should not confirm the qty and pass on to MRP
    But if we put at header level delivery block,schedule line qty at item level are not getting confirmed.So requirements are not passed to MRP-This is correct .Working as per SAP standard configuration.
    Can you tell how to activate the same for item level delivery block.if same delivery block is put at item level,it is confirming the quantity.But we don't want confirmation of qty to happen.
    Can you give us solution
    Regards
    Sudha

    We had similar issue , there will be confirmed quantity but the requirement will not transfer to MRP , We used Item category configuration ( Copied new item category assignment and it should behave as Inquiry item category)
    Check OVZ7 T code for customizing the u201CDelivery Blocku201D in your sales document to block Confirmation block
    Check the  customizing OVZ8: if the flag  Transfer of Requirement
    Transfer of requirements of the requirement class should be ON.
    In the sales order the requirement type is determined by the combination sales order item + MRP type.
    Refer SAP Help URL below
    [Setting a Delivery Block |http://help.sap.com/saphelp_470/helpdata/en/93/744bf2546011d1a7020000e829fd11/content.htm]

  • Sales Order: confirmation status at item level

    Hi,
    I am trying to locate a status field in sales order tables which truly reflects the item level quantity confirmation. I have checked table VBUP. In some cases field BESTA, COSTA shows the status correctly. But I am not able to find a table which is true in all cases. I can do it by checking confirmed quantity at schedule line level, but trying to avoid that since it involves addition of schedule line confirmed quantities etc.
    Any ideas?
    Thanks
    Anil

    Hi ,
             Check VBUK-GBSTK , and also VBFA for individual status check for sales , delivery and pick up...
    Regards,
    Vind.

  • How to limit the rows in the item level in sales order

    hi
    i have created a sales order here my requirement is in item level there are so many line items i want to limit the line items to 5 num is it possible

    Dear chandra
    In billing it is possible.  But if you want in sale order, apply user exit in program MV45AFZB - USEREXIT_CHECK_VBAP. 
    This user exit can be used to carry out additional checks (e.g. for completion) at item level.
    thanks
    G. Lakshmipathi

  • Field "Rejection For Reason" is in disble status at sales order item level

    Hi,
    I am trying to reject the items in a sales order by entering "Rejection Reason" at item level. But the problem is, this field is in disable status in WEB UI only for my user.
    However, If I use any other user, it is in enable status.
    Could you please help me out, do I need to have config settings to enable this field.
    Thanks,
    Sandeep

    Hi,
    Check TRX. SU53 and see if there you need some authorization.
    Best regards,
    Caíque Escaler

  • Problem while updating notification at ITEM level ?

    Hi...
    I am doing an LSMW to update certain notifications at item level.
    The Function module which i am using for this purpose is ..
    IQS4_MODIFY_NOTIFICATION
    While updating the first line item of notification, it is successfully updated, but while updating the second line item of the notification and further line items, error is thrown stating .....
    "Notification is locked by the user"
    I want to release this lock of notification after every change in line item. How do i do this.
    Regards.
    Edited by: Akshay Raj on Oct 16, 2008 8:32 AM
    Edited by: Akshay Raj on Oct 16, 2008 8:43 AM

    Use userexit save_document_prepare in MV45AFZZ .
    <REMOVED BY MODERATOR>
    Edited by: Alvaro Tejada Galindo on Jun 12, 2008 6:51 PM

  • Item level parcel Tracking with external carriers through AII

    Hi folks,
    I am new to AII and am trying to explore the possibilities with the tools at hand.
    With flexible delivery processing, we have tight control over the goods statuses across customer and supplier. For example, EM would let the customer know that the goods left the warehouse and are on their way.
    Suppose I would like to integrate this information with the parcel tracking service of external carriers. The web services and web based tools such carriers offer are surprisingly immature. Some "global" companies are not able to provide seamless information, every carrier has their own standard and some do not provide public interfaces which could be used for customer-level tracking in a useful way (eg requiring authentication credentials of the warehouse clerk requesting the delivery).
    I am wondering whether AII could be enabled to orchestrate this information flow. If an appropriate EDI format would exist, the carriers could be requested to update AII on shipment item level with any new statuses through EDI. Now it's up to the supplier to present the information to the customer as need be. This would remove inconsistencies as mentioned above.
    Does this sound like a viable idea, are there EDI messages available for the task at hand and do you know of companies having successfully implemented something like this?
    cheers & thanks,
    Andi

    Hi Amit,
    thanks for trying to tie in!
    You are right in assuming that I mixed up the purpose of AII and EM. This is about making EDI-based information accessible to all partners involved, and therefore a case for EM.
    Probably it helps if I re-state my thoughts. The supplier sends an ASN to the goods recipient. Afterwards, the goods are transported by a logistics provider based on a transport order. Question is, how can the intermediate delivery statuses of the provider be captured and published? Web UIs of the Providers with a tracking URL seem a very unreliable way of doing it.
    I figured that IDoc IFTSTA seems to be the correct form for this kind of information to flow back from the carrier to the supplier and from there to the recipient.
    Does it seem to be a viable option to  incorporate the carrier data into EM for tracking purposes?
    Cheers & Thanks, Andi

Maybe you are looking for

  • Database string formatting

    I'm fairly new to java and was wondering how to manipulate substrings in database output string to become html links. Basically if I have the following string in the database: test = "The following text: www.google.ca and http://www.sun.com"; it woul

  • How to design Master datas?? Whats is Time Scenarios???Explain..

    How to design Master datas?? Whats is Time Scenarios??? Can anybody explain about Time Scenarios???

  • International Char. Sets

    Hello, Does anyone know how to force the browser to use a particular charset with JSP? I am trying to write a page in Japanese, but the browser keeps switching to the default ISO. I have already tried setting the contentType in the page tag, but I ca

  • JMenuBar set location and/or  height

    Hello, I was just wondering if it is possible to place a JMenuBar at the bottom of a frame instead of at the top that it seems to goto by default. Also was wondering if it is possible to change the height of a JMenuBar. Any help would be great thanks

  • Cannot access old backups

    So here's the problem from start to finish: A while back I was experiencing some trouble with my Time Machine backups - they just kept failing. So I turned off time machine on my machine, de-selected the Time Capsule as my backup point, and rebooted