03-26-2007 5:32 AM
Hi all
I am facing one problem In OOPS ALV . I have to set ALV display On some selection screen Paramter.
If Selection-screen_parameter= 'A'.
ALV display shouldcome with Structure 'XYZ'.
else.
ALV display should come with only six fields of Structure 'XYZ'.
endif.
pls tell me how should i approach for that.
Waiting for ur reply.
03-26-2007 6:18 AM
Hi,
For that create two internal tables and call two different ALV classes based on the condition.
if condition = 1.
CALL METHOD grid->set_table_for_first_display
EXPORTING I_STRUCTURE_NAME = 'Structure1'
CHANGING IT_OUTTAB = itab1.
else.
CALL METHOD grid->set_table_for_first_display
EXPORTING I_STRUCTURE_NAME = 'Structure2'
CHANGING IT_OUTTAB = itab2.
endif.
hope this will help u.
Darshan.
**please give points if this is helpful to u...
03-26-2007 6:18 AM
Hi,
For that create two internal tables and call two different ALV classes based on the condition.
if condition = 1.
CALL METHOD grid->set_table_for_first_display
EXPORTING I_STRUCTURE_NAME = 'Structure1'
CHANGING IT_OUTTAB = itab1.
else.
CALL METHOD grid->set_table_for_first_display
EXPORTING I_STRUCTURE_NAME = 'Structure2'
CHANGING IT_OUTTAB = itab2.
endif.
hope this will help u.
Darshan.
**please give points if this is helpful to u...
03-26-2007 7:10 AM
Hi
Write two methods for building the field catalogs.
one method which includes all the fields of the structure and the second method which contains the six fields of the field catalog.
Based on the selection parameter condition, pass the field catalog variable to the alv display.
Hope this helps u.
Regards,
Prasanth
Reward if it helps
03-26-2007 7:35 AM