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

ALV REPORT

Former Member
0 Likes
655

think that there are 5 col........... like 101 to 105............

if i give input as a 101 it as to be display col 101...rest of think it as to be hide ....

tatol based on input

think that there are 5 col........... like 101 to 105............

if i give input as a 101 it as to be display col 101...rest of think it as to be hide ....

tatol based on input

5 REPLIES 5
Read only

Former Member
0 Likes
628

Hi,

Once you build the fildcatalog for 5 columns. Check the condition as below :



loop at gt_fieldcat.

if input = '101'.

gt_fieldcat-fieldname = 'COL102'.
gt_fieldcat-hide = 'X'.
gt_fieldcat-tech - 'X'.
else
"For other input values.

modify gt_fieldcat.
endloop.

Thanks,

Sriram Ponna.

Read only

0 Likes
628

IF GIVE INPUT MATERIAL... FLD IS MATNR IN SELECTIONSCREEN UPTO LABST1......REST SHOULD BE HIDE

fcat-row_pos = 1.

FCAT-SELTEXT_L = 'SRL_NO'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'SLNO'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'PARENT'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'PMATNR'.

FCAT-TABNAME = 'IT_FINAL'.

FCAT-NO_OUT = 'X'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Tube S/A'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK1'.

FCAT-IFIELDNAME = 'IDNRK1'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Tube Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST1'.

FCAT-FIELDNAME = 'LABST1'.

FCAT-NO_ZERO = 'X'.

FCAT-FIX_COLUMN = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

clear fcat.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'P.Rod S/A'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK2'.

FCAT-IFIELDNAME = 'IDNRK2'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'P.Rod S/A Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST2'.

FCAT-TABNAME = 'IT_FINAL'.

FCAT-NO_ZERO = 'X'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Port A/S'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK4'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Port Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST4'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK5'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST5'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe S/A'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK6'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe S/A Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST6'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Spare Seal Kit'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK3'.

FCAT-TABNAME = 'WA_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe S/A Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST3'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

Read only

0 Likes
628

can send source code it will helpful for me

Read only

Former Member
0 Likes
628

You can do this..

assume your input is stored in the field

p_input.

you can do this coding in your fieldcatalog population.

populate all the columns using fieldcatalog merge or manually. now conditionally hide them using NO_OUT

loop at it_fieldcat where fieldname <> p_input.

it_fieldcat-no_out = 'X'.

modify it_fieldcat.

endif.

rest of the columns will be hidden.

so you can see only what ever you enter assume it is 101.

Read only

0 Likes
628

MY CODE S LIKE THIS CAN MODIFY THAT

fcat-row_pos = 1.

FCAT-SELTEXT_L = 'SRL_NO'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'SLNO'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'PARENT'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'PMATNR'.

FCAT-TABNAME = 'IT_FINAL'.

FCAT-NO_OUT = 'X'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Tube S/A'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK1'.

FCAT-IFIELDNAME = 'IDNRK1'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Tube Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST1'.

FCAT-FIELDNAME = 'LABST1'.

FCAT-NO_ZERO = 'X'.

FCAT-FIX_COLUMN = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

clear fcat.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'P.Rod S/A'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK2'.

FCAT-IFIELDNAME = 'IDNRK2'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'P.Rod S/A Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST2'.

FCAT-TABNAME = 'IT_FINAL'.

FCAT-NO_ZERO = 'X'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Port A/S'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK4'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Port Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST4'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK5'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST5'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe S/A'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK6'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe S/A Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST6'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Spare Seal Kit'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'IDNRK3'.

FCAT-TABNAME = 'WA_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.

w_pos = w_pos + 1.

FCAT-SELTEXT_L = 'Pipe S/A Quantity'.

FCAT-COL_POS = W_POS.

FCAT-FIELDNAME = 'LABST3'.

FCAT-NO_ZERO = 'X'.

FCAT-TABNAME = 'IT_FINAL'.

LAYOUT1-COLWIDTH_OPTIMIZE = 'X'.

APPEND FCAT.

CLEAR FCAT.