2006 Dec 06 6:42 AM
1.suppose my internal table contains 10 fields, and in ALV fieldcat also contains 10fields. if i want only 6 files not 10 in my fieldcat how can i do that?
2. can i call one window from another window in scripts /smartfors.
2006 Dec 06 6:48 AM
Hi Madhav,
you can remove the 4 fields from the field catalog
or you can mark ls_fcat-no_out = 'X' for the fields for which you do not want to show in the ALV
Hope this helps
Regards,
Kinshuk
1.suppose my internal table contains 10 fields, and in ALV fieldcat also contains 10fields. if i want only 6 files not 10 in my fieldcat how can i do that?
2. can i call one window from another window in scripts /smartfors.
2006 Dec 06 6:48 AM
Hi Madhav,
you can remove the 4 fields from the field catalog
or you can mark ls_fcat-no_out = 'X' for the fields for which you do not want to show in the ALV
Hope this helps
Regards,
Kinshuk
2006 Dec 06 6:51 AM
You can make them to invisible mode while displaying
loop at it_fieldcat into wa_fieldcat.
if wa_fieldcat-fieldname = 'FIELD1' or
wa_fieldcat-fieldname = 'FIELD2' or
wa_fieldcat-fieldname = 'FIELD3' or
wa_fieldcat-fieldname = 'FIELD4' .
wa_fieldcat-no_out = 'X'.
modify it_fieldcat from wa_fieldcat.
endif.
endloop.
2006 Dec 06 6:51 AM
For <b>Q1</b>, you need to build field catalog to display 6 fields.
data wf_fieldcat type slis_t_fieldcat_alv.
****
****
****
perform f_fieldcat_init using wf_fieldcat[].
****
****
****
&----
*& Form f_fieldcat_init
&----
Fill Field Values for ALV
----
-->P_WF_FIELDCAT[] text
----
form f_fieldcat_init using lt_fieldcat type slis_t_fieldcat_alv.
data ls_fieldcat type slis_fieldcat_alv.
ls_fieldcat-fieldname = 'OBJID'.
ls_fieldcat-seltext_m = 'Object ID.
append ls_fieldcat to lt_fieldcat.
clear ls_fieldcat.
PS: like above you need to build it for another 5 fields.
endform. "f_fieldcat_init
<b>Note: OBJID should be part of your internal table.</b>
***
***
***
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_callback_program = sy-repid
i_callback_user_command =
is_layout =
it_fieldcat = <b>wf_fieldcat[]</b>
it_excluding =
it_sort =
it_events =
tables
t_outtab = int_output
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
endif.
Regards,
Ramki.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |