Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Good receipt document can't be found

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

peter_ruiz2
Active Contributor
0 Kudos

hi,

call FM BAPI_TRANSACTION COMMIT after execution of your BAPI.

regards,

Peter

13 REPLIES 13

Former Member
0 Kudos

Hi,

after bapi call have u call commit bapi? if no call commit bapi it will work.

Former Member
0 Kudos

Hello Anggara

Have you done "Commit Work and Wait" after making BAPI call.... ??? If not, then do it...

Thanks & regards,

Amol Lohade

peter_ruiz2
Active Contributor
0 Kudos

hi,

call FM BAPI_TRANSACTION COMMIT after execution of your BAPI.

regards,

Peter

0 Kudos

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

0 Kudos

hi,

just do it like this.

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

regards,

Peter

0 Kudos

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 ??

0 Kudos

hi,

if the return code is 0 then it's working fine without errors.

regards,

Peter

0 Kudos

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

0 Kudos

Hello

But why move_type - no_more_gr -> "X" ???

Try move_type = '101'

0 Kudos

sorry i just wrong written, i already set move_type -> 101

0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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