You can create a maintenance view for the table & here you can define the maintenance attribute for individual fields.
For the fields you want to be READ-ONLY pass ‘R’ to those fields. (It is the 4th column from the left, the one to the immediate left of the Key column).
Don’t change the TMG function group directly. If you regenerate the TMG the changes would be overwritten !
You can use the Event ’01’ to fulfill your requirement:
*&---------------------------------------------------------------------*
*& Form f_event_01
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM f_event_01.
DATA: v_indx TYPE sy-index,
v_land1 TYPE land1,
v_name1 TYPE name1.
FIELD-SYMBOLS: <vendor> TYPE lifnr,
<val> TYPE ANY.
BREAK-POINT.
"TOTAL contains all data which are read, changed and created in TMG
LOOP AT total.
IF <action> = neuer_eintrag " New Entry.
OR <action> = aendern "Changed entry
OR <action> = original. "Same as DB
READ TABLE extract WITH KEY <vim_xtotal_key>.
IF sy-subrc = 0.
v_indx = sy-tabix.
ELSE.
CLEAR v_indx.
ENDIF.
ASSIGN COMPONENT 'LIFNR' OF STRUCTURE total TO <vendor>.
CHECK sy-subrc = 0.
* select data from the LFA1 based on LIFNR
SELECT SINGLE name1 land1 FROM lfa1
INTO (v_name1,v_land1)
WHERE lifnr = <vendor>.
CHECK sy-subrc = 0.
* Populate the hidden fields NAME1 & LAND1
ASSIGN COMPONENT 'NAME1' OF STRUCTURE total TO <val>.
CHECK sy-subrc = 0.
<val> = v_name1.
ASSIGN COMPONENT 'LAND1' OF STRUCTURE total TO <val>.
CHECK sy-subrc = 0.
<val> = v_land1.
MODIFY total.
CHECK v_indx GT 0.
extract = total. "Pass the changes in TOTAL to EXTRACT
MODIFY extract INDEX v_indx.
ENDIF.
ENDLOOP.
sy-subrc = 0.
ENDFORM. "f_event_01
No responses yet