To add new Line Items in Accounting Document using BTE

Hi,
We have a requirement to add new GL line items while doing PGI through VL02N. The requirement is as below. Please confirm, if we can use BTE 1120 for this and if yes, how to use it to add new line items.
Orig line items:
Item PK Acct No USD
001 99 12200 565.00
002 81 40000 565.00
New DESIRED line items:
Item PK Acct No USD
001 99 12200 565.00
002 81 40000 565.00
003 91 40000 565.00
004 81 40001 565.00
Regards
Sai

Hi,
I need to add new line items previously to save the FI document too.
Could you explain how we can use BTE 1120 to change or add new lines, please?
I have done a test but it don't work:
(Function open_fi_perform_00001120_p)
L_BSEG[] = T_BSEG[].
Call to the function that handle the BTE, with L_BSEG[] parameter.
T_BSEG[]  = L_BSEG[].                                "Note 996552
Then our new values in T_BSEG table are replace for the original table, and our changes are be deleted.
Thanks in advance,
Susana

Similar Messages

  • How to add new line items to FI document

    Hi,
    When doing a Post Goods Issue From VL02N I need to add a new line item to the posted FI document.  BADI AC_DOCUMENT allows you to change the FI document, but it doesn't appear to allow you to add any new lines.  In fact the Exporting parameter EX_DOCUMENT-item doesn't even have all of the line item fields like the GL account(hkont).  Can the item component be extended to add the other item fields?
    Or is it best to use a Business Transaction Event such as Process 1120??
    Thanks for any and all advice!
    Doug Crabtree

    Hi Chris,
    The $20 difference represents a variance between what is the Material Master standard price and and another price that is maintained because of the current rapidly escalating commodity prices.  This amount and cost center to post it to has to be determined dynamically at posting time from VL02N.  Finance wants to be able to post this variance to account 40100 to be able to track this.  Our FI analyst has determined that this isn't possible using config. 
    A possible solution is to create a custom program to post an additional FI doc using a BAPI with the additional line item and run it as a periodic job, however a real-time solution would be preferred.
    There are BADI's and substitutions to substitute values, but I haven't found any great way to add additional line items.  Even several BTE's I have looked at such as PROCESS_00001120 say not to change bseg lines. 
    Any help or advice would be greatly appreciated.  Thanks.
    Doug

  • Add NEW invoice items  in accounting document when doing billing (VF01)

    Hi !
    Is it possible to ADD NEW Itemlines to the Accountingdocument while doing billing(VF01) ?
    Know that its no problem to change existing lines.
    Need to ADD one new debit and one new credit item line.
    Have tried  userexit  EXIT_SAPLV60B_008 and BADI  AC_DOCUMENT  in debugger.
    But did not get it to work , "Accounting document was not get created".
    Added lines to XACCIT and XACCCR tables.
    BTE 1130 ?
    Please let me know how i can solve this,
    Thanks !
    Cheers
    /Per

    Hi !
    OK did you solve it ??  What exit did you then use ?
    I copied one of the GL rows and changed to next index and changed the values i wanted in XACCIT.
    Same to the table that holds the amounts. Same index there as the XACCIT table.
    I just want to know IF it is possible and what exit to use.
    Best regards
    /Per

  • Inserting new line item into existing delivery using BAPI

    Hi
    can you send me the code for inserting new line item into existing delivery either using BAPI or
    Function module.
    We are using SAP 4.7 version

    Hi Sreekanth,
    Refer to this links
    New item for outbound delivery via FM/BAPI?
    /message/3976349#3976349 [original link is broken]
    BAPI_OUTB_DELIVERY_CHANGE Help - Add new line item
    hope it is useful to you.
    Regards!

  • Add new line item in VA02 by copying same Order line details

    Hi All,
    I've a requirement where i need to add new line items in the Sales Order (T Code VA02) with reference to the same Order lines . For e.g an Order 80000100 which has 2 line items and the requirement is to create a new line i.e. line item 0030 by copying the details from the existing line item 0010 of the same order .
    I've checked the BAPI - BAPI_SALESDOCUMENT_COPY which is for Order Creation T Code VA01 . I'm looking out for Sales Order Change BAPI where i can give the reference as Order no and Order line item which will create a new line item in the same Order with the same details of the reference Order line item .
    Do let me know your thoughts !!!!
    Thanks,
    Bintu

    Hi -
    Please check these two FM's BAPI_SALESORDER_GETDETAILBOS & BAPI_SALESORDER_CHANGE.
    Regards,
    Atul Mohanty

  • How to add new line item using BAPI BAPI_CONTRACT_CHANGE for contract-ME32K

    HI Experts,
    how to add new line item using BAPI: BAPI_CONTRACT_CHANGE for existing contract.
    Requirement:
    Already the contract having two line items using ME31K.
    Custom program has to add new line items in existing contract.
    Thanks,
    Sendil

    I got the solution:
    We can do like this:
    1. Get all details using details, BAPI_CONTRACT_GETDETAIL.
    2. After getting results, append new line item. Then use your BAPI.
    Check this posting program.. where this bapi is used, use the same coding technique.
    IDOC_INPUT_PURCONTRACT_CHANGE

  • How to add new line item to SO using BAPI_SALESORDER_CREATEFROMDAT2

    Hi,
    I have sales order A with 1 line item, now i want to add new line item with material x and quantity y to the existing sales order A
    using BAPI_SALESORDER_CREATEFROMDAT2.
    Line item no for new line item should be generated by SAP internally.Please let me know the mandatory parameters to be passed to the BAPI to fulfill the requirement.
    DATA: order_header TYPE bapisdhd1,
               order_inx TYPE bapisdhd1x,
               partners TYPE TABLE OF bapiparnr,
               wa_partners TYPE bapiparnr.
    CLEAR: salesdocument,order_header_inx,wa_in, wa_inx.
    REFRESH: item_in, item_inx.
      salesdocument = wa_vbup-vbeln.
      order_header_inx-updateflag = 'X'.
      wa_in-itm_number = ' '.
      wa_in-material = p_nmatnr.
      wa_in-target_qty = gv_menge - gv_wemng.
      APPEND wa_in TO item_in.
      wa_inx-itm_number = ' '.
      wa_inx-updateflag = 'U'.
      wa_inx-target_qty = 'X'.
      APPEND wa_inx TO item_inx.
          CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
          EXPORTING
           salesdocumentin               = salesdocument
           order_header_in               = order_header
           order_header_inx              = order_inx
          IMPORTING
           salesdocument                 = salesdocument
          TABLES
           return                              = return
           order_items_in                = item_in
           order_items_inx               = item_inx
           order_partners                = partners.
    Thanks
    Bhuvana

    Hello,
    You can use FM: BAPI_SALESORDER_CHANGE with update indicator I (insert)
      call function 'BAPI_SALESORDER_CHANGE'
        exporting
          salesdocument    = l_vbeln
          order_header_inx = l_wa_order_header_inx
          simulation       = l_simulation
        tables
          return           = l_i_return
          order_item_in    = l_i_order_item
          order_item_inx   = l_i_order_item_inx
          partners         = l_i_partners
          schedule_lines   = l_i_schedule_lines
          schedule_linesx  = l_i_schedule_linesx
          extensionin      = l_i_extensionin.
    Thanks
    Subhankar

  • Add new line item in existing outbound delivery

    Hi,
    I am trying to add new line item in existing outbound delivery with material number and quantity.
    for this i tried BAPI_OUTB_DELIVERY_CHANGE and LE_MOB_DELIVERY_UPDATE.
    but both fm doesn't work and this will not add new line in that delivery.
    please help me how can i add new line item in delivery.
    I hope someone will help me........plz
    Thanks

    This kind of question is about to become a FAQ, I think....search the forum for similar questions.

  • Add new line items in ISA B2B

    Hi All,
    My requirement is to add new line items automatically onto the shopping basket based on a main configurable line item addition.
    Unfortunately this could not be configured for a variety of reasons.
    This has to done after the user clicks on Accept on the config pop-up for this Part and before he returns to the shopping basket.(I believe the CRM_ISA_BASKET_CHANGE would be called at this point)
    ISA would pass to the backend the extension values for the new Material to be added and the Main item(config item number) in the function call.
    So technically what would be best approach to add new line items and tie it to a parent line item if ISA can send both the values(new Material/Parent Product) in extension table to the backend?
    Did someone face this situation before. If yes can you please let me know which methods in the backend were used?
    Thanks a lot.

    Hi,
    May I know how did you resolve this problem.
    Thanks in advance.
    amar.s

  • How to add new line item to PO using BAPI_PO_CREATE1

    Hi,
    I have a purchase order with 2 line items, now i want to add new line item to the same PO using BAPI_PO_CREATE1.
    Here new line item should be created with reference PR line item.But this PR line item is Dynamic it get generated once the Sales order line item get changed.
    Please let me know how can i pass the PR doc no, PR line item no as reference to create the new PO line item.
    Thanks
    Bhuvana

    Hi,
    I think you need to use BAPI: BAPI_PO_GETDETAIL, then BAPI:BAPI_PO_CHANGE.
    BAPI_PO_CREATE1 equals ME21N, but adding new line item needs to be done in ME22N.
    Cheers,

  • Add New Line item while creating a new PO in ME21N

    Hi All,
    I have a requirement to add a new line item when user is pressing enter on the Line item 1 based on some condition.
    I am using the BADI 'ME_PROCESS_PO_CUST' and Method is 'PROCESS_ITEM'.
    I have tried lots of options and also look for method 'Create_Item ' but not able to understand what exactly I need to pass in that method.
    Can somebody elaborate on it if somebody has work on it? Even sample code will also help me.
    Thanks in advance.
    With regards
    Sachin Gupta

    Hi Sachin,
    Please find the sample code :
    METHOD if_ex_me_process_po_cust~process_item .
      DATA: ls_mepoitem TYPE mepoitem,
            ls_customer TYPE mepo_badi_exampl,
            ls_tbsg     TYPE tbsg.
    * here we check customers data
      ls_mepoitem = im_item->get_data( ).
      IF ls_mepoitem-loekz EQ 'D'.
    * a physical deletion of the item was carried out. therrefor we have to
    * delete customer data on the level of the item
        ls_customer-ebeln = ls_mepoitem-ebeln.
        ls_customer-ebelp = ls_mepoitem-ebelp.
        CALL FUNCTION 'MEPOBADIEX_SET_DATA'
          EXPORTING
            im_data                    = ls_customer
            im_physical_delete_request = 'X'.
      ELSE.
    * update/insert operation
        CALL FUNCTION 'MEPOBADIEX_GET_DATA'
          EXPORTING
            im_ebeln = ls_mepoitem-ebeln
            im_ebelp = ls_mepoitem-ebelp
          IMPORTING
            ex_data  = ls_customer.
    * check customers data
    * check field badi_bsgru. This should be carried out only for new items. Once the PO is posted the
    * field should no longer be changeable. This is done in Method FIELDSELECTION_ITEM.
        IF im_item->is_persistent( ) EQ mmpur_no.
          IF ls_customer-badi_bsgru IS INITIAL.
    * Place the cursor onto field badi_bsgru. The metafield was defined in BAdI ME_GUI_PO_CUST,
    * Method MAP_DYNPRO_FIELDS.
            mmpur_metafield mmmfd_cust_01.
            mmpur_message_forced 'W' 'ME' '083' text-002 '' '' ''.
          ELSE.
    * check whether the field is valid
            SELECT SINGLE * FROM tbsg INTO ls_tbsg WHERE bsgru EQ ls_customer-badi_bsgru.
            IF NOT sy-subrc IS INITIAL.
              mmpur_metafield mmmfd_cust_01.
              mmpur_message_forced 'E' 'ME' '083' text-004 '' '' ''.
    * invalidate the object
              CALL METHOD im_item->invalidate( ).
            ENDIF.
          ENDIF.
        ENDIF.
    Try to check the import and export paremeters to pass the vales.
    I hope this may helpfull.
    Thank you,
    Thanks,
    AMS

  • Add New line item from Quote to Contract using CRM_ORDER_MAINTAIN

    HI Gurus,
    I need to add a new line item with entire item details such as SALES PRICING etc in contract,
    i am confused like what are the parameters i need to pass to FM CRM ORDER MAINTAIN,
    Please help me on this regard.
    Thanks & regards.

    Experts,
    any luck i have please help me on the same.
    Thanks.

  • Multiple line item in billing but only one line item in accounting document

    Hi Everyone,
    I am having one scenario in which sales order has more than one line item. Only one billing document is create for all line items in Sales Order but billing document contains as many items as sales order has. In accounting document of billing i find only one customer line which has total amount of all line items in billing as debited. My requirement is Accounting document also should have as many line of customer-debit as in billing items i.e sales order. For example :
    (1) Sales order has 2 line items.
    (2) Billing document is only ONE and has 2 line items
    (3) currently accounting document has only ONE line of Customet - Debit ( Total amount of both items)
    My requirement is
    Accounting document should have 2 line item of customer - Debit
    Customer - Debit (amount of first line item)
    Customer - Debit (amount of Second line item)
    Sales - Credit
    How can it be done ?
    Regards,
    Manish

    Hi,
    This is the SAP expected behaviour
    As far as the values correspond to same account key and same GL account as per account determination, then ti will be posted as a single line item in FI document.
    If you want the customer specific items to be posted in two GL accounts , then you have to do the account determination that way.
    For example, you should have a condition table in FICO as follows.
    Sales org/ Account key / Customer
    For this condition table, the entries shoudl be as follows.
    5110/ERS/Customer A  GL ACCOUNT IS 5000100
    5110/ERS/Customer B GL ACCOUNT IS  5000200
    In this case, there will be 2 entries for the invoice instead of just one line entry.

  • Add new line item to Purchase Requisition

    Hello All,
    I want to add a new line item to the exixsting Purchase Requisition. The documentation for BAPI 'BAPI_REQUISITION_CHANGE' says that new items cannot be added using this BAPI. Is there any other BAPI or FM that does this? Thanks,
    Chandni

    Hi,
    Try using ME_UPDATE_REQUISITION.
    Thanks,
    Naren

  • ME21N add new line item when creating a PO

    Hi guys,
    I am new to badi & oop.
    I want to add a PO line item after clicking the save button in ME21n.
    I found the BADI IF_PURCHASE_ORDER_MM.
    I have coded in the method POST by using method create_item.
    However, it still does not work? Any ideas how to use this method to create the new line item or any sample code?
    Please help! points will be rewarded.
    Many thanks...

    Hi Sen,
    You mean by executing the BAPI call? Maybe you did understand my question wrongly.
    What my requirement is that, user will be keying in details for PO and its line item in ME21N.
    And upon saving, need to auto add in an additional line to the PO. Eg user key in 3 line items, the BADI/userexit suppose to add a new line item to it.
    The bapi that you proposed, creates PO from d scratch right?
    I guess it can't just create an PO item with that bapi unfortunately.
    Any other help? I need a help in coding this create_item method in interface class IF_PURCHASE_ORDER_MM.
    Please help.. I have an urgent requirements.
    Many thanks in advance.

Maybe you are looking for

  • Why my safari keep crashing on open time?

    hi, i can's open safari since updated to Yosemite, it keeps crashing all the time. here is the error output: Process:               Safari [669] Path:                  /Applications/Safari.app/Contents/MacOS/Safari Identifier:            com.apple.Sa

  • How do I re-activate remote for Apple TV

    I have an Apple TV 2 and 2xremotes (plus my iphone remote App) and none of then will connect. One of my remotes won't scroll upwards so I found an old white one and then the battery went on it so I hooked up my iPhone but the other night something ha

  • Oracle Application Server 10.1.3.0.0 OPMN Configuration Assistant Fails Due

    I'm in the process of installing Oracle E-Business Suite 12.1 on RHEL. This is where I'm stuck at: having trouble starting OPMN. While looking up Metalink, I found Doc ID:ID 422562.1 close to solving my issue.However I'm not sure how to use the solut

  • What is the equivalent selection in BI7? (Following BW 3.5 How to...Set up

    Hi, What is the equivalent selection in BI7? (Following BW 3.5 How to...Set up BW Statistics) I am trying to install BW statistics and all the good things that come with it for BI7. Following the instructions in a document that I was directed to on t

  • B2B Add on (Edi separator) IDOC AAE Receiver Error

    Hi We are getting an error, Transmitting the message to endpoint <local> using connection EDISeparator_http://sap.com/xi/XI/EDISeparator failed, due to: com.sap.engine.interfaces.messaging.api.exception.ConfigException: No sender agreement configured