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: 

Make editable a custom field in CS01 or CS02

fernando_1980
Explorer
0 Kudos

Hello,

I have added a zzfield in CI_STPO, I see it in the tab Material in CS01/CS02/CS03, I have activate the exits EXIT_SAPLCSDI_002 and EXIT_SAPLCSDI_003 to save and recuperate the value for the field.

The problem is I can't modify the zzfield in CS01/CS02. The field appear not editable.

Somebody found the solution to edit the custom field in CS01/CS02?

Thank you for you help.

Fernando.

8 REPLIES 8

marcobeer
Active Participant

Hi Fernando,

please go to the corresponding screen exit within your enhancement project (where you activate the exits) and add a code similar to:

LOOP AT SCREEN INTO DATA(ls_screen).
  IF ls_screen-name = 'YOURFIELD'.
    IF sy-tcode = 'CS01' OR sy-tcode = 'CS02'.
      ls_screen-input = '1'.
    ELSE.
      ls_screen-input = '0'.
    ENDIF.
    MODIFY SCREEN FROM ls_screen.
  ENDIF.
ENDLOOP.

Please have a look at the following Tutorials for further information:
http://saptechnical.com/Tutorials/ExitsBADIs/BOM/Index.htm
https://blogs.sap.com/2014/05/14/to-display-custom-field-in-bom-transactions-cs01-cs02-cs03-cs11-cs1...
https://help.sap.com/doc/abapdocu_752_index_htm/7.52/de-DE/abapmodify_screen.htm

Regards.

fernando_1980
Explorer
0 Kudos

Thank you Marco, I don't find any screen exit in the enhancement project where the code is executed to put the typical code about loop at screen.

And in the tutorials explain how to add a new field to show information but these fields are not editable.

fernando_1980
Explorer

Finally, I have done it!

Material tab in CS01 is the dynpro 0152 in include LCSDIO02.

At line 162 (when isc_tcmat.), we have the next code:

loop at tcmat-cols into cols_wa.
if cols_wa-screen-name eq '*RC29P-KZBEZ' or cols_wa-screen-name eq 'RC29P-KZBEZ'.

The zz fields in CI_STPO are name like <D0152-FSxx>. I have created and enhancement sport and I have implemented it to change input = 1:

cols_wa-screen-input = '1'.

Best regards,

Fernando.

0 Kudos

Hi Fernando,

I‘m glad you figured it out. I couldn’t tell you the exact dynpro numbers, since we do not have any custom fields implemented there and it depends on the place where you put them. Thank you for sharing your solution.

Regards
Marco

0 Kudos

Hi Fernando,

I found there is no implicit enhancement in include LCSDIO02, so we have to modify SAP code with access key. is it correct?

BR.

Jason.

0 Kudos

No, either

  • Use the explicit Enhancement point (LCSDIO02_01 / ES_SAPLCSDI)
  • Work in the PBO of the custom screen (SAPLXCSA 1000) you defined in CMOD on Enhancement PCSD0002.

JasonY
Explorer
0 Kudos

Hi Raymond,

Thank you for your reply.

There are 2 modules in include LCSDIO02.

JasonY_0-1713311660384.png

The explicit enhancement point (LCSDIO02_01 / ES_SAPLCSDI) is in module uebersicht_init. 

I need to change the logic in module tc_columns_modify as below and there is no enhancement point defined by SAP, so have to do the modification with access key.

JasonY_1-1713311843657.png

The second solution you mentioned works for the custom fields in tab Customer fields. not for the custom fields in tab Material on BOM item-level .

 

The  tc_control module (added from note 1313559 doesnt provide enh options)

But if I remember (from DIMP) there was another module to change SCREEN attributes, in the LOOP WITH CONTROL, look for module field_selection_loop which call a form, so you get some implicit Enh points (and an explicit one?)