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: 

Catching data while saving in KS02

0 Kudos

Hi,

I have a problem with catching data while saving at transaction KS02. There could be any other transaction which is changing transaction. I want to catch exactly name and description of cost centre and save it to another table.

I know that there is a customer exit  EXIT_SAPLKMA1_003  which is trigerred when save button is clicked in KS02. But there is no more support of customer exits (we cannot enhance it). So I have tried to do BADi but I don't know which BADI I have to use.

Can anyone could help me? Or say to me that it is impossible to do this.

I would be greatful

1 ACCEPTED SOLUTION

former_member195402
Active Contributor
0 Kudos

Hi,

the exit you've found (EXIT_SAPLKMA1_003) looks fine to me and seems to be the right one.

Fields ICSKSP-KTEXT and ICSKSP-LTEXT should be the right fields to get your informations.

You can place some code in include ZXKM1U03 to call an update function module for update of your Z-table, which is only processed on COMMIT in KS02 (Do not call a COMMIT in the userexit !) .

To activate this userexit SAP enhancement COOMKS02 must be assigned to an active customer project in CMOD.

Regards,

Klaus

4 REPLIES 4

former_member195402
Active Contributor
0 Kudos

Hi,

the exit you've found (EXIT_SAPLKMA1_003) looks fine to me and seems to be the right one.

Fields ICSKSP-KTEXT and ICSKSP-LTEXT should be the right fields to get your informations.

You can place some code in include ZXKM1U03 to call an update function module for update of your Z-table, which is only processed on COMMIT in KS02 (Do not call a COMMIT in the userexit !) .

To activate this userexit SAP enhancement COOMKS02 must be assigned to an active customer project in CMOD.

Regards,

Klaus

0 Kudos

Yes, you're right. Fortunately I have project in CMOD and I can place some code in ZXKM1U03 include.

But I think, ICSKSP table is not good one. I have an error:

"ICSKSP" is a table without a header line and therefore has no  
component called "KTEXT".  

Thanks for interesting

0 Kudos

Hi,

pleased loop at table ICSKSP into a workarea or field-symbol of type CSKSP in ZXKM1U03.

Regards,

Klaus

0 Kudos

Thank you very much for your help. There was type TCSKSP instead of CSKSP.