Substitution to create new line item

Hi,
I am looking for a way of creating an additional line item when posting an FI document (incoming payment) based on one of the documents actual line items.
(well, actually the customer is looking for this...) ;o)
Something like:
IF line item account number EQ 1234 THEN
   Check how many invoices are paid by this transaction
   Check something in SD via the invoice number for all line items
   Based on findings, create a new line item.
END IF.
Can I do this via a substitution and user exit?
Did anyone ever do something like this?
Thanks in advance!
Dirk

Hi,
Good evening and greetings,
I dont think it is possible through substitution...Please go through the following
FBICRC002POPULATE_LINEITEMS
Please reward points if found useful
Thanking you
With kindest regards
Ramesh Padmanabhan

Similar Messages

  • Reconfigure sales BOM deletes line item and creates new line item

    We are having issue with Sales BOM. Once sales BOM is reconfigure, line item is automatically deleted and creates new line item. These changes are not captured by reporting tool. Is it standard SAP behavior? if its not standard behavior, how to fix this issue?

    Hi,
    If i am not wrong, i assume you are using site instead of plant.   If it is plant , then "yes", we can have a order with same material being line item 10 and 20 with different plants.  Reg delivery, if the plants are configured to a same shipping point then you will have one delievery.  if the plants are configured for a different shipping point , then delivery will be split up.
    Reward if it helps,
    Thanks & regards,
    CLN

  • Create new line item while saving a new order

    I have a requirement to create a new line item with different item category while creating an order.
    i.e
    if the item category is ICT1, then create a new line item like item 1 but with item category ICT2.
    Also in the conditions tab, we need to update the condition type with  different values for both existing and new item.
    All this has to be in VA01 i.e on save.
    I tried to append lines of structure XVBAP at SAVE_DOCUMENT _PREPARE by changing the item no and item caegory. This works fine. But, how can I get other table details like XKOMV(which stores pricing condition details) for the new item?
    Please can you suggest any other exit/subroutine for this?
    or any other alternative solutions

    Hi,
    Try to use this EXIT:
    'EXIT_SAPMM06E_013'     Update Customer's Own Data in Purchasing Document
    The Badi and exit contains same parameter.
    Thanks,
    AMS

  • After Release material in PR not create new line item material

    Hi friends
              I m facing a problem in PR . When PR is Release then  not add new line item in existing PR. It have any solution .
    pls give the solution .
    thanks .
    Anup .

    Hi,
    Go to ME54N > Here reverse Release of PR and then add the new line item and then release it again.
    OR if you don't want to do as above then Go to SPRO > MM > Purchase Requisition > Release Procedure > Procedure with Classification > Set Up Procedure with Classification > Release indicator > Here for Release indicator "2" (RFQ/purchase order), if you have entered Changeabil. as "1" then change it to "4"
    Also check if you have assigned a Field Selection Key as only Display PR then you have to change it or remove it.

  • How to create new line item in credit memo request in rebate settlement

    HI friends,
                 I need aimmediate help on following.
    Requirenment is for given agreement all invoices for that needs to be retrieved. In those invoices we need to check the tax code or tax city for all invoices. If all are same then do nothing.
               But if any of these 2 fields are different in all retrieved invoices, then we need to sum up the qty for all invoices having same tax code/city & like wise ned to create a credit memo request which will have one line item for each tax code/city.
    Example:
    Agreement 9999 with the relevant sales volume:
    Invoice 1: Material A, tax key X, quantity 1 kg
    Invoice 2: Material B, tax key X, quantity 2 kg
    Invioce 3: Material C, tax key Z, quantity 4 kg
    The credit memo request for agreement 9999 should look as such:
    Thanks & regards,
    Abhijeet.
    Item line 1: SETTLEMENT MATERIAL, tax key X, 3 kg
    Item line 2: SETTLEMENT MATERIAL, tax key Z, 4 kg
    Please help me . I am not getting the user exit / badi for this development.
    Please let me know if any one of you know from where to do this?

    Hi Vinod,
    The relationship with main item is stored with CRMD_ORDERADM_I- Parent.
    You need to pass the guid of main item to orderadm_i-parent. This will keep the relationship with main item.
    Thanks
    Ajay

  • AO Create new line items/new data records

    Hello,
    I´m looking for a feature to create new data records for a planning query in AO.
    I know this worked for BExAnalyzer, but can´t find any documentation for AO.
    Would be great if anyone can help me out
    Best Regards,
    Sandra

    Hi Thorsten,
    the planning query I use is using characteristic relationships. There are no free characteristics.
    All characteristics are somehow derived by relationship or restricted with single values via variables.
    I tried to define the planning kpi as no disaggregation, but even though it doesn´t work.
    The query is ready for input and I can enter, recalculate and save the data.
    But I got the kpi in the rows and as soon as I drag the key figure into the columns it is working.
    Thanks
    Sandra

  • Adding new line item while save

    Hi all,
    use an implementation of BADI  ME_PROCESS_REQ_CUST in the MM-Purchase-Requisition, method IF_EX_ME_PROCESS_REQ_CUST~POST while save.
    based on the line items available(USER ENTERED) i have to add few more line items based on the account assignment category and quantity while save.
    How to create new line items (copying the existing line item and change the quantity ) and save the requestion with the additional line items. I used this code. while calling the method CRETE_ITEM  create based on the object REF_ITEM  in the MY_STATE.
    the REF_ITEM object is Initial . so while creation the empty object is created.
    kindly help to give tips/details  to handle.
    Coding:
    data: l_item_list TYPE MMPUR_REQUISITION_ITEMS,
    l_item TYPE MMPUR_REQUISITION_ITEM,
    l_item_akt TYPE mereq_item,
    l_item_ref TYPE ref to IF_PURCHASE_REQUISITION_ITEM.
    l_item_list = im_header->get_items().
    loop at l_item_list into l_item.
    l_item_akt = l_item-item->get_data( ).
    IF l_item_akt-MENGE > 1 AND
           l_item_akt -KNTTP = 'A'.
          DO l_item_akt -MENGE TIMES.
             l_item-item= IM_HEADER->CREATE_ITEM( IM_ITEM =  l_item-item).
            INSERT  l_item INTO TABLE IT_ITEMS_list.
    %%%%%  here i checked useing    get data  method  i am not getting any data other than relesing procedure data.
    I used SET_DATA method to set the data. even I am not getting data.
    endloop.
    (Debugging the code, I manage by doubleclicking while create Item  method the fieldcontent of l_item (e.g ) to show the content of the class-attribute my_state. This works only if the field “Interface” in the Debugger is empty because then I see the attributes of the class. If the field Interface is filled with “IF_PURCHASE_REQUISITION_ITEM”, there aren’t any attributes shown.)
    Thanks in advance for your kind help!!
    Nicole

    I searched sdn and found this not possible.

  • How to create a new line item automatically in CRMD_ORDER

    Hi,
    While creating a sales order in CRMD_ORDER, after user enters a line item say 'xxxx' and press 'Enter', we need to create a new line item say 'yyyy' dynamically.  Any ways of how to achieve this functionality?
    thanks in advance,
    amar.s

    Hi Amar
    You can use structured products:
    Step1:COMM_PR01
    Open Product xxxx > Relationships > Tab Component > Select Relationship type = STRSET Set > Assing product yyyy
    Step2: IMG > CRM > Transactions > Define Item Categories
    Open you item category and in Structure scope field select option A Single-Level Explosion of structured products
    Step3: IMG >  CRM > Transactions > Define Item Category Determination
    create new entry
    Transaction type =
    Item   category group = Category group of xxxx product
    main item cat = item cat of xxxx product
    item cat =  item cat of yyyy product
    now when you enter product xxxx , product yyyy will be automatically added
    Hope it helps
    Rupesh

  • CREATE SUBSTITUTION RULE FOR u0093COPYING LINE ITEM TEXT FOR LINE ITEMSu0094

    Hi every body
    When user post transactions in FB60 we have give the line item text, Suppose no.of lineitems are there in tht instnace my client asked to create the substitution rule to “COPYING LINE ITEM TEXT FOR LINE ITEMS”
    pls tell me the processes how to create the substitution rule
    Plz can anyboby help me out...
    laxmi velaga

    sorry,
    link doesn't work:
    here's the content:
    you must add your rules at event 3 (complete document)
    in an exit of ZGGBS000:
    data htext type bseg-sgtxt.
    *find
      LOOP AT BOOL_DATA-BSEG INTO BSEG
                      WHERE    bseg-sgtxt <> space.
      move  bseg-sgtxt to htext.
      ENDLOOP.
    *copy
      LOOP AT BOOL_DATA-BSEG INTO BSEG
                      WHERE    bseg-sgtxt = space.
      move  htext to bseg-sgtxt
    *modify
      MODIFY BOOL_DATA-BSEG FROM BSEG.^
      ENDLOOP.
    http://help.sap.com/saphelp_47x200/helpdata/en/5b/d231a843c611d182b30000e829fbfe/frameset.htm
    please reward useful answers
    thanks and regards
    Andreas

  • Append New Line Item(s) onto the created Purchase Request using Function

    Dear Expert,
    I am trying to append new lines into the created purchase request via Function Module/ BAPI.
    Say, now, the Purchase Request has already 1 line item. And i want to append new line items into
    this purchase request via function module/ bapi.
    Do you know if there is any function module/ bapi exists to do this?
    Thanks.
    Tee

    Hi,
    It's weird.
    I tried on the BAPI_PR_CHANGE, and the return message says that it has successfully changed the PR. But, when i see it via ME53N, it's not being updated.
    Does anyone has sample usage/ code using this BAPI?
    Thanks.
    Tee

  • New Line Item to be created in sale order

    Hi,
    Client requires a new line item to be created in sale order for particular regions only..
    Scenario 1 :
    For a particular region Additional Tax shud be calculated on Basic Price .
    Scenario 2 :
    For a particular region Cess on Vat need to incorporated.
    Client wants to maintain condition records in Cond Type :UTXJ and also the client shall maintain a 2 different Tax Codes for above each scenarios,  In future in case Additional Tax or Cess on Vat is applicable to other regions it shud get posted in their respective G/L's
    Plz suggest...
    Thanx...

    It would be wonderful had you shared your suggestion in this forum itself rather sending to personal mail ids which is against the rules and regulations of this forum.
    I request you to dont do that please.

  • How do i create a new line item (say 20) in reference to line item 10

    Hi all,
    I am trying to map a scenario where i want to create a new line item with reference to an existing line item. Where do i get this option in SD, and how could i go about it?
    Thanks & Regards
    Ravi

    > In ECC6 if u go to VA01 and enter the SP and SH,
    > Press Propose Item Icon, then one window will pop-up
    > asking for Sale Document Number, enter the Number and
    > select- selection list, there  u will get all the
    > line item of the Sale Doc. Select and copy Material
    Hi i am on SAP 4.7. How could be the same handled here?

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

  • Create a new line item in sales order

    Hi,
    I have to create a new line item in a sales order. The scenario is that if we donot find the desired quantity from a plant. Then we have to go ahead and pick the remaining quantity from another plant and automatically create a new line item.The new plant is picked from a custom table so u need not worry about it.
    According to me I will have to use the BAPI for it but one constraint is that while creating a sales order the order number assignment is not done until saved. So what can be done in the case if its a new document.
    Kindly let me know if there is any appropriate user exit or if someone has worked on a similar requirement.
    thanks
    Varun

    Hi,
    Thanks for your response. I have tried to use these exits already but the problem dat comes here is dat when we try to use the BAPI we donot have any sales document created in the first instance(i.e. while creating an order) so the BAPI returns error and when i tried to populate the itabs in the program directly the new values just wont get processed.
    I think like: in case its a new document and we face this scenario I can just terminate the document creation and create a new document using the BAPI with proper plant assignments.But i am doubtful about the stability of this process.
    Kindly comment.
    Thanks
    Varun

  • 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

Maybe you are looking for

  • How to set levels values in adjustment layer via script?

    I try to make a script which generates a non destructive adjustment layer for levels which already sets values for shadow levels and highlight levels. I tried the scripting listener in order to record it. Unfortunately the scripting listener only rec

  • BPS retraction part for Cost center accounting

    hi All         Can any body help me regarding the retraction part for cost center accounting bw-bps, how the retraction is exactly done . when part is where the data comes sits in bw and R/3 . how exactly plan data sits in r/3 what is the relation wh

  • Can I take use the RAM from my old Macbook pro and put in in my new one?

    Hi guys, wondering if I can do this to save money on buying new RAM? I have a 13" Macbook pro and have just bought a new 15" Macbook pro the 13" Has 8gb of RAM the 15" has 4 gb of RAM I want to swap them over if its possible. This is the info I have

  • How to use the standrad Refresh button in ooalv Grid?

    Hai Experts ,                           i write editable oo alv program its works fine.  when change the data then click save button its saved correctly, but the problem is totals of row  & column not refresh when i am click the Refresh button . Plea

  • How to permanently remove Pokki from a system image

    QuestionI have configured the base install of our E440/E540 to our standards with one exception. Despite my efforts, each time a new user signs into a machine, Pokki is loaded up and added to the taskbar. I've uninstalled it. I've combed through ever