‎2010 Jan 03 7:47 AM
Hi,
I need to create a MIGO for imported parts. In the MIGO transaction I need to remove the commercial invoice number from the pop-up screen and then after entering all the details I need to put the MIGO on hold.
Is there any BAPI available to do this. If not please suggest me any other way to do this.
Thanks in advance.
Regards,
Sriram.
‎2010 Jan 03 8:11 AM
‎2010 Jan 03 8:49 AM
Thanks for ur reply...but... I need to put MIGO on hold without commercial invoice number.
Is there anyway to do it?
Regards,
Sriram
‎2010 Jan 04 4:33 AM
hi,
try this code it will work.
loop at it_mat INTO wa_mat.
PERFORM date_conv USING wa_mat-bldat CHANGING bapi_head-PSTNG_DATE.
*bapi_head-PSTNG_DATE = wa_mat-bldat.
PERFORM date_conv USING wa_mat-budat CHANGING bapi_head-DOC_DATE.
*bapi_head-DOC_DATE = wa_mat-budat.
bapi_head-HEADER_TXT = wa_mat-bktxt.
bapi_code-GM_CODE = '05'.
LOOP at it_data INTO wa_data WHERE sgtxt = wa_mat-sgtxt.
wa_item-MATERIAL = wa_Data-matnr.
wa_item-PLANT = wa_data-werks.
wa_item-STGE_LOC = wa_data-lgort.
wa_item-BATCH = wa_data-charg.
wa_item-MOVE_TYPE = wa_data-bwart.
PERFORM date_conv USING wa_data-vfdat CHANGING wa_item-EXPIRYDATE.
*wa_item-EXPIRYDATE = wa_data-vfdat.
wa_item-ENTRY_QNT = wa_data-erfmg.
wa_item-ITEM_TEXT = wa_data-sgtxt.
begin of changes +MR21102009
wa_item-AMOUNT_LC = wa_data-amt_lc.
end of changes +MR21102009
APPEND wa_item to it_item.
endloop.
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = bapi_head
GOODSMVT_CODE = bapi_code
TESTRUN = ' '
GOODSMVT_REF_EWM =
IMPORTING
GOODSMVT_HEADRET =
MATERIALDOCUMENT = MATDOC
MATDOCUMENTYEAR = matyr
TABLES
GOODSMVT_ITEM = it_item
GOODSMVT_SERIALNUMBER =
RETURN = it_ret
GOODSMVT_SERV_PART_DATA =
EXTENSIONIN =
.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'
.
‎2010 Jan 04 4:40 AM
Hi Manesh,
Thanks very much for ur reply. Will this be equivalent to pressing the hold button in transaction MIGO. And, will this code remove the commercial invoice number from the pop-up screen that appears for PO to foreign vendors.
Regards,
Sriram.
‎2010 Jan 04 7:04 AM
Hi,
You can check this code as a reference:
http://wiki.sdn.sap.com/wiki/display/SCM/SCMStockTransfer+Program
cheers
Aveek
‎2010 Jan 04 11:09 AM
Hi,
Thanks a lot!!
Let me try this and get back to you.
Regards,
Sriram.