12-21-2006 7:24 AM
hi all.
i created a po by using the bapi (BAPI_PO_CREATE1). after created there is no mess in bapi error table, but the po is only in document overview and tables of po. if i use me23n or me22n to display mean it show the error 'this po is doesnot exits'. pls help me about this.
Regards
Usman
12-21-2006 7:26 AM
after BAPI_PO_CREATE1 , apply BAPI_TRANSACTION_COMMIT.
Check this sample code.
CALL FUNCTION 'BAPI_PO_CREATE1'
EXPORTING
poheader = poheader
poheaderx = poheaderx
poaddrvendor = poaddrvendor
testrun = testrun
memory_uncomplete = memory_uncomplete
memory_complete = memory_complete
IMPORTING
exppurchaseorder = exppurchaseorder
TABLES
return = return
poitem = poitem
poitemx = poitemx
poaddrdelivery = poaddrdelivery
poschedule = poschedule
poschedulex = poschedulex
poaccount = poaccount
poaccountprofitsegment = poaccountprofitsegment
poaccountx = poaccountx
pocondheader = pocondheader
pocondheaderx = pocondheaderx
pocond = pocond
pocondx = pocondx
poservices = tl_poservice
posrvaccessvalues = tl_posrvacc
extensionin = extensionin
extensionout = extensionout
potextitem = po_item_text
popartner = t_popartner.
LOOP AT return WHERE type <> 'S'.
MOVE 'E' TO bapi_error_tab-error_type.
CONCATENATE return-id return-number return-message
INTO bapi_error_tab-error_msg
SEPARATED BY space.
APPEND bapi_error_tab.
CLEAR bapi_error_tab.
ENDLOOP.
CLEAR: poheader, poheaderx, poaddrvendor, return,
poitem, poitemx, poaddrdelivery, poschedule, poschedulex,
poaccount, poaccountprofitsegment, poaccountx,
pocondheader, pocondheaderx, pocond, pocondx,
extensionin, extensionout, po_item_text.
REFRESH: return,
poitem, poitemx, poaddrdelivery, poschedule, poschedulex,
poaccount, poaccountprofitsegment, poaccountx,
pocondheader, pocondheaderx, pocond, pocondx,
extensionin, extensionout, po_item_text.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
Message was edited by:
Raghavendra L
12-21-2006 7:27 AM
Please check that you are doing the explicit COMMIT work...
Kind Regards
Eswar
12-21-2006 7:42 AM
yes i use commit work and i use wait up to 2 sec command also. po is created and all datas there in ekko and ekpo tables and data also there in md04. but not displayed in me22n and me23n, and not selected from table. how can i solve this problem.
Message was edited by:
Usman Sheriff
12-21-2006 8:32 AM
Hi Usman
So you mean to say the data exist in EKKO and EKPO for the PO created but not able to display via transaction ME23N, is it???
Thats strange...
Can you let us know if you are using standard document type or customized one...???
Kind Regards
Eswar
12-21-2006 8:44 AM
hi Eswar thanks for your replay.
i am using standard doc type "NB" to create po. before it self its working perfect. but now only like this happen. if now i create new one po mean its ok. that particuler po only not displayed in me22n.
Regards
Usman
12-21-2006 8:56 AM
Oh you mean to say, it happens with only one PO...
Am not sure, but can you check the flag in field LOEKZ of table EKKO...
Also, do you get any sort of messages in a window or in status bar when you try to display the particular PO???
Regards
Eswar
12-21-2006 9:15 AM
hi Eswar
that field Deletion indicator is initial.
in me22n po is displayed through the document overview only. but gr is not possible. it give the error po does not exits.
actually i am working in prd server so i need this same po to further process.
Regards
Usman
Message was edited by:
Usman Sheriff
12-21-2006 9:22 AM
What is the PO qty? and what error msg does it give in ME22n when u enter the PO number.
12-21-2006 9:27 AM
12-21-2006 9:34 AM
Put a break point at line 54 in MM06EF0L_LESEN_BELEG
CALL FUNCTION 'ME_EKKO_SINGLE_READ'.
Try debugging from here. U are saying the PO number is in database tables EKKO and EKPO. let me know where it fails...