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: 

Sorting correspondence by BADI in FPCOPARA

Former Member
0 Kudos

SAP has provided a BADI (FKKCORR_SORT_HEAD) within Function Module: FKKCORR_PRINT_DFKKCOH_SET that we can implement to do a zipcode sort. However, there is an IF statement around the execution of the BADI based on a change in the application area which is returned from another FM FKKCORR_BTE_APPL_DETERMINE.

Since "FKKCORR_BTE_APPL_DETERMINE " always returns a blank application area to the printing Function Module: FKKCORR_PRINT_DFKKCOH_SET, the BADI is never executed.

How did SAP intend to have the application area set?

1 ACCEPTED SOLUTION

william_eastman
Advisor
Advisor
0 Kudos

Heather:

I am not sure why you are getting a blank value. If you are using FICA correspondence, then the FM FKKCORR_BTE_APPL_DETERMINE should return a value of FI-CA because the table TFK070A does not have values in field EVENT_CONCEPT for FICA correspondence types. And other non-FICA correspondences should instead have values in the EVENT_CONCEPT field which will also populate the application value. Perhaps you have changed the standard correspondence types OR copied your own incompletely?

regards,

bill.

View solution in original post

2 REPLIES 2

william_eastman
Advisor
Advisor
0 Kudos

Heather:

I am not sure why you are getting a blank value. If you are using FICA correspondence, then the FM FKKCORR_BTE_APPL_DETERMINE should return a value of FI-CA because the table TFK070A does not have values in field EVENT_CONCEPT for FICA correspondence types. And other non-FICA correspondences should instead have values in the EVENT_CONCEPT field which will also populate the application value. Perhaps you have changed the standard correspondence types OR copied your own incompletely?

regards,

bill.

0 Kudos

Bill,

Thanks for your reply. You are correct that it returns a value of FI-CA (and yes this is for our own customized correspondence), but the value that the surrounding code checks is the other export value from this FM (which always returns blank) The value which equals FI-CA is called E_BTE_APPLK where as the one the code checks before it executes the BADI is called E_APPLK. E_APPLK gets assigned to some global variable G_APPLK (but I don't see anywhere that G_APPLK gets set).

??????