Skip to Content
0
Former Member
Sep 20, 2005 at 06:14 AM

The question about BDC Program

52 Views

I do an example with transaction code SU01.Selected an user(Tom) click Change,then edit Parameters.

Here is my source code:

-


REPORT ZADDRID.

DATA:BEGIN OF INT_BDC OCCURS 0.

INCLUDE STRUCTURE BDCDATA.

DATA:END OF INT_BDC.

INITIALIZATION.

PERFORM BUILD_BDC.

PERFORM SUBMIT_BDC.

FORM BUILD_BDC.

PERFORM BDC_SCREEN TABLES INT_BDC

USING 'SAPLSUU5' '0050'.

PERFORM BDC_FIELD TABLES INT_BDC:

USING 'BDC_CURSOR' 'USR02-BNAME',

USING 'USR02-BNAME' 'Tom',

USING 'BDC_OKCODE' '=CHAN'.

PERFORM BDC_SCREEN TABLES INT_BDC

USING 'SAPLSUU5' '0100'.

PERFORM BDC_FIELD TABLES INT_BDC:

USING 'USPARAM-PARID' 'RID',

USING 'USPARAM-PARVA' 'MYTEST',

USING 'BDC_OKCODE' '=UPD'.

ENDFORM.

FORM SUBMIT_BDC.

CALL TRANSACTION 'SU01' USING INT_BDC MODE 'A'.

REFRESH INT_BDC.

ENDFORM.

FORM BDC_SCREEN TABLES P_BDC STRUCTURE BDCDATA

USING P_PROGRAM P_SCREEN.

CLEAR P_BDC.

P_BDC-PROGRAM = P_PROGRAM.

P_BDC-DYNPRO = P_SCREEN.

P_BDC-DYNBEGIN = 'X'.

APPEND P_BDC.

ENDFORM.

FORM BDC_FIELD TABLES P_BDC STRUCTURE BDCDATA

USING P_NAME P_VALUE.

CLEAR P_BDC.

CASE P_VALUE.

WHEN ''.

WHEN OTHERS.

P_BDC-FNAM = P_NAME.

P_BDC-FVAL = P_VALUE.

APPEND P_BDC.

ENDCASE.

ENDFORM.

-


Error Message:Field USPARAM-PARVA,does not exist in the screen SAPLSUU5 0100.

Pleae tell how can I solve this question.

Thanks!!