Capture an error while creating a purchase requisition (BAPI_PR_CREATE)

Hi All,
    I am using FM BAPI_PR_CREATE to create purchase requesition, Now my problem is that i have various items for single material now i wan to capture the error if any item has ?
Please let me know how to do so?
Thanks & Regards,
Ruchi Tiwari

Hi,
To get the error messages after the BAPI_PR_CREATE is called,
loop at the return table which will contain the system messages and call the following FM
CALL FUNCTION 'FORMAT_MESSAGE'
        EXPORTING
          ID        = LS_MESSAGES-MSGID
          LANG      = '-D'
          NO        = LS_MESSAGES-MSGNR
          V1        = LS_MESSAGES-MSGV1
          V2        = LS_MESSAGES-MSGV2
          V3        = LS_MESSAGES-MSGV3
          V4        = LS_MESSAGES-MSGV4
        IMPORTING
          MSG       = LV_MESSAGE
        EXCEPTIONS
          NOT_FOUND = 1
          OTHERS    = 2.
      IF SY-SUBRC  0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.

Similar Messages

  • How to capture an error while creating a purchase requisition

    Hello All,
    I append 50 line items while creating a PR using BAPI_REQUISITION_CREATE and I get an error in RETURN.
    So can I capture the line item which exactly has that error.
    I mean to say how to figure out the line item with error, if the BAPI gives an error.
    Please suggest.
    Thanks & Regards,
    Tarun Gambhir

    I could not find TEST_RUN option in these bapis
    Roundway will be
    1. Use BAPI_REQUISTION_CREATE with single line item  and create PR then take the requisiton number
    2. Use ME_UPDATE_REQUISITION. and add line by line into same PR (Within loop)
    BAPI_REQUISITION_CHANGE can only be possible to edit existing line and you cannot able to add new lines,
    a®s
    Edited by: a®s on Jul 29, 2009 11:13 AM

  • Error while creating a Purchase Requisition T Code ME52N

    Dear Freinds,
    The users are trying to create the Purchase Requisition, however the system gives the error message that the GL Account xxxxxx cannot be used, as the comparison of the field selection strings are not comparable with the Account Assignment Category E. Message no. is ME045. How could we resolve this?
    Thanks for the help.
    Regards

    Dear,
    check the FSG for the GL Account 200010 and go to TCcode OBC4 and check the status of field 'Asset number / subnumber' and then go to TCode OME9 and select A and check the field status for field 'Asset number / subnumber'. Status at both areas are different hence system is not accpting. Make status identical.
    Regards,
    Sandip

  • Best Practice while creating Contract, Purchase Requisition, Purchase Order

    Hi
    What is the best practice with respect to Contract & Purchase Requisition?
    IN T Code ME31K, there is a button Reference to PReq, meaning that we can create contract with using Purchase Requisition. (We have done the same)
    While creating the Purchase Order using Contract, we could find Purchase Requisition reference in the Purchase Order; similarly when we created the Purchase Order using Purchase Requisition, we could find Contract reference in the Purchase Order.
    I have done the following:
    1. Create a Contract.
    2. Create a Purchase Requisition
    3. Assign Requisition and Create Purchase Order using T Code ME57.
    4. Create Purchase Order
    Here in this case we could find references of both Contract & Purchase Requisition.
    I just want to know what Practice should we adopt / advise while creating Contract, Purchase Requisition. & Purchase Order?
    Regards,

    Hi,
    In ME51N Screen, enter Contract number in the "AGREEMENT" TAB and if more items in the contract, you can mention the item number in the next TAB to the AGREEMENT TAB and then proceed with creating PR by entering other details. This TAB you can find in the 4th column from extreme right end of PR screen.
    Regards,
    Biju K
    Edited by: Bijay Kumar Barik on Sep 10, 2009 2:23 PM

  • Error when creating a purchase requisition in reference to a contract.

    Hello All,
    My client have a requirement that , He wants to create a purchase requissition with Item catogery-B and account assignment-K
    with reference to a contract.
    when we are trying to create a purchase requisition with Item catogery-B and account assignment-K
    with reference to a contract the system is throwing an error: "Item categories in agreement and requisition incompatible".
    I had searched for the relating documents and tried all the conbinations but could not find the solution.
    Could any body help in this regard.
    thanks in advance.

    Hi Gayathri
    I thought so. So that means you are unable to create a contract with the combination of K and B which is why you are not able to adopt it in the PR with the same results.
    As far as entering the limit goes, you would be making a value contract in which you would have to enter the value of contract that you need to create for vendor. Also, for the second error, once you have created a contract with the particular account assignment, u cannot change it. You would have to create a new contract with the desired account assignment category and then try creating a PR. Hope this helps!

  • Error while creating a Purchase Order

    Hi Friends,
    I am new to SAP MM. I am getting a problem while creating a purchase order. I created Purchase Info Record, Source List, but while creating Purchase Order, price is not picking from the purchase order. I am getting an error i.e. Net Value must be greater than 0. I checked all the settings, but getting same error.
    Could you please solve this

    Hi,
    Give some price at the item level for the item in the PO.
    And check the Pricing procedure in PO
    Hope it helps you.
    Thanks.

  • Enter short text error when creating a purchase requisition using ME51

    Hello
    I would be grateful if someone can help. I am currently trying to raise a purchase req using ME51. The purchase req is for one item so i enter details of this item on line 1. However when i try to save the purchase req i get an error message stating "enter short text"  on line 3 and it does not let me continue. Line 3 however does not contain any item information so i dont understand why i am getting this error message.
    Another user created the same purchase req and it worked fine for them so i am not sure why i am getting this message.
    I  would be grateful if you can please help.
    Thank you
    Regards
    Bindi

    Syed
    I  have tried logging off and logging back in and still having this issue.
    Jurgen
    No im only having this problem in a ME51 creating purchase requisitions and not in a CATT or any batch input recording
    Regards
    Bindi

  • Get "Error in Net Price Calculation" error while creating a Purchase Order

    I am getting a error when i try to create a PO. Says "Error in Net Price Calculation item 00010(Please correct)"
    I have defined conditon records with the price for the material  and have also created info record.However the price in the info record (including currency i.e USDN is different than the one defined in the conditon records currency is USD).
    However the price is different from the one defined in info record and in material master.
    Where is it picking the price from also is there any way to edit the price in material master or info record ?
    Also when i view the condition records by using Tcode MEK1 i get the following error
    "Access Pricing Purchasing Z00q 20 contains no fields"
    I know Z001 is the access sequence
    Can any one tell me wht is this error message about ?
    Edited by: Dspsac on Jan 29, 2008 4:31 AM

    how can u maintain the condition record as well as info record for a vendor -material in the same time frame
    it is not possibe
    as info record is also 1 of the condition table
    if u have maintained the info record then system is going to fetch the data from there but point top notice is it depends on the validity of record
    system fetch the price from info record
    and the currency used is fom vendor master

  • WebDynpro Error while creating a Purchase Order in SRM 7.0

    Hello Friends,
    I need help.
    We are on SRM 7.0 with support pack 8.0 and  we are getting the below error wile clicking on Shopping cart or Purchase Order link in Portal.
    Any idea on how to resolve this error.
    Thanks
    Jyothi.
    http://sapsrm.erpcx.com:8000/sap/bc/webdynpro/sapsrm/wda_l_fpm_oif/
    ASSERTION_FAILED
    The ASSERT condition was violated.
    Method: ADD_EVENT_TO_QUEUE of program CL_FPM========================CP
    Method: IF_FPM~RAISE_EVENT of program CL_FPM========================CP
    Method: SET_CREATE_BUTTON_ACTIVE of program /1BCWDY/0FJM4718F184UKVHA34J==CP
    Method: IF_COMPONENTCONTROLLER~SET_CREATE_BUTTON_ACTIVE of program /1BCWDY/0FJM4718F184UKVHA34J==CP
    Method: RESET_SCREEN of program /1BCWDY/0FJM4718F184UKVHA34J==CP
    Method: IF_V_PRSEL~RESET_SCREEN of program /1BCWDY/0FJM4718F184UKVHA34J==CP
    Method: WDDOMODIFYVIEW of program /1BCWDY/0FJM4718F184UKVHA34J==CP
    Method: IF_WDR_VIEW_DELEGATE~WD_DO_MODIFY_VIEW of program /1BCWDY/0FJM4718F184UKVHA34J==CP
    Method: DO_MODIFY_VIEW of program CL_WDR_DELEGATING_VIEW========CP
    Method: MODIFY_VIEW of program CL_WDR_VIEW===================CP

    Here is what I see:
    Error analysis                                                                                |
    The following checkpoint group was used: "No checkpoint group specified"
    If in the ASSERT statement the addition FIELDS was used, you can find
    the content of the first 8 specified fields in the following overview:
    " (not used) "
    " (not used) "
    " (not used) "
    " (not used) "
    " (not used) "
    " (not used) "
    " (not used) "
    " (not used) "
    How to correct the error
    Probably the only way to eliminate the error is to correct the program.
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "ASSERTION_FAILED" " "
    "CL_FPM========================CP" or "CL_FPM========================CM004"
    "ADD_EVENT_TO_QUEUE"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    |

  • Error in WBS element while doing the purchase requisition

    Dear All,
    While doing the purchase requisition in ps
    the error is : Item 010 WBS element IN05-PR09-16 . 04 budget exceeded.
    Kindly parovide any solution.
    Best Regards,
    Venkat.

    Hi Venkar,
    Check the available budget against WBSE - IN05-PR09-16 . 04 (S_ALR_87013558 - Budget/Actual/Commitment/Rem Plan/Assigned ), and the PR amount. Available Budget should be more than PR amount. Based on the tolerance limits set for the  budget profile, maintain the Current Budget with budget updates and try to create a PR accordingly.
    Hope this solves your problem !!
    Br
    Hari.
    Edited by: Hari Krishna Kudaravalli on Aug 20, 2009 3:25 PM

  • Error while creating Vacancy requisition object (NB) after upgrading EHP4

    Hi All,
    We had alreay E-Rec system with EHP2 and using last 1 year. Now based on Client requirement, we have upgrdaed to EHP4. After completing EHP4 upgradation, we are getting error while creating vacancy requisition object after all level of approval.
    Can any body help how to resolve this issue?
    Thanks in advance.
    Regards,
    Sreelatha

    Hi
    Hope SAP Note 1241014 will be useful to you.
    Best Regards
    Reddy

  • Error while Creating PO from Purchase Requistion in Third Party  Sales

    Dear Team,
                          While Creating the Purchase Order from Purchase Requistion in Third Party Sales. When I am saving the PO I am getting the Error in GL Account Cannot be Used. I have disabled the field G/L Account in settings of Account Assignment Category of Third Party. Still I am facing that Error while Creating Purchase Order.  Can you guide me where we do this Assignment of G/L Account so that I can change the G/L Account.
    Thanks,
    Farhan.

    Dear Farhan,
    1. Go to T. Code: FS00 and enter GL number and Company Code and go to Tab: Create/bank/interest, write down the field status group.
    2. Go to T. Code: OBC4 and Select your Field Status Variant and Double Click: Field Status Group (From Left-hand Dialog Structure)
    Double-Click on to Field Status Group (as noted down from in Step 1).
    From Select group, Select Additional account assignments and make Earmarked Funds, as optional.
    Best Regards,
    Amit

  • Error while creating contract type 0002 [Purchase side]

    Hiya
    While creating a purchase side contract vide tcode wb21 i am getting following error
    No basic purchase price relevant to pricing found with schema RM0000
    Message no. WV185
    Diagnosis
    There is no condition record flagged as relevant to pricing in the master conditions defined for the basic purchase price.
    Procedure
    Check in Customizing (price determination, Purchasing) whether the condition types that are used as gross price or promotion price (these are PB00, PBXX and PA00 in the standard system) are flagged as relevant to pricing. Set this flag if you wish new condition records to be saved as relevant to pricing in future. If you wish to flag existing condition records as "relevant to pricing" in retrospect, use report RWVKP01U.
    Kindly help
    Regards
    Ranjeet

    Closing...

  • Error while creating PO in operation subcontracting

    I am getting an Error while creating PO in operation subcontracting.When I'm trying to convert the purchase requisition for the operation in the routing into a Purchase order it gives me the error "Not possible to determine any components".Please guide me why I am getting this error. I have already assigned the component to the operation in the routing. I also have this component in stock. But no Idea why I'm getting this error

    Hi  Sam,
    please check ,
    Assign a recursive BOM for the material for which you want to  create the purchase order .ie. create a BOM  of mat say X having a component  X and marking the indicator  recursive ticked.
    Please create the BOM  which is valid much before the date of creating a purchase requisition .
    And proceed for the creation of subcontract purchase requisition.
    Please Revert back, if the problem is solved.
    OMKAR

  • Error whilw creating a purchase order

    i am getting the error while creating a po like"you have no authorisation for a purchase order referencing a requisition".
    please help me to solve this issue
    Regards

    Hi bharat,
    It seems to be authorization issue.
    When you get the error message, in the same screen enter /nSU53 transaction code and press enter.
    You will get screen in which you have 'spread layout' tab. click on the same and you will get authorization object.
    you send the screenshot to basis people to give you the authorization.
    regards
    prasad

Maybe you are looking for

  • Itunes stop working on Windows 7 after update

    After latest update, Itunes stop working on my computer. My computer has Windows 7. What can I do to get my Itunes up and running?

  • Installing iTunes made windows stop recognizing my iPod

    *Short version:* the USB driver included in Apple Mobile Device Support with the latest version of iTunes did not work. Deleting them made my iPod work. *Long Version:* I had an iPod Mini (4gb, past warranty) that recently had a harddisk failure, so

  • Preloader in flex

    hi     i want to use a preloader in flex.please help me if anyone know the answer                                                                            regards

  • Connecting to third party JMS Queue using Patchbay

    Hi All, We are trying to connect to a third party JMS queue configured in a remote weblogic server using ATG patcbay. We have configured the provider in dynamoMessagingSystem.xml and created a InitialContextFactory and provided all the queue configur

  • Acrobat could not be used despite confirmation of registration.

    I have an adobe CS4. I have already registered the product quite some time ago. Today as usual, when I needed to use acrobat, a problem occured. It wanted me to open photoshop so that the program can be registered and activated for use. This was stra