Application Development 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: 

changes in maintenance screen.

Former Member
0 Kudos

Hi Experts,

Hi have created a maintenance screen where I am showing sales division, child account and parent account. I am showing this maintenance screen in tcode zorder and tcode zhorder.

Now my requirement is to hide sales division in both tcodes. I have used the following fieldcatalog:

FORM BUILD_FIELDCATALOG .

REFRESH:LT_FIELDCAT.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

I_PROGRAM_NAME = C_TABNAME1

I_STRUCTURE_NAME = C_TABNAME

CHANGING

CT_FIELDCAT = LT_FIELDCAT

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

PROGRAM_ERROR = 2

OTHERS = 3.

IF SY-SUBRC <> 0.

ENDIF.

CLEAR:WA_LAYOUT,WA_COMMON_GRID_SETTINGS.

LOOP AT LT_FIELDCAT ASSIGNING <FS_FIELDCAT>.

<FS_FIELDCAT>-EDIT = C_FLAG.

<FS_FIELDCAT>-EMPHASIZE = C_FLAG.

ENDLOOP.

  • Preparing Layout

WA_LAYOUT-ZEBRA = WA_LAYOUT-COLWIDTH_OPTIMIZE = C_FLAG.

  • Displaying Output table in ALV Grid format

WA_COMMON_GRID_SETTINGS-EDT_CLL_CB = C_FLAG.

ENDFORM. " BUILD_FIELDCATALOG

Pleased help me in sorting out this problem,.

thanku in advance...

1 ACCEPTED SOLUTION

former_member195402
Active Contributor
0 Kudos

Hi,

set fieldcat field TECH to 'X' for sales division entry.

Regards,

Klaus

7 REPLIES 7

former_member195402
Active Contributor
0 Kudos

Hi,

set fieldcat field TECH to 'X' for sales division entry.

Regards,

Klaus

0 Kudos

Hi Klaus,

thanku for ur responce but i havnt get u what have u said..

sorry for inconvience,,

thanku..so much..

Former Member
0 Kudos

Hi Anusha,

If you dont want to display the field sales division in both tcodes, why couldnt you remove this field from the final INTERNAL table.

If that is not your actual requirment, you can modify your field catalog like below.

LOOP AT LT_FIELDCAT ASSIGNING <FS_FIELDCAT>.
IF <FS_FIELDCAT>-FIELDNAME = < sales division >.
<FS_FIELDCAT>-NO_OUT = X.
ENDIF.
ENDLOOP.

Regards

HM

Former Member
0 Kudos

Hi,

try out this


LOOP AT LT_FIELDCAT ASSIGNING <FS_FIELDCAT>.
<FS_FIELDCAT>-EDIT = C_FLAG.
<FS_FIELDCAT>-EMPHASIZE = C_FLAG.
***new code
IF <FS_FIELDCAT>-FIELDNAME = fld to hide.
     <FS_FIELDCAT>-NO_OUT = 'X',
ENDIF.
ENDLOOP.

raymond_giuseppi
Active Contributor
0 Kudos

In the field catalog you can use two fields<br />

- NO_OUT : if set to 'X' the field wont be displayed by default, but if user can maintain layout he will be able to display the field, and can even create a default layout which will display this field<br />

- TECH : if set to 'X' the field wont be displayed, and user cannot display it<br />

(check documentation at <a class="jive-link-external" href="http://help.sap.com/saphelp_erp2004/helpdata/en/ff/4649a6f17411d2b486006094192fe3/frameset.htm" target="_newWindow">Fields of the Field Catalog</a>)<br />

<br />

Regards,<br />

Raymond

SuhaSaha
Advisor
Advisor
0 Kudos

Hello Anusha,

As mentioned by Klaus mark the field as 'technical'. In other words,

LOOP AT LT_FIELDCAT ASSIGNING <FS_FIELDCAT>.
<FS_FIELDCAT>-EDIT = C_FLAG.
<FS_FIELDCAT>-EMPHASIZE = C_FLAG.

IF <FS_FIELDCAT>-fieldname = <fieldwhich you dont want to display>.
<FS_FIELDCAT>-tech = 'X'. "Technical field
ENDIF.

ENDLOOP.

A 'technical' field is for purely technical purposes & is not displayed in the layout management as 'hidden' field. But if you mark it as 'NO_OUT' the user can display it via layout management.

BR,

Suhas

Former Member
0 Kudos

THANKU ALL...