08-20-2008 10:33 AM
hi everyone..
My name angga. currently i simulate make good receipt using BAPI_GOODSMVT_CREATE.
i am input this field :
GOODSMVT_HEADRET
- posting_date -> 20.08.2008
- doc_date -> 20.08.2008
- gm_code -> 01
GOODSMVT_ITEM
- material - entry_qnt
- plant - po_number -> 47000001963
- stge_loc - po_item -> 10
- move_type - no_more_gr -> "X"
- mvt_ind -> B
after i executed, i sucessfully got the GR document/accounting document. But after i check my PO using T-code ME23N , there isn't any good receipt for PO 47000001963.
Futhermore, i cek in table MKPF and also i can't find the GR document.
can anyone give me some explenation about this ??
i hope all of u can help me. thank you
Regards,
Anggara Mahardika
Edited by: Anggara Mahardika on Aug 20, 2008 11:33 AM
08-20-2008 10:53 AM
hi,
call FM BAPI_TRANSACTION COMMIT after execution of your BAPI.
regards,
Peter
08-20-2008 10:37 AM
Hi,
after bapi call have u call commit bapi? if no call commit bapi it will work.
08-20-2008 10:38 AM
Hello Anggara
Have you done "Commit Work and Wait" after making BAPI call.... ??? If not, then do it...
Thanks & regards,
Amol Lohade
08-20-2008 10:53 AM
hi,
call FM BAPI_TRANSACTION COMMIT after execution of your BAPI.
regards,
Peter
08-21-2008 3:57 AM
Thx for the attention..
after i execute BAPI_GOODSMVT_CREATE, I still don't know
what should i entry to bapi_transaction_commit. ??
regards,
angga
08-21-2008 4:17 AM
hi,
just do it like this.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
regards,
Peter
08-21-2008 4:47 AM
i'm sorry i haven't star coding a program yet, i just try input all mandatory field in BAPI_GOODSMVT_CREATE.
after that i follow your instruction so i open BAPI_TRANSACTION_COMMIT and give input parameter Wait -> "X"
and i execute but give return 0.
am i wrong ??
08-21-2008 4:56 AM
hi,
if the return code is 0 then it's working fine without errors.
regards,
Peter
08-21-2008 5:36 AM
thx u...
but why i still cant' find my gr document number in Purchase order History or in table MKPF ?
is it any step that i missed ?
regards,
Anggara Mahardika
08-21-2008 5:49 AM
Hello
But why move_type - no_more_gr -> "X" ???
Try move_type = '101'
08-21-2008 7:51 AM
08-21-2008 7:57 AM
Hi ,
value of TESTRUN of this BAPI should ne SPACE, i think u are running in the test mode.
ur call should be like this .
call 'BAPI_XXXX'
export
TESTRUN = ' '.
if no errors in return table
then
call commmit work BAPI.
regards
Prabhu
08-21-2008 4:17 AM
hi dear,
do like this..
CALL FUNCTION 'BAPI_GOODSMVT_CREATE' DESTINATION 'NONE'
EXPORTING
goodsmvt_header = wa_goodsmvthdr
goodsmvt_code = wa_goodsmvt_code
testrun = w_testrun
IMPORTING
goodsmvt_headret = wa_goodsmvthdr_ret
materialdocument = w_materialdocument
MATDOCUMENTYEAR =
TABLES
goodsmvt_item = it_goodsmvt_item
GOODSMVT_SERIALNUMBER =
return = it_return
.
IF NOT w_materialdocument IS INITIAL."
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' DESTINATION 'NONE'
EXPORTING
wait = 'X'
IMPORTING
return = wa_return.
IF sy-subrc = 0.
WRITE: / 'Goods Recieve document saved' , w_materialdocument.
MESSAGE w_materialdocument TYPE 'I'.
ENDIF.
Regards,
Sudarsan
08-22-2008 10:45 AM
Thank u all...
i finall success, all of u'r suggestion its true that i should do BAPI_TRANSACTION_COMMIT.
this is my step :
I go to menu function module->Test->Test Sequences.
I put the bapi you want to use and bapi_commit_work. After the first bapi when I try to return I'll get to the second function to commit
once again....thank u very much everyone..
i closed this thread.
regards,
Anggara Mahardika