2010 Jun 17 9:08 AM
Hi gurus!
I'm facing some trouble using the BAPI in object to confirm some Purchase Order positions.
I don't have any errors, but in ME23N, under confirmation labels, I don't find anything and positions doesn't seems to be confirmed.
I'm missing something?
SELECT ebelp menge eindt lpein etenr uzeit
INTO (l_confirmation-po_item, l_confirmation-quantity,
l_confirmation-deliv_date, l_confirmation-del_datcat_ext,
l_confirmation-conf_ser, l_confirmation-deliv_time )
FROM eket WHERE ebeln EQ l_ebeln.
MOVE: 'AB' TO l_confirmation-conf_type,
* 'ZMREMO40' to l_confirmation-CONF_NAME,
'D' TO l_confirmation-del_datcat_ext,
l_confirmation-del_datcat_ext TO l_confirmation-del_datcat,
'X' TO l_confirmation-dispo_rel.
APPEND l_confirmation.
MOVE: l_confirmation-po_item TO poitem-po_item,
l_confirmation-po_item TO poitemx-po_item,
'X' TO poitemx-po_itemx.
APPEND poitem.
APPEND poitemx.
CLEAR l_confirmation.
ENDSELECT.
MOVE l_ebeln TO poheader-po_number.
MOVE 'X' TO poheaderx-po_number.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = l_ebeln
poheader = poheader
poheaderx = poheaderx
no_authority = 'X'
TABLES
return = l_return
poitem = poitem
poitemx = poitemx
poconfirmation = l_confirmation.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
2010 Nov 15 1:52 PM
Hi gurus!
For a new implementation, i need to use this BAPI (or another FM that do the same) to update PO Confirmations!
Any Hints?
Hi gurus!
I'm facing some trouble using the BAPI in object to confirm some Purchase Order positions.
I don't have any errors, but in ME23N, under confirmation labels, I don't find anything and positions doesn't seems to be confirmed.
I'm missing something?
SELECT ebelp menge eindt lpein etenr uzeit
INTO (l_confirmation-po_item, l_confirmation-quantity,
l_confirmation-deliv_date, l_confirmation-del_datcat_ext,
l_confirmation-conf_ser, l_confirmation-deliv_time )
FROM eket WHERE ebeln EQ l_ebeln.
MOVE: 'AB' TO l_confirmation-conf_type,
* 'ZMREMO40' to l_confirmation-CONF_NAME,
'D' TO l_confirmation-del_datcat_ext,
l_confirmation-del_datcat_ext TO l_confirmation-del_datcat,
'X' TO l_confirmation-dispo_rel.
APPEND l_confirmation.
MOVE: l_confirmation-po_item TO poitem-po_item,
l_confirmation-po_item TO poitemx-po_item,
'X' TO poitemx-po_itemx.
APPEND poitem.
APPEND poitemx.
CLEAR l_confirmation.
ENDSELECT.
MOVE l_ebeln TO poheader-po_number.
MOVE 'X' TO poheaderx-po_number.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = l_ebeln
poheader = poheader
poheaderx = poheaderx
no_authority = 'X'
TABLES
return = l_return
poitem = poitem
poitemx = poitemx
poconfirmation = l_confirmation.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
2010 Jun 17 9:44 AM
2010 Jun 17 9:52 AM
Sorry, but the thread you linked me doesn't fit!
The question is the same, but proposed solutions don't works.
2010 Jun 17 9:57 AM
Have a check like: with your inputs just check if the bapi can change some other filed like qty. If not you should provide more inputs to the BAPI.
--
Reddy
2010 Jun 17 10:01 AM
I already use this bapi to change almost everything in a PO (conditions, partners, item data and so on..) and every time it worked fine.
I never used it to confirm positions and i'm stucked here.
2010 Jun 17 10:06 AM
MOVE: l_confirmation-po_item TO poitem-po_item,
l_confirmation-po_item TO poitemx-po_item,
'X' TO poitemx-po_itemx.
APPEND poitem.
APPEND poitemx.
CLEAR l_confirmation.
ENDSELECT.
MOVE l_ebeln TO poheader-po_number.
MOVE 'X' TO poheaderx-po_number.with this information you changed every thing..i mean condition..qty..ect?
--
Reddy
2010 Jun 17 10:21 AM
2010 Jun 17 10:27 AM
Ok, i worked a bit on the bapi
SELECT ebelp menge eindt lpein uzeit etenr
INTO (l_confirmation-po_item, l_confirmation-quantity,
l_confirmation-deliv_date, l_confirmation-del_datcat_ext,
l_confirmation-deliv_time, l_confirmation-conf_ser )
FROM eket WHERE ebeln EQ l_ebeln.
MOVE: 'AB' TO l_confirmation-conf_type,
'D' TO l_confirmation-del_datcat_ext.
MOVE: l_confirmation-po_item TO poschedule-po_item,
l_confirmation-conf_ser TO poschedule-sched_line,
l_confirmation-po_item TO poschedulex-po_item,
l_confirmation-conf_ser TO poschedulex-sched_line,
l_confirmation-quantity TO poschedule-com_qty,
l_confirmation-deliv_date TO poschedule-com_date,
'X' TO poschedulex-com_qty,
'X' TO poschedulex-com_date.
APPEND l_confirmation.
APPEND poschedule.
APPEND poschedulex.
MOVE: l_confirmation-po_item TO poitem-po_item,
l_confirmation-po_item TO poitemx-po_item,
'Z001' to poitem-conf_ctrl,
'X' to poitemx-conf_ctrl.
APPEND poitem.
APPEND poitemx.
CLEAR l_confirmation. CLEAR: poschedule, poschedulex.
ENDSELECT.
CALL FUNCTION 'BAPI_PO_CHANGE'
EXPORTING
purchaseorder = l_ebeln
no_authority = 'X'
TABLES
return = l_return
poschedule = poschedule
poschedulex = poschedulex
poitem = poitem
poitemx = poitemx
poconfirmation = l_confirmation.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.now i get the message "Unable to update confirmed quantity".
Any suggestion?
2010 Nov 15 1:52 PM
Hi gurus!
For a new implementation, i need to use this BAPI (or another FM that do the same) to update PO Confirmations!
Any Hints?
2010 Nov 17 4:10 PM
I found on SDN the suggestion to use ME_CONFIRMATION_UPDATE and ME_CONFIRMATION_REDISTR_ITEMS but i still have the already spotted issue with MD04.
This is my code
SELECT ebeln ebelp INTO CORRESPONDING FIELDS OF TABLE ti_ekpo_key
FROM ekpo WHERE ebeln EQ p_ebeln.
LOOP AT ti_ekpo_key.
MOVE-CORRESPONDING ti_ekpo_key TO xekes.
xekes-eindt = sy-datum + 20.
xekes-eindt(4) = 2020.
MOVE: 1 TO xekes-etens,
'AB' TO xekes-ebtyp,
1 TO xekes-lpein,
sy-uzeit TO xekes-uzeit,
sy-datum TO xekes-erdat,
sy-uzeit TO xekes-ezeit,
1 TO xekes-menge,
1 TO xekes-dabmg,
1 TO xekes-estkz,
'NU' TO xekes-ekpomeins,
'TEST' TO xekes-xblnr,
' ' to xekes-KZDIS,
'I' TO xekes-kz.
SELECT SINGLE lgort werks INTO CORRESPONDING FIELDS OF xekes FROM ekpo
WHERE ebeln EQ xekes-ebeln
AND ebelp EQ xekes-ebelp.
APPEND xekes. CLEAR xekes.
ENDLOOP.
CALL FUNCTION 'ME_CONFIRMATION_UPDATE'
EXPORTING
i_ebeln = p_ebeln
TABLES
xekes = xekes.
COMMIT WORK AND WAIT.
CALL FUNCTION 'ME_CONFIRMATION_REDISTR_ITEMS'
TABLES
ti_ekpo_key = ti_ekpo_key.
COMMIT WORK AND WAIT.
Any suggestion?
2010 Nov 22 11:20 AM
Hello, the function "ME_CONFIRMATION_UPDATE" work well, The problem is in the table XEKES, you are not fill the data XEKES-KZDIS with 'X'.
If you fill the data XEKES-KZDIS = 'X', The system will be update the transacion MD04.
Thanks.
2010 Nov 23 7:37 PM
I cannot get any confirmation created using these function modules. Have you had any luck with them yet?
2010 Nov 23 7:37 PM
I cannot get any confirmation created using these function modules. Have you had any luck with them yet?
2010 Nov 24 4:13 PM
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |