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

BDC for TCode KE21N

Former Member
0 Likes
505

Dear All,

Have anyone written BDC for KE21N T-Code ,

please send the code .

Regards

Deepak

2 REPLIES 2
Read only

former_member404244
Active Contributor
0 Likes
420

Hi,

I don't think you can use BDC for this Tcode ... Use the FM "BAPI_COPAACTUALS_POSTCOSTDATA" and post the data..

Giving some sample code with two fields ...Please use and try..



gwa_copain-record_id = '000001'.
        gwa_copain-fieldname = 'BUDAT'.
        gwa_copain-value     = itab-budat.
        APPEND gwa_copain TO git_copain.

        gwa_copain-record_id = '000001'.
        gwa_copain-fieldname = 'BUKRS'.
        gwa_copain-value     = itab-bukrs.
        APPEND gwa_copain TO git_copain.

 gwa_fldlst-fieldname = 'BUDAT'.
        APPEND gwa_fldlst TO git_fldlst.

        gwa_fldlst-fieldname = 'BUKRS'.
        APPEND gwa_fldlst TO git_fldlst.

 CALL FUNCTION 'BAPI_COPAACTUALS_POSTCOSTDATA'
          EXPORTING
            operatingconcern = '9000'
            testrun          = ''
          TABLES
            inputdata        = git_copain
            fieldlist        = git_fldlst
            return           = git_return2.

Regards,

Nagaraj

Read only

Former Member
0 Likes
420

Hi,

You can goto tcode SHDB and create a new recording. Execute your transaction. Once it is finished, you can use this recording for BDC code.

Thansk,

Archana