How to change an Existing  Purchase Requisition Document in MM.

Hi Folks,
I want to write a program to change a existing  Purchase Requisition in MM.
I found two BAPI's BAPI_PR_CHANGE and BAPI_REQUISITION_CHANGE , which could be used to change PR document in  ECC.
I have following question:
1) why we have two seprate BAPI's for changing PR.
2) Do we need to use both BAPI's to change PR, depending on what value we are trying to change.
3) Is it optional to use any of these two BAPI's
Or do we have any other way to implement this PR change process.( Bcoz of when i tried to debug standard PR change process, none of these two BAPI's has been called)
Which FM or method is called when, we try to change and save PR document manually.
I would appriciate, if some one has any sample code to implement this PR change process.
Regards
PG
Edited by: PG on Aug 23, 2010 3:10 PM

>
PG wrote:
> I have following question:
> 1) why we have two seprate BAPI's for changing PR.
BAPI_REQUISITION_CHANGE is the older BAPI, the one based on the older ERP transaction (ME5x family), while BAPI_PR_CHANGE is the newest one, referring to the "recent" Enjoy transaction (ME5xN family).
They both satisfy you task probably, but if you can chose, I'd go for BAPI_PR_CHANGE.
>
PG wrote:
> 2) Do we need to use both BAPI's to change PR, depending on what value we are trying to change.
> 3) Is it optional to use any of these two BAPI's
You can use the first or the second one, it's indifferent. The newest one will also trigger user exits from ME5xN family. Which transactions are used by the users on the ERP? Choose with regards to the transactions used during the normal activity.
>
PG wrote:
> Or do we have any other way to implement this PR change process.( Bcoz of when i tried to debug standard PR change process, none of these two BAPI's has been called)
Normal PR change operativity doesn't use BAPI. BAPIs are used to create/modify docs from "external" systems (it's not properly true, but let assume it), they provide a simple interface to populate with PR data and the process of creation/modification will trigger every check/userexit already defined for the standard transactions on the ERP.
In example, suppose that in ME51N you defined a custom check in a specific userexit which don't allow an user to create a material item which have odd quantity (odd example, I know ). Then using BAPI_PR_CREATE you will not be able to create a PR with items with odd quantity, because the same check will be executed.

Similar Messages

  • PM orders change already existing purchase requisitions

    How can we avoid that changes to an existing work order, e.g. adding a new service or component will reset already reased purchase orders. The system does not recognize if requisitions are already converted to purchase orders or approval steps have already been performed.
    The external procurement settings need to be on "collective creation of purchase requisitions".  Maybe there is a user exit available that anybody knows more about, within that we can control the status of requisitions and avoid above described behaviour?
    Many thanks for your help and replies,
    Heiko

    Hi,
    Yes, It is possible to change plant on existing PO's provided the particular PO line item is not doing GRN and MIRO.
    If not done GRN and MIRO, the particular PO opened in ME22N T-code and selected particular line item deleted and then you have to create new line item give input data material code,plant,quantity,gross price, storage location and SAVE the PO.
    Hope, it is very useful for you.
    Regards,
    K.Rajendran

  • Purchase requisition document type change after Enhancement pack 4

    HI,
    we have recently upgraded to enhancement pack 4, after which i am not able to change purchase requisition document type.
    In change mode ME52N, the system is allowing to make change but when i goback and display the same PR again the change is not visible in change history also.
    I am able to make other changes. facing the problem with change in document type only.
    Regards,
    Raghu

    Hi,
    One thing please note that once you select the document type and draft the PR and save the PR, you will  get the doc number.
    Once you get the document number you cannot change the PR document type .
    The reason is document type is linked with number range so it cannot be changed because different seriers of document number is assined to differentdocument type. 
    And moreover document type is linked with the screen settings also. So I would request you to check the settings for each doc. type

  • Change Purchase Requisition Document Type when item category is D

    Hi experts,
    i have problem, when i put servis number in to the servis line i havent change Purchase Requisition Document Type. Account
    Assignment Category is K and Item Category is D. It is standard of Purchase Requisition? When i set that i can change document type when item category is D.
    When i putting only material i can change Purchase Requisition Document.
    Thx for your answer.
    Laco

    Hi,
    One thing please note that once you select the document type and draft the PR and save the PR, you will  get the doc number.
    Once you get the document number you cannot change the PR document type .
    The reason is document type is linked with number range so it cannot be changed because different seriers of document number is assined to differentdocument type. 
    And moreover document type is linked with the screen settings also. So I would request you to check the settings for each doc. type

  • MRP and purchase requisition document type.

    Hi
    where can I set the purchase requisition document type for
    MRP?
    MRP generates purchase requisitions using document type NB instead of
    a custom document  type.
    <b>How can I set the system so that generates purchase requisitions with
    a custom document type?</b>
    Best regards

    hi,
    in Tranasction : OPPQ, you can assingn the user defined document type.
    here standard is NB. There you can change the doucment type to ZNB like.
    hope this may help you,
    Regards,
    Srinivas

  • Purchase requisition document type

    Hi,
    Could any body guide me on how to control the assignment of  Purchase requisition document type in project system.
    The system has been taking default NB for network 20 and I want system to assign document type based on plant.
    What is required to be done???
    Regards,
    Pradeep

    Hi Pankaj,
    What if we copy netword 20 and assign the copied network a different document type??
    If we do so, how that new network 20 copy settings will have to be taken care of, in term of its dependencies??
    Please suggest??
    Regards,
    Pradeep

  • HT2204 how to change the existing ID form App Store

    how to change the existing ID form App Store

    You can tap on the id in Settings > iTunes & App Stores and log out of the account and you can then log in with a different account. But any content that was downloaded via the currently logged in account will remain tied to that account (so only that account can download updates to its apps), and if you turn on automatic downloads for an account, use iTunes match or re-download past purchases then you risk tying the device to that account for 90 days : http://support.apple.com/kb/HT4627

  • Changes in approved Purchase Requisition

    Hi all,
    After a purchase requisition has been released the person that created it can still make changes. If changes are made the altered requisition does not have to be released anymore.
    Is is possible to prevent users from changing a released purchase requisition? (How?)
    Is it possible to require another release after changing an released purchase requisition? (How?)
    Thanks!
    Regards,
    Victor

    Hi Victor,
    Below are the possible settings for Release Indicator for PR which may work for your requirements.
    If the changeability value -
    Blank  --- Changeable, new release in case of new Strategy, 
    1---- Can not be changed
    2---- Changeable, no new release in case of new strategy.
    Confirm if it works for you.
    Thanks,
    PNR.

  • How to change the language of the document in Pages 5.0.1

    Does anyone have an idea about how to change the language of a document in the new version of Pages (version 5.0 or later) without having to restart the computer?

    Edit > Spelling and Grammar > Show Spelling and Grammar

  • How to change supplier on purchase order

    Entered a purchase order for supplier X but the supplier does not have the item. How can I change the supplier on the purchase order without cancelling it?

    Hi............
                You cant change the supplier once the document has been punched against. You should cancel it first........
    Regards,

  • Changing quantities from purchase requisition to purchase order

    Hi MM friends,
    I've created a purchase requisition with some materials and quantities.
    When I create a purchase orer in reference to this purchase requisition, SAP modifies quantities for some materials.
    Why ?
    Regards,
    Bahia.

    Hi,
    This is standard functionality of SAP...If you create PR for say 100 qty, then while creating PO w.r.t. PR you can change quantity to 70....
    The same will be replicated in PR history.....
    Coming to your point If you do not want to make any changes in the quantity in the PO, then you have to make sure that your all PO's are only getting generated by PR....
    Spro-Materials Management-Purchasing-Purchase Order-Define Screen Layout at Document Level..Select ME21N...Quantity and Price--Make quantity as DISPLAY..SAve and come out..
    Now try, it will work..
    Also Be sure this will only work out if you are making your all PO's wrt PR...If you try to create PO manual (w/o any ref) then Quantity field will be in suppress mode.
    Utsav

  • Purchase requisition document attachment

    Hi,
    We are attaching document to Purchase requisition with the help
    of "Services for object" icon on top left of PR screen.
    User wants to know how to identify that a PR has document attached to
    it.
    Please advise.
    Regards,
    Pratap

    Hi Pratap,
    A workaround solution is update the PR header note with "note attached" or some other appropriate text.
    Easier for user to check the header than the services for object.
    Hope this helps.
    Cheers !

  • Change customer for purchase requisition

    Hi gurus,
    i'm trying to change customer number for purchase requisition.
    i tried to enter this code in badi ME_PROCESS_REQ_CUST~PROCESS_ITEM but KUNNR is not changed:
      DATA : ls_item_data   TYPE mereq_item,
             ls_item_datax  TYPE mereq_itemx,
             lv_obj         TYPE REF TO object,
             lv_attr        TYPE string,
             lv_aktyp       TYPE aktyp,
             lv_kunnr       TYPE ekunnr.
      FIELD-SYMBOLS : <fs_lcl> TYPE any,
                     <fs_source> TYPE any.
      IF im_count EQ 1.  " to avoid infinate Loop"
    Access Attributes value of Local Class
    for getting the transaction mode of Line item
    H-> Create
        lv_obj ?= im_item.
        MOVE 'MY_STATE->AKTYP' TO lv_attr.
        ASSIGN lv_obj->(lv_attr) TO <fs_lcl>.
        lv_aktyp = <fs_lcl>.
        IF lv_aktyp EQ 'H' OR lv_aktyp EQ 'V'.        "While creating line item"
    Extracting existing Item Data and Modify the fields
    Requestor Name (AFNAM) & Source of supply details
          CLEAR : ls_item_data.
          ls_item_data = im_item->get_data( ).
         ls_item_datax = im_item->get_datax( ).
         MOVE ls_item_data-ernam TO ls_item_data-afnam.
          lv_kunnr = '0000100000'.
          ls_item_data-kunnr = lv_kunnr.
             ls_item_datax-kunnr = 'X'.
         im_item->set_datax(
         EXPORTING
         im_datax = ls_item_datax ).
          im_item->set_data(
          EXPORTING
          im_data = ls_item_data ).
        ENDIF.
      ENDIF.
    when trying changing other fields like AFNAM for example, the data is changed.
    the customer number exists in KNA1.
    any ideas?
    Thanks,
    Sagit.

    SEARCH  SEARCH  SEARCH  SEARCH  SEARCH  SEARCH  SEARCH
    Good work

  • Change netpr in purchase requisition

    Hi all,
    does anybody know how to change the item field 'netpr' in the purchase requisition?
    Regards
    Joachim

    Please see KBA 1976282 - Valuation Price in Purchase Requisitions
    It explains how the field is filled and that you shall use BAdI "ME_PROCESS_REQ_CUST
    to built your own logic.
    However, I am not sure when this BAdI is actually executed. Looking into the info records means that you need a successful source determination, which is not the easiest part either  having all the SCN questions about the source determination issues in mind.

  • How can create IDOC for Purchase Requisition

    Hi all,
    whenever I change the Purchase requisition(Tcode-ME22N),IDOC has to be generated automatically.Please help me out.

    Hi ravi,
    It seems you are talking about the purchase order change.
    because ME22N is a transaction for editing the purchase order.Purchase req. is a internal document which we dont send out to any one.
    Anyway what is the output type you are using?.
    If you use NEU then no need for any changes.
    otherwise use NACE transaction and select your output type then mark the 'multiple issuing ' flag.
    So whenever there is a change system senses that and proposes the output.
    After that you got to make the settings at the partner profile using WE20 transaction.There at the message control parameters level mention the output type and set the change flag.
    Entry could be EF ( App.id) NEU (output type) and X (Change flag).
    So system generates the IDOC whenever you do the change using ME22n transaction.
    Please let me know if you have any issues.
    Thank you.
    Regards,
    karun.M

Maybe you are looking for