Adding line items in to a PO and PR using a Bapi

I need to change PO and PR and add several line items to each of them .
Can addition of line items to Pr and PO be achieved via a Bapi .
Please suggest.
Many Thanks

Hello Aditi,
About Purchase requisition, unfortunately you cannot add new item with BAPI_REQUISITION_CHANGE,
you have to create a your own bapi, but this is a long process to do (I think could take 2-3 days or more).
About Purchase Order ( BAPI  BAPI_PO_CHANGE ) you just have to specify all the data for the          
new line including the item number.  Be sure to put the new item number in the field PO_it in tables POITEM, POITEMX POSCHEDULE...
Regards,
Mauro

Similar Messages

  • Adding line item prior to ACC_DOCUMENT03 Posting

    Due to our legacy currency alignment on some systems being incongruent with our SAP ECC 6.0 environment, some upstream inbound IDocs will post with 2 decimals for HUF when 6.0 environment has 0 decimals for HUF.  The inbound documents are coming in as ACC_DOCUMENT03 IDocs.
    There will be rounding involved.  iN certain cases, the rounding will mean that the line items are no longer in balance.
    Rather than alter the value of the inbound line items, preference is to add line item prior to posting that contains the balance difference and posts to the "rounding difference" account.
    Has anyone expereinced this situation before? How was it resolved?
    Considered adding line item via "BAPI_ACC_DOCUMENT_POST" or, if possible, within "'BAPI_INCOMING_INVOICE_CREATE'".
    Has anyone faced this or a simlar issue before?  How was it resolved?  Was it resolved internally?

    Hello Weng,
    I also looked on SAP notes. 
    There is a note with much information about Tax Postings with accounting BAPIs and it's a consulting note.  The note number is 626235.
    Regards,
    Rae Ellen Woytowiez
    Edited by: Rae Ellen Woytowiez on Dec 21, 2010 10:11 PM

  • Undeleting a PO line item with multiple account assignment and PO history

    I  am getting error message
    PO history already exists (Multiple account assignment not possible)
        Message no. MEPO841
    When attempting to undelete a purchase order line item that has GR (nonvaluated) and Invoice postings.
    Sequence of events.
    PO line item was created with mutlitple account assignments ( 50/50 distribution) and GR nonval flags on.
    Invoice Posted (blocked for payment)
    GR done
    PO line item marked for deletion.
    Now getting MEPO841 when attempting to undelete.
    Tried to Reverse GR and cancel material docuement - unable to do so - message no selectable items in PO
      (even with check zero indicator )

    Hello Dan ,
    Error message MEPO 841 is only issued if you have Multiple account assignment function (MAA) activated. Multiple account assignment function is a new business function developed in Release 604.
    If you have MAA active, you are not allowed to change a single account assigned PO which has GR posted to a multiple accounts assigned PO. If this is tried , MEPO 841 will stop you from doing this change.
    If you want to have your old functionality in the lower release, you should switch off the business function LOG_MM_MAA_1 ( MM Multiple Account Assignment )  in Release 604.
    Please switch the business function LOG_MM_MAA_1 off in test environment  and test the problem again in a productive system.
    I hope this information has been helpful in solving your problem. Please let me know if you have any further questions.
    Thank you.
    Best Regards,
    Frank Farinella

  • User-exit to fill PO line item G/L account no. and other details

    Hi All,
    I am looking a customer function or a BADI to fill in the account number when PO is about to be created.
    My requirement is that based on some conditions account number in Account assignment tab for PO line item should be filled or overwritted if there is already a one selected, so that when user see the value for account number, it is the desired one.
    I tried with exit EXIT_SAPMM06E_006, which has the table TEKKN(account assignment for purchasing document) parameter but when I debugg it and assign some other value to TEKKN-SAKTO for the corresponding line item, I can see that changed value is not coming.
    Any clue?
    Regards,
    Mark

    Hi Mark,
    You can try implementing follwoing BADI's:
    ME_GUI_PO_CUST
    ME_PROCESS_PO_CUST
    Let me know if it helps.
    Gouri.

  • If SO line item is rejected, will PR and PO be cancelled automatically?

    Hi!  Just want to ask, if an SO line item is rejected, can the PR or PO line item be automatically cancelled as well?  If not, can the PR and the PO still be used even if the SO has been set to Rejection status? THanks so much!

    Hi Angela,
    Unfortunately, it is not so, owing to a lot many business reasons, the material concerned, can be ordered and received against the sales order, it will be a sales order stock E.
    You can anytime do a stock transfer to unrestricted to use it.
    Regards
    Shailesh

  • Fbl1n and fbl5n line item wise display the cutomer and vendor name

    Hi,
    My user is asking report for fbl5n and fbl1n line itemwise dispaly vendor and customer.See the report for one time vendor and customer name displaythe line item wise display in FBL!N/FBL5N. but not the display the regular vendors/customer.So one time table name BSEC
    Please advise
    Regards.
    Edited by: yps y on Nov 13, 2008 1:26 PM

    Hi,
    line item reports FBL1N/FBL5N are reading the line items (wow, what a big surpise ) and displaying information on line item level.
    As the vendor/customer name is NOT stored in the line items, you cannot display this in the lines (along with other item level information., like amount, posting key, doc.type, etc.). You may find a field called "Name 1) in the field catalog when configuring the ALV layout but this is empty for normal customers/vendors. It is only filled in for one time (Cpd) customers - the reason is as explained above: for these special accounts, the name IS stored on line item level (it varies from item to item),, that's why it can be read and displayed in the items.
    Now how about normal customers/vendors?
    You have to activate Business Transaction Event 1650 and implement a simple code so that depending on the account type (D = customer, K = vendor), you get the business partners name from table KNA1 / LFA1 and put it into field Name1.
    Hope that helps, points welcome
    Csaba

  • Fbl1n and fbl5n display at time line item wise name for vendor and customer

    Hi
    Could you tell me how can I include Customer or Vendor names for each line items in transaction FBL5N and FBL1N, please? Customer Accounts are displayed well, but in several cases we also need the name of the certain Customer or Vendor account names. This would be important for consolidation of customer accounts of the same customers.
    It is possible to include in these reports the u201EName1u201D, but they are empty in all cases. Could you tell me how it is possible to correct this problem, please?
    ysr

    hi YSR,
    See if you want to have the Vendor/ Customer name or number to be displayed when you execute it. I mean on the Vendor/Customer Line Item Display.
    THEN follow the below steps........
    After executing the FBL1N or FBL5N Click CTRL+F8 or Change Layout.  From the Pop screen select the Vendor from the Right side of the screen and then drag to the Left side of the screen, then click on Copy as.
    Then Save the Layout or CTRL F12, save the layout with the new name that you want.
    When you want this Layout as the default each and every time then u have to do 1 more step....
    After executing the same layout go the
    MENU> Settings>Layout-->Administration...
    there you select the layout that u have created and then set that layout as the Default settings Check mark on DS.
    So that each and every time when u execute it the same layout will be displayed with the fields that u have selected....
    Hope this will solve ur issue......
    Kumar........

  • Error when adding line items in a Contract

    Hi All,
    Need your help regarding the following issue.
    The business user is trying to edit (to add more line items/materials) a contract with customized T.Code ZGME31K.
    Getting error "Enter rate USD / rate type M for 11/24/2009 in the system settings" MSG No. SG105.
    However, the Vendor, Material all are maintained in the same currency i.e. USD.
    So, not finding a scope of rectification in OB28.
    Please advice.
    Regards,
    Milan.

    Hi,
    I closed
    Re: SBWP attachment link not diverting to Contract/P.O
    as my problem got resolved.
    And I put it "unanswered" as no one gave me the correct answer.
    It came out as a result of several testing in Quality by our team. Anyway, thanks to everyone who contributed.
    Regards,
    Milan.

  • Module Pool Programming adding line items.

    Hi,
    I am Doing Module Pool Programming in which I Should add line items and if the user gives the save button the data wil be saved in  tables and SAP should generate one unique number.
    Please give me inputs how to generate unique number and add n number of line items
    correct inputs are rewarded
    Thanks
    Rasheed.

    Hi,
    You may use Number Generator for generating unique ids in the system.
    The keyword DEFAULT SERIAL  gets a number generator for positive integers and can only be specified for columns that have the data type INTEGER, SMALLINT, and FIXED without decimal places (SERIAL).
    The first value generated by the generator can be defined by specifying an unsigned integer (must be greater than 0). If this definition is missing, 1 is defined as the first value.
    If an INSERT statement inserts the value in this column, you get the current number generator value and not the value 0.
    Each table may not contain more than one column with the DEFAULT specification DEFAULT SERIAL.
    Regards,
    Renjith
    Edited by: Renjith Michael on Oct 23, 2008 11:34 AM

  • Seperate Line item for taxes in MIGO and MIRO

    All SAP Gurus,
    We want to inventories the CST (central sales tax) amount.
    For this we have used the condition type JIPS, check marked the accounting key 'JI7' and gave posting indicator as '2' Separate line item.
    Now, CST amount is getting inventorised at the time of GR. (but no separate line item is created at the time of GR).
    During MIRO, the inventoried CST amount is getting deinventorised (although separate line item being created here).
    Can we have separate line item in MIRO, without getting value deinventorised? (as it happens for freight)
    Regards,

    Hi Kunal,
    Thanks for the reply.
    As you have rightly said, we need to tick 'NOT DEDUCTIBLE' in OBCN (we have already did that).
    And key has been already assigned in Atx procedure for the appropriate condition type.
    But the problem is that, we want separate line item for this tax amount in MIGO.
    Is it possible to have separate line item for the tax amount in MIGO (as we can get separate line item for freight in MIGO).
    Regards,

  • Classification of line items into the Detailed Profit and Loss report

    Hi,
    Given a line item in a profit and loss ledger, what field determines that the line item will appear under Fixed Manufacturing Costs, Sales and Distribution or General Admin Expenses when we generate the Detailed Profit and Loss report?
    Thank you

    Hi all,
    Thank you so much for everyone's quick reply. I really appreciate it.
    Please allow me to clarify my question.
    I have a balance of 3,712,126.60 in my GL 30000000. In my detailed Profit and Loss (ZPL-002), 705,712.90 is shown under Gen. Operating Exp. while 3,006,413.70 is shown under Fixed Manufacturing Costs.
    So, what field does SAP use to allocate those line items between Gen. Operating Exp. and Fixed Manufacturing Costs? Is it Functional Area only?
    Thank you.

  • Adding line items in BAPI_PO_CHANGE

    Hi,
    i am using BAPI_PO_CHANGE and i have already created po line item under one PO. Now i want to add more line items under the same document number. How can i do that using BAPI_PO_CHANGE.
    Thanks

    Hi
    Populate the following strucuture in the BAPI
    PURCHASEORDER = PO Number
    Tables :
    POITEM    = itab_item
    POITEMX  = itab_itemx
    where in the Itab_item fill in the item details and mark X in the corresponding fields in itab_itemx.
    also call the BAPI_TRANSACTION_COMMIT  so that the data would be saved.

  • EDI sales order line items that can not fulfilled and completed.

    Dear all,
    My requirement
    I have multiple EDI customers that send in orders daily where their requirements is that if the ordering item qty can not to fulfilled on the day then the line item in question on the corresponding created sale order needs to be automatically rejected along with a suitable and descriptive reason code.
    I'm looking to have this a seamless as possible and don't want to have the user manually review stock, edit sales orders or ATP check as they do now
    I've looked at the partial delivery settings on the customer master and customer item but I think this just warns that the customer requires complete deliveries.
    I apologise now as SD is not my thing, but if anyone has seen this situation before or has a standard solution I'd be grateful?
    Rgds

    Hi Braven,
    Ram has given good suggestion. I would like to add on it.
    If the quantity is not availabe put a reason for rejection , this is fine. But we dont need to create a new line item.. right.
    Because this way it will pile up line items in sales order..
    Instead put the logic in such a way that, when qty is not available put a rejection.
    If qty is partially availabe, then process the qty and create a new line item for the remianing qty. ( this is ofcourse if the customer agress on partial deliveries ).
    The above is on assumptions that your users review orders which are on rejection and process further.And other assumption is your customer agrees on partial deliveries.
    This is how we mapped in our system.Hope it helps.
    Regards,
    SB.

  • 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

  • Multiple line item display for PAYMENT ADVISE form(script) using F110 tcode

    Dear All,
    I am currently working on PAYMENT ADVISE script ( form ) - for which i have copied the
    form F110_IN_AVIS to zform.
    I am executing the form for output through executing Tcode - F110.
    The output works for single line item entry of vendor line items - but doesnot support
    for muliple line items.
    I have checked the standard program - RFFOUS_C - which has include - RFFORI06 for remittance advice -which supports for single line item display.
    Kindly advise me for the soultion of the same.
    Regards
    HC

    Hi,
    Do you manage to fix it ?
    we experienced the same problems (mass printing smarforms F110), we would like to use one time F110, and generates all the spool, for all the line items.
    Thanks
    Any help would be grateful.
    Thomas

Maybe you are looking for