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: 

Goods Issue

Former Member
0 Kudos

Hi All,

I am developing a BDC program for Goods Issue TCODE MIGO_GI.

User will be posting multiple material numbers at a time. Once data is loaded final check and post will be done.

May be few material numbers will give an error. How to delete these materials and post those without any error and aquire final material document numbers in BDC program.

Thanks

Pratibha

6 REPLIES 6

Former Member
0 Kudos

Hi Pratibha,

Y don't u, use the BAPI, for this process,

    • Call the BAPI for Goods Receipt

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = st_gmvt_header

goodsmvt_code = st_gmvt_code

IMPORTING

goodsmvt_headret = st_gret_head

TABLES

goodsmvt_item = it_gm_item

return = it_return.

    • Commit the Transaction

CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.

0 Kudos

Thanks Bala for your quick reply.

Please explain what are st_gmvt_header, st_gmvt_code variables and structure of table it_gm_item.

Please provide an example cause I am new ABAP programmer and never used BAPI in program.

Regards,

Pratibha.

0 Kudos

Hi Pratibha,

Go to SE37, type in the name of the BAPI and display - you should be able to see what fields exist in these structures. You will need to define the data in your program accordingly.

Sudha

0 Kudos

Hi Bala,

I will be posting details data and not header data.

Bapi 'BAPI_GOODSMVT_CREATE' will help to find the end OK_CODE in BDC program?

Regards

Pratibha

0 Kudos

Hi Pratibha,

With 'BAPI_GOODSMVT_CREATE' you donot need a BDC . It is capable of posting a material document by itself. In SE37 just read this Function Module documentation. In your program intead of doing a BDC , call this FM directly by passing the correct parameters . BDC for MIGO_GI is not recommended as it is an enjoy transaction.

Hope this helps .

Cheers.

0 Kudos

Hi Sanjay,

Is it possible to provide an example.

Suppose if I have to post

MATNR <b>11005020</b>

Qty <b>3</b>

Valuation Type <b>A COND</b>.

Plant <b>2001</b>

Storage locat <b>001</b>

Goods recipiet <b>Dummy</b>

Unloading point <b>Dummy</b>

Text <b>Dummy</b>

etc.

How can I use this BAPI.

Thanks,

Pratibha