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

BDC

Former Member
0 Likes
632

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?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
541

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.

3 REPLIES 3
Read only

Former Member
0 Likes
541

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

Read only

Former Member
0 Likes
541

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

Read only

Former Member
0 Likes
542

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.