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

Call Transaction

Former Member
0 Likes
1,002

Hi.

I'm trying to call a transaction (MI09).

Can anyone please tell me what I'm doing wrong?

DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,

IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

REFRESH IT_BDCDATA.

PERFORM BDC_DYNPRO USING 'SAPMM07I' '0700'.

PERFORM BDC_FIELD USING 'IKPF-WERKS'

'1000'.

PERFORM BDC_FIELD USING 'IKPF-LGORT'

'0001'.

PERFORM BDC_DYNPRO USING 'SAPMM07I' '0731'.

PERFORM BDC_FIELD USING 'ISEG-MATNR'

'000004005556109166'.

PERFORM BDC_FIELD USING 'ISEG-ERFMG'

'12'.

CALL TRANSACTION 'MI09' USING IT_BDCDATA

MODE 'E'

UPDATE 'S'

MESSAGES INTO IT_BDCMSGCOLL.

FORM BDC_DYNPRO USING PROG SCR.

CLEAR IT_BDCDATA.

IT_BDCDATA-PROGRAM = PROG.

IT_BDCDATA-DYNPRO = SCR.

IT_BDCDATA-DYNBEGIN = 'X'.

APPEND IT_BDCDATA.

ENDFORM. "BDC_DYNPRO

FORM BDC_FIELD USING FNAM FVAL.

CLEAR IT_BDCDATA.

IT_BDCDATA-FNAM = FNAM.

IT_BDCDATA-FVAL = FVAL.

APPEND IT_BDCDATA.

ENDFORM. "BDC_FIELD

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
953

Hey there

In release 4.7 the correct syntax for that field depends on the position of the Item list:

ISEG-ERFMG(01) for Item line 01

ISEG-ERFMG(02) for Item line 02

Maybe that will be the error.

Anyway to test that try making a record in SM35 and see what reference apears in the recording.

Hope that helps.

Mário Semedo

Hi.

I'm trying to call a transaction (MI09).

Can anyone please tell me what I'm doing wrong?

DATA : IT_BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE,

IT_BDCMSGCOLL LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.

REFRESH IT_BDCDATA.

PERFORM BDC_DYNPRO USING 'SAPMM07I' '0700'.

PERFORM BDC_FIELD USING 'IKPF-WERKS'

'1000'.

PERFORM BDC_FIELD USING 'IKPF-LGORT'

'0001'.

PERFORM BDC_DYNPRO USING 'SAPMM07I' '0731'.

PERFORM BDC_FIELD USING 'ISEG-MATNR'

'000004005556109166'.

PERFORM BDC_FIELD USING 'ISEG-ERFMG'

'12'.

CALL TRANSACTION 'MI09' USING IT_BDCDATA

MODE 'E'

UPDATE 'S'

MESSAGES INTO IT_BDCMSGCOLL.

FORM BDC_DYNPRO USING PROG SCR.

CLEAR IT_BDCDATA.

IT_BDCDATA-PROGRAM = PROG.

IT_BDCDATA-DYNPRO = SCR.

IT_BDCDATA-DYNBEGIN = 'X'.

APPEND IT_BDCDATA.

ENDFORM. "BDC_DYNPRO

FORM BDC_FIELD USING FNAM FVAL.

CLEAR IT_BDCDATA.

IT_BDCDATA-FNAM = FNAM.

IT_BDCDATA-FVAL = FVAL.

APPEND IT_BDCDATA.

ENDFORM. "BDC_FIELD

7 REPLIES 7
Read only

Former Member
0 Likes
953

What is the error?

Sudha

Read only

Former Member
0 Likes
953

I get the message: Field ISEG-ERFMG not found in loop of screen SAPMM07I 0731.

Read only

0 Likes
953

Hi,

In that screen for ur values, there is no such a screen field is available. Just check out by doing it manualy. And then let me know.

rgds

p.kp

Read only

0 Likes
953

<deleted>

Message was edited by: Rene Guenther

Read only

Former Member
0 Likes
953

Hi Jon,

HOw are you navigating from screen 0700 to 0731 without any user action(FCODE)?

Even if you did, the screen 731 has a step loop, which has an index attached with every field, like ISDEG-MATNR(01) , 'ISEG-ERFMG(01)' etc.

REgards,

Ravi

also the save OK-code in the 0731 screen.

Read only

Former Member
0 Likes
954

Hey there

In release 4.7 the correct syntax for that field depends on the position of the Item list:

ISEG-ERFMG(01) for Item line 01

ISEG-ERFMG(02) for Item line 02

Maybe that will be the error.

Anyway to test that try making a record in SM35 and see what reference apears in the recording.

Hope that helps.

Mário Semedo

Read only

0 Likes
953

ISEG-ERFMG(01) did the trick:)

Thanks!