2006 Aug 11 6:43 AM
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
2006 Aug 11 6:46 AM
try with <b>BAPI_GOODSMVT_CREATE</b>.
see the documentation for more info.
Regards
Prabhu
2006 Aug 11 10:11 AM
2006 Aug 11 10:11 AM
2006 Aug 11 10:16 AM
HI,
Pass the line items in the tables structure:
GOODSMVT_ITEM.
Regards
Subbu
2006 Aug 11 10:20 AM
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.