Purchase order modification

Hi,
We are using this functionaly:
We change purchase requistiion quantity with BAPI BAPI_REQUISITION_CHANGE.
If modification is correct we are doing a BAPI_TRANSACTION_COMMIT with WAIT and also we modify purchase order quantity with BAPI BAPI_PO_CHANGE.
If purchase order modification is correct we are doing a BAPI_TRANSACTION_COMMIT with WAIT.
Sometimes occurs that if a change is done with BAPI_REQUISITION_CHANGE correctly and we are doing the correspondant changes to purchase order BAPI_PO_CHANGE, this bapi give error ME 006 (User alredy processing requisition).
How it is possible if we have done a commit and wait?
How can we solve this problem?
Best regards¡¡¡

HI,
Try using FM : ENQUE_SLEEP for wait process.
Actually sometimes, due to some database constraints, process takes time to save document.
SO better to give 5 seconds delay for that.
CALL FUNCTION 'ENQUE_SLEEP'
     EXPORTING
          SECONDS        = '5'
     EXCEPTIONS
          SYSTEM_FAILURE = 1
          OTHERS         = 2.
Regds,
Anil

Similar Messages

  • Purchase Order Modification: External Document Number already assigned

    Hello,
    We're running Extended Classic Scenario in a SRM 4.0 implementation.
    The problem is the following: When the user modifies a purchase order (this purchase order is already replicated to the backend), sometimes (not always), the next error occurs:
    "Purchase Order XXXXXXXXXX: PO header data still faulty "
    "Purchase Order XXXXXXXXXX: External document number XXXXXXXXX already    assigned"
    The system does not provide additional info (RZ20 give us the same message, no ST22 dumps...
    We think it could be some kind of error in the standard BAPI BAPI_PO_CHANGE.
    We've revised the SAP OSS but didn´t find anything....
    Some idea?
    Regards and Thanks in advance!!!

    Hi
    <u>Any other rrors / dumps noticved in system using RZ20 and ST22 transactions ?</u>
    <b>Have you seen this helpful pointers and link ?</b>
    <u>The related SAP OSS notes are as under :</u>
    <b>"Purchase Order item 00010 still contains faulty account assignment items"</b>
    <b>Note 1000184 - Account assignment error when document transfer to back end</b>
    Note 966323 - Service Item: Not able to create PO in ERP backend
    "Purchase Order item 00010 still contains faulty account assignment items"
    Re: How to create a PO in R/3 from a local Bid Invitation in classic scenario ?
    Re: From local Bid invitation PO is not generated in backend
    <b>Do let me know.</b>
    Regards
    - Atul

  • Purchase Order Modifications

    Hi guys!
    I work in 6.0 Release and I have to modificate some Purchase Orders.
    I've found two BAPI's to do that BAPI_PR_GETDETAIL
    BAPI_PR_CHANGE, but I am not able to understand them.
    Can somebody give me a clue, please?
    Many thanks!
    Antonio.

    If you want to modify PO, i think you may need to use BAPI
    <b>'BAPI_PO_CHANGE'</b>.
    See the below link for the exmaple code for Changing PO using this BAPI. Hope this will help you.
    http://www.sap-img.com/abap/sample-abap-code-on-bapi-po-change.htm
    CHeers,
    Thomas.
    Please mark point if you got solution.

  • ME22N Purchase Order Modification Doesn't Trigger Idoc

    Hi,
    Can you help me with my issue? My Idoc when the PO is changed is not triggering. But it runs properly on our DEV and QAS server. It showing "No IDoc items belonging to purchasing document found". I compare the T166C Tables of our DEV and PROD server and they are equal. What would be the possible cause and how will I resolve this issue?
    Any help will be highly appreciated.
    Thanks!
    Mon Magallanes
    Edited by: Mon Magallanes on Apr 10, 2010 10:23 AM

    Hi Mon,
    Is the output type is being displayed in Purcahse order -> Messages ? If not then check the output type settings in t-code "NACE", as well as the Partner Profile settings in t-code "WE20".
    Regards
    Vinod

  • Account Assignment in the Purchase order

    Hi
    I am trying to create Purchase order with Account assignment category "Q"  wherein system displays a GL account (4011100) which is mapped in the OBYC in the transaction GBB and general modification VBR. Further when I enter WBS element, it changes  GL account to  2301100 which is mapped in the transaction BSX. You are requested to kindly let me know what is logic behind GL account change, Is there any setting of WBS element with transaction BSX ?
    Can I change vendor code in the purchase order modification ME22N before PO release.
    regards
    Sanjay

    Hi
    If you are using the account assignment category Q, then the account to which it should get posted is the Inventory account
    So the The g/l is getting changed once you give the WBS elemnt.
    After the receipt of stock thsi will get moved into Special Stock with Project.
    Can I change vendor code in the purchase order modification ME22N before PO release.
    Once the PO is craeted Vendor cannot be changed.
    Cancel the PO & create a new one.
    Thanks & Regards
    Kishore

  • Purchase Order: Mass modifications

    Hello:
    I'm using transaction MEMASSPO to change "delivery date" in purchase orders but I can't. OSS note 443777 says it is possible to do that since:
    "... Transaction MEMASSPO can only change fields which are contained in the standard system of program SAPMM06E on the following screens:
    0101 header data purchase order
    0111 order item data purchase order
    0120 purchase order item overview
    and which can there be changed in transaction ME22
    and "delivery date" in in screen 0120.
    Can anyone help me, please?
    Thanks,
    Abel Grandal

    Hi Abel,
       If there are multiple schedules for a PO item then you can not change delivery date from item overview screen.
    Cheers,
    Sanjeev

  • SRM Purchase order History Screen Modification

    Hi All,
    We have requirement to modify Purchase order's History table to modify. To be precise When User clicks on Purchase order details tab and go to Follow-on document at header tab There will be two option to view the follow-on document. One is graphical and other is Table view.
    Standard SRM history tab you will get Purchase order number, Goods Receipt number both in SRM and backend system as well as status. Can over here we add Goods Receipt Quantity and Amount as well as Invoice Amount? We are using Extended Classic Scenario.
    Please advise.
    Thank you
    Ritesh

    Hi
    Pl find the content of the notes.
    Note 1524928 - History: Order of related document is not consistent.
    Symptom
    In some cases, when you go to the shopping cart item history, the system displays follow-on documents in a wrong order.
    Other terms
    History.
    Reason and Prerequisites
    Program Error.
    Solution
    Implement the attached correction instructions or apply the relevant Support Package.
    If  the note is not released , pl raise a OSS to get this note released.
    Regards
    velu

  • Looking for modifications in purchase order

    Hi all,
        When the purchase order is saved, one of the output sent an email  based on certain logic .   I debug the program when the email output is sent out but unable to find the logic. The debug only goes to the print program.    In the nast table, it has a business object BUS2012.   I looked at userexit but cannot find where the logic is.  
        Can anyone tell me where in the world the logic is implemented in the purchase order at creation and change mode ?
    thanks
    Joyce

    Try here
    IMG
    -->Materials Management
       -->Purchasing
          -->Messages
             -->Output Control
                -->Message Types
                   -->Define Message Types for Purchase Order
                         -->Maintain Message Types for PO
    Select your output type and then click on "Processing Routines"

  • Purchase order statistical delivery date modification

    In a purchase order there are statistical delivery dates.  Where (and how) can I go to modify how this date is calculated?  I would like to change it based on the due date minus a certain amount of days.
    All help is appreciated.

    >
    Cameron wrote:
    > Where can I change the planned delivery time within the material master?
    You can find the field Planned delivery time in the MRP2 view.
    >
    > How would I determine whether or not we have an info record?  If we do have one, how would I use it to change the vendor evaluation data?
    You can use t.codes ME13 or ME1L or ME1M to find the info records. In the info record you can find the field Planned delivery time in the purchase view-control box
    >
    > Is the statistical believer date something I can have entered automatically using my own calculations?
    > Check whether the BAPI BAPI_PO_CHANGE would help to change the date based on calculatoins
    Regards,

  • Modification of Purchase order

    hi guru's,
    I need to modify the purchase order.My requirement is that whenever the delivery date of any item is changed the purchase order heading should be changed to modified purchase order.Is there any field to check two delivery dates.

    Hi,
    History data will get update in CDPOS and CDDIR , u can verify the changed data in it.
    About changed delivery date , new delivery date will get update in table EKET , can refer the table using EBELN and EBELP.
    can Reward,  if useful info.

  • Purchase order status...

    Hello,  please can you tell me where can I see purchase orders status? Which table or if I can configure it in SUS?
    I am talking about these status: New, changed, in process, confirmed, partly confirmed, rejected, canceled by customer....
    Thanks in advance
    Rosa Rodríguez

    Hello Rosa,
    >
    Rosa Rodriguez wrote:
    > Please can you tell me if you know for which document is I2202 and I1817 status used?
    >(...)
    System status u2018I2202u2019 is used by object category DML (DML Object types  - Master Data Framework) and status u2018I1817u2019 is linked to AUP (Audit Plan u2013 Audit Management).
    Nevertheless, I am not able to tell what are those status for and if they are linked to purchasing documents.
    >
    Rosa Rodriguez wrote:
    > Can I use these for purchase order for example and manage them with my system requirements?
    > (...)
    I don't think so because those status have their own transaction control (double click onto system status number in BS23 transaction to display it).
    So, eitheir manage status profile for user status, or manage your own system status with standard modifications.
    Regards.
    Laurent.

  • Purchase order and service entry sheet

    Hi
    Is there a way to prohibit modifications on the position of services purchase order when the service entry sheet and the invoice were already entered for that position?
    Thanks in advance for your help
    Tomas

    hi, thanks for your help, but the problem that i have is when the service entry sheet and the invoice are allready entered, the user change the value of the position and the service tab, so the user can enter services for more amounts. So its produce difference on the purchase order history between the values of LERF (WE) and the value of the purchase position. For example
    Service Purchase order for 100 dollars.
    Tab service: 2 units for 50 dollars
    The user enter one service entry sheet for 50 and the invoice for 50 (lerf and WE= 50)
    Then the user change the position of the purchase order and increase the value to 100 and modifies the service tab to 1 services for 100.
    Then he enter one service for 100 and the corresponding invoice..........so the result is the following:
    Service purchase position: 100
    LERF-WE: 150
    so the purchase order history is inconsistence.
    For that reason i whant to know is there is a wat to prohibit modifications on the position of purchase order
    Thanks in advnace for your help
    Enzo

  • Open items for purchase order its very urgent

    hi
    my requirement is to write extract program for purchase order(me21) to extract only open items.
    please provide sample code its very urgent.
    thanks in advance.
    points will be rewarded.
    thanks
    hari prasad reddy

    check the below report :
    REPORT ZMM_OPEN_PO_REPORT no standard page heading
                              line-size 255
                              message-id zwave.
    ======================================================================
    Program Name : ZMM_OPEN_PO_REPORT                                    *
    Description  : This report displays all Open PO Items and output     *
                   would be PO Number,Material number and so on          *
    Author       : Seshu                                                 *
    Date         : 01/24/2007                                            *
    MODIFICATION HISTORY                                                 *
    DATE    | AUTHOR   | CHANGE #   | DESCRIPTION OF MODIFICATION        *
    --|||--
    01/24/07| Seshu    | DEVK921979 | Initial                            *
    D A T A  D E C L A R A T I O N   P A R T                         ***
    type-pools
    type-pools : slis.
    Tables
    tables : ekko, " Purchase order Header
             ekpo, " Purchase order Item
             marc. " Material with Plant data
    Internal table for output.
    data : begin of i_output occurs 0,
           ebeln like ekko-ebeln,
           matnr like ekpo-matnr,
           end of i_output.
    ALV Data declaration.
    data : v_repid like sy-repid.
      ALV Function Module Variables
    DATA: gs_layout type slis_layout_alv,
          g_exit_caused_by_caller,
          gs_exit_caused_by_user type slis_exit_by_user.
    DATA: gt_fieldcat    type slis_t_fieldcat_alv,
          gs_print       type slis_print_alv,
          gt_events      type slis_t_event,
          gt_list_top_of_page type slis_t_listheader,
          g_status_set   type slis_formname value 'PF_STATUS_SET',
          g_user_command type slis_formname value 'USER_COMMAND',
          g_top_of_page  type slis_formname value 'TOP_OF_PAGE',
          g_top_of_list  type slis_formname value 'TOP_OF_LIST',
          g_end_of_list  type slis_formname value 'END_OF_LIST',
          g_variant LIKE disvariant,
          g_save(1) TYPE c,
          g_tabname_header TYPE slis_tabname,
          g_tabname_item   TYPE slis_tabname,
          g_exit(1) TYPE c,
          gx_variant LIKE disvariant.
    data : gr_layout_bck type slis_layout_alv.
    Ranges
    ranges r_eindt for eket-eindt.
    initialization.
    v_repid = sy-repid.
    start-of-selection.
    Get the data from EKKO ,EKPO and MARC Table
    perform get_data_tables.
    end-of-selection.
    display the data in the form of ALV
    perform display_data.
    *&      Form  get_data_tables
          Get the data from EKKO,EKPO and MARC Table
    FORM get_data_tables.
    clear : i_output.
    refresh : i_output.
    fill the dates in ranges
    r_eindt-low = sy-datum - 7.
    r_eindt-high = sy-datum + 14.
    r_eindt-option = 'BT'.
    r_eindt-sign = 'I'.
    append r_eindt.
    Get the data from EKKO,EKPO and EKET Tables
    select aebeln bmatnr into table i_output
                           from ekko as a inner join
                                ekpo as b on aebeln = bebeln
                                inner join marc as c on cmatnr = bmatnr
                                inner join mara as d on dmatnr = bmatnr
                                inner join eket as e on eebeln = aebeln
                                               and   eebelp = bebelp
                                where c~beskz = 'E'
                                and   c~werks = '1000'
                                and   d~mtart = 'FERT'
                                and   b~loekz = space
                                and   b~elikz = space
                                and   e~eindt in r_eindt.
    if sy-subrc ne 0.
    message e000(zwave) with 'No open purchase order found'.
    endif.
    ENDFORM.                    " get_data_tables
    *&      Form  display_data
          text
    FORM display_data.
    Fill the Fiedlcat
      PERFORM fieldcat_init  using gt_fieldcat[].
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
       I_INTERFACE_CHECK                 = ' '
       I_BYPASSING_BUFFER                =
       I_BUFFER_ACTIVE                   = ' '
         I_CALLBACK_PROGRAM                = v_repid
       I_CALLBACK_PF_STATUS_SET          = ' '
        I_CALLBACK_USER_COMMAND           = g_user_command
       I_CALLBACK_TOP_OF_PAGE            = ' '
       I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
       I_CALLBACK_HTML_END_OF_LIST       = ' '
       I_STRUCTURE_NAME                  =
       I_BACKGROUND_ID                   = ' '
       I_GRID_TITLE                      =
       I_GRID_SETTINGS                   =
       IS_LAYOUT                         = gr_layout_bck
          IT_FIELDCAT                       = gt_fieldcat[]
       IT_EXCLUDING                      =
       IT_SPECIAL_GROUPS                 =
       IT_SORT                           =
       IT_FILTER                         =
       IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
        I_SAVE                            = g_save
        IS_VARIANT                        =
       IT_EVENTS                         =
       IT_EVENT_EXIT                     =
       IS_PRINT                          =
       IS_REPREP_ID                      =
       I_SCREEN_START_COLUMN             = 0
       I_SCREEN_START_LINE               = 0
       I_SCREEN_END_COLUMN               = 0
       I_SCREEN_END_LINE                 = 0
       IT_ALV_GRAPHICS                   =
       IT_ADD_FIELDCAT                   =
       IT_HYPERLINK                      =
       I_HTML_HEIGHT_TOP                 =
       I_HTML_HEIGHT_END                 =
       IT_EXCEPT_QINFO                   =
    IMPORTING
       E_EXIT_CAUSED_BY_CALLER           =
       ES_EXIT_CAUSED_BY_USER            =
        TABLES
          T_OUTTAB                          = i_output
       EXCEPTIONS
         PROGRAM_ERROR                     = 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.
    ENDFORM.                    " display_data
    *&      Form  fieldcat_init
          text
         -->P_GT_FIELDCAT[]  text
    FORM fieldcat_init USING  e01_lt_fieldcat type slis_t_fieldcat_alv.
      DATA: LS_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    Purchase order number
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'EBELN'.
      LS_FIELDCAT-ref_fieldname = 'EBELN'.
      LS_FIELDCAT-ref_tabname = 'EKKO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Purchase Order'.
      ls_fieldcat-seltext_M = 'Purchase Order'.
      ls_fieldcat-seltext_S = 'Purchase Order'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    Material #
      CLEAR LS_FIELDCAT.
      LS_FIELDCAT-FIELDNAME    = 'MATNR'.
      LS_FIELDCAT-ref_fieldname = 'MATNR'.
      LS_FIELDCAT-ref_tabname = 'EKPO'.
      LS_FIELDCAT-TABNAME    = 'I_OUTPUT'.
      ls_fieldcat-seltext_L = 'Material'.
      ls_fieldcat-seltext_M = 'Material'.
      ls_fieldcat-seltext_S = 'Material'.
      APPEND LS_FIELDCAT TO E01_LT_FIELDCAT.
    ENDFORM.                    " fieldcat_init

  • Short Closure and Permanent Closure of Purchase Orders

    Dear Experts,
    Our clientu2019s requirement is to close and block the processing of Purchase Orders for either partly received or no receipt at all.
    The following objectives for the closure of Purchase Orders :-
    1.     The useru2019s should not be able to process the Service or Material Purchase Orders after short closure of the Purchase Orders.
    2.     The Budget commitments for the undelivered Services or Material should get released after short closure of the Purchase Order.
    If a Purchase Order is raised for 100 nos. of a material/services @ Rs. 100 per unit, the total value of the Purchase Order will be Rs. 10000/- and GR has been prepared for say 10 nos, so the value of the GR will be Rs. 1000/-. The Purchase Order is now short closed for 90 nos. Then the following are the objectives to be achieved :-
    1.     The user should not be able to make a GR/SES for 90 nos.
    2.     Commitment Budget for 90 nos (Rs. 9000/- should get released from the Purchase Order.
    We have tried the following :-
    1.     Ticking the Delivery Completion Indicator.
    2.     Putting the Last GR Date
    3.     Making the Message of Last GR from Warning to Error.
    4.     Locking the line item for further processing
    But still the Delivery Completion Indicator, Last GR date and Unlock options are are editable to the user in ME22N and ME23N, where he can remove the tick and date and process the gr.
    Please suggest a solution to achieve the above objective.
    Thanks in advance.
    AJ

    Hi Adwait,
    Reducing the quantity to 90 nos. in the Purchase Order will help in release of my commitement budget. But the line item will still be open to the user for amendment and further processing. If the user amends the purchase order again, the line item can be processed by the user again.
    I want that alongwith the release of the commitment budget the line item should also be permanantly locked for modification by the end user.
    Please suggest further in continuance to the above.
    Thanks in advance.
    AJ

  • Document rows Cannot be closed concurrently - Purchase Orders

    hello, I am trying to close Purchase Orders using DTW. When I import the files I get the following error :
    Document rows Cannot be closed concurrently with the other document modifications you have made (POR1.linestatus).
    These are item Purchase Orders, with 1 item in the contents of the PO.
    the client is on SAP Business One 2007 A (8.00.232)  SP: 01  PL: 07 and
    DTW  Version 2005.0.28 , API Version 8.0.181
    When I use the same templates for Service Purchase orders I have no problem closing it with DTW.
    this is my files - OPOR HEADER
    RecordKey     DocEntry
    RecordKey     DocEntry
    1     5
    POR1 LINES file
    bold RecordKey     LineNum     LineStatus
    bold RecordKey     LineNum     LineStatus
    1                     0              bost_Close
    Your assistance will be much appreciated.

    Hi,
    Check if this PO has target document or not. If a partial GRPO based on the PO, you need to close it manually.
    Thanks,
    Gordon

Maybe you are looking for