‎2009 Aug 20 1:09 AM
Hi All,
I am using the BAPI - BAPI_PO_CHANGE for changing the Confirmation details of a PO.
But it is not working despite all the necessary parameters being filled into the Table Structures of the BAPI.
I am filling in the following Parameters:
POITEMX:
wa_itemx-po_itemx = 'X'.
wa_itemx-delete_ind = 'X'.
wa_itemx-short_text = 'X'.
wa_itemx-material = 'X'.
wa_itemx-plant = 'X'.
wa_itemx-info_rec = 'X'.
wa_itemx-vend_mat = 'X'.
wa_itemx-quantity = 'X'.
wa_itemx-orderpr_un = 'X'.
wa_itemx-conv_num1 = 'X'.
wa_itemx-conv_den1 = 'X'.
wa_itemx-price_unit = 'X'.
wa_itemx-gr_pr_time = 'X'.
wa_itemx-tax_code = 'X'.
wa_itemx-info_upd = 'X'.
wa_itemx-prnt_price = 'X'.
wa_itemx-gr_ind = 'X'.
wa_itemx-plan_del = 'X'.
wa_itemx-weightunit = 'X'.
wa_itemx-weightunit_iso = 'X'.
wa_itemx-conf_ctrl = 'X'.
wa_itemx-pricedate = 'X'.
POSCHEDULEX:
wa_schedx-po_itemx = 'X'.
wa_schedx-del_datcat_ext = 'X'.
wa_schedx-delivery_date = 'X'.
wa_schedx-quantity = 'X'.
I am getting the following error/warning messages when the BAPI is called:
-
1 W ME 658 Please also populate interface parameter POITEMX
2 E BAPI 003 Instance of object type PurchaseOrder could not be changed
3 E ME 006 User RAGHAKE1 already processing Purchase order 44000116
-
I have filled in the value for parameter POITEMX, but still i get the warning as above.
If any of you has used this BAPI, kindly help me in resolving this issue.
Thanks in advance.
Regards,
Keerthi
‎2009 Aug 20 5:40 AM
Hi,
One of the error message clearly tells that some other user is processing the same PO. BAPI_PO_CHANGE wont work when the PO is already being processed by some other user or by userself in another window. Ensure that this particular PO is not being processed by anyone and then try to run the program and check
Regards,
Vik
‎2009 Aug 20 6:49 AM
Hi , wht ever fileds u r filling try to fill its bapiupdate structure aslo.
Take this example and proceed with ur requiremen ny comparing this.
Note : For the error po alreday processing , see may be u ur self or some other user might have kept open the same po.
so better close all the windows and work with a single window.
To check u can execute the bapi through se37 directly by passing the parameter thr,.
See the bellow example
data : BEGIN OF it_item1 OCCURS 0,
EBELN TYPE ekpo-EBELN,
EBELP TYPE ekpo-EBELP ,
LOEKZ TYPE ekpo-LOEKZ,
END OF it_item1.
loop at i_display INTO w_display WHERE XFLAG = 'X' .
poheader1-PO_NUMBER = w_display-ebeln.
poheader1X-PO_NUMBER = 'X'.
VERSION1-REASON = '0001'.
VERSION1-DESCRIPTION = 'Reason 1'.
poheader1x-PO_NUMBER = 'X'.
select EBELN EBELP LOEKZ from EKPO INTO CORRESPONDING FIELDS OF TABLE it_item1 WHERE ebeln = w_display-ebeln.
LOOP at it_item1.
it_poitem1-PO_ITEM = it_item1-EBELP.
it_poitem1-DELETE_IND = 'X'."it_item1-LOEKZ .
APPEND it_poitem1.
it_poitem1x-PO_ITEM = it_item1-EBELP."'X'.
it_poitem1x-PO_ITEMX = 'X'.
it_poitem1x-DELETE_IND = 'X'.
APPEND it_poitem1x.
ENDLOOP.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
PURCHASEORDER = w_display-ebeln
POHEADER = poheader1
POHEADERX = poheader1x
POADDRVENDOR =
TESTRUN =
MEMORY_UNCOMPLETE =
MEMORY_COMPLETE =
POEXPIMPHEADER =
POEXPIMPHEADERX =
VERSIONS = VERSION1
NO_MESSAGING =
NO_MESSAGE_REQ =
NO_AUTHORITY =
NO_PRICE_FROM_PO =
IMPORTING
EXPHEADER =
EXPPOEXPIMPHEADER =
TABLES
RETURN = return
POITEM = it_poitem1
POITEMX = it_poitem1x
POADDRDELIVERY =
POSCHEDULE =
POSCHEDULEX =
POACCOUNT =
POACCOUNTPROFITSEGMENT =
POACCOUNTX =
POCONDHEADER =
POCONDHEADERX =
POCOND =
POCONDX =
POLIMITS =
POCONTRACTLIMITS =
POSERVICES =
POSRVACCESSVALUES =
POSERVICESTEXT =
EXTENSIONIN =
EXTENSIONOUT =
POEXPIMPITEM =
POEXPIMPITEMX =
POTEXTHEADER =
POTEXTITEM =
ALLVERSIONS =
POPARTNER =
POCOMPONENTS =
POCOMPONENTSX =
POSHIPPING =
POSHIPPINGX =
POSHIPPINGEXP =
POHISTORY =
POHISTORY_TOTALS =
POCONFIRMATION =
.
LOOP at return.
RETURN1-type = return-type.
RETURN1-number = return-number.
RETURN1-message = return-message.
RETURN1-message_v1 = return-message_v1.
RETURN1-message_v2 = return-message_v2.
APPEND return1.
ENDLOOP.
ENDLOOP.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
IMPORTING
RETURN = return
.
PERFORM display_error.
‎2009 Aug 21 1:53 AM
Sorry guys,
Actually that error was because i was not passing the Item Number in the POITEMX structure.
Identified it later on.
But now i have resolved that one and am stuck with another issue.
This time, I get an error saying:
E 06 873 Vendor's or manufacturer's QA system inadequate
I am not able to understand why this error occurs.
Can someone please help me out in this regard?
Thanks in advance.
Regards,
Keerthi
‎2009 Aug 21 3:51 AM
This error is coming from the following code :
Include MM06EFQM (line 999 -- line 1006).
bstyp-best VALUE 'F'
CASE ekko-bstyp.
WHEN bstyp-anfr.
MESSAGE w873 INTO gl_dummy.
mmpur_message 'W' '06' '873' '' '' '' ''.
_WHEN bstyp-best. MESSAGE e873. "Das vorhandene QS-System_ WHEN bstyp-kont. MESSAGE e873. "ist nicht ausreichend.
WHEN bstyp-lfpl. MESSAGE e873.
ENDCASE.
And ekko-bstyp's value range
A Request for Quotation
F Purchase Order
K Contract
L Scheduling Agreement
you should set a breakpoint in MM06EFQM and debug the program in your system,maybe you will find the solution.