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: 

Add custom fields to Cost Center master data

Former Member
0 Kudos

Hi all.

I need to add a custom field to cost center master data. To do this I've implemented the enhancement COOMKS01:

  1. Create the structure CI_CSKS and add custom fields.
  2. Create the dynpros 0399 and 3399 with the custom field (using the structure CSKS_CI).
  3. Implements the EXITS EXIT_SAPLKMA1_001 and EXIT_SAPLKMA1_002.


Everything is working to save (KS01/KS02) and consult (KS03) the custom field.

Into KS03 the Add. Fields tab is showing the fields in input mode. To avoid this I've writted the following code into EXIT_SAPLKMA1_001:

IF user_mode = mode-show.

   LOOP AT SCREEN.

     screen-input = 0.

     MODIFY SCREEN.

   ENDLOOP.

ENDIF.

But it does not work. Thats my first problem.

When creating (KS01) and editing (KS02) cost center master data I have to shows a message if the user does not fill the custom field added. To do this I've implemented the enhancement COOMKS02 with the following code:

DATA ls_csksp LIKE LINE OF icsksp.

  LOOP AT icsksp INTO ls_csksp.

   IF ls_csksp-persa IS INITIAL.

     MESSAGE e055(00) RAISING error.

   ENDIF.

ENDLOOP.

Saving through KS01 leading the custom field blank executes the code bellow and take the user to de Add. Fields tab, but does not show the message. Thats my second problem.

Can anyone help me with those problems?


Regards.
Gregory.

2 REPLIES 2

Former Member
0 Kudos

Problem solved.

I've put the code to show the fields as output fields into a PBO module of the screen.

And with the second issue, my customer is ok with how it's functioning now.

Regards,
Gregory.

0 Kudos

This message was moderated.