‎2005 Oct 23 6:01 AM
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
‎2005 Oct 23 6:16 AM
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'.
‎2005 Oct 23 6:42 AM
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.
‎2005 Oct 23 7:06 AM
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
‎2005 Oct 23 7:44 AM
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
‎2005 Oct 23 7:48 AM
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.
‎2005 Oct 23 9:02 AM
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