2016 Feb 04 12:09 PM
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
2016 Feb 04 6:25 PM
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 ,
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:
2016 Feb 04 12:28 PM
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
2016 Feb 04 12:40 PM
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
2016 Feb 04 12:43 PM
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.
2016 Feb 04 12:44 PM
Check out Environment->Modification->Maintenance Screens and then modify the table control settings at PBO.
Rich
2016 Feb 04 1:02 PM
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'.
2016 Feb 04 1:31 PM
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.
2016 Feb 04 2:19 PM
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
2016 Feb 04 3:29 PM
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
2016 Feb 04 4:33 PM
Isn't the scenario with two maintenance views sufficient for you? Why do you have to use exactly one?
2016 Feb 04 6:25 PM
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:
2016 Feb 04 7:23 PM
Thank Vaigunda,
It was the correct one...
Best Regards,
Niraj Sinha
2025 Feb 13 9:40 AM
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.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |