cancel
Showing results for 
Search instead for 
Did you mean: 

Batch to Batch Transfer Posting in Migo Transaction

kabil_g
Active Participant
0 Kudos

Hi Frds,

                 Batch to Batch Transfer Posting in Migo Transaction

How to solve this problem. I want to transfer 2000  Batches to transfer as if now . I taken 500 records and uploading through LSMW.

Please help me with some other ideas.......

Regards,

Kabil

Accepted Solutions (0)

Answers (3)

Answers (3)

kabil_g
Active Participant
0 Kudos

Hi Frds,

                 I Need to transfer batch no to batch no for migo tcode A08 and R10 and plant

Based on these condition . I need to transfer 2000 Records, At present I m using lsmw.

Please Help me with some bdc codes

Regards,

Kabil

arivazhagan_sivasamy
Active Contributor
0 Kudos

Hi Kabil,

FS_GMCODE = '04'.


       FS_GMHEAD-DOC_DATE   =SY-DATUM.
     FS_GMHEAD-PSTNG_DATE = SY-DATUM.


IF INT_GMITEM[] IS NOT INITIAL.
     CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
       EXPORTING
         GOODSMVT_HEADER       = FS_GMHEAD
         GOODSMVT_CODE         = FS_GMCODE
            "   TESTRUN                     = 'X'
       IMPORTING
         GOODSMVT_HEADRET      = FS_GMHEAD_RET
*       MATERIALDOCUMENT      =
*       MATDOCUMENTYEAR       =
       TABLES
         GOODSMVT_ITEM         = INT_GMITEM
*       GOODSMVT_SERIALNUMBER =
         RETURN                = INT_GMRET.
     "APPEND LINES OF INT_GMRET TO P_RETURN.
   ENDIF.


Hope above BAPI will help you.


Arivazhagan S

atul_mohanty
Active Contributor
0 Kudos

Hi Kapil -

Please check below two ways. (Either one can help you)

1. In LSMW, you can add your code . In Step 5, you can do that (check for the Batch field)  and you can create a new batch add it.

To Create BATCH below is the code.

    DATA : i_return TYPE STANDARD TABLE OF bapiret2,

         return TYPE bapiret2,

        w_attributes    TYPE bapibatchatt,
       v_batch  TYPE charg_d.    "Batch

  REFRESH :i_return.
    CALL FUNCTION 'BAPI_BATCH_CREATE'
    EXPORTING
      material = <matnr>
     batchattributes      = <w_attributes>

    IMPORTING
      batch    = lv_batch
    TABLES
      return   = li_return.

2. Use user exit ' EXIT_SAPMM07M_010' .

Use above FM ''BAPI_BATCH_CREATE'' and modify the value of   E_CHARG for batch

Let us know, if it helps.

Regards,

Atul Mohanty

Former Member
0 Kudos

You would be much better served to move to a BAPI implementation.  However, BDC may be doable.  Have you recorded a BDC? (ie run SHDB?)

Neal

arivazhagan_sivasamy
Active Contributor
0 Kudos

Hi Kapil,

Please use BAPI_GOODSMVT_CREATE with movement of 309.

Arivazhagan S

sreeramkumar_madisetty
Active Contributor
0 Kudos

Hi

Have you tried Using txn MB1B.

Regards,

Sreeram

Former Member
0 Kudos

It would help to have a description of the business need for this...  However, I would create an FM with input fields to determine what batch goes where.   It would call a BAPI to make the transfer.  Then if i needed to automate it, I would write a report that the read an excel file from the app server and called the FM as many times as needed.

Neal

PS:  Please let us know how this suggestion isn't appropriate.  So we can make better suggestions