Application Development and Automation 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: 
Read only

BAPI for MIGO

Former Member
0 Likes
1,109

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.

6 REPLIES 6
Read only

Former Member
0 Likes
912

Hi Sriram,

Did you searched SDN ? Several posts related to this are avaliable on SDN.

Check this

Read only

0 Likes
912

Thanks for ur reply...but... I need to put MIGO on hold without commercial invoice number.

Is there anyway to do it?

Regards,

Sriram

Read only

Former Member
0 Likes
912

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'

.

Read only

0 Likes
912

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.

Read only

Former Member
0 Likes
912

Hi,

You can check this code as a reference:

http://wiki.sdn.sap.com/wiki/display/SCM/SCMStockTransfer+Program

cheers

Aveek

Read only

0 Likes
912

Hi,

Thanks a lot!!

Let me try this and get back to you.

Regards,

Sriram.