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: 

New field in PO screen

divsmart
Participant
0 Kudos

Hi Experts,

My requirement is to create a new field in PO screen (ME21n, ME22n,ME23n) I done as per requested.

But my issue is 'When i display the Me23n field was in editable mode' How to make field as non-editable. Please guidance.

I wrote the logic in ME_PROCESS_PO_CUST ->FIELDSELECTION_ITEM.

Program:

DATA: l_changeable          TYPE mmpur_bool.
DATA: wa_poheader TYPE mepoheader.
DATA : lv_bsart TYPE ekko-bsart.
FIELD-SYMBOLS:<fs_f> LIKE LINE OF ch_fieldselection.

CALL METHOD im_header->get_data
RECEIVING
re_data = wa_poheader.

lv_bsart = wa_poheader-bsart.

IF lv_bsart EQ 'ZMSS'.
l_changeable = im_header->is_changeable( ).

READ TABLE ch_fieldselection ASSIGNING <fs_f> WITH TABLE KEY metafield = mmmfd_cust_08.
IF sy-subrc = 0.
IF l_changeable = 'X'.
<fs_f>-fieldstatus = '.'.
ELSE.
<fs_f>-fieldstatus = '*'.
ENDIF.
ENDIF.
ENDIF.

Screen:

1 REPLY 1

venkateswaran_k
Active Contributor
0 Kudos

Hi

In the new custom screen you creataed, in PBO module,

IF sy-tcode = 'ME23N'.
LOOP AT SCREEN.
  IF SCREEN-NAME = 'YOUR FIELD'.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
  ENDIF.
ENDLOOP.

ENDIF.

regards,

Venkat