Incorrect vendor line splitting using BADI MRM_WT_SPLIT_UPDATE. BADI.

Hi, gurus !
Custom MIRO vendor line item splitting implemented throw BADI MRM_WT_SPLIT_UPDATE. BADI is active and called.
At transaction MIRO we try to imitate invoice posting. I see, that at badi method te_rbvs table is updated correctly. At invoice posting imitation screen incorrect amounts for vendor splitted lines appear.
At badi call start
I_RBKPV-H_RBVS
1               0000     000001     963.99
TE_RBVS[]
Initial
TI_DRSEG
1     ST          8000     607.02
2     ST          8000     172.64
3     ST          8000     49.18
4     ST          8000     16.02
5     ST          8000     119.13
At badi call end
I_RBKPV-H_RBVS
1               0000     000001     963.99
TE_RBVS[]
1               0000     000001     607.02
2               0000     000007     172.64
3               0000     000008     49.18
4               0000     000009     16.02
5               0000     000010     119.13
At imitation screen items appear as follows:
1     K                    C          607,02-     LTL
2     S     G          607,02      LTL
3     S     G          172,64      LTL
4     S     G          49,18      LTL
5     S     G          16,02      LTL
6     S     G          119,13      LTL
7     K                    C          607,02-     LTL
8     K                    C          607,02-     LTL
9     K                    C          607,02-     LTL
10     K                    C          1.464,09      LTL
7-10 lines are incorrect.
Thanks in advance.
Edited by: Gabtia on Aug 7, 2009 4:00 PM

Had anyone used BADI MRM_WT_SPLIT_UPDATE succesfuly ?

Similar Messages

  • Unreservation Issue while SO line split using Process Order API

    Hi,
    We are facing unreservation issue in the parent line after sales order line split for partially reserved line scenario usiing oe_order_pub.process_order API in 11.5.10 instance.
    Standard Proces:
    Orlder line - 10 quantities
    Partially Reserved with 5 Quantities
    Splitting the SO line using Process order API
    Parent line with 5 quantities - Reserved
    Child Line with 5 quantities - Unreserved
    Our Issue
    Orlder line - 10 quantities
    Partially Reserved with 5 Quantities
    Splitting the SO line using Process order API
    Parent line with 5 quantities - Unreserved
    We are not facing this issue when try to split the SO line from the Appllication.
    Please find the script below which we are using for this line split scenario. The same script was working fine in our instance and not working after applying patch for Minimum Baseline Patch Requirements for Extended Support on Oracle E-Business Suite 11.5.10 (Note 883202.1).
    I tried to find the differences between the APIs before and after patching and found these list of bug fixes in our API in the patched instances.
    1.7503298
    2.8339692
    3.8479339
    4.9347399
    Please help us in this issue.
    DECLARE
    p_header_id NUMBER :=836084;-- Sales order header id
    p_line_id NUMBER :=2560509;-- sales order line id
    p_item_id NUMBER :=405477;--item id in sales order line
    p_ord_qty NUMBER :=5;-- Total ordered quantity
    p_reserv_qty NUMBER :=2;--partially reserved quantity
    ln_counter NUMBER := 0;
    lv_return_status VARCHAR2 (1);
    lv_msg_data VARCHAR2 (2000);
    ln_msg_count NUMBER := 0;
    ln_increment NUMBER := 0;
    ln_inv_item_id NUMBER;
    ln_list_line_id NUMBER;
    ln_service_duration NUMBER := 0;
    lv_duration_uom VARCHAR2 (10);
    lv_duration_uom_desc VARCHAR2 (10);
    l_line_tbl oe_order_pub.line_tbl_type := oe_order_pub.g_miss_line_tbl;
    lr_header_rec oe_order_pub.header_rec_type;
    lr_header_val_rec oe_order_pub.header_val_rec_type;
    lt_header_adj_tbl oe_order_pub.header_adj_tbl_type;
    lt_header_adj_val_tbl oe_order_pub.header_adj_val_tbl_type;
    lt_header_price_att_tbl oe_order_pub.header_price_att_tbl_type;
    lt_header_adj_att_tbl oe_order_pub.header_adj_att_tbl_type;
    lt_header_adj_assoc_tbl oe_order_pub.header_adj_assoc_tbl_type;
    lt_header_scredit_tbl oe_order_pub.header_scredit_tbl_type;
    lt_header_scredit_val_tbl oe_order_pub.header_scredit_val_tbl_type;
    lt_line_tbl oe_order_pub.line_tbl_type;
    lt_line_val_tbl oe_order_pub.line_val_tbl_type;
    lt_line_adj_tbl oe_order_pub.line_adj_tbl_type;
    lt_line_adj_val_tbl oe_order_pub.line_adj_val_tbl_type;
    lt_line_price_att_tbl oe_order_pub.line_price_att_tbl_type;
    lt_line_adj_att_tbl oe_order_pub.line_adj_att_tbl_type;
    lt_line_adj_assoc_tbl oe_order_pub.line_adj_assoc_tbl_type;
    lt_line_scredit_tbl oe_order_pub.line_scredit_tbl_type;
    lt_line_scredit_val_tbl oe_order_pub.line_scredit_val_tbl_type;
    lt_lot_serial_tbl oe_order_pub.lot_serial_tbl_type;
    lt_lot_serial_val_tbl oe_order_pub.lot_serial_val_tbl_type;
    lt_action_request_tbl oe_order_pub.request_tbl_type;
    lv_errmsg VARCHAR2(4000);
    v_user_id NUMBER:=fnd_profile.value('USER_ID');
    v_resp_id NUMBER:=fnd_profile.value('RESP_ID');
    v_resp_appl_id NUMBER:=fnd_profile.value('RESP_APPL_ID');
    v_security_group_id NUMBER:=fnd_profile.value('SECURITY_GROUP_ID');
    v_server_id NUMBER:=fnd_profile.value('SERVER_ID');
    v_login_id NUMBER:=fnd_profile.value('LOGIN_ID');
    l_file_val Varchar2(200);
    BEGIN
    --- Apps Initialize
    fnd_global.apps_initialize(v_user_id,v_resp_id,v_resp_appl_id,v_security_group_id,v_server_id);
    l_line_tbl(1) := oe_order_pub.G_MISS_LINE_REC;
    l_line_tbl(1).operation := OE_GLOBALS.G_OPR_UPDATE;
    l_line_tbl(1).split_action_code := 'SPLIT';
    l_line_tbl(1).header_id := p_header_id;
    l_line_tbl(1).line_id := p_line_id;
    l_line_tbl(1).ordered_quantity := p_reserv_qty ;
    l_line_tbl(2) := oe_order_pub.G_MISS_LINE_REC;
    l_line_tbl(2).operation := OE_GLOBALS.G_OPR_CREATE;
    l_line_tbl(2).header_id := p_header_id;
    l_line_tbl(2).split_from_line_id := p_line_id;
    l_line_tbl(2).inventory_item_id := p_item_id ;
    l_line_tbl(2).ordered_quantity := (p_ord_qty-p_reserv_qty) ;
    --Debug File creation
    oe_debug_pub.debug_on;
    oe_debug_pub.initialize;
    l_file_val := OE_DEBUG_PUB.Set_Debug_Mode('FILE'); -- add l_file_val Varchar2(200); in declare section
    oe_Debug_pub.setdebuglevel(5);
    dbms_output.put_line(' Log File : '||l_file_val);
    dbms_output.put_line('Log File name '||OE_DEBUG_PUB.G_DIR||'/'||OE_DEBUG_PUB.G_FILE);
    -- Start Process Order API for Splitting the line
    oe_order_pub.process_order (p_api_version_number => 1.0,
    p_init_msg_list => fnd_api.g_true,
    p_return_values => fnd_api.g_false,
    p_action_commit => fnd_api.g_true,
    x_return_status => lv_return_status,
    x_msg_count => ln_msg_count,
    x_msg_data => lv_msg_data,
    p_line_tbl => l_line_tbl,
    x_header_rec => lr_header_rec,
    x_header_val_rec => lr_header_val_rec,
    x_header_adj_tbl => lt_header_adj_tbl,
    x_header_adj_val_tbl => lt_header_adj_val_tbl,
    x_header_price_att_tbl => lt_header_price_att_tbl,
    x_header_adj_att_tbl => lt_header_adj_att_tbl,
    x_header_adj_assoc_tbl => lt_header_adj_assoc_tbl,
    x_header_scredit_tbl => lt_header_scredit_tbl,
    x_header_scredit_val_tbl => lt_header_scredit_val_tbl,
    x_line_tbl => lt_line_tbl,
    x_line_val_tbl => lt_line_val_tbl,
    x_line_adj_tbl => lt_line_adj_tbl,
    x_line_adj_val_tbl => lt_line_adj_val_tbl,
    x_line_price_att_tbl => lt_line_price_att_tbl,
    x_line_adj_att_tbl => lt_line_adj_att_tbl,
    x_line_adj_assoc_tbl => lt_line_adj_assoc_tbl,
    x_line_scredit_tbl => lt_line_scredit_tbl,
    x_line_scredit_val_tbl => lt_line_scredit_val_tbl,
    x_lot_serial_tbl => lt_lot_serial_tbl,
    x_lot_serial_val_tbl => lt_lot_serial_val_tbl,
    x_action_request_tbl => lt_action_request_tbl
    IF lv_return_status = fnd_api.g_ret_sts_success
    THEN
    COMMIT;
    DBMS_OUTPUT.put_line('SUCCESS');
    ELSE
    IF ln_msg_count > 0
    THEN
    FOR i IN 1 .. ln_msg_count
    LOOP
    --fnd_file.put_line (fnd_file.log,  fnd_msg_pub.get (i, 'F') );
    DBMS_OUTPUT.put_line('ERROR'||fnd_msg_pub.get (i, 'F'));
    END LOOP;
    END IF;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    DBMS_OUTPUT.put_line('EXCEPTION'||' '||SQLERRM);
    END;
    Thanks,
    Kavin
    Edited by: 897922 on Nov 17, 2011 11:51 PM

    Suggest that you first enter the transaction manually via the order entry form and adjustments. Then query the oe_price_adustments table and determine the values you need to send in to get the results you want.
    -Bob

  • Withholding tax not able to view in FBL1N - Vendor Line Item report

    Dear All,
    The VI documents are posted in different vendors. The Tax code has been duly selected and tax was deducted at the time of posting the entry. When we generate the list of vendor line items using standard report FBL1N, we observe that only some of the VI documents in the output show the withholding tax amount in the respective column whereas in some of the VI documents, the withholding tax amount is appearing as zero even though the tax line item is available in the document (same can be seen in FB03).
    Please let us know the possible cause for the same.
    Regards,
    Anand.Inguva

    Dear,
    by FBL1N is not possible to check the Extended WT            
    information due to the technical reasons explained into the note               
    number 363309.                                                                               
    Furthermore please be aware that by the report RFKQST00 and          
    RFIDYYWT You can have all the WT details.                                      
    I hope this helps You.
    Mauri

  • (Brazil) equivalent of badi MRM_WT_SPLIT_UPDATE for FB60

    Hi,
    in MM documents by means of badi MRM_WT_SPLIT_UPDATE
    we calculate ISS tax.
    is there an equivalent for FI documents (that is for FB60 transaction)?
    Best regards.

    hi,
    Transaction Code - FB60                     Enter Incoming Invoices
    Enhancement/ Business Add-in            Description
    Enhancement
    F180A001                                Balance Sheet Adjustment
    FARC0002                                Additional Checks for Archiving MM Vendor Master Data
    FEDI0001                                Function exits for EDI in FI
    RFAVIS01                                Customer Exit for Changing Payment Advice Segment Text
    RFEPOS00                                Line item display: Checking of selection conditions
    RFKORIEX                                Automatic Correspondence
    SAPLF051                                Workflow for FI (Pre-Capture, Release for Payment)
    F050S001                                FIDCMT, FIDCC1, FIDCC2: Edit user-defined IDoc segment
    F050S002                                FIDCC1: Change IDoc/do not send
    F050S003                                FIDCC2: Change IDoc/do not send
    F050S004                                FIDCMT, FIDCC1, FIDCC2: Change outbound IDoc/do not send
    F050S007                                FIDCCH Outbound: Influence on IDoc for Document Change
    F050S006                                FI Outgoing IDoc: Reset Clearing in FI Document
    F050S005                                FIDCMT, FIDCC1, FIDCC2 Inbound IDoc: Change FI document
      Business Add-in
    FI_AUTHORITY_ITEM                       Extended Authorization Check for Document Display (FB03)
    FI_GET_INV_PYMT_AMT                     BAdI for Determining the Payment Amount for an Invoice
    FI_PAYREF_BADI_010                      BAdI: Payment Reference Number
    FI_TRANS_DATE_DERIVE                    Derive BKPF-WWERT from Other Document Header Data
    FBAS_CIN_MF05AFA0                       EWT - Downpayment Clearing - Tax transfer for CIN
    FBAS_CIN_LTAX1F02                       Tax interface
    BADI_DRB_CONV_BORID                     DRB: Additional Conversions of BORIDENT to AWTYP
    BADI_DRB_CONV_AWREF                     DRB: Additional AWTYPE to BORIDENT conversions
    AC_QUANTITY_GET                         Transfer of Quantities to Accounting - Customer Exit
    No.of Exits:         14
    No.of BADis:         9
    **reward points if useful**
    regards,
    n.jain

  • BADI MRM_WT_SPLIT_UPDATE fail

    Hi guys.
    I tryed use this BADI but it not work... I saw the notes:
    http://service.sap.com/sap/support/notes/1286713
    and
    http://service.sap.com/sap/support/notes/1156325
    but they cant help me too.
    My problem is: I need to change the first "tax code" like below:
    for that, I insert the code in BADI MRM_WT_SPLIT_UPDATE.
      DATA: ls_rbws TYPE LINE OF mrm_tab_rbws.
    te_rbvs[] = i_rbkpv-h_rbvs[].
    te_rbws[] = i_rbkpv-h_rbws[].
    LOOP AT te_rbws INTO ls_rbws.
    ls_rbws-wt_withcd = 'I2'.
    MODIFY te_rbws FROM ls_rbws.
    EXIT. "change only first item
    ENDLOOP.
    after pass this BADI, the tax not change.
    Please.. anyone can Help me?

    I find one solution, it's not the best, but save me.
    I put a ENHANCEMENT point in FM FI_WT_READ_LFBW and append the table  x_lfbw with my tax.
    if anyone give a better soluction, please, put here
    below how i put my code:
    IF sy-tcode = 'MIRO' OR
          sy-tcode = 'MR8M' OR
          sy-tcode = 'MIR7'. 
    *Get memory fields
    ASSIGN: ('(SAPLMR1M)DRSEG-EBELN')    TO <fs_d>,
                  ('(SAPLMR1M)DRSEG-EBELN')  TO <fs_i>.
    [...put your code...]
    LOOP AT t_imposto INTO v_imposto.
               t_lfbw2-lifnr = i_lifnr.
               t_lfbw2-bukrs = i_bukrs.
               t_lfbw2-witht = v_imposto-witht.
               t_lfbw2-wt_subjct = 'X'.
               t_lfbw2-wt_withcd = v_imposto-wt_withcd.
               APPEND x_lfbw2. CLEAR x_lfbw2.
    ENDLOOP.
    ENDIF

  • Header and item level approval using N level BADI

    Hi Experts,
    I beleive we can use either header level or item level approval workflow (WS14000133 and WS14500015) using N Approval-BADI. Please advise what information approval will be able to see if we will be using WS14000133 (Header level approval). Can he see all line item information or header level only.
    Regards,
    Kamal

    In SRM the same BADI is used for SC, PO, Invoice and others as well..  If you see the example implementation provided by SAP, you can see the use of CASE statement with different Business Objects and code under it.
    Irrespective of the Header level or Item level approval workflow the same BADI has to be implemented.
    The difference between Header and Item Level approval is
    1) In Header level, approval or rejection is done for the whole cart (there can be 1 item or multiple items).
        Approver will be able to see all the items in the cart.
    2) In Item level, approval or rejection is done for each and every line item. here is an example ---
      Line item 1 has Cost Center as Account Assignment Category and has to be approved by Users A and B.
      Line item 2 has Internal Order as Account Assignment Category and has to be approved by Users C and D.
    Item 1 goes to user A and once approved, it goes to B.  they will not be able to approve or reject item 2. but we can restrict user A and B to see item 2 or not by setting a flag..
    Item 2 goes to user C and once approved, it goes to D.  they will not be able to approve or reject item 1. but we can restrict user C and D to see item 1 or not by setting a flag..
    The SC will get released only after all the items are approved.
    For Header Level approval, you need to fill the APPROVAL_TABLE.
    For Item Level approval, you need to make use of APPROVAL_TABLE, ITEM_APPROVAL_TABLE and ITEM_APPROVAL_OBJ.
    Examples provided by SAP might give you an idea how to code for Header and Item Level.
    Hope this gives you some information .....
    Regards,
    PR.
    Edited by: PR on Nov 25, 2008 10:50 PM

  • Help to use BAPI_GOODSMVT_CREATE in BAdI MB_DOCUMENT_BADI

    Hi frnds ,
      I want use BAPI_GOODSMVT_CREATE in BAdI MB_DOCUMENT_BADI,
    can any one have any code related this ?
    i have also writeen my code but it is giving error that itab is not an inatertable occurs n misiing , but when i  m creting internal table with occurs staement it is not suppoertd by OO concept.
    Dont worry about points.
    Mahesh.

    Hello
    Use the syntax
    data : itab type table of <xmseg> with header line.
    regards

  • Can we make use of Transaction code FKMT  for vendor line items

    Hi
    Please advise me whether we can make use of Transaction code FKMT (Account assignment model) for vendor line items as follows:
    For Example:
    Expenditure Account      Dr.       Rs.1000
             To Vendor A                                      Rs.100
             To Vendor B                                      Rs.100
             To Vendor C                                      Rs.100
              To Vendor D                                      Rs.700
    Also please advise me what to give parameters
    Thanks and Best Regards
    Shekhar
    Edited by: Shekhar Yecham on Sep 19, 2008 7:05 AM
    Edited by: Shekhar Yecham on Sep 19, 2008 7:10 AM

    Dear Kulakarni,
    I found few of my fields in 0FI_AP_4.I did n't find few fields can i enhance the Datasourse.
    What is the respective Cube for that  Datasourse.
    I check  0AP_30,but in Business Content that cube is not available.
    Could you please give me guidance.
    Thanks in Advance,
    Srinivasan.

  • Which data sources Can i use for Vendor line items

    Dear Experts,
    I want to load the Vendor Line Items Data.In Rsa5 I found
    0fi_ap_3: Vendors: Line Items
    0fi_ap_4: Vendors: Line Items with Delta Extrcation
    0fi_ap_30: Vendor Line Items
    What is the differences of the 3 Datasources.
    Which Datasource  can i use.In my R/3 side they used EHP3.
    Could you please guide me what is the use of EHP3. What Cude and Dso can I use.
    Thanks in Advance.
    Regards,
    Srinivasan.

    Dear Kulakarni,
    I found few of my fields in 0FI_AP_4.I did n't find few fields can i enhance the Datasourse.
    What is the respective Cube for that  Datasourse.
    I check  0AP_30,but in Business Content that cube is not available.
    Could you please give me guidance.
    Thanks in Advance,
    Srinivasan.

  • I have bought a used macbook, to bad i do not have the admin password. is there any way to bypass this issue with out the Mac OS X disk? (without loosing my obtained files?)

    i have bought a used macbook, to bad i do not have the admin password. is there any way to bypass this issue with out the Mac OS X disk? (without loosing my obtained files?)   I NEED HELP BADLY PLEASE....

    What version of the Mac OS X are you running. Go to the Apple in the upper left corner and select About This Mac and post the version.

  • Hi experts, issue regarding badi MRM_WT_SPLIT_UPDATE

    Actually this badi dont have the option of multiple use,
    and it is already implemented,
    but they is no document for which purpose it is implemented.
    Now the issue is i have to use the same badi .
    How can i use this badi again
    thank you

    Hi
    Please, see SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment
    Regards
    Eduardo

  • Two Systems On 6.0 Acting Differently using Purchase Req BADIs

    Why won't two Version 6.0 systems, we can call system A, and system B, react the same when trying to use the same BADI for a Purchase requisition? I used ME_PROCESS_REQ_CUST in one 6.0 system A, and it worked great. I want to put the same logic in another system B, that is also on Version 6.0. I put my break points in system Bs BADI ME_PROCESS_REQ. However, when I execute the same navigation within a Purchase requisition, ME52N, the breakpoints do not get hit in system B, like they do in system A?
    Please note:
    The BADI and the code is activated in system B
    System A and System B are both on Version 6.0, but it looks like System A has several EHPs applied, and SystemB does not have any EHPs applied.  But I believe these BADIs have been around, since 4.7.
       Anybody?
       Thank-You
    Edited by: Tom Matys on Aug 21, 2011 9:54 AM

    Tom,
    Your question would best be addressed by SAP.  Raise a message.
    Best Regards,
    DB49

  • Debug and use of UJW_LOCK_SCHEDULE_BADI_SAMPLE Badi

    Hi,
    I need to debug UJW_LOCK_SCHEDULE_BADI_SAMPLE Badi through UJKT Tcode using script logic.
    Usually we provide 1 Filter name in script logic, but for above Badi we have 3 Filter names.
    Can anyone let me know the use of above Badi and more importantly what would my script logic should look like to debug it?

    Current scenario my BPC consultant has designed is if for a planner 100 sites are assigned, unless all 100 sites planning is not done, planner wont be able to submit data.
    New requirement is planner should be able to submit data for few sites rather than waiting for all 100 sites.
    So the work status should change from unlock data to submit data for few sites. I believe we can achieve this using above badi.
    I know we can debug UJ_CUSTOM_LOGIC using UJKT Tcode, the same way can we debug UJW_LOCK_SCHEDULE_BADI_SAMPLE?
    I want to debug this Badi independent of BPC, is it possible?

  • F110 Issue Split of Vendor line items in Clearing document

    Hi SAP Gurus,
    I have a strange problem with F110 payment programme when i am clearing the single  vendor line items example 4 line items through F110 system is spliting 4 line items into 4 different clearing doucments rather than creating one clearing document and showing an error 098 in document payment list.
    Can you please guide me in this issue
    Regards
    Srini

    HI
    This may happen because of any of the following settings:
    1) in the vendor master, payment transaction company code area, "individual payment" check box is selected
    2) "single payment for marked item" check box is selected in payment methos company code.
    Deselect the check box for making single payment for multiple open item

  • Exit or Enchancement for changing amount in vendor line item in MIRO

    Dear All,
    I want to change the amount in vendor line item which get posted through MIRO.System generated 2 line item in case of payment terms of retention is used.
    Requirement is that, in one line item of vendor, amount should get changed based on the logic and adjust the amount in other line item of vendor.
    Request to please let me know, Where in Exit/ Badi or enhancement spot, we can write our coding, so that it should update the amount with new value at the time of posting the document.
    Thanks & Regards,
    Abhinav Jain

    Hi,
    Try with Badi   ACC_DOCUMENT
    Regards,
    Azeem

Maybe you are looking for

  • How much memory can i install on my macbook?

    First time doing this on a macbook, i'm really confused trying to work out how old the darn thing is, i think it's mid 2007 but not sure. i cannot tell whether i can do 2gb or 4gb total. can anybody help. Model Name: MacBook Model Identifier: MacBook

  • Can't get OneStep iDVD going

    I am trying to quickly make DVD's from tapes on my Sony DCR-TRV520 NTSC camcorder. Time is short so OneStep iDVD sounded ideal altho basic. I can't get it going on my PowerBook G4 or my wife's iMac G5, both running 10.4.3 Most of the time the camera

  • 10.9.2 compatibility with Outlook 2011

    Office 2011 re-installed from CD on MacBook Pro 8,1 early 2011.   Xcel, PP and Word all work.  I received an error mesage when I tried to launch Outlook - seemed to be a version / compatibility issue with 10.9.2. 

  • Mass upload of Source List through LSMW

    Dear Experts, In our plant we have so many materials for which source list has not been maintained properly.Please,can any one tell me in detail how to do Mass upload of Source list through LSMW in detail. Please do reply me... Thanks in Advance... M

  • Assign costumer in stock transfer between plants

    Hi Gurus!    I have a problems!  I need to assing a customer in stock transger scenery and I can't open the quality and production environment to do this definition.    I customazing the process in SPRO (MM>P>PO>SSTO>Define Shippiment Data for Plants