cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Can't get variable from structure CI_CSKS after activating Exit COOMKS01

Alexsander_Hoffmann
Discoverer
0 Kudos
432

Hello dear ABAP experts,

I have a requirement to add an additional field in the Cost Center master data. I did this with User-Exit COOMKS01.

Alexsander_Hoffmann_0-1722504760623.png

However, I can't use the value after the input. SAP only saves what is stored in structure CSKS_CI instead.

Alexsander_Hoffmann_0-1722505737776.png

And I can't move what is stored in CI_CSKS to the CSKS_CI structure.

Alexsander_Hoffmann_2-1722505070745.png

Can someone who already implemented exit COOMKS01 tell me how am I supposed to get this input value?

Thanks in advance
Alexsander

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

The DDIC structure CSKS_CI is to be used for your screen fields according to the COOMKS01 documentation. You should declare it like any other DDIC structure used for the screen fields, with TABLES:

TABLES csks_ci.

CSKS_CI is not filled or read by the standard program. It's just the documentation which tells to use it for your screen fields. Technically speaking, I looked at S/4HANA 2023 code, CSKS_CI is not used by the standard, so you might not use it if you wish.

You have to implement the function modules below.

Sandra_Rossi_0-1722507249104.png

  1. EXIT_SAPLKMA1_001 is called during the PBO (before display of your screen), get the data from the parameter USER_CSKS_CI and store it in a global variable (screen field for instance).
  2. EXIT_SAPLKMA1_002 is called during the PAI (after user input), get the global variable (screen field for instance), and transfer its value to the return parameter USER_CSKS_CI.

The include LXKM1F00 provides an example:

Sandra_Rossi_1-1722511056653.png

For information:

Sandra_Rossi_2-1722507312726.png

Sandra_Rossi_1-1722507298470.png

Sandra_Rossi_0-1722510193552.png

As explained in the documentation, see also 141707 - Customer enhancements: Checks for CO master data - SAP for Me.

 

Alexsander_Hoffmann
Discoverer
0 Kudos

Hello Sandra

I actually used the following code in the includes

Alexsander_Hoffmann_1-1722511144960.png

Alexsander_Hoffmann_0-1722511101054.png

But still the value is not passed to the CSKS_CI structure  and therefore is not carried forward into the main program.

Do you know what I am doing wrong?

Thank you
Alexsander

 

 

Sandra_Rossi
Active Contributor

You should not use CI_CSKS. You should use CSKS_CI. Answer edited.

If needed, debug the standard code after the PAI (LKMA1F39):

Sandra_Rossi_0-1722511907257.png

 

Alexsander_Hoffmann
Discoverer
Hello Sandra. I was getting error "csks_ci-zwerks is not provided" when changing my dynpro but I chose to activate anyways and now it works. Thank you very much!

Answers (0)