‎2010 Aug 06 5:27 PM
hello sir,
Good evening to all,
1) Excise Invoice date :
j_1iexchdr-EXDAT
2) BED
J_1iexchdr-EXBED
3) AED
J_1iexchdr-EXAED
4) PO Number
ekpo-ebeln
5) Line item
ekpo-ebelp
6) Date
ekko-bedat
7)Material
ekpo-txz01,
Selection fields are ekko-s_bedat,ekpo- s_ebeln,ekko-s_lifnr by using this selection fields i want to display above mentioned 7 items on ALV.Please send me answer sir because i am new to this ALV. Using multiple select statement of innerjoin statement i want to display these items on alv.
‎2010 Aug 06 6:26 PM
Put the result set that you want into an internal table and pass that internal table to the ALV
Here is the code you need to create a ALV:
DATA gr_alv TYPE REF TO cl_salv_table.
DATA gr_functions TYPE REF TO cl_salv_functions_list.
data gr_selections type ref to cl_salv_selections.
DATA gr_events type ref to cl_salv_events_table.
data gr_settings type ref to CL_SALV_DISPLAY_SETTINGS.
FIELD-SYMBOLS: <GT_FIELDCAT> TYPE LVC_T_FCAT.
TRY.
CASE gv_tables.
WHEN 'ZFI_TNE_GL_ACNT'.
cl_salv_table=>factory(
IMPORTING r_salv_table = gr_alv
CHANGING t_table = gt_leg_gl ).
when 'ZFI_TNE_RC_ACNT'.
cl_salv_table=>factory(
IMPORTING r_salv_table = gr_alv
CHANGING t_table = gt_leg_rc ).
WHEN 'ZFI_TNE_TX_ACNT'.
cl_salv_table=>factory(
IMPORTING r_salv_table = gr_alv
CHANGING t_table = gt_leg_tx ).
when 'ZFI_TNE_ERR_TBL'.
cl_salv_table=>factory(
IMPORTING r_salv_table = gr_alv
CHANGING t_table = gt_leg_err ).
endcase.
PERFORM display_settings.
gr_alv->set_screen_status(
pfstatus = 'SHOW_ALV'
report = sy-repid
set_functions = gr_alv->c_functions_all ).
gr_events = gr_alv->get_event( ).
create object event_handler.
set handler event_handler->on_user_command for gr_events.
gr_functions = gr_alv->get_functions( ).
gr_functions->set_all('X').
gr_functions->set_group_filter( value = if_salv_c_bool_sap=>false ).
gr_functions->set_print_preview( ).
gr_alv->display( ).
CATCH cx_salv_msg.
MESSAGE 'ALV Display Not possible'(w02) TYPE 'I' DISPLAY LIKE 'E'.
ENDTRY.
award if useful
Edited by: ABAP-ER19 on Aug 6, 2010 7:26 PM