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

how to hide fields in table maintenance generator dynamically.

Former Member
0 Likes
6,476

Hello Experts,

                     I have one requirement and that needs to do dynamically display the fields in table maintenance generator based on the selected radio button.I have written the code in pbo but it is not working properly,can anyone figure me out in this.

Thanks,

Vinod Bhaskar.

Hello Experts,

                     I have one requirement and that needs to do dynamically display the fields in table maintenance generator based on the selected radio button.I have written the code in pbo but it is not working properly,can anyone figure me out in this.

Thanks,

Vinod Bhaskar.

14 REPLIES 14
Read only

Former Member
0 Likes
4,526

Hi vinod,

ABAP gives you a structure called SCREEN. It contains all the screen variables.Find out the field names and put it in the loop and make its visibility property as 0.

loop at screen.

if screen-name = ''.

screen-visible = 0.

endif.

modify screen.

endloop.

Regards,

Ravikiran.K

Read only

0 Likes
4,526

Hi Ravi,

            as you said i had given SCREEN-VISIBLE but it is showing me error as screen doesn't contain component called visible,but there is a component called INVISIBLE.

Read only

nabheetscn
SAP Champion
SAP Champion
0 Likes
4,526

Hi Vinod

Please provide the complete details. Where is this radio button..? Are you calling TMG via call transaction or some FM?

Nabheet

Read only

0 Likes
4,526

Hi nabheet ,

                    I am calling tmg via call transaction.

Read only

narendar_naidu
Active Participant
0 Likes
4,526

This message was moderated.

Read only

vijay_sharma12
Explorer
0 Likes
4,526

Hi vinod

     when you are creating tmg , you will specific a function group name  and sap generate a func group which contains that tmg . you can view in se80 , specifying function group name. In that , screen contains single screen 100 or two screen 100,200 .

     screen you can create module in pbo .u can find all field name in that screen.

    loop at screen.

   if screen-name = ''.

   screen-visible = 0.

   endif.

   modify screen.

   endloop.

regards,

vijay.

Read only

Former Member
4,526

Hello,

It is very difficult and unacceptable to make modification to generated code of TMG.

Also there will be a risk involved if the TMG is regenerated then custom code may be over written.

Better you develop a simple ALV grid report to maintain the table rather than going for changes into TMG.

Thanks,

Zuber

Read only

Former Member
0 Likes
4,526

      After Writing this code i got only the empty values for that particular field but i dont want the whole column.

Can any one help me in this.

Read only

0 Likes
4,526

Hi vinod,

Use screen-visible = 0. not screen-invisible.

Screen-invisible means data will not be visible. To hide column we have to use screen-visible = 0.

Regards,
Ravikrian.K

Read only

0 Likes
4,523

hi ravi ,

          i accept your point but the thing is showing error as invisible doesn't exists.

Thanks,

Vinod Bhaskar.

Read only

Former Member
0 Likes
4,523

Hi,

we can control how to access a field of TMG with the maintenance attribute.

Maintenance Attribute of a View Field - BC - ABAP Dictionary - SAP Library

Thanks

vijay

Read only

RaymondGiuseppi
Active Contributor
0 Likes
4,523

Did you try to modify the table-control itself tctrl_<view name> in PBO.

Its subfield CXTAB_COLUMN is an internal table of column, you can modify field INVISIBLE to disable display of a column. Do it before the LOOP AT EXTRACT WITH CONTROL tctrl_<view name>.

Regards,

Raymond

Read only

Former Member
0 Likes
4,523

Hi vinod,

Just do like this , first go to tmg screen then uble clik on maintain screen then clik on tabcelementry list after simply uncheck u r required field.thats it

Read only

0 Likes
4,523

HI Vinod,

There might be few things which could be a problem,

1. Just check whetehre the field name is correct.

2. You can use only active property not invisble.

3. Just check in debug mode whether the code is executing perfectly.

Just make sure these things. Because i think except these there is no other mistake in code.

Regards,

Sri Hari Anand Kumar.