How to use intractive list in Alv REPORT
how to use intractive list in Alv REPORT with example.
thangs
venki.......
Hi
using the USER_COMMAND we can move to the Secondary(interactive) list in the ALV
see the sample code
report yh645_secndry_alv.
type-pools: slis.
data: fieldcat type slis_t_fieldcat_alv,
fieldcat_ln like line of fieldcat,
fs_layout type slis_layout_alv,
t_layoout like standard table
of fs_layout.
data: begin of fs_spfli,
carrid type spfli-carrid,
connid type spfli-connid,
countryfr type spfli-countryfr,
cityfrom type spfli-cityfrom,
airpfrom type spfli-airpfrom,
countryto type spfli-countryto,
cityto type spfli-cityto,
airpto type spfli-airpto,
fltime type spfli-fltime,
deptime type spfli-deptime,
arrtime type spfli-arrtime,
distance type spfli-distance,
distid type spfli-distid,
fltype type spfli-fltype,
period type spfli-period,
checkbox,
color(3),
end of fs_spfli.
data:
begin of fs_table,
carrid type spfli-carrid,
connid type spfli-connid,
end of fs_table.
data: begin of fs_sflight,
check,
color(3).
include type sflight.
data:end of fs_sflight.
data:
begin of fs_table1,
carrid type sflight-carrid,
connid type sflight-connid,
fldate type sflight-fldate,
end of fs_table1.
data:
t_spfli like standard table
of fs_spfli.
data:
t_table like standard table
of fs_table.
data:
t_table1 like standard table
of fs_table1.
data:
t_sflight like standard table
of fs_sflight.
data:
t_sbook like standard table
of sbook.
data t_layout type slis_layout_alv.
select *
into corresponding fields of table t_spfli
from spfli.
perform start_list_viewer.
perform get_spfli_details.
*& Form SUB1
text
-->RT_EXTAB text
form sub1 using rt_extab type slis_t_extab.
data: flight type slis_extab.
flight-fcode = 'SFLIGHT'.
append flight to rt_extab.
set pf-status 'SFLIGHT'. " EXCLUDING RT_EXTAB.
endform. "SUB1
*& Form START_LIST_VIEWER
text
--> p1 text
<-- p2 text
form start_list_viewer .
data: pgm like sy-repid.
pgm = sy-repid.
fs_layout-box_fieldname = 'CHECKBOX'.
fs_layout-info_fieldname = 'COLOR'.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = pgm
i_callback_pf_status_set = 'SUB1'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'SPFLI'
is_layout = fs_layout
tables
t_outtab = t_spfli
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " START_LIST_VIEWER
*******Process Call Back Events (Begin)**************************
form user_command using ucomm like sy-ucomm
selfield type slis_selfield.
case ucomm.
when 'SFLIGHT'.
selfield-refresh = 'X'.
perform get_spfli_details.
select *
from sflight
into corresponding fields of table t_sflight
for all entries in t_table
where carrid eq t_table-carrid
and connid eq t_table-connid.
perform display_sflight.
when 'SBOOK'.
selfield-refresh = 'X'.
perform get_sflight_details.
select *
from sbook
into corresponding fields of table t_sbook
for all entries in t_table1
where carrid eq t_table1-carrid
and connid eq t_table1-connid
and fldate eq t_table1-fldate.
perform display_sbook.
endcase.
endform. "USER_COMMAND
*& Form SUB2
text
-->RT_EXTAB text
form sub2 using rt_extab type slis_t_extab.
data: flight type slis_extab.
flight-fcode = 'SBOOK'.
append flight to rt_extab.
set pf-status 'SBOOK'. " EXCLUDING RT_EXTAB.
endform. "SUB2
*& Form DISPLAY_SFLIGHT
text
--> p1 text
<-- p2 text
form display_sflight .
data: pgm like sy-repid.
pgm = sy-repid.
clear t_layout.
fs_layout-box_fieldname = 'CHECK'.
fs_layout-info_fieldname = 'COLOR'.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = pgm
i_callback_pf_status_set = 'SUB2'
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'SFLIGHT'
is_layout = fs_layout
tables
t_outtab = t_sflight
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_SFLIGHT
*& Form GET_SPFLI_DETAILS
text
--> p1 text
<-- p2 text
form get_spfli_details .
loop at t_spfli into fs_spfli.
if fs_spfli-checkbox = 'X'.
fs_spfli-color = 'C51'.
fs_spfli-checkbox = '1'.
fs_table-carrid = fs_spfli-carrid.
fs_table-connid = fs_spfli-connid.
append fs_table to t_table.
modify t_spfli from fs_spfli.
endif.
endloop.
endform. " GET_SFLIGHT_DETAILS
*& Form GET_SFLIGHT_DETAILS
text
--> p1 text
<-- p2 text
form get_sflight_details .
loop at t_sflight into fs_sflight.
if fs_sflight-check = 'X'.
fs_sflight-color = 'C71'.
fs_sflight-check = '1'.
fs_table1-carrid = fs_sflight-carrid.
fs_table1-connid = fs_sflight-connid.
fs_table1-fldate = fs_sflight-fldate.
append fs_table1 to t_table1.
modify t_sflight from fs_sflight.
endif.
endloop.
endform. " GET_SFLIGHT_DETAILS
*& Form DISPLAY_SBOOK
text
--> p1 text
<-- p2 text
form display_sbook .
data: pgm like sy-repid.
pgm = sy-repid.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = pgm
i_structure_name = 'SBOOK'
tables
t_outtab = t_sbook
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endform. " DISPLAY_SBOOK
Reward points for useful Answers
Regards
Anji
Similar Messages
-
How to handle interactive list in alv reports
hi experts.
how to handle interactive list in alv reports.
regards.
subhasisHI Subhasis,
below is the sample code for handling an interactive ALV report, hope this helps you ..
REPORT ZTEST_ALV123.
TYPE-POOLS:SLIS.
DATA : IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAK-VBELN,
POSNR LIKE VBAP-POSNR,
END OF ITAB.
DATA: BEGIN OF ITAB1 OCCURS 0,
VBELN LIKE LIKP-VBELN,
POSNR LIKE LIPS-POSNR,
VGBEL LIKE LIPS-VGBEL,
VGPOS LIKE LIPS-VGPOS,
END OF ITAB1.
DATA: IT_LIPS LIKE ITAB1 OCCURS 0 WITH HEADER LINE.
SELECT VBELN
POSNR
FROM VBAP
INTO TABLE ITAB.
IF SY-SUBRC = 0.
SORT ITAB BY VBELN .
SELECT VBELN
POSNR
VGBEL
VGPOS
INTO TABLE ITAB1
FROM LIPS
FOR ALL ENTRIES IN ITAB
WHERE VGBEL = ITAB-VBELN
AND VGPOS = ITAB-POSNR.
ENDIF.
DATA: X_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'PFSTATUS'
I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'
IT_FIELDCAT = IT_FIELDCAT
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC = 0.
ENDIF.
*& Form POPUP
text
-->P_EXTAB text
FORM POPUP USING P_EXTAB TYPE SLIS_T_EXTAB.
"here double click on PFSTATUS and create the status, "activate, before that set PICK for choose(F2).
*- Pf status
SET PF-STATUS 'PFSTATUS'.
ENDFORM. " POPUP
*& Form HANDLE_USER_COMMAND
text
-->R_UCOMM text
-->RS_SELFIELD text
FORM HANDLE_USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
CASE R_UCOMM.
WHEN '&IC1'.
IF RS_SELFIELD-FIELDNAME = 'VBELN'.
READ TABLE ITAB INDEX RS_SELFIELD-TABINDEX.
LOOP AT ITAB1 WHERE VGBEL = ITAB-VBELN
AND VGPOS = ITAB-POSNR.
MOVE-CORRESPONDING ITAB1 TO IT_LIPS.
APPEND IT_LIPS.
ENDLOOP.
PERFORM INTERACTIVE_REPORT.
ENDIF.
ENDCASE.
ENDFORM. "HANDLE_USER_COMMAND
*& Form interactive_report
text
FORM INTERACTIVE_REPORT .
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-SELTEXT_L = 'VBELN'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 1.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-SELTEXT_L = 'ITEM'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 2.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'VGBEL'.
X_FIELDCAT-SELTEXT_M = 'SO #'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 3.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
X_FIELDCAT-FIELDNAME = 'VGPOS'.
X_FIELDCAT-SELTEXT_M = 'SO ITEM'.
X_FIELDCAT-TABNAME = 'IT_LIPS'.
X_FIELDCAT-COL_POS = 4.
APPEND X_FIELDCAT TO IT_FIELDCAT1.
CLEAR X_FIELDCAT.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IT_FIELDCAT = IT_FIELDCAT1
TABLES
T_OUTTAB = IT_LIPS
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC = 0.
ENDIF.
ENDFORM. " interactive_report
Regards,
Ranjita
null -
Can anyone tell me how to use GUI status in ALV report.
Can anyone tell me how to use GUI status in ALV report. I want to use buttons in ALV report.
Juheb,
see the link
http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
Adding a button on the ALV grid using OOPs
check these sites.
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/webDynproABAP-ALVControllingStandard+Buttons&
chk this.
alv-pfstatus:
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_pfstatus.htm
then how to capture that button click.
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_ucomm.htm
REPORT ZTESTALV.
TYPE-POOLS: SLIS.
*- Fieldcatalog
DATA: IT_FIELDCAT TYPE LVC_T_FCAT,
IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV..
*- For Events
DATA:IT_EVENTS TYPE SLIS_T_EVENT.
DATA: X_FIELDCAT TYPE LVC_S_FCAT,
X_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
DATA:X_LAYOUT TYPE LVC_S_LAYO.
"{ FOR DISABLE
DATA: LS_EDIT TYPE LVC_S_STYL,
LT_EDIT TYPE LVC_T_STYL.
"} FOR DISABLE
DATA: BEGIN OF IT_VBAP OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
HANDLE_STYLE TYPE LVC_T_STYL, "FOR DISABLE
<b> BUTTON(10),</b>
END OF IT_VBAP.
DATA: LS_OUTTAB LIKE LINE OF IT_VBAP.
SELECT VBELN
POSNR
UP TO 10 ROWS
INTO CORRESPONDING FIELDS OF TABLE IT_VBAP
FROM VBAP.
DATA:L_POS TYPE I VALUE 1.
CLEAR: L_POS.
L_POS = L_POS + 1.
<b>X_FIELDCAT-SELTEXT = 'Button'.
x_fieldcat-fieldname = 'BUTTON'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-OUTPUTLEN = '10'.
X_FIELDCAT-style = X_FIELDCAT-style bit-xor
cl_gui_alv_grid=>MC_STYLE_BUTTON bit-xor
cl_gui_alv_grid=>MC_STYLE_ENABLEd.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.</b>
L_POS = L_POS + 1.
X_FIELDCAT-SELTEXT = 'VBELN'.
X_FIELDCAT-FIELDNAME = 'VBELN'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-OUTPUTLEN = '10'.
x_fieldcat-ref_field = 'VBELN'.
x_fieldcat-ref_table = 'VBAK'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
X_FIELDCAT-SELTEXT = 'POSNR'.
X_FIELDCAT-FIELDNAME = 'POSNR'.
X_FIELDCAT-TABNAME = 'ITAB'.
X_FIELDCAT-COL_POS = L_POS.
X_FIELDCAT-EDIT = 'X'.
X_FIELDCAT-OUTPUTLEN = '5'.
APPEND X_FIELDCAT TO IT_FIELDCAT.
CLEAR X_FIELDCAT.
L_POS = L_POS + 1.
"{FOR DISABLE HERE 6ROW IS DISABLED
SY-TABIX = 6.
LS_EDIT-FIELDNAME = 'VBELN'.
LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
LS_EDIT-STYLE2 = SPACE.
LS_EDIT-STYLE3 = SPACE.
LS_EDIT-STYLE4 = SPACE.
LS_EDIT-MAXLEN = 10.
INSERT LS_EDIT INTO TABLE LT_EDIT.
*LS_EDIT-FIELDNAME = 'POSNR'.
*LS_EDIT-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
*LS_EDIT-STYLE2 = SPACE.
*LS_EDIT-STYLE3 = SPACE.
*LS_EDIT-STYLE4 = SPACE.
*LS_EDIT-MAXLEN = 6.
*INSERT LS_EDIT INTO TABLE LT_EDIT.
INSERT LINES OF LT_EDIT INTO TABLE LS_OUTTAB-HANDLE_STYLE.
MODIFY IT_VBAP INDEX SY-TABIX FROM LS_OUTTAB TRANSPORTING
HANDLE_STYLE .
X_LAYOUT-STYLEFNAME = 'HANDLE_STYLE'.
"} UP TO HERE
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
IS_LAYOUT_LVC = X_LAYOUT
IT_FIELDCAT_LVC = IT_FIELDCAT
TABLES
T_OUTTAB = IT_VBAP[]
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Don't forget to reward if useful.... -
How to use at new in alv report
Hi Experts,
I am creating a ALV report in which i have to sorted the data with 1 field like " if there the one division that have multiple department , so i have to show the output like division name then next row contain the releted dept of that"
can you plz suggest me how to i do this.
Thanks....Hi Asamadhi,
Using control break statement(At new or at end of)you can do this.
At first sort the internal table by key field(for your case i think division).
at first field(division)
write:/ data.
endat.
Regards,
Tutun -
Hi Experts,
How to use icon in the ALV Report ...?
Suppose My Scenario is i have a Pending PR Report if any line item in the PR is Deleated i want to display delete icon
Please guide me on this....
any Kind help would be highly appricated.Hello friend,
please try following codes, it works.
types: begin of gs_outtab.
types: lights type char1,
color type i,
tabcol type lvc_t_scol,
id type char25, " Already exist in ICON, Flat Structure
name type icon-name,
symbol type icon-id,
end of gs_outtab.
data: gt_outtab type standard table of gs_outtab.
data: gr_grid type ref to cl_gui_alv_grid.
data: gr_container type ref to cl_gui_custom_container,
gs_layout type lvc_s_layo,
gt_fieldcat type lvc_t_fcat.
data: ls_vari type disvariant.
data: g_okcode type syucomm.
data: gt_exc type table of ALV_S_QINF.
data: text type string.
selection-screen begin of block gen with frame.
parameters:
p_amount type i default 20.
selection-screen end of block gen.
selection-screen begin of block dsp with frame.
parameters:
p_full radiobutton group dsp,
p_grid radiobutton group dsp.
selection-screen end of block dsp.
START-OF-SELECTION.
END-OF-SELECTION.
perform select_data.
IF p_full = 'X'.
perform display_fullscreen.
ELSE.
perform display_grid.
ENDIF.
STEP 1: load data *******************************************
form select_data.
select * from icon into corresponding fields of table gt_outtab
up to p_amount rows.
endform.
STEP2: build full screen **************************************
form display_fullscreen .
data: ls_layout type slis_layout_alv,
lt_fcat type slis_t_fieldcat_alv,
ls_fcat type slis_fieldcat_alv.
ls_layout-lights_tabname = '1'.
ls_layout-lights_fieldname = 'LIGHTS'.
ls_layout-coltab_fieldname = 'TABCOL'.
clear ls_fcat.
ls_fcat-fieldname = 'LIGHTS'.
ls_fcat-inttype = 'C'.
ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Lights'.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'COLOR'.
ls_fcat-inttype = 'I'.
ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Color'.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'ID'.
ls_fcat-inttype = 'C'.
ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Icon'.
ls_fcat-icon = abap_true.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'SYMBOL'.
ls_fcat-inttype = 'C'.
ls_fcat-seltext_l = ls_fcat-seltext_m = ls_fcat-seltext_s = 'Symbol'.
ls_fcat-symbol = abap_true.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'NAME'.
ls_fcat-tech = abap_true.
append ls_fcat to lt_fcat.
perform select_data.
perform set_tooltips.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
IS_LAYOUT = ls_layout
IT_FIELDCAT = lt_fcat
IT_EXCEPT_QINFO = gt_exc
TABLES
T_OUTTAB = gt_outtab
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
ASSERT sy-subrc = 0.
endform.
STEP3: display grid ******************************************
form display_grid.
call screen 100.
endform.
STEP4: PBO ***************************************************
module d0100_pbo output.
perform d0100_pbo.
endmodule.
STEP5: PAI ***************************************************
module d0100_pai input.
perform d0100_pai.
endmodule.
STEP6: PBO form ***********************************************
form d0100_pbo .
set pf-status 'D0100'.
if gr_container is not bound.
create object gr_container
exporting
container_name = 'CONTAINER'.
create object gr_grid
exporting i_parent = gr_container.
data: ls_layout type lvc_s_layo,
lt_fcat type lvc_t_fcat,
ls_fcat type lvc_s_fcat.
ls_layout-excp_fname = 'LIGHTS'.
ls_layout-ctab_fname = 'TABCOL'.
clear ls_fcat.
ls_fcat-fieldname = 'LIGHTS'.
ls_fcat-inttype = 'C'.
ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Lights'.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'COLOR'.
ls_fcat-inttype = 'I'.
ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Color'.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'ID'.
ls_fcat-inttype = 'C'.
ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Icon'.
ls_fcat-icon = abap_true.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'SYMBOL'.
ls_fcat-inttype = 'C'.
ls_fcat-scrtext_l = ls_fcat-scrtext_m = ls_fcat-scrtext_s = 'Symbol'.
ls_fcat-symbol = abap_true.
append ls_fcat to lt_fcat.
clear ls_fcat.
ls_fcat-fieldname = 'NAME'.
ls_fcat-tech = abap_true.
append ls_fcat to lt_fcat.
perform select_data.
perform set_tooltips.
data: lt_tooltips type lvc_t_qinf,
lt_toolb type ui_functions,
ls_toolb type UI_FUNC.
ls_toolb = CL_GUI_ALV_GRID=>mc_fc_call_crbatch.
append ls_toolb to lt_toolb.
lt_tooltips = gt_exc.
call method gr_grid->set_table_for_first_display
exporting is_layout = ls_layout
it_except_qinfo = lt_tooltips
it_toolbar_excluding = lt_toolb
changing
it_fieldcatalog = lt_fcat
it_outtab = gt_outtab.
endif.
endform.
STEP7: PAI form ******************************************************
form d0100_pai .
case g_okcode.
when 'BACK' or 'EXIT' or 'CANC'.
set screen 0.
leave screen.
endcase.
endform.
STEP8: Set Tooltip *************************************************
FORM set_tooltips .
field-symbols: <outtab> type gs_outtab.
data: tooltips type ref to cl_salv_tooltips,
settings type ref to cl_salv_functional_settings,
ls_styl type lvc_s_styl,
value type char128,
text type char40,
ls_symbol type icon,
lt_symbol type standard table of icon,
ls_exc type ALV_S_QINF,
tabix type sy-tabix,
col type lvc_s_scol.
loop at gt_outtab assigning <outtab>.
tabix = sy-tabix.
read table lt_symbol index sy-tabix into ls_symbol.
<outtab>-symbol = ls_symbol-id.
value = <outtab>-id(3).
text = <outtab>-name.
concatenate value '\Q' text '@' into value.
<outtab>-id = value.
value = ls_symbol-id.
text = ls_symbol-name.
ls_exc-type = cl_salv_tooltip=>c_type_symbol.
ls_exc-value = value.
ls_exc-text = text.
append ls_exc to gt_exc.
<outtab>-color = tabix mod 7 + 1.
<outtab>-lights = tabix mod 3 + 1.
col-fname = 'COLOR'.
col-color-col = tabix mod 7 + 1.
if tabix ge 7.
col-color-inv = 1.
endif.
if tabix ge 14.
col-color-int = 1.
endif.
append col to <outtab>-tabcol.
endloop.
ENDFORM. -
How to find the list of Queries/Reports which are using Exceptional Aggregation in SAP BI?
Hi All,
We are interested to know how to find the list of Queries/ Reports which are using Exceptional aggregation in SAP BI.
Please let us know is there any table's to check the list of reports using Exceptional Aggregation in SAP BI.Hi,
Here you go..
1) Go to table RSZCALC and get list of ELTUID where AGGREXC is not INITIAL and AGGRCHA is not initial; now you get only exception aggregation set based on some chars. Also you can further add STEPNR = 1 since your intention is just to get query name , not the calculation details; this will reduce number of entries to lookup and save DB time for next steps.
Here you will get list of exception aggregation UUID numbers from which you can get properties from RSZELTDIR.
2) Pass list of RSZCALC-ELTUID to table RSZELTXREF - TELTUID and get list of RSZELTXREF -SELTUID - this table stores query to it's elements maping kind.
3) Now again pass RSZELTXREF - SELTUID into same table but into different field RSZELTZREF - TELTUID and get RSZELTXREF - SELTUID
This step you get query reference sheet or column or query general UUID for next step.
4) Pass list of RSZELTXREF - SELTUID into RSZELTDIR - ELTUID with DEFTP as 'REP'. Now you get list of query names in RSZELTDIR - MAPNAME and description in TXTLG.
Note: you can also get the reference chars used for exception aggregation from RSZCALC - AGGRCHA field.
Hope this helps.
Please keep in mind, it might take more time depends on how many query elements you have in the system...
Comments added for better DB performance by: Arun Thangaraj -
How to insert horizontal lines in alv report?
hi,
i have to insert horizontal lines in alv report.( RM07MLBB )
actually my requirement is:
basis list = RM07MLBB.
first secondary list = another report is called here ( RM07DOCS )
i want to insert horizontal lines in the first secondary list, when i execute individually RM07DOCS , i can get horizontal lines, but when i dounle click in the basic list --> in the first secondary list , i am not getting the horizontal lnes.
functional modules used are REUSE_ALV_HIERSEQ_LIST_DISPLAY & REUSE_ALV_GRID_DISPLAY.
here in this program,
is_layout = alv_layout.
hence i tried to give
alv_layout-no_hline = ' '.
but not effecting.
can some one please tell me , how to insert lines in the alv report.
thanks in advance,
Dastagir.hello,
so i cannot insert horizontal lines in the first secondary list according to my sorting condition, i.e., in a single block there should be :
if same delivery challan number is repeating they should come in the same block,
for the corresponding delivery challen number, if have po number, is repeating , they also should come in the same block.
in this way i have to seperate the blocks containing EXNUM , EBELN CONDITIONED. -
How to create check box in ALV Reports?
how to create check box in ALV Reports?
Hi
check the report BCALV_TEST_GRID_EDITABLE
or
check this report
REPORT ZRFC346_TST.
TABLES:SFLIGHT,RL034.
TYPE-POOLS:SLIS.
INCLUDE:<ICON>,<SYMBOL>.
DATA: G_REPID LIKE SY-REPID,
G_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
G_IT_SORT TYPE SLIS_T_SORTINFO_ALV,
G_LAYOUT TYPE SLIS_LAYOUT_ALV,
G_TABNAME_HEADER TYPE SLIS_TABNAME,
G_TABNAME_ITEM TYPE SLIS_TABNAME,
G_KEYINFO TYPE SLIS_KEYINFO_ALV,
G_VARIANT LIKE DISVARIANT,
G_EXTAB TYPE SLIS_T_EXTAB,
I_SLIS_EXIT_BY_USER TYPE SLIS_EXIT_BY_USER.
DATA: XEVENT TYPE SLIS_T_EVENT,
AEVENT TYPE SLIS_ALV_EVENT,
VARIANT LIKE DISVARIANT,
LAYOUT TYPE SLIS_LAYOUT_ALV,
ASP_GROUP TYPE SLIS_SP_GROUP_ALV,
GT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV,
EXTAB TYPE SLIS_T_EXTAB WITH HEADER LINE,
XFIELD TYPE SLIS_T_FIELDCAT_ALV,
AFIELD TYPE SLIS_FIELDCAT_ALV,
G_SUCOMM LIKE SY-UCOMM,
G_SELFLD TYPE SLIS_SELFIELD.
DATA: SAV_SY_REPID LIKE SY-REPID.
CONSTANTS: CON_SFLIGHT TYPE LVC_FNAME VALUE 'SFLIGHT',
CON_DISPLAY_FULL TYPE I VALUE 3.
Data to be displayed
DATA: BEGIN OF GT_SFLIGHT OCCURS 0.
INCLUDE STRUCTURE SFLIGHT.
DATA:ACTIVATE(1).
DATA: END OF GT_SFLIGHT.
INITIALIZATION.
*........Initialisierung...............................................
PERFORM INITIALIZATION_RL034.
*........Field cata....................................................
PERFORM FIELD_CAT.
*........SPECIAL GROUP.................................................
PERFORM E07_SP_GROUP_BUILD USING GT_SP_GROUP[].
START-OF-SELECTION.
Selection
SELECT * FROM SFLIGHT INTO TABLE GT_SFLIGHT.
*........ALV CALL.......................................................
PERFORM ALV_CALL.
PERFORM USER_COMMAND_LOCAL USING G_SUCOMM G_SELFLD.
FORM USER_COMMAND_LOCAL *
--> G_UCOMM *
--> G_SELFIELD *
FORM USER_COMMAND_LOCAL USING G_UCOMM LIKE SY-UCOMM
G_SELFIELD TYPE SLIS_SELFIELD.
CASE G_UCOMM.
WHEN 'ACT'.
ENDCASE.
ENDFORM.
FORM ALV_CALL *
FORM ALV_CALL.
Call ABAP List Viewer (ALV)
G_LAYOUT-BOX_FIELDNAME = 'ACTIVATE'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_BACKGROUND_ID = 'ALV_BACKGROUND'
I_BYPASSING_BUFFER = SPACE
I_BUFFER_ACTIVE = SPACE
I_CALLBACK_PROGRAM = SAV_SY_REPID
I_CALLBACK_PF_STATUS_SET = 'STATUS'
I_CALLBACK_USER_COMMAND = 'USER_COMMAND_LOCAL'
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME = 'SFLIGHT'
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
IS_LAYOUT = G_LAYOUT
IT_FIELDCAT = XFIELD[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS = GT_SP_GROUP[]
IT_SORT =
IT_FILTER =
IS_SEL_HIDE = 'X'
I_DEFAULT = 'X'
I_SAVE = 'A'
IS_VARIANT =
IT_EVENTS = XEVENT
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IT_ALV_GRAPHICS =
IT_ADD_FIELDCAT =
IT_HYPERLINK =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IT_EXCEPT_QINFO =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = GT_SFLIGHT
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM.
FORM status *
--> EXTAB *
FORM STATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS 'STAT' EXCLUDING EXTAB.
ENDFORM. " STATUS
*& Form INITIALIZATION_RL034
text
--> p1 text
<-- p2 text
FORM INITIALIZATION_RL034.
SAV_SY_REPID = SY-REPID.
ENDFORM. " INITIALIZATION_RL034
*& Form DEFINE_EVENTS_RL034
text
--> p1 text
<-- p2 text
FORM DEFINE_EVENTS_RL034.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = XEVENT.
exceptions
list_type_wrong = 1
others = 2.
ENDFORM. " DEFINE_EVENTS_RL034
*& Form FIELD_CAT
text
--> p1 text
<-- p2 text
FORM FIELD_CAT.
DATA: LS_FCAT TYPE SLIS_FIELDCAT_ALV,
L_LIN TYPE I.
REFRESH XFIELD.
1. per Default eingeblendete Felder *
*........Ikone/Symbol..................................................
CLEAR AFIELD.
DATA: LS1_FCAT TYPE SLIS_FIELDCAT_ALV,
L_LIN1 TYPE I.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_STRUCTURE_NAME = CON_SFLIGHT
I_BYPASSING_BUFFER = SPACE
I_BUFFER_ACTIVE = SPACE
CHANGING
CT_FIELDCAT = XFIELD
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
DESCRIBE TABLE XFIELD LINES L_LIN1.
ADD 1 TO L_LIN1.
CLEAR LS_FCAT.
LS1_FCAT-FIELDNAME = 'ACTIVATE'.
LS1_FCAT-CHECKBOX = 'X'.
LS1_FCAT-KEY = 'X'.
LS1_FCAT-INPUT = 'X'.
LS1_FCAT-EDIT = 'X'.
LS1_FCAT-INTTYPE = 'C'.
LS1_FCAT-DATATYPE = 'CHAR'.
LS1_FCAT-INTLEN = 1.
LS1_FCAT-COL_POS = L_LIN1.
LS1_FCAT-SELTEXT_S = LS1_FCAT-FIELDNAME.
LS1_FCAT-SELTEXT_M = LS1_FCAT-FIELDNAME.
LS1_FCAT-SELTEXT_L = LS1_FCAT-FIELDNAME.
LS1_FCAT-SP_GROUP = 'A'.
APPEND LS1_FCAT TO XFIELD.
ADD 1 TO L_LIN.
ENDFORM. " FIELD_CAT
FORM E07_SP_GROUP_BUILD USING E07_LT_SP_GROUP TYPE SLIS_T_SP_GROUP_ALV.
DATA: LS_SP_GROUP TYPE SLIS_SP_GROUP_ALV.
CLEAR LS_SP_GROUP.
LS_SP_GROUP-SP_GROUP = 'A'.
LS_SP_GROUP-TEXT = 'SPECIAL'.
APPEND LS_SP_GROUP TO E07_LT_SP_GROUP.
ENDFORM.
Regards
Shiva -
How to create secondary lists in ALV
Hi all,
Can u plz explain me how to create Secondary lists usingl ALV and how many secondary lists we can create.
Thanks in advance
Venkatthis is the very very simple program in HR module to demonstrate interactive ALV report.
If u have HR module implemented...just copy and paste this code and debug it...you will easily get the flow of the report...this is the simplest program..
i hope it helps...here u go......
REPORT ztej_alv_interactive.
TABLES: pa0000, pa0001.
DATA : BEGIN OF it0001 OCCURS 0,
pernr LIKE pa0001-pernr,
ename LIKE pa0001-ename,
END OF it0001.
DATA : BEGIN OF it0000 OCCURS 0,
pernr LIKE pa0000-pernr,
begda LIKE pa0000-begda,
endda LIKE pa0000-endda,
massn LIKE pa0000-massn,
massg LIKE pa0000-massg,
aedtm LIKE pa0000-aedtm,
END OF it0000.
TYPE-POOLS: slis.
DATA: v_repid LIKE sy-repid .
DATA: i_fieldcat TYPE slis_t_fieldcat_alv.
DATA: i_fieldcat1 TYPE slis_t_fieldcat_alv.
DATA: it_listheader TYPE slis_t_listheader.
DATA: it_listheader1 TYPE slis_t_listheader.
DATA: v_events TYPE slis_t_event,
wa_event TYPE slis_alv_event.
DATA: alv_layout TYPE slis_layout_alv.
DATA: i_title_0001 TYPE lvc_title VALUE 'FIRST LIST DISPLAYED'.
DATA: i_title_0000 TYPE lvc_title.
DATA : temp_pernr LIKE pa0001-pernr.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECTION-SCREEN SKIP.
SELECT-OPTIONS : s_pernr FOR pa0000-pernr DEFAULT '16240147'.
SELECTION-SCREEN END OF BLOCK b1.
INITIALIZATION.
v_repid = sy-repid.
PERFORM build_fieldcatlog USING i_fieldcat.
PERFORM event_call.
PERFORM populate_event.
START-OF-SELECTION.
PERFORM data_retrieval.
PERFORM build_listheader USING it_listheader.
PERFORM display_alv_report.
*& Form BUILD_FIELDCATLOG
text
--> p1 text
<-- p2 text
FORM build_fieldcatlog USING temp_fieldcat TYPE slis_t_fieldcat_alv.
DATA : wa_temp_fieldcat TYPE slis_fieldcat_alv.
wa_temp_fieldcat-tabname = 'IT0001'.
wa_temp_fieldcat-fieldname = 'PERNR'.
wa_temp_fieldcat-seltext_m = 'Personnel Number'.
APPEND wa_temp_fieldcat TO temp_fieldcat.
CLEAR wa_temp_fieldcat.
wa_temp_fieldcat-tabname = 'IT0001'.
wa_temp_fieldcat-fieldname = 'ENAME'.
wa_temp_fieldcat-seltext_m = 'Name'.
APPEND wa_temp_fieldcat TO temp_fieldcat.
CLEAR wa_temp_fieldcat.
ENDFORM. " BUILD_FIELDCATLOG
*& Form EVENT_CALL
text
--> p1 text
<-- p2 text
FORM event_call.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = v_events
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " EVENT_CALL
*& Form POPULATE_EVENT
text
--> p1 text
<-- p2 text
FORM populate_event.
READ TABLE v_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc EQ 0.
wa_event-form = 'TOP_OF_PAGE'.
MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
wa_event-form.
ENDIF.
READ TABLE v_events INTO wa_event WITH KEY name = 'USER_COMMAND'.
IF sy-subrc EQ 0.
wa_event-form = 'USER_COMMAND'.
MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
wa_event-name.
ENDIF.
ENDFORM. " POPULATE_EVENT
*& Form DATA_RETRIEVAL
text
--> p1 text
<-- p2 text
FORM data_retrieval.
SELECT pernr ename
FROM pa0001
INTO TABLE it0001
WHERE pernr IN s_pernr.
DELETE ADJACENT DUPLICATES FROM it0001.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_LISTHEADER
text
-->P_IT_LISTHEADER text
FORM build_listheader USING i_listheader TYPE slis_t_listheader.
DATA hline TYPE slis_listheader.
hline-info = 'This is Interactive ALV Program.'.
hline-typ = 'H'.
APPEND hline TO i_listheader.
ENDFORM. " BUILD_LISTHEADER
*& Form DISPLAY_ALV_REPORT
text
--> p1 text
<-- p2 text
FORM display_alv_report.
v_repid = sy-repid.
alv_layout-colwidth_optimize = 'X'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_callback_top_of_page = 'TOP_OF_PAGE'
i_grid_title = i_title_0001
I_GRID_SETTINGS =
is_layout = alv_layout
it_fieldcat = i_fieldcat[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'ZLAY1'
i_save = 'A'
is_variant = i_variant
it_events = v_events
TABLES
t_outtab = it0001
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
REFRESH i_fieldcat.
CLEAR i_fieldcat.
REFRESH it_listheader.
CLEAR it_listheader.
ENDFORM. " DISPLAY_ALV_REPORT
*& Form TOP_OF_PAGE
text
FORM top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
REFRESH i_fieldcat1.
REFRESH it_listheader1.
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE it0001 INDEX rs_selfield-tabindex.
IF sy-subrc = 0.
temp_pernr = it0001-pernr.
PERFORM build_fieldcatlog_0000 USING i_fieldcat1.
PERFORM event_call_0000.
PERFORM populate_event_0000.
PERFORM data_retrieval_0000.
PERFORM build_listheader_0000 USING it_listheader1.
PERFORM display_alv_0000.
ENDIF.
ENDCASE.
ENDFORM. "user_command
*& Form BUILD_FIELDCATLOG_0000
text
--> p1 text
<-- p2 text
FORM build_fieldcatlog_0000 USING temp_fieldcat TYPE slis_t_fieldcat_alv
DATA : wa_temp_fieldcat TYPE slis_fieldcat_alv.
wa_temp_fieldcat-tabname = 'IT0000'.
wa_temp_fieldcat-fieldname = 'BEGDA'.
wa_temp_fieldcat-seltext_m = 'From Date'.
APPEND wa_temp_fieldcat TO temp_fieldcat.
CLEAR wa_temp_fieldcat.
wa_temp_fieldcat-tabname = 'IT0000'.
wa_temp_fieldcat-fieldname = 'ENDDA'.
wa_temp_fieldcat-seltext_m = 'To Date'.
APPEND wa_temp_fieldcat TO temp_fieldcat.
CLEAR wa_temp_fieldcat.
wa_temp_fieldcat-tabname = 'IT0000'.
wa_temp_fieldcat-fieldname = 'MASSN'.
wa_temp_fieldcat-seltext_m = 'Action'.
APPEND wa_temp_fieldcat TO temp_fieldcat.
CLEAR wa_temp_fieldcat.
wa_temp_fieldcat-tabname = 'IT0000'.
wa_temp_fieldcat-fieldname = 'MASSG'.
wa_temp_fieldcat-seltext_m = 'Reason'.
APPEND wa_temp_fieldcat TO temp_fieldcat.
CLEAR wa_temp_fieldcat.
wa_temp_fieldcat-tabname = 'IT0000'.
wa_temp_fieldcat-fieldname = 'AEDTM'.
wa_temp_fieldcat-seltext_m = 'Action Run On'.
APPEND wa_temp_fieldcat TO temp_fieldcat.
CLEAR wa_temp_fieldcat.
ENDFORM. " BUILD_FIELDCATLOG
*& Form EVENT_CALL_0000
text
--> p1 text
<-- p2 text
FORM event_call_0000.
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = v_events
EXCEPTIONS
LIST_TYPE_WRONG = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " EVENT_CALL_0000
*& Form POPULATE_EVENT_0000
text
--> p1 text
<-- p2 text
FORM populate_event_0000.
READ TABLE v_events INTO wa_event WITH KEY name = 'TOP_OF_PAGE'.
IF sy-subrc EQ 0.
wa_event-form = 'F_TOP_OF_PAGE'.
MODIFY v_events FROM wa_event TRANSPORTING form WHERE name =
wa_event-form.
ENDIF.
ENDFORM. " POPULATE_EVENT_0000
*& Form TOP_OF_PAGE
text
FORM f_top_of_page.
CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
EXPORTING
it_list_commentary = it_listheader1
i_logo =
I_END_OF_LIST_GRID =
ENDFORM. "TOP_OF_PAGE
*& Form USER_COMMAND
text
-->R_UCOMM text
-->, text
-->RS_SLEFIELDtext
*retreiving values from the database table ekko
FORM data_retrieval_0000.
SELECT pernr begda endda massn massg aedtm
FROM pa0000
INTO TABLE it0000
WHERE pernr = temp_pernr.
ENDFORM.
*& Form BUILD_LISTHEADER_0000
text
-->P_IT_LISTHEADER text
FORM build_listheader_0000 USING i_listheader1 TYPE slis_t_listheader.
DATA: hline1 TYPE slis_listheader.
hline1-typ = 'H'.
hline1-info = 'Actions Detail List'.
APPEND hline1 TO i_listheader1.
ENDFORM. " BUILD_LISTHEADER_0000
*& Form DISPLAY_ALV_0000
text
--> p1 text
<-- p2 text
FORM display_alv_0000.
CONCATENATE 'Actions For Personnel Number ' temp_pernr
INTO i_title_0000 SEPARATED BY ' '.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = v_repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = 'F_USER_COMMAND'
i_callback_top_of_page = 'F_TOP_OF_PAGE'
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
i_grid_title = i_title_0000
I_GRID_SETTINGS =
is_layout = alv_layout
it_fieldcat = i_fieldcat1[]
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT =
i_save = 'A'
IS_VARIANT =
it_events = v_events
TABLES
t_outtab = it0000
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " DISPLAY_ALV_0000
Regards,
Tejas -
How to select multiple row in ALV report
Hi friends,
1. How to select multiple row in ALV report
( How to set tab in ALV report and want to select multiple line.)
Thanking you.
SubashHi Sahoo,
If you are using the class CL_GUI_ALV_GRID. In methods SET_TABLE_FOR_FIRST_DISPLAY.
in layout structure you will find field SEL_MODE
pass :
LS_LAYOUT-SEL_MODE = 'A'.
In PAI.
CALL METHOD GRID->GET_SELECTED_ROWS
IMPORTING
ET_INDEX_ROWS = T_ROWS
ET_ROW_NO = T_ROWID.
Hope these will solve your problem.
Regards,
Kumar M. -
How to use dynamic parameter when a report is created using Stored Procedures
Hi all,
any one have the idea of how to use dynamic parameter in crystal report XI R2
when report is created using Stored Procedure.
Regards
shashi kant chauhanHi
You can create an SQL command in Database Expert > Expand your datasource > Add command
Then enter the SQL query that will create the list of values to supply to the user
eg select field1,field2 from table
Then edit the parameter of the report. These will be the SP parameters adn can be seen in field explorer.
Change the parameter type to Dynamic
Under the word Value click on Click here to add item
Scroll down to your Command and select one of the values that you want to appear in the list
e.g field1
Then click on the Parameters field - this is essential to create the param
You can edit other options as required
That should do it for you.
I must say that i use CR 2008 connected to Oracle 10g SP, but i reckon this will work for SQL DB and CR XI as well
Best of luck -
How to use Standard Text in ALV
How to use Standard Text in ALV header part? Can you please help me by giving the answer?
Hi ,
You can read the Standard text using read_text function module and then print in LV header part. -
How to use a parameter of a report program in a dialog program
how to use a parameter of a report program in a dialog program.
I have to fetch the value entered in the parameter of report program and display it in a dialog programHi Aasim,
Just mention like below in your ABAP report.
PARAMETERS: p_aufnr TYPE aufnr MEMORY ID ord.
and mention the same memory ID name in the module pool screen property it automatically populates the value to and fro -
How to use a parameter in a report program in a dialog program
how to use a parameter in a report program in a dialog program
Hi Shaikh,
Post it in http://scn.sap.com/community/abap
"ABAP Development".
sree -
How to use advanced tab in user reports?
Hi,
How to use "advanced" tab in user reports?
I have two reports. I fill "Report ID" in both and then I can push "Add Report" and fill fields property.
Then I'm can "drill" from one report to another on right click, but how to pass parameters?
Is it even possible?
Regard
LiborThank you for reply.
I can't get it working.
I have two reports:
1. report:
Name: test
SQL: select 1 NUM, 'text' TEXT from dual;
On advanced tab:
ReportID: -null-
Name: test2
Report: Test2
2. report
Name: test2
SQL: select :NUM from dual;
Now, when I run the first report and click do right click on a row and select TEST2
from popup menu, it navigates to the second report test2, but WITHOUT actual value
from NUM column from first report.
I'm using latest version of SQL Developer (1.1.1.25) and I like reports.
With this feature it would be even better.
Regards
Libor
Maybe you are looking for
-
ITunes 7.7 messes up alphabetical order
Hello! After installing iTunes 7.7 any new import I make is put to the wrong place in the alphabetical order. I use "Album by Artist" sorting, and when I imported an Avril Lavigne album it was put to the letter L instead of A. Similarly Alice Cooper
-
Does JRE 1.6 include a built-in SQL database?
I'm investigating the creation of a custom Java database application that's intended to run on multiple systems, particularly Windows and Macs. I'd like to store and retrieve my data using SQL, rather than as flat files. At the same time, I'd also li
-
Assignment of factory calendar ID to company code
Hello, I want to implement a report where I need the Assignement of the ID for the factory calendar to the company code. Is there a table in the system? thx Robert
-
Extended Notification Config in ECC
Hi I want to configure Extended Notifications in the ECC 6.0. I have created a category. But when I create a subscription for that, in the Subscription Basic data, it asks for recepient address. i dont want to specify any specific user or email addr
-
Hi Guys, I am using Oracle 10G database. When I am running the below query I am naturally getting an error as there is an outer join to more then one table: SELECT MV_VAA_INC_MONTHLY_SUMMARY.Month_ID, MV_VAA_INC_MONTHLY_SUMMARY.PRIORITY, sum(MV