Application Development 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: 

bdc for ke51

Former Member
0 Kudos

hi any body done the bdc for ke51 please send me the code. it is on urgent basis.

regards

ask

2 REPLIES 2

vinod_gunaware2
Active Contributor
0 Kudos

Hi

U just do SHDB recording for TCODE KE51.

Then SAVE and use source code.

for further developement.

U can use same recording and subroutine.

then by call transcation u can run ur bdc.

For example.

FORM FILL_BDC_ADD_MAT .

CLEAR : T_BDCDATA.

REFRESH T_BDCDATA.

PERFORM FILL_BDC_ENTRY USING :

'X' 'SAPLMGMM' '0060',

' ' 'BDC_OKCODE' '=AUSW'.

Endform.

FORM FILL_BDC_ENTRY USING P_FLAG TYPE ANY

P_FNAM TYPE ANY

P_FVAL TYPE ANY.

CLEAR T_BDCDATA.

  • Check For the Dynbegin flag.

IF P_FLAG EQ 'X'.

T_BDCDATA-PROGRAM = P_FNAM.

T_BDCDATA-DYNPRO = P_FVAL.

T_BDCDATA-DYNBEGIN = 'X'.

ELSE.

T_BDCDATA-FNAM = P_FNAM.

T_BDCDATA-FVAL = P_FVAL.

ENDIF.

APPEND T_BDCDATA.

ENDFORM. " FILL_BDC_ENTRY

CALL TRANSACTION 'MM01' USING T_BDCDATA OPTIONS FROM WA_CTU_PARAMS

MESSAGES INTO T_BDCMSGCOLL.

COMMIT WORK AND WAIT.

regard

vinod

Former Member
0 Kudos

u can use BAPI BAPI_PROFITCENTER_CREATE (BUS0015)