2009 Feb 13 4:58 PM
Hi Gurus,
I have a small problem wit a maintenace table. I have genereated a maintenace dialog for a customizing table. Now i'd like to hide one column. But I'm not able to do this.I went to my generated dynpro and inserted a module with following code:
Loop at screen.
if screen-name = 'Tab-Field1'.
screen-invisible = '1'.
screen-active = 0.
modify screen.
endif.
endloop.
The column is no read only - but I still see the column. I there any possibility to do this with coding. I don't like to delete the columns in the element list.
Thanks for your help in advance Stefan
2009 Feb 13 5:26 PM
Hi,
Try giving the following inside the LOOP AT...ENDLOOP...of the flow logic in the PBO event..
Flow logic.
PROCESS BEFORE OUTPUT.
LOOP AT EXTRACT
...............
MODULE REMOVE. " Custom code.
ENDLOOP.Module*
MODULE remove OUTPUT.
Loop at screen.
if screen-name = 'Tab-Field1'.
screen-invisible = '1'.
screen-active = 0.
modify screen.
endif.
endloop.
ENDMODULE.Thanks
Naren
Hi,
Try giving the following inside the LOOP AT...ENDLOOP...of the flow logic in the PBO event..
Flow logic.
PROCESS BEFORE OUTPUT.
LOOP AT EXTRACT
...............
MODULE REMOVE. " Custom code.
ENDLOOP.Module*
MODULE remove OUTPUT.
Loop at screen.
if screen-name = 'Tab-Field1'.
screen-invisible = '1'.
screen-active = 0.
modify screen.
endif.
endloop.
ENDMODULE.Thanks
Naren
2009 Feb 13 5:04 PM
Hi,
if you always want the column to be invisible...Instead of writing code..change the attributes of the column to be invisible..and then activate the screen.
Thanks
Naren
2009 Feb 13 5:05 PM
HI,
Loop at screen.
if screen-name = 'TAB-FIELD1'. " the field name should be in caps
screen-active = 0.
modify screen.
endif.
endloop.or use
parameter: p_field(20) type c invisible.regards
gurpreet
2009 Feb 13 5:05 PM
if somebody regenerate the table maintenance generator functiongroup again , then you will loose all your flow logic coding
Instead of coding the table maintenace screen flow logic , create a maintenance view for the customising table and create a table maintenance generator for that view.
PS : remember while creating the maintenance view please kept only fields you want to display in the table maintenance generator..
a®
2009 Feb 13 5:19 PM
Hi thanks for the answers,
1. I can't make it invisible via checkbox, because the checkboxes in the element list are greyed out.
2. Sorry, in my codeexample I don't write it in captials, but in my "real program" i do.
3. I understand you, but with a view I have the same problem - because I have to fill the hidden column before saving to the db.
Any other ideas??
Thanks Stefan
2009 Feb 13 5:31 PM
For filling hidden column in the table maintenance while saving you may need to use EVENT in table maintenance generator
Please look at this link
a®
2009 Feb 13 5:26 PM
Hi,
Try giving the following inside the LOOP AT...ENDLOOP...of the flow logic in the PBO event..
Flow logic.
PROCESS BEFORE OUTPUT.
LOOP AT EXTRACT
...............
MODULE REMOVE. " Custom code.
ENDLOOP.Module*
MODULE remove OUTPUT.
Loop at screen.
if screen-name = 'Tab-Field1'.
screen-invisible = '1'.
screen-active = 0.
modify screen.
endif.
endloop.
ENDMODULE.Thanks
Naren
2009 Feb 13 5:38 PM
Hi,
thank you for the fast answers, but it doesn't work. I can still see the column.
Sorry, but any other ideas - i have no one.
Stefan
2009 Feb 13 5:43 PM
Hi,
Try this code...I tried it and it is working for me..
PROCESS BEFORE OUTPUT.
** New code. " Naren.
MODULE remove_column.
** New code end. " Naren.
MODULE LISTE_INITIALISIEREN.
LOOP AT EXTRACT WITH CONTROL
TCTRL_xxxxxxx CURSOR NEXTLINE. " TCTRL_xxxxxxx - table control name check your Flow logic
MODULE LISTE_SHOW_LISTE.
ENDLOOP.* Module code
MODULE remove_column OUTPUT.
* You can get the table control name from the flow logic.
DATA: wa_cols LIKE LINE OF TCTRL_XXXXXXX-COLS.
READ TABLE TCTRL_XXXXXXX-COLS
INTO WA_COLS
WITH KEY SCREEN-NAME = 'Your column name'.
IF SY-SUBRC = 0.
WA_COLS-INVISIBLE = 'X' . " Remove the column.
MODIFY TCTRL_XXXXXXX-COLS FROM WA_COLS INDEX SY-TABIX.
ENDIF.
ENDMODULE..Thanks
Naren
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |