‎2007 Mar 12 2:34 PM
I am trying to process a batch input for a MIGO transaction.
I want to start by making sure that the Detail screen is closed. I then
want to begin by entering the Material number, as indicated in the
code below:
LOOP AT valid_table.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=MIGO_OK_DETAIL_CLOSE'.*
PERFORM bdc_field USING 'GOITEM-MAKTX(01)'
valid_table-maktx.
ENDLOOP.
But an exception is throw:
GOITEM-MAKTX(01) is not an input field.
I know this happens because the Detail screen is not yet closed;
the Material number on the Detail screen is GOITEM-MAKTX.
How should this code be revised so I can still first make sure the
Detail screen is called and then intialize the input fields?
‎2007 Mar 12 5:25 PM
HI Try with this,
LOOP AT valid_table.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=MIGO_OK_DETAIL_CLOSE'.*
<b>PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.</b>
PERFORM bdc_field USING 'GOITEM-MAKTX(01)'
valid_table-maktx.
ENDLOOP.
Regards.
Francis.
Reward points if useful.
‎2007 Mar 12 2:36 PM
Hello,
U can use the BAPI:
* Call goods movement BAPI
CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
EXPORTING
GOODSMVT_HEADER = GM_HEADER
GOODSMVT_CODE = GM_CODE
IMPORTING
GOODSMVT_HEADRET = GM_HEADRET
MATERIALDOCUMENT = GM_RETMTD
TABLES
GOODSMVT_ITEM = GM_ITEM
RETURN = GM_RETURN.Regards,
Vasanth
‎2007 Mar 12 2:37 PM
Hi,
It appears that the problem is with Material Description field (MAKTX) not with the Material Number (MATNR) field.
Are you passing the Material description data to that screen. if you are not passing that you better comment it. Generally we only pass the Material No only.
Regards,
Anji
‎2007 Mar 12 5:25 PM
HI Try with this,
LOOP AT valid_table.
PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.
PERFORM bdc_field USING 'BDC_OKCODE'
'=MIGO_OK_DETAIL_CLOSE'.*
<b>PERFORM bdc_dynpro USING 'SAPLMIGO' '0001'.</b>
PERFORM bdc_field USING 'GOITEM-MAKTX(01)'
valid_table-maktx.
ENDLOOP.
Regards.
Francis.
Reward points if useful.