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

MB01 BDC - Screen number changes

Former Member
0 Likes
1,065

Hi Friends,

I am facing a peculiar problem with the BDC program for T-code MB01.

When I execute the program for the first time after loging in, the program works for the following code.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0221'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(01)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SELN'.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0221'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(04)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SP'.

PERFORM BDC_FIELD USING SEL_FLD 'X'.

PERFORM BDC_FIELD USING 'RM07M-XSELK(02)' 'X'.

The above codes are not working, when I execute subsequently. I have to change to screen numbers as following.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0225'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(01)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SELN'.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0225'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(04)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SP'.

PERFORM BDC_FIELD USING SEL_FLD 'X'.

Instead of changing the screen number in the program between '0221' and '0225', I have retained the screen number '0225' in the code and initially after the loging on, if I execute recording (SHDB) once, then for the subsequent execution, the program works fine with screen number '0225'.

I do not understand why the screen numbers changes like this.

Could u pls look into this and guide me with a solution.

Thanx in advance,

Mark K

Hi Friends,

I am facing a peculiar problem with the BDC program for T-code MB01.

When I execute the program for the first time after loging in, the program works for the following code.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0221'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(01)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SELN'.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0221'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(04)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SP'.

PERFORM BDC_FIELD USING SEL_FLD 'X'.

PERFORM BDC_FIELD USING 'RM07M-XSELK(02)' 'X'.

The above codes are not working, when I execute subsequently. I have to change to screen numbers as following.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0225'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(01)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SELN'.

PERFORM BDC_DYNPRO USING 'SAPMM07M' '0225'.

PERFORM BDC_FIELD USING 'BDC_CURSOR' 'MSEG-ERFMG(04)'.

PERFORM BDC_FIELD USING 'BDC_OKCODE' '=SP'.

PERFORM BDC_FIELD USING SEL_FLD 'X'.

Instead of changing the screen number in the program between '0221' and '0225', I have retained the screen number '0225' in the code and initially after the loging on, if I execute recording (SHDB) once, then for the subsequent execution, the program works fine with screen number '0225'.

I do not understand why the screen numbers changes like this.

Could u pls look into this and guide me with a solution.

Thanx in advance,

Mark K

5 REPLIES 5
Read only

Former Member
0 Likes
995

try with <b>BAPI_GOODSMVT_CREATE</b>.

see the documentation for more info.

Regards

Prabhu

Read only

0 Likes
995

How to select a particular line item .

Regards,

Mark Kek

Read only

0 Likes
995

How to select a particular line item .

Regards,

Mark Kek

Read only

0 Likes
995

HI,

Pass the line items in the tables structure:

GOODSMVT_ITEM.

Regards

Subbu

Read only

Former Member
0 Likes
995

CALL FUNCTION 'BAPI_GOODSMVT_CREATE'

EXPORTING

goodsmvt_header = header

goodsmvt_code = mvt_code

  • testrun = 'X'

IMPORTING

goodsmvt_headret = goodsmvt_ret

materialdocument = mat_document

matdocumentyear = matdoc_year

TABLES

goodsmvt_item = goodsmvt_item

return = return_msg.