SAP for Utilities Discussions
Connect with fellow SAP users to share best practices, troubleshoot challenges, and collaborate on building a sustainable energy future. Join the discussion.
cancel
Showing results for 
Search instead for 
Did you mean: 

Change Clearing Category in using BAPI: BAPI_CTRACCONTRACTACCOUNT_CH1

Former Member
0 Kudos

Hello experts,

I'm trying to update a contract account using the below mentioned BAPI I need to change the clearing category = 'REC' and LINE_NUMBER = 0001 these 2 parameters are inside the table CTRACPARTNERDETAIL but when I pass this values to the BAPI

I'm getting this errors in the return table:

Enter a value in field Account determination ID

Enter a value in field Payment Condition

Enter a value in field Form

Enter a value in field Language

I know all this information is in the fkkvkp table and I retrieved it to pass it to the BAPI but I don't which are the parameters for this fields inside the CTRACPARTNERDETAIL table I can use to pass this values, any help will very appreciated, thanks.

DATA: lw_contractaccountdata TYPE BAPIFKKVKPI1,

lt_contractaccountdata type table of BAPIFKKVKPI1.

lw_contractaccountdata-clearing_category = lc_rec. " REC

lw_contractaccountdata-LINE_NUMBER = c_0001. "0001

lw_contractaccountdata-comp_code = lw_fkkvkp-comp_code."1000

lw_contractaccountdata-standard_comp_code = lw_fkkvkp-standard_comp_code. "1000

lw_contractaccountdata-toler_group = lw_fkkvkp-toler_group. "1000

CALL FUNCTION 'BAPI_CTRACCONTRACTACCOUNT_CH1'

EXPORTING

contractaccount = lv_acct_no

businesspartner = lv_partner_no

ctracdetail = lw_ctracdetail

ctracdetailx = lw_ctracdetailx

VALIDFROM = lv_valid_from

tables

CTRACPARTNERDETAIL = lt_contractaccountdata

return = lt_bapi_return .

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Norman,

Please set the respective parameters in the structure CTRACPARTNERDETAILX with value X.

For example, CLEARING_CATEGORY in the structure CLEARING_CATEGORY should be set to X, if you intend to change the clearing category.

Thanks,

Sakthi.

View solution in original post

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can use FM FKK_ACCOUNT_UPDATE instead of BAPI. It is simple one.

You can change clearing category by putting proper data in X_FKKVKP,Y_FKKVKP.

I hope it helps you.

Regards,

Pranaya

Former Member
0 Kudos

Hi Norman,

Please set the respective parameters in the structure CTRACPARTNERDETAILX with value X.

For example, CLEARING_CATEGORY in the structure CLEARING_CATEGORY should be set to X, if you intend to change the clearing category.

Thanks,

Sakthi.

0 Kudos

Thanks sakthi, it worked perfect after I did that.