Application Development and Automation 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: 
Read only

Hide fields in Table Maintenance generator ??

niraj_sinha4
Explorer
23,106

Hi ABAPers,

I have a requirement to hide two fields in table maintenance generator (SM30) at the time of  ' Display ' button.

Is it possible to hide by use EVENT here ??

Table- ztable

Field: INDEX ,  VARIANT

Thanks and Regards,

Niraj Sinha

1 ACCEPTED SOLUTION
Read only

Former Member
14,150

Hi ,

  Using PBO Module we can hide the columns.

See the below example.

Flow Logic:

Use below code to Hide the Columns. All TMG table control name start with tctrl_ and

Screen handling through cols deep structure table.

Code:

When user click display button above mentioned field has been hide.

if user click other button, all field has been shown.

Maintain Button:

Display Button:

Hi ABAPers,

I have a requirement to hide two fields in table maintenance generator (SM30) at the time of  ' Display ' button.

Is it possible to hide by use EVENT here ??

Table- ztable

Field: INDEX ,  VARIANT

Thanks and Regards,

Niraj Sinha

12 REPLIES 12
Read only

Former Member
0 Likes
14,150

Why don't you simply change the field attributes to 'H' / remove them from maintenance view for the fields you want to hide? Do you need to assign value to them in the background?

Edit: Or if you generated your maintenance view directly to a transparent table rather go for a maintenance view instead.

BR,

Gábor

Message was edited by: Gábor Márián

Read only

0 Likes
14,150

Thanks gabor for your replay,

No I don't need to assign any value.

But i want to Hide only at the time of display button,

but in case of MAINTAIN, it should be change with display all the fileds ...

It is possible through SE11. ??

OR do you have any Idea by using Event in Maintenance generator ??

Regards..

Niraj

Read only

0 Likes
14,150

Hi Try this,

In table maint.dialog generation go to environment -> mofifications -> maintenance sreens

you can use this example in PBO sccreen .

ex.

Use structure 'cols'

check SY-UCOMM = 'SHOW'.

loop at control-cols into wa_cols.

if wa_cols-index = 2. "your hidden column

wa_cols-invisible = 1.

endif.

modify control-cols from wa_cols.

endloop.

regards.

Read only

Former Member
0 Likes
14,150

Check out Environment->Modification->Maintenance Screens and then modify the table control settings at PBO.

Rich

Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
14,149

I am not a big fan of manually changing the TMG screens.

You can create 2 Maintenance views viz., ZVW_CHNG & ZVW_DISP.

For the display view ZVW_DISP, set the maintenance status to "Read only".

and the maintenance attribute for the field(s) as 'H'.

Read only

Former Member
0 Likes
14,149

I completely agree. In this case two is better than one.

Programatically I think the only place where this could work is the PBO (as others described), but the re-generation of the maintenance screen would whipe out the modifications every time.

Read only

0 Likes
14,149

Hi Gabor,

I already done this, but I have to hide the complete row not only the data.

BREAK-POINT.

   CASE sy-ucomm.

     WHEN 'SHOW'.

       LOOP AT SCREEN.

         IF screen-name = 'ZTABLE-CD_IDENTNUMBER'.

           screen-invisible = 1.

           screen-output = 0.

           screen-active = 0.

         ELSEIF screen-name = 'ZTABLE-CD_COVAR'.

           screen-invisible = 1.

           screen-output = 0.

           screen-active = 0.

         ENDIF.

         MODIFY SCREEN.

       ENDLOOP.

   ENDCASE.


Regards,

Niraj

Read only

0 Likes
14,149

First identify an Extended Table Maintenance Event that is triggered at PBO level (*), and then update the control (table_view) structure (some TCTRL_Zxxxx) loop at the itab component COLS and set the INVISIBLE subfield.


Regards,

Raymond


(*) For example: start debug at start of module liste_initialisieren (include LSVIMOXX) and CHECK STATUS-ACTION EQ ANZEIGEN for display mode

Read only

Former Member
0 Likes
14,149

Isn't the scenario with two maintenance views sufficient for you? Why do you have to use exactly one?

Read only

Former Member
14,151

Hi ,

  Using PBO Module we can hide the columns.

See the below example.

Flow Logic:

Use below code to Hide the Columns. All TMG table control name start with tctrl_ and

Screen handling through cols deep structure table.

Code:

When user click display button above mentioned field has been hide.

if user click other button, all field has been shown.

Maintain Button:

Display Button:

Read only

0 Likes
14,148

Thank Vaigunda,

It was the correct one...

Best Regards,

Niraj Sinha

Read only

SuryaaVamsi
Discoverer
0 Likes
9,792

My table is ZSVEMPLOYEE_1 and it has fields like ID,Name,School,College,DOJ. now I need to hide School field.  if im trying to do the above code i got an error like tctrl_zsvemployee_1-cols is unknown, but if trying to access in Debugging i am able to access that tctrl_zsvemployee_1-cols and i can pass values to Screen in debugging.2025-02-13 14_59_31-Greenshot.png2025-02-13 15_07_58-Greenshot.png2025-02-13 15_08_12-Greenshot.png