‎2007 Aug 07 4:15 PM
Hi all,
How do I allow user to enter the desired ALV layout in a report.
THanks and Regards
JM
‎2007 Aug 07 4:19 PM
hi Johann,
For that place a radio button for each lay out and based on the selection make use of your final table to display differnet layout.
if rad1 = 'X'.
* List Display
elseif rad2 = 'X'
* Grid Display
endif.Message was edited by:
Santosh Kumar Patha
‎2007 Aug 07 4:19 PM
hi Johann,
For that place a radio button for each lay out and based on the selection make use of your final table to display differnet layout.
if rad1 = 'X'.
* List Display
elseif rad2 = 'X'
* Grid Display
endif.Message was edited by:
Santosh Kumar Patha
‎2007 Aug 07 4:24 PM
Hi Santosh,
Thanks for the quick response. What I want is I have this Layout field on my selection screen, so that when the user can have the option of selecting his own layout....say if he want to see only 2 or 3 columns in a report.
Thanks
JM
‎2007 Aug 07 4:21 PM
Give all the layout in your selection screen, with radio button..
IF <LAYOUT1> selected
EXECUTE LAYOUT one code
ENDIF.
IF <LAYOUT2> selected
EXECUTE LAYOUT two code.
ENDIF.
-
-
Regards,
SaiRam
‎2007 Aug 07 4:22 PM
Hi,
Declare a selection parameter in your program
parameters: p_vari like ltdx-variant.
then <<<
at selection-screen on value-request for p_vari.
perform f_variant_f4 using p_vari.
then <<<
form f_variant_f4 using p_vari.
* private variables
data : v_exit type c.
clear gs_variantt.
v_variant_save = 'U'.
call function 'LVC_VARIANT_F4'
exporting
is_variant = gs_variant
i_save = v_variant_save
importing
e_exit = v_exit
es_variant = gs_variantt
exceptions
not_found = 1
program_error = 2
others = 3.
if sy-subrc ne c_0.
* & & & & &
message i999(yscc) with text-064. " No Layout Available for F4
endif.
if v_exit is initial.
gs_variant-variant = gs_variantt-variant.
p_vari = gs_variantt-variant.
endif.
endform. " F_variant_f4
then <<< pass gs_variant to call method
call method grid1->set_table_for_first_display
exporting
is_layout = gs_layout
is_variant = gs_variant
i_save = 'A'
it_toolbar_excluding = i_exclude[]
changing
it_outtab = i_output[]
it_fieldcatalog = i_fieldcat[]
exceptions
invalid_parameter_combination = 1
program_error = 2
too_many_lines = 3
others = 4.
otherwise if you are using REUSE fm then pass the variant name
aRs
Message was edited by:
a®
‎2007 Aug 07 4:57 PM
Hi,
Can you please giv me the full code, bcos am getting a lot of errors.
JM
‎2007 Aug 07 5:02 PM