BAPI_SALESORDER_CHANGE field REF_DOC (VGBEL) not updated

Hi,
I use BAPI BAPI_SALESORDER_CHANGE to update link between sales order and contract. It means updated field VGBEL (for VBAK and VBAP)
It works fine for sales order header : VBAK-VGBEL is updated.
But it doesn't work for VBAP-VGBEL.
I have tried to update other fields on vbap with the BAPI and it works fine.
I copy bellow source code used (it is a test program)
Do you have any ideas why VGBEL is not updated?
thanks in advance for your help.
Luc
source code:
REPORT ZLM01 .
tables vbak.
Tables and structures used in BAPI
DATA : wt_order_header_in  LIKE bapisdh1,      " Order Header Fields
       wt_order_header_inx LIKE bapisdh1x.   " Order Header checkbox
DATA : t_bapiret            LIKE bapiret2   OCCURS 0 WITH HEADER LINE.
DATA : t_bapiret2           LIKE bapiret2   OCCURS 0 WITH HEADER LINE.
DATA : s_bapiret2           LIKE bapiret2   OCCURS 0 WITH HEADER LINE.
DATA : wt_order_item_in    LIKE bapisditm  OCCURS 0 WITH HEADER LINE.
DATA : wt_order_item_inx   LIKE bapisditmx OCCURS 0 WITH HEADER LINE.
DATA : wt_partnerchange    LIKE bapiparnrc OCCURS 0 WITH HEADER LINE.
DATA : wt_schedule_in      LIKE bapischdl  OCCURS 0 WITH HEADER LINE.
DATA : wt_schedule_inx     LIKE bapischdlx OCCURS 0 WITH HEADER LINE.
DATA : wt_sales_text       LIKE bapisdtext OCCURS 0 WITH HEADER LINE.
clear : wt_order_header_in , wt_order_header_inx, t_bapiret2.
Header
wt_order_header_inx-updateflag = 'U'.
wt_order_header_in-refdoc_cat  = 'G'.
wt_order_header_inx-refdoc_cat = 'X'.
wt_order_header_in-ref_doc     = '0040001508'.
wt_order_header_inx-ref_doc    = 'X'.
*ligne 1
wt_order_item_in-itm_number  = '000010'.
wt_order_item_inx-itm_number = '000010'.
wt_order_item_inx-updateflag = 'U'.
wt_order_item_in-ref_doc     = '0040001508'.
wt_order_item_inx-ref_doc    = 'X'.
wt_order_item_in-ref_doc_it     = '000010'.
wt_order_item_inx-ref_doc_it    = 'X'.
append wt_order_item_in.
append wt_order_item_inx.
call function 'BAPI_SALESORDER_CHANGE'
     EXPORTING
          salesdocument    = '0000025246'
          order_header_in  = wt_order_header_in
          order_header_inx = wt_order_header_inx
     TABLES
          order_item_in   = wt_order_item_in
          order_item_inx  = wt_order_item_inx
          return           = t_bapiret2.
loop at t_bapiret2.
write :/ t_bapiret2.
endloop.
call function 'BAPI_TRANSACTION_COMMIT'
     EXPORTING
          wait   = 'X'
     IMPORTING
          return = s_bapiret2.
move-corresponding s_bapiret2 to t_bapiret.
append t_bapiret. clear t_bapiret.

i give one example :
pass SCHEDULE_LINES .
REPORT  ZSALESORDER_CHANGE MESSAGE-ID 38.
Selection Screen Definitions *
PARAMETERS: p_vbeln TYPE vbap-vbeln OBLIGATORY, "Order Number
p_posnr TYPE vbap-posnr OBLIGATORY, "Order Item
p_etenr TYPE vbep-etenr OBLIGATORY, "Schedule Line
p_reqqty TYPE bapischdl-req_qty OBLIGATORY. " Order Qty
Internal Tables/Structures/Variables for calling BAPI. *
DATA: i_hdr TYPE bapisdh1,
i_hdrx TYPE bapisdh1x,
i_ret TYPE bapiret2 OCCURS 0 WITH HEADER LINE,
wa_ret TYPE bapiret2.
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.
START-OF-SELECTION Event *
START-OF-SELECTION.
*" Initialize internal tables.
REFRESH: i_sched, i_schedx, i_ret.
CLEAR: i_sched, i_schedx, i_ret.
*" Fill required ORDER_HEADER_IN data.
i_hdrx-updateflag = 'U'.
*" Fill required SCHEDULE_LINES data.
i_sched-itm_number = p_posnr.
i_sched-sched_line = p_etenr.
i_sched-req_qty = p_reqqty.
i_schedx-updateflag = 'U'.
i_schedx-itm_number = p_posnr.
i_schedx-sched_line = p_etenr.
i_schedx-req_qty = 'X'.
APPEND i_sched.
APPEND i_schedx.
CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
EXPORTING
salesdocument = p_vbeln
order_header_in = i_hdr
order_header_inx = i_hdrx
TABLES
return = i_ret
schedule_lines = i_sched
schedule_linesx = i_schedx.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
LOOP AT i_ret.
WRITE / i_ret-message.
ENDLOOP.

Similar Messages

  • Cannot update delivery attributes: the following field(s) are not updatable

    Hi. I create in EBS simple Order
    Now , my goal is to create a delivery , pick , change shipping quantity and ship confirm. Here is my code
    DECLARE
    p_sales_order NUMBER := 10014445;
    p_line_number NUMBER := 1.1;
    p_org_id NUMBER := 308;
    l_shipped_quantity NUMBER := 5;
    p_api_version_number NUMBER := 1.0;
    init_msg_list VARCHAR2(200);
    l_commit VARCHAR2(30);
    x_msg_details VARCHAR2(3000);
    x_msg_summary VARCHAR2(3000);
    x_return_status VARCHAR2(3);
    x_msg_count NUMBER;
    x_msg_data VARCHAR2(3000);
    p_validation_level NUMBER;
    v_errbuf VARCHAR2(2000);
    v_retcode VARCHAR2(20);
    v_released_status wsh_delivery_details.released_status%TYPE;
    v_inv_interfaced_flag wsh_delivery_details.inv_interfaced_flag%TYPE;
    v_oe_interfaced_flag wsh_delivery_details.oe_interfaced_flag%TYPE;
    v_source_code wsh_delivery_details.source_code%TYPE;
    v_pending_interface_flag wsh_trip_stops.pending_interface_flag%TYPE;
    l_changed_attributes wsh_delivery_details_pub.changedattributetabtype;
    l_source_code VARCHAR2(30) := 'OE';
    -- Parameters for WSH_DELIVERIES_PUB
    p_delivery_name VARCHAR2(30);
    p_action_code VARCHAR2(15);
    p_asg_trip_id NUMBER;
    p_asg_trip_name VARCHAR2(30);
    p_asg_pickup_stop_id NUMBER;
    p_asg_pickup_loc_id NUMBER;
    p_asg_pickup_loc_code VARCHAR2(30);
    p_asg_pickup_arr_date DATE;
    p_asg_pickup_dep_date DATE;
    p_asg_dropoff_stop_id NUMBER;
    p_asg_dropoff_loc_id NUMBER;
    p_asg_dropoff_loc_code VARCHAR2(30);
    p_asg_dropoff_arr_date DATE;
    p_asg_dropoff_dep_date DATE;
    p_sc_action_flag VARCHAR2(10);
    p_sc_intransit_flag VARCHAR2(10);
    p_sc_close_trip_flag VARCHAR2(10);
    p_sc_create_bol_flag VARCHAR2(10);
    p_sc_stage_del_flag VARCHAR2(10);
    p_sc_trip_ship_method VARCHAR2(30);
    p_sc_actual_dep_date VARCHAR2(30);
    p_sc_report_set_id NUMBER;
    p_sc_report_set_name VARCHAR2(60);
    p_sc_defer_interface_flag VARCHAR2(60);
    p_sc_send_945_flag VARCHAR2(60);
    p_sc_rule_id NUMBER;
    p_sc_rule_name VARCHAR2(60);
    p_wv_override_flag VARCHAR2(10);
    p_asg_pickup_stop_seq NUMBER;
    p_asg_dropoff_stop_seq NUMBER;
    x_trip_id VARCHAR2(30);
    x_trip_name VARCHAR2(30);
    fail_api EXCEPTION;
    x_debug_file VARCHAR2(100);
    l_ship_method_code VARCHAR2(100);
    l_user_id NUMBER;
    l_resp_id NUMBER;
    l_appl_id NUMBER;
    CURSOR c_ord_details IS
    SELECT DISTINCT det.source_header_number sales_order,
    det.org_id,
    det.source_line_number,
    det.source_header_id,
    det.source_line_id,
    det.source_header_type_name,
    det.inventory_item_id,
    det.requested_quantity,
    det.delivery_detail_id,
    (SELECT concatenated_segments
    FROM mtl_system_items_kfv
    WHERE inventory_item_id = det.inventory_item_id
    AND organization_id = det.organization_id) ordered_item,
    det.organization_id,
    det.src_requested_quantity,
    det.shipped_quantity,
    del.delivery_id,
    del.status_code delivery_status_code,
    det.released_status pick_release_status,
    det.oe_interfaced_flag,
    det.inv_interfaced_flag
    FROM wsh_delivery_details det,
    wsh_delivery_assignments asn,
    wsh_new_deliveries del
    WHERE 1 = 1
    AND det.delivery_detail_id = asn.delivery_detail_id
    AND asn.delivery_id = del.delivery_id(+)
    AND det.source_header_number = 1199656
    AND det.source_line_number = '1.1'
    AND det.org_id = 10102
    AND shipped_quantity IS NULL
    AND NVL(del.status_code, 'OP') <> 'CL'
    and det.delivery_detail_id =21439836
    /* AND det.released_status = 'Y'*/;
    BEGIN
    -- Initializing the Applications
    SELECT user_id INTO l_user_id FROM fnd_user WHERE user_name = 'MSHAPIRA';
    SELECT responsibility_id, application_id
    INTO l_resp_id, l_appl_id
    FROM fnd_responsibility_vl
    WHERE responsibility_name = 'OM Super User - UDS UK';
    fnd_global.apps_initialize(l_user_id, l_resp_id, l_appl_id);
    FOR i IN c_ord_details LOOP
    DBMS_OUTPUT.put_line('Initializing the Application for Shipping Transactions');
    -- Mandatory initialization for R12
    mo_global.set_policy_context('S', i.org_id);
    mo_global.init;
    -- Ship Confirming
    p_delivery_name := TO_CHAR(i.delivery_id);
    DBMS_OUTPUT.put_line('Before Shipping, Calling WSH_DELIVERY_DETAILS_PUB API to Update Shipping Attributes');
    DBMS_OUTPUT.put_line('=============================================');
    l_changed_attributes(1).delivery_detail_id := i.delivery_detail_id;
    l_changed_attributes(1).shipped_quantity := 5;
    wsh_delivery_details_pub.update_shipping_attributes(p_api_version_number => 1.0,
    p_init_msg_list => init_msg_list,
    p_commit => l_commit,
    x_return_status => x_return_status,
    x_msg_count => x_msg_count,
    x_msg_data => x_msg_data,
    p_changed_attributes => l_changed_attributes,
    p_source_code => l_source_code);
    IF (x_return_status <> wsh_util_core.g_ret_sts_success) THEN
    RAISE fail_api;
    DBMS_OUTPUT.put_line('Failed to Update the Shipping Attributes');
    ELSE
    DBMS_OUTPUT.put_line('Successfully Updated the Shipping Attributes');
    END IF;
    BEGIN
    SELECT shipping_method_code
    INTO l_ship_method_code
    FROM oe_order_headers_all
    WHERE order_number = i.sales_order
    AND org_id = i.org_id;
    EXCEPTION
    WHEN OTHERS THEN
    l_ship_method_code := NULL;
    END;
    p_action_code := 'CONFIRM'; -- The action code for ship confirm
    p_sc_action_flag := 'S'; -- Ship entered quantity.
    p_sc_intransit_flag := 'Y';
    --In transit flag is set to 'Y' closes the pickup stop and sets the delivery in transit.
    p_sc_close_trip_flag := 'Y'; -- Close the trip after ship confirm
    p_sc_trip_ship_method := l_ship_method_code; -- The ship method code
    p_sc_defer_interface_flag := 'Y';
    p_sc_stage_del_flag := 'Y';
    p_sc_create_bol_flag := 'N';
    p_wv_override_flag := 'N';
    -- API Call for Ship Confirmation
    DBMS_OUTPUT.put_line('Calling WSH_DELIVERIES_PUB to Perform Ship Confirmation');
    DBMS_OUTPUT.put_line('=============================================');
    wsh_deliveries_pub.delivery_action(p_api_version_number => 1.0,
    p_init_msg_list => init_msg_list,
    x_return_status => x_return_status,
    x_msg_count => x_msg_count,
    x_msg_data => x_msg_data,
    p_action_code => p_action_code,
    p_delivery_id => i.delivery_id,
    p_delivery_name => p_delivery_name,
    p_asg_trip_id => p_asg_trip_id,
    p_asg_trip_name => p_asg_trip_name,
    p_asg_pickup_stop_id => p_asg_pickup_stop_id,
    p_asg_pickup_loc_id => p_asg_pickup_loc_id,
    p_asg_pickup_stop_seq => p_asg_pickup_stop_seq,
    p_asg_pickup_loc_code => p_asg_pickup_loc_code,
    p_asg_pickup_arr_date => p_asg_pickup_arr_date,
    p_asg_pickup_dep_date => p_asg_pickup_dep_date,
    p_asg_dropoff_stop_id => p_asg_dropoff_stop_id,
    p_asg_dropoff_loc_id => p_asg_dropoff_loc_id,
    p_asg_dropoff_stop_seq => p_asg_dropoff_stop_seq,
    p_asg_dropoff_loc_code => p_asg_dropoff_loc_code,
    p_asg_dropoff_arr_date => p_asg_dropoff_arr_date,
    p_asg_dropoff_dep_date => p_asg_dropoff_dep_date,
    p_sc_action_flag => p_sc_action_flag,
    p_sc_intransit_flag => p_sc_intransit_flag,
    p_sc_close_trip_flag => p_sc_close_trip_flag,
    p_sc_create_bol_flag => p_sc_create_bol_flag,
    p_sc_stage_del_flag => p_sc_stage_del_flag,
    p_sc_trip_ship_method => p_sc_trip_ship_method,
    p_sc_actual_dep_date => p_sc_actual_dep_date,
    p_sc_report_set_id => p_sc_report_set_id,
    p_sc_report_set_name => p_sc_report_set_name,
    p_sc_defer_interface_flag => p_sc_defer_interface_flag,
    p_sc_send_945_flag => p_sc_send_945_flag,
    p_sc_rule_id => p_sc_rule_id,
    p_sc_rule_name => p_sc_rule_name,
    p_wv_override_flag => p_wv_override_flag,
    x_trip_id => x_trip_id,
    x_trip_name => x_trip_name);
    IF (x_return_status <> wsh_util_core.g_ret_sts_success) THEN
    DBMS_OUTPUT.put_line('Ship confirm has not been Completed For SO => ');
    ROLLBACK;
    RAISE fail_api;
    ELSE
    DBMS_OUTPUT.put_line('Ship confirm Successfully Completed For SO => ');
    COMMIT;
    DBMS_OUTPUT.put_line('Checking the Delivery Status after delivery action API Call');
    DBMS_OUTPUT.put_line('==========================================');
    SELECT wdd.source_code,
    wdd.released_status,
    wdd.inv_interfaced_flag,
    wdd.oe_interfaced_flag,
    wts.pending_interface_flag
    INTO v_source_code,
    v_released_status,
    v_inv_interfaced_flag,
    v_oe_interfaced_flag,
    v_pending_interface_flag
    FROM wsh_trips wtr,
    wsh_trip_stops wts,
    wsh_delivery_legs wlg,
    wsh_new_deliveries wnd,
    wsh_delivery_assignments wda,
    wsh_delivery_details wdd
    WHERE wtr.trip_id = wts.trip_id
    AND wts.stop_id = wlg.pick_up_stop_id
    AND wts.pending_interface_flag = 'Y'
    AND wdd.inv_interfaced_flag <> 'Y'
    AND wlg.delivery_id = wnd.delivery_id
    AND wnd.delivery_id = wda.delivery_id
    AND wda.delivery_detail_id = wdd.delivery_detail_id
    AND wnd.delivery_id = p_delivery_name
    AND wdd.source_line_id = i.source_line_id;
    IF (v_source_code = 'OE' AND v_released_status = 'C' AND
    v_inv_interfaced_flag <> 'Y' AND v_oe_interfaced_flag <> 'Y' AND
    v_pending_interface_flag = 'Y') THEN
    DBMS_OUTPUT.put_line('The Delivery has been Shipped & the Next Step is - Run Interface');
    DBMS_OUTPUT.put_line('===========================================');
    -- API Call for Submitting Interface Trip Stop
    wsh_ship_confirm_actions.interface_all_wrp(errbuf => v_errbuf,
    retcode => v_retcode,
    p_mode => 'ALL',
    p_stop_id => NULL,
    p_delivery_id => p_delivery_name,
    p_log_level => 0,
    p_batch_id => NULL,
    p_trip_type => NULL,
    p_organization_id => i.organization_id,
    p_num_requests => 1,
    p_stops_per_batch => 1);
    ELSE
    DBMS_OUTPUT.put_line('The Delivery has not Shipped Properly');
    END IF;
    END IF;
    END LOOP;
    EXCEPTION
    WHEN fail_api THEN
    DBMS_OUTPUT.put_line('==============');
    DBMS_OUTPUT.put_line('Error Details If Any');
    DBMS_OUTPUT.put_line('==============');
    wsh_util_core.get_messages(p_init_msg_list => 'Y',
    x_summary => x_msg_summary,
    x_details => x_msg_details,
    x_count => x_msg_count);
    IF x_msg_count > 1 THEN
    x_msg_data := x_msg_summary ||' '||x_msg_details;
    DBMS_OUTPUT.put_line(x_msg_data);
    ELSE
    x_msg_data := x_msg_summary||' '|| x_msg_details;
    DBMS_OUTPUT.put_line(x_msg_data);
    END IF;
    END;
    But at the stage of updating delivery attributes I get the following error message
    Warning: For Delivery Detail 21439836, the following field(s) are not updatable: SHIPPED_QUANTITY.
    Why?

    Hi Paul
    Looks like the authorisation is failing due to a bad registration for some reason.
    Would you be kind enough to clear out the registration to ensure we are dealing with a fresh start and no information is being used which may have become corrupt. You may do this by following this procedure;
    Remove existing reg details
    # usr/lib/cc-ccr/bin/eraseCCRRepository
    List /tmp/RegistrationProfile.properties file
    # cat /tmp/RegistrationProfile.properties
    Attempt re-registration
    # sconadm register -a -r /tmp/RegistrationProfile.properties
    Send us the full output of the commands above if you would please.

  • Field BKPF-STBLG not updated

    While canceling the commercial as well as excise invoice the field BKPF-STBLG not updated.

    Hi,
    Thanks for your reply.
    I did the changes to the standard sort key 018-Asset Number as per your advise and didnt get the desired outcome.
    Our asset code length is 7 and sub asset length is 1
    So i went to OB16 and added STBLG to the sort key 018, then system says that you can maintain only upto 18 characters.
    So i have made asset number to length to 7 and sub number lengtth to 1 and STBLG length to 10.
    After saving the sort key, i have assigned the same sort key to the all of my asset related GL accounts in company code data under control data tab.
    Now i reversed one asset transfer transaction and checked the BKPF entry. It didnt updated either in sending company code document nor receiving company code's document.
    Please advise me, if i am missing anything.
    But really thankful to you for your intiation.
    Thanks,
    Srinu...

  • Field LFM1-SPERM not updating

    Hello
    Wonder if anyone can help me? If this is in the wrong part of the Forum can someone point me in the right direction?
    SRM version 5.5 & ECC 6.0
    When putting a block on a Vendor for Purchasing Orgs in transaction XK05  it is not replicating in SRM after Vendor Sync?  The field LFM1-SPERM is not updating?  I can change this in transaction BBPMAININT but really want this replicating from ECC ERP?
    I have checked SLG1 and nothing shows in there?
    Can anyone point me in the right direction as I am going round in circles?
    In table BBPM_BUT_FRG0061 the Purchasing block does not show but it does show it has a central block in table BBPM_BUT_FRG0061.
    I need the Purchasing block to show.
    Please ask any questions as I am not very good at explaining.

    Hi,
    Kindly run BBPUPDVD in SRM system with the vendor number.
    Regards,
    Nikhil

  • Custom Fields in BSEG not updating on FI document post

    Hello Experts
    I'm facing a problem when posting FI documents. I'm using BAPI_ACC_DOCUMENT_POST and passing some Z fields using Table Extension2 (bapiparex). The problem is that the Z fields are not getting updated.
    BADI_ACC_DOCUMENT is implemented and working. In debug, I can see that the BADI is working as it should. Furthermore, It was already working for older developments in the same machine.
    This problem is only happening in Development machine (DEV). In Quality machine (QAS) everything is working fine. Because my program is still in development, I can't transport it to QAS to see if it works there.
    The problems are now the following:
    - Older developments aren't updating the Z fields in BSEG
    - My new development isn't updating Z fields in BSEG
    - Manual posting in FB01 updates the fields
    What I have done so far:
    - Checked my program codding (it's ok)
    - Checked BAPI BADI_ACC_DOCUMENT (it's also ok)
    - Checked all user exits being used on this machine that could be clearing this fields - In all of the implemented exits, none of them refers to this problem
    - Checked all implemented BTE's  - In all of the implemented BTE's, none of them refers to this problem
    - Searched for differences between SAP releases on DEV and QAS machines - All components have the same release
    - Checked for differences (activation, structure, source code, etc) of structure bapicobl_ci, ci_cobl, table bseg, BADI's being used, etc...
    What am I missing here? I think I have done everything that could explain this behavior and still have no answers...
    Thanks in advance, best regards,
    João Argêncio

    Hi,
    in BAPI_ACC_DOCUMENT_POST there is a part
        PERFORM call_customer_function
                TABLES extension1.
                                                                                    PERFORM call_badi
                TABLES extension2.
    for the extensions. Seems that there has to be filled a BADI implementation too to get the extension2 data into bseg.
    BADI interface is IF_EX_ACC_DOCUMENT, used method should be method CHANGE.
    Regards,
    Klaus
    Edited by: Klaus Babl on Apr 1, 2011 11:54 AM

  • Re: Changes to screen field date was not updated

    Hi,
    I had a dialog screen showing a valid from date as 10.10.2007. I changed it to 15.10.2007 and click on other details tab. when I returned, it is still showing the old values.
    When I did a DEBUG, upon changing and hitting enter key, the new dates for the screen field is not changed. it is still showing the old date for the screen field.
    why is it so?
    I think this is the cause of why the old values is still displaying. How can I get the field updated to my internal table. It need to be filled with the new values before I can updated to my internal table and then re-displayed again.
    How to get the new values into the screen field?

    Hi..
    As i understatnd this field is in TABLE Control.
    In that case you must Update the Internal table in the PAI .. Inside LOOP .. ENDLOOP.
    Process After Input.
      LOOP AT ITAB.
       Module Update_itab.  "Calling the module
      ENDLOOP.
    <b>In Module pool</b>
       Module Update_itab INPUT. 
        modify itab from wa index TABCON-CURRENT_LINE.
       ENDMODULE.
    Note: Here WA is the work area of the Screen fields and TABCON is the Table control variable.
    <b>Reward if Helpful.</b>

  • Ref.2 field of JE not updated through A/P Credit Memo

    Hi Experts,
    I am using SBO 8.81 PL 07.
    I have observed that when I create A/P Credit Memo, SAP doesnot save the Vendor Ref. (NumAtCard) field in the corresponding JE's ref.2 or any other field.
    It happens when we create A/P Invoice.
    I believe it is important for Accounts person to have that details.
    Is it a bug or it is correct functionality ?
    Best Regards,
    Samir Gandhi

    Hi Samir,
    I am not mentioning copying credit not to JE.
    I just told you regarding document settings option for credit note and invoice.
    E,g if you open document settings window and check for per document tab, select AP invoice- you will find option i.e., Allow copying supplier reference number to target documemts .
    similar option is not available for credit note.
    Thanks,
    neetu

  • Lord 2 Api - Custom field on Item not updating in ECC

    Hi All
    I have a customer field in erp that I need to get populated from crm.
    I have added the field to the additional data b section in vao1.
    I have added the field to the TDS_ITEM_COMC and  TDS_ITEM_COMV
    I have added the screen to the lord mapping table under ITEM, and I have have enabled "Automatic Field Transport".
    I have updated the badi BADI_LORD_DO_PAI method Add_supply_LIST with the following code
    IF iv_object_id EQ 'ITEM'.
         CLEAR ls_supply.
         ls_supply-field = 'ZZADTV'.
         ls_supply-check = 'N'.
         APPEND ls_supply TO ct_supply.
       ENDIF.
    My field is being populated from CRM and is being passed through to r3.  I know this because I debugged  the function module erp_lord_get_item_multi
    and I can see the correct value for my field, and there are no errors reported.
    Any one got any ideas.
    I have done this for a customer field on at header level and it works.
    Thanks
    Darren

    Hello Darren,
         Please find the screenshots describing the way how it was done by me. Hope this will help you.
    The field Application is a Z field added and mapped with ECC.
    ZZAFLD00004M is the Field Name
    Communication Structures
    LORD_MAPPING table
    Field in the Screen (Additional Data B ) of VA21/VA22 etc
    Field in VBAP
    BAdi's which were implemented

  • Problem with field-symbol values not updating

    H i ,
          I have following piece of code :
    Assigning Dynamic Table to Field Symbol
        ASSIGN ist_dyn_table->* TO <gs_dyn_table>.
    *   Creating Structure for dynamic table
        CREATE DATA gs_dyn_line LIKE LINE OF <gs_dyn_table>.
    *   Creating line type for the Dynamic Values
        ASSIGN gs_dyn_line->* TO <gs_line>.
    *   Populating values in the dynamic table
        LOOP AT ist_pwcl_main INTO wa_pwcl_main.
          ASSIGN COMPONENT gc_fld_werks OF STRUCTURE <gs_line> TO <gs_field>.
       1   IF sy-subrc EQ 0.
       2        <gs_field> = wa_pwcl_main-werks.
       3      ENDIF.
       5  IF <gs_field> IS ASSIGNED.
       6     <gs_field> = wa_pwcl_main-vbeln.
          ENDIF.
      7 IF <gs_field> IS ASSIGNED.
      8  <gs_field> =  wa_pwcl_main-posnr.
          ENDIF.
       IF <gs_field> IS ASSIGNED.
            <gs_field> = wa_pwcl_main-quant.
          ENDIF.
    on debugging  at line 2 <gs_filed> contains the value of werks .
    but at line 6 <gs_field> contains value of vbeln as 0 and at 8 of posnr as 0 .
    What can be the problem ? Other values are getting assigned properly .
    Plz help ...
    Regards .

    Hi,
    Assigning Dynamic Table to Field Symbol
        ASSIGN ist_dyn_table->* TO <gs_dyn_table>.
      Creating Structure for dynamic table
        CREATE DATA gs_dyn_line LIKE LINE OF <gs_dyn_table>.
      Creating line type for the Dynamic Values
        ASSIGN gs_dyn_line->* TO <gs_line>.
      Populating values in the dynamic table
        LOOP AT ist_pwcl_main INTO wa_pwcl_main.
          ASSIGN COMPONENT gc_fld_werks OF STRUCTURE <gs_line> TO <gs_field>.
       1   IF sy-subrc EQ 0.
       2        <gs_field> = wa_pwcl_main-werks.
       3      ENDIF.
       5  IF <gs_field> IS ASSIGNED.
       6     <gs_field> = wa_pwcl_main-vbeln.
          ENDIF.
      7 IF <gs_field> IS ASSIGNED.
      8  <gs_field> =  wa_pwcl_main-posnr.
          ENDIF.
       IF <gs_field> IS ASSIGNED.
            <gs_field> = wa_pwcl_main-quant.
          ENDIF.
    Based on your coding above, <gs_field> has been assigned with data type 'WERKS' (i'd assume component gc_fld_werks found from structure <gs_line> is a plant typed), which is a CHAR(4) data type.
    Meaning, if <gs_field> is assigned with Plant type value, e.g. <gs_field> = '1000', field symbol <gs_field> will contain 4 character only.
    At line 6, if wa_pwcl_main-vbeln = '0000201000', <gs_field> is only capturing '0000' only. This is also happened to line 8.
    However, it looks like that <gs_field> is getting over-write if ASSIGNED statement returns SY-SUBRC = 0.
    Hope this helps.
    Regards,
    Patrick

  • Reference field is not updating in VBAK table

    Hi Experts,
    I am using SD_SALESDOCUMENT_CREATE bapi for Credit Memo Creation .
    but the field XBLNR is not updating in the table vbak.
    Kindly help me to sort out this issue.
    Thanks in advance.
    In which field i should pass the value to update in the table vbak.
    Regards,
    Ajay.
    Edited by: srinivasan12345 on Nov 14, 2011 9:21 AM

    Hi,
    follow this,may help u..
    Re: Credit Memo Creation
    thanks & regards.

  • Edit in datasheet field is not updated in real time

    Hello,
    I have SharePoint 2007, a list viewed in Edit in DataSheet and a workflow attached to the list which updates a field FirstTitle in the list when the item is created. 
    The problem is that, while in Edit in Datasheet view, the field FirstTitle is not updated in real time so the workflow starts again and again because the field is still viewed as empty. The users keep receiving the error message "Your changes conflict
    with those made concurrently by another user" (the other user being actually themselves). So they have to exit Edit in Datasheet and enter again in order to have FirstTitle field refreshed and that is annoying and totally unproductive.  
    I tried from SharePoint designer different checks, I used different actions like wait until item is changed and then stop but nothing worked. Is there any workaround to this ?
    Thanks in advance,
    Teddy
    Able was I ere I saw Elba

    Thanks for sharing the answer here, it is really helpful for others with the similar issue.
    Qiao Wei
    TechNet Community Support

  • Not update field PPEHDR.TIMSTMP

    G'day!
    Has anyone faced with following problem:
    field PPEHDR.TIMSTMP not update then:
    1. Something change in phantom node PPE
    2. User get release key in ECNs (change master record) in AccessNode PPE
    3. User wrote material in Access Variant PPE
    May be have BADI or system transaction for setting?
    Best regard,
    Igor

    This is not correct forum you to post this problem here.

  • Quantity column is not updating in YR02 report

    Dear Experts,
    While doing download the asset data into excel through t.code YR02 the field quantity is not updating. If i checked in asset master data, there i am getting asset quantity 1 for each asset but in YR02 report i am not getting.
    Please help me to resolve this issue.
    Thanks,
    Anjiee
    Edited by: anjiee on Mar 21, 2011 12:47 PM

    Transaction YR02 is in customer namerange and hence it is not a standard functionality of the system .
    Hence whenever you are quoting any queries then you will have to also provide the Y programme that you have created for the purpose .
    I mean to say the coding of the programme to comment further .
    Cheers ,
    Dewang

  • BAPI_SALESORDER_CHANGE not updating database

    Hi,
    I am using BAPI_SALESORDER_CHANGE to change the target quantity ( ZMENG ) of the Standard sales order.
    I am getting no error message in the bapi return table but the data is not getting updated in the database.
    I am also calling commit work  'BAPI_transaction_Commit'. Please let me know if there is an alternative to this BAPI. I have tried BAPI_SALESDOCUMENT_CHANGE also.
    thanks,
    Hitanshu

    Hitanshu,
    You need to use as well the schedule line table and change the qty overthere. Did you use the schedule_linesx and order_item_inx to tell which fields you want to update?
    Example code:
    orderch_header_inx-updateflag = 'U'.
    orderch_item_in-itm_number = it_vbap_old-posnr.
    orderch_item_inx-itm_number = it_vbap_old-posnr.
    orderch_item_inx-updateflag = 'U'.
    APPEND : orderch_item_in, orderch_item_inx.
    orderch_header_inx-updateflag = 'U'.
    schedulech_lines-itm_number = it_vbap_old-posnr.
    schedulech_lines-sched_line = '0001'.
    schedulech_linesx-itm_number = it_vbap_old-posnr.
    schedulech_lines-req_qty = it_vbap-kwmeng.
    schedulech_linesx-sched_line = '0001'.
    schedulech_linesx-req_qty = 'X'.
    schedulech_linesx-updateflag = 'U'.
    APPEND : schedulech_lines, schedulech_linesx.
      CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
          EXPORTING
            salesdocument               = order_number
            order_header_in             = orderch_header_in
            order_header_inx            = orderch_header_inx
      SIMULATION                  =
      BEHAVE_WHEN_ERROR           = ' '
      INT_NUMBER_ASSIGNMENT       = ' '
      LOGIC_SWITCH                =
          TABLES
            return                      = return
        order_item_in               = orderch_item_in
        order_item_inx              = orderch_item_inx
       PARTNERS                    =
        partnerchanges              = partnerch
      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              = schedulech_lines
        schedule_linesx             = schedulech_linesx
      ORDER_TEXT                  =
      ORDER_KEYS                  =
      CONDITIONS_IN               =
      CONDITIONS_INX              =
      EXTENSIONIN                 =

  • BAPI_SALESORDER_CHANGE - not updating ITEM CATEGORY(VBAP-PSTYV)

    Hi all,
    I have used bapi to change sales order  but the Item category(pstyv) is not updating .
    please tell me whether it needs to be passed to the bapi structure , if passed then how to retrieve (table) the item cateogry(pstyv) for the material.
        CALL FUNCTION 'BAPI_SALESORDER_CHANGE'
                EXPORTING
                  salesdocument               = e_vbeln
                 ORDER_HEADER_IN             = wa_hdr
                  order_header_inx           = wa_hdrx
                tables
                  return                     = i_ret
                 ORDER_ITEM_IN               = i_item
                 ORDER_ITEM_INX              = i_itemx
                 SCHEDULE_LINES              = i_sch
                 SCHEDULE_LINESx             = i_schx
                  EXTENSIONIN                = i_parex.
              endif.
    please help me out.

    Hi,
    I think if you use FM BAPI_SALESORDER_CHANGE, you have to explicitly specify the field and its value you want to change. So put the value you want in the field ORDER_ITEM_IN-ITEM_CATEG and also "X" to ORDER_ITEM_INX-ITEM_CATEG and see what happen.
    Hope it helps,
    Chang

Maybe you are looking for

  • Message Level Security in XI  7.0

    Hi, Have someone worked on Message level Security in XI 7.0 for transferring a file from one system to an external third party system? If so can u provide me with links or documents? Thanks Manjula

  • Getting started with Ajax - how do I query the db without 'submitting' the page?

    Hi guys, I'm building a simple 'power point presentation' - basically a cf page which will display a large jpg [a slide]) every n seconds I want the page to query the db to ask if it needs to change the jpg and if so which jpg should it now show. In

  • What is a class 1 database?

    what is a class 1 database?. Can anyone explain in detail about what classifies a database as class 1?. Searched on google, but couldn't get a single link explaining what this term means..

  • All Documents by User

    Hello, it is possible to get the list of all documents created by users in specific period? Can anyone help? thank you D.

  • Dataguard between AIX/windows

    Hi, Can I implement Dataguard between AIX and windows db.Please provide documentation path in oracle. ravi.