Hierarchial and blocked list displays
Hi friends,
when do we opt for hierachial list display and when do we opt for blocked list display?
Hi Suresh,
Blocked ALV displays the data in blocks together in output. e.g. suppose you want to dsplay the data of header & item level. Then you candisplay the data of header records in first block & Item level data in another block on same output screen.
For hierarchical ALV check the below link
http://help.sap.com/saphelp_nw2004s/helpdata/en/6e/4e2941fa918739e10000000a1550b0/frameset.htm
& check this link also:
A new approach to ALV Programming
Hope this will help.
Regards,
Nitin.
Similar Messages
-
Displaying Average of Columns in ALV Blocked List Display
Hi,
I am using ALV Blocked List Display. For the 1st block, I need to display the average of certain columns.
I am using the following code in the field catalog of the RATE column to display the average , but it is not displayed.
wa_disptab_field-col_pos = 8.
wa_disptab_field-fieldname = 'RATE''.
wa_disptab_field-ref_tabname = 'IT_DISPTAB'.
wa_disptab_field-seltext_m = 'RS PER KL'.
wa_disptab_field-do_sum = 'C'.
wa_disptab_field-datatype = 'QUAN'.
append wa_disptab_field to it_disptab_field.
clear wa_disptab_field.
For the same column, the sum is displayed with the same code if I change this part:
wa_disptab_field-do_sum = 'C'. To wa_disptab_field-do_sum = 'X'.
Please Help..Hi Debarati,
go For function/pattern [reuse_alv_grid_display_lvc]
do the following as mentioned in the previous reply's.
And To find the Average of your requirement, pass the field names as per the requirement.
gs_sort-fieldname = 'RATE'.
gs_sort-tabname = 'T_DISPTAB' "Final Internal table
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
gs_sort-fieldname = 'RATE1'.
gs_sort-tabname = 'T_DISPTAB' "Final Internal table
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
gs_sort-fieldname = 'RATE2'.
gs_sort-tabname = 'T_DISPTAB' "Final Internal table
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
gs_sort-fieldname = 'RATE3'.
gs_sort-tabname = 'T_DISPTAB' "Final Internal table
gs_sort-subtot = 'X'.
APPEND gs_sort TO gt_sort.
CALL FUNCTION ' REUSE_ALV_GRID_DISPLAY_lvc'
EXPORTING
i_callback_program = sy-cprog
i_callback_user_command = 'USER_COMMAND'
is_layout = gs_layout
it_fieldcat = wa_disptab
it_events = gt_events
it_sort = gt_sort
i_default = 'X'
i_save = 'U'
TABLES
t_outtab = gt_final
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.
i think this will workout.
Thanks & Regards,
Abhisek
Edited by: Abhisek Pradhan on Sep 29, 2011 7:55 PM -
What is the difference between Single List and Blocked List. how REUSE_ALV_LIST_DISPLAY will work with single List and Blocked List.
Please Help me.
Regards
vamsi.hi vamsi,
to get single list u use FM's REUSE_ALV_LIST_DISPLAY or REUSE_ALV_GRID_DISPLAY and
for blocked list u use the FM's REUSE_ALV_BLOCK_LIST_INIT,
REUSE_ALV_BLOCK_LIST_APPEND & REUSE_ALV_BLOCK_LIST_DISPLAY
<b>check this code for List display....</b>
REPORT ZTEST_ALV1.
**TABLES DECLN
TABLES: VBRK,VBRP,T001.
TYPE-POOLS: SLIS.
TYPE-POOLS: ICON.
***DATA DECLN.
DATA: V_VBELN LIKE VBRK-VBELN,
V_MATNR LIKE VBRP-MATNR.
CONSTANTS: C_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'F_USER_COMMAND',
C_PF_STATUS TYPE SLIS_FORMNAME VALUE 'F_SET_PF_STATUS'.
**ALV RELATED TABLES.
*--Field Catalog
DATA: IT_FIELDCAT TYPE STANDARD TABLE OF
SLIS_FIELDCAT_ALV WITH HEADER LINE,
IT_FIELDCAT1 TYPE STANDARD TABLE OF
SLIS_FIELDCAT_ALV WITH HEADER LINE ,
WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
*--Layout
WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
*--Sort
IT_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV ,
**-Structure for excluding function codes
WA_EXTAB TYPE SLIS_EXTAB,
**-To hold function codes to be excluded in ALV toolbar
IT_EXTAB TYPE SLIS_T_EXTAB.
***INTERNAL TABLE DECLN.
DATA: BEGIN OF IT_VBRK OCCURS 0,
VBELN LIKE VBRK-VBELN,
WAERK LIKE VBRK-WAERK,
VKORG LIKE VBRK-VKORG,
FKDAT LIKE VBRK-FKDAT,
BUKRS LIKE VBRK-BUKRS,
NETWR LIKE VBRK-NETWR,
END OF IT_VBRK.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBRP-VBELN,
POSNR LIKE VBRP-POSNR,
FKIMG LIKE VBRP-FKIMG,
VRKME LIKE VBRP-VRKME,
NETWR LIKE VBRP-NETWR,
MATNR LIKE VBRP-MATNR,
ARKTX LIKE VBRP-ARKTX,
END OF ITAB.
DATA: IT_VBRP LIKE ITAB OCCURS 0 WITH HEADER LINE.
***selection screen.
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
SELECT-OPTIONS: S_VBELN FOR VBRK-VBELN,
S_FKDAT FOR VBRK-FKDAT OBLIGATORY,
S_MATNR FOR VBRP-MATNR.
SELECTION-SCREEN: END OF BLOCK B1.
**INITIALIZATION.
INITIALIZATION.
S_FKDAT-LOW = SY-DATUM - 200.
S_FKDAT-HIGH = SY-DATUM.
APPEND S_FKDAT.
***AT SELECTION-SCREEN.
AT SELECTION-SCREEN.
IF NOT S_VBELN IS INITIAL.
SELECT SINGLE VBELN FROM VBRK
INTO V_VBELN
WHERE VBELN IN S_VBELN.
IF SY-SUBRC <> 0.
MESSAGE E001(ZZ2).
ENDIF.
ENDIF.
IF NOT S_MATNR IS INITIAL.
SELECT SINGLE MATNR FROM MARA
INTO V_MATNR
WHERE MATNR IN S_MATNR.
IF SY-SUBRC <> 0.
MESSAGE E001(ZZ2).
ENDIF.
ENDIF.
***START-OF-SELECTION.
START-OF-SELECTION.
PERFORM GET_DATA_VBRK.
***END-OF-SELECTION.
END-OF-SELECTION.
*--Sort the Output Fields
PERFORM SORT_FIELDS.
*--Build Field catalog for the Output fields
PERFORM GET_FIELD_CATALOG.
***MODIFY LAYOUT.
PERFORM MODIFY_LAYOUT.
*--Display ALV output
PERFORM LIST_DISP TABLES IT_VBRK
USING C_USER_COMMAND.
*& Form GET_DATA_VBRK
text
--> p1 text
<-- p2 text
FORM GET_DATA_VBRK.
SELECT VBELN
WAERK
VKORG
FKDAT
BUKRS
NETWR
INTO TABLE IT_VBRK
FROM VBRK
WHERE VBELN IN S_VBELN
AND FKDAT IN S_FKDAT.
ENDFORM. " GET_DATA
*& Form GET_FIELD_CATALOG
text
--> p1 text
<-- p2 text
FORM GET_FIELD_CATALOG .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'IT_VBRK'
I_INCLNAME = SY-REPID
CHANGING
CT_FIELDCAT = IT_FIELDCAT[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
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. " GET_FIELD_CATALOG
*& Form SORT_FIELDS
text
--> p1 text
<-- p2 text
FORM SORT_FIELDS .
CLEAR WA_SORT.
WA_SORT-SPOS = '01'.
WA_SORT-FIELDNAME = 'VBELN' .
WA_SORT-TABNAME = 'IT_VBRK'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
CLEAR WA_SORT.
WA_SORT-SPOS = '02'.
WA_SORT-FIELDNAME = 'POSNR' .
WA_SORT-TABNAME = 'IT_VBRP'.
WA_SORT-UP = 'X'.
APPEND WA_SORT TO IT_SORT.
ENDFORM. " SORT_FIELDS
*& Form MODIFY_LAYOUT
text
--> p1 text
<-- p2 text
FORM MODIFY_LAYOUT .
WA_LAYOUT-DEFAULT_ITEM = 'X'.
WA_LAYOUT-ZEBRA = 'X'.
WA_LAYOUT-EXPAND_FIELDNAME = 'EXPAND'.
WA_layout-colwidth_optimize = 'X'.
ENDFORM. " MODIFY_LAYOUT
*& Form LIST_DISP
text
--> p1 text
<-- p2 text
FORM LIST_DISP TABLES P_IT_VBRK
USING P_USER_COMMAND TYPE SLIS_FORMNAME.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID
I_CALLBACK_PF_STATUS_SET = 'POPUP'
I_CALLBACK_USER_COMMAND = 'HANDLE_USER_COMMAND'
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = IT_FIELDCAT[]
IT_EXCLUDING = IT_EXTAB[]
TABLES
T_OUTTAB = IT_VBRK
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. " LIST_DISP
*& Form POPUP
text
-->P_EXTAB text
FORM POPUP USING IT_EXTAB TYPE SLIS_T_EXTAB.
*- Pf status
SET PF-STATUS 'POPUP'.
ENDFORM. " POPUP
<b>and check this for <b>Block List</b>....</b>
REPORT ZTEST_ALV3.
TABLES: SFLIGHT,SPFLI.
TYPE-POOLS: SLIS.
DATA: BEGIN OF ITAB OCCURS 0,
CARRID LIKE SFLIGHT-CARRID,
CONNID LIKE SFLIGHT-CONNID,
FLDATE LIKE SFLIGHT-FLDATE,
PRICE LIKE SFLIGHT-PRICE,
CURRENCY LIKE SFLIGHT-CURRENCY,
CITYFROM LIKE SPFLI-CITYFROM,
CITYTO LIKE SPFLI-CITYTO,
END OF ITAB.
DATA: V_REPID LIKE SY-REPID.
***FIELD CATALOG.
DATA: ITAB_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV WITH HEADER LINE,
WA_FLDCAT TYPE SLIS_FIELDCAT_ALV.
***SORTING
DATA: ITAB_SORT TYPE SLIS_T_SORTINFO_ALV,
WA_SORT TYPE SLIS_SORTINFO_ALV.
***events
DATA: IT_EVENTS TYPE SLIS_T_EVENT WITH HEADER LINE,
***VARIANTS
IT_VARIANT LIKE DISVARIANT OCCURS 0 WITH HEADER LINE.
FOR LAYOUT
DATA: WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
IT_LAYOUT TYPE SLIS_LAYOUT_ALV OCCURS 0 WITH HEADER LINE.
****SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME.
SELECT-OPTIONS: S_CARRID FOR SFLIGHT-CARRID.
SELECTION-SCREEN: END OF BLOCK B1.
****START-OF-SELECTION.
START-OF-SELECTION.
V_REPID = SY-REPID.
PERFORM GET_DATA.
***END-OF-SELECTION.
END-OF-SELECTION.
PERFORM GET_FIELDCAT.
*PERFORM GET_LAYOUT.
PERFORM BLOCK_ALV.
*& Form GET_DATA
text
--> p1 text
<-- p2 text
FORM GET_DATA .
SELECT A~CARRID
A~CONNID
A~FLDATE
A~PRICE
A~CURRENCY
B~CITYFROM
B~CITYTO
INTO TABLE ITAB
FROM SFLIGHT AS A JOIN SPFLI AS B ON
ACARRID = BCARRID
WHERE A~CARRID IN S_CARRID.
ENDFORM. " GET_DATA
*& Form GET_FIELDCAT
text
--> p1 text
<-- p2 text
FORM GET_FIELDCAT .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = 'ITAB'
I_STRUCTURE_NAME =
I_CLIENT_NEVER_DISPLAY = 'X'
I_INCLNAME = SY-REPID
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE =
CHANGING
CT_FIELDCAT = ITAB_FIELDCAT[]
EXCEPTIONS
INCONSISTENT_INTERFACE = 1
PROGRAM_ERROR = 2
OTHERS = 3.
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. " GET_FIELDCAT
*& Form BLOCK_ALV
text
--> p1 text
<-- p2 text
FORM BLOCK_ALV .
PERFORM BLOCK_INIT.
PERFORM BLOCK_APPEND.
PERFORM BLOCK_DISPLAY.
ENDFORM. " BLOCK_ALV
*& Form BLOCK_INIT
text
--> p1 text
<-- p2 text
FORM BLOCK_INIT .
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = V_REPID.
ENDFORM. " BLOCK_INIT
*& Form BLOCK_APPEND
text
--> p1 text
<-- p2 text
FORM BLOCK_APPEND .
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = WA_LAYOUT
IT_FIELDCAT = ITAB_FIELDCAT[]
I_TABNAME = 'ITAB'
IT_EVENTS = IT_EVENTS[]
IT_SORT =
I_TEXT = ' '
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
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. " BLOCK_APPEND
*& Form GET_LAYOUT
text
--> p1 text
<-- p2 text
FORM GET_LAYOUT .
WA_LAYOUT-DEFAULT_ITEM = 'X'.
WA_LAYOUT-ZEBRA = 'X'.
APPEND WA_LAYOUT TO IT_LAYOUT.
ENDFORM. " GET_LAYOUT
*& Form BLOCK_DISPLAY
text
--> p1 text
<-- p2 text
FORM BLOCK_DISPLAY .
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
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. " BLOCK_DISPLAY
hope this helps,
do reward if it helps,
priya. -
Moderator message: Please do not use ALL CAPITALS in your message subjects
I am facing a peculiar situation with respect to a report with 2 block lists.
STEP 1:
I first use REUSE_ALV_BLOCK_LIST_INIT with EXPORTING parameter as
i_callback_program = SY-REPID.
This works fine with return code of sy-subrc = 0.
STEP 2:
I build the field catalog and internal table - in debug I also check the sequence of fields of both the internal tables and field calatogs - perfect - no issues.
Then I call REUSE_ALV_BLOCK_LIST_APPEND with exporting parameters as layout, field catalog, table name & event and tables parameter as internal table and exception handling, I repeat this call for the two internal tables.
This works fine with return code of sy-subrc = 0
STEP 3:
I use REUSE_ALV_BLOCK_LIST_DISPLAY to display the two lists one after the other, and I have coded for error message if sy-subrc is non zero.
This works fine with return code of sy-subrc = 0
ISSUE :
Internal table 1 and internal table 2 both have say 4 records, then I see the two lists with heading(s) perfec and col width also optimized and zebra (alternate steipes also in place), and 4 rows for each internal table on output, however the rows are BLANK - NO DATA, whereas I have checked both internal tables before the call and they seem to have the data perfectly and in the same sequence as the field catalog - however the rows are BLANK.
I checked in debugging but was just not able to find out why if the internal tables and field catalog is perfect, no data is passed to output.
Please help !!
Edited by: M N on Nov 14, 2008 5:22 AM
Edited by: Matt on Nov 14, 2008 10:23 AM*& Report Y_ALV_BLOCKLIST_
REPORT Y_ALV_BLOCKLIST_16131.
TYPE-POOLS : SLIS.
DATA: X_LAYOUT TYPE SLIS_LAYOUT_ALV.
Events
DATA: GT_XEVENTS TYPE SLIS_T_EVENT.
DATA: GT_YEVENTS TYPE SLIS_T_EVENT.
data : XS_EVENT TYPE SLIS_ALV_EVENT.
DATA: XFIELD TYPE SLIS_T_FIELDCAT_ALV.
DATA: YFIELD TYPE SLIS_T_FIELDCAT_ALV.
DATA: AFIELD TYPE SLIS_FIELDCAT_ALV.
DATA: GT_PRINT TYPE SLIS_PRINT_ALV.
TYPES : BEGIN OF TY_MARA ,
MATNR TYPE MATNR,
MTART TYPE MTART,
END OF TY_MARA.
TYPES: BEGIN OF TY_MAKT ,
MATNR TYPE MATNR,
MAKTX TYPE MAKTX,
END OF TY_MAKT.
DATA : ITAB TYPE TABLE OF TY_MARA,
PTAB TYPE TABLE OF TY_MAKT.
START-OF-SELECTION.
SELECT DATA
SELECT MATNR MAKTX FROM MAKT INTO TABLE PTAB UP TO 10 ROWS.
SELECT MATNR MTART FROM MARA INTO TABLE ITAB UP TO 10 ROWS.
*eVENT FOR Heading
PERFORM F_EVENTS.
FIELD CATALOG
PERFORM F_FIELDCAT.
INIT BLOCK ALV
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = SY-REPID.
ADD INTERNAL TABLE ITAB
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = X_LAYOUT
IT_FIELDCAT = XFIELD "ALVFC
I_TABNAME = 'ITAB'
IT_EVENTS = GT_XEVENTS
TABLES
T_OUTTAB = ITAB
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
ADD INTERNAL TABLE PTAB
REFRESH ALVFC[].
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = X_LAYOUT
IT_FIELDCAT = YFIELD "ALVFC
I_TABNAME = 'PTAB'
IT_EVENTS = GT_YEVENTS
TABLES
T_OUTTAB = PTAB
EXCEPTIONS
PROGRAM_ERROR = 1
MAXIMUM_OF_APPENDS_REACHED = 2
OTHERS = 3.
DISPLAY
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXCEPTIONS
PROGRAM_ERROR = 1
OTHERS = 2.
*GT_PRINT-RESERVE_LINES = 2.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
IS_PRINT = GT_PRINT.
*& Form F_FIELDCAT
text
--> p1 text
<-- p2 text
FORM F_FIELDCAT .
DATA: L_COUNT TYPE I.
CLEAR AFIELD.
L_COUNT = L_COUNT + 1.
AFIELD-COL_POS = L_COUNT.
AFIELD-FIELDNAME = 'MATNR'.
AFIELD-REF_TABNAME = 'MARA'.
AFIELD-KEY = 'X'. "define field as key
AFIELD-DO_SUM = 'X'.
APPEND AFIELD TO XFIELD.
CLEAR AFIELD.
L_COUNT = L_COUNT + 1.
AFIELD-COL_POS = L_COUNT.
AFIELD-FIELDNAME = 'MTART'.
AFIELD-REF_TABNAME = 'MARA'.
AFIELD-KEY = 'X'. "define field as key
APPEND AFIELD TO XFIELD.
L_COUNT = 0.
CLEAR AFIELD.
L_COUNT = L_COUNT + 1.
AFIELD-COL_POS = L_COUNT.
AFIELD-FIELDNAME = 'MATNR'.
AFIELD-REF_TABNAME = 'MAKT'.
AFIELD-KEY = 'X'. "define field as key
APPEND AFIELD TO YFIELD.
CLEAR AFIELD.
L_COUNT = L_COUNT + 1.
AFIELD-COL_POS = L_COUNT.
AFIELD-FIELDNAME = 'MAKTX'.
AFIELD-REF_TABNAME = 'MAKT'.
AFIELD-KEY = 'X'. "define field as key
APPEND AFIELD TO YFIELD.
ENDFORM. " F_FIELDCAT
*& Form F_EVENTS
text
--> p1 text
<-- p2 text
FORM F_EVENTS .
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'TOP1'.
APPEND XS_EVENT TO GT_XEVENTS.
CLEAR XS_EVENT.
XS_EVENT-NAME = SLIS_EV_TOP_OF_PAGE.
XS_EVENT-FORM = 'TOP2'.
APPEND XS_EVENT TO GT_YEVENTS.
ENDFORM. " F_EVENTS
FORM TOP1.
WRITE : 'MARA TABLE'.
ENDFORM.
FORM TOP2.
WRITE : 'MAKT TABLE'.
ENDFORM. -
Block list display when report is executed in background?
Hello all,
when i execute the report program in foreground ,output is displayed as block list with two blocks say success table and failure table.
when i execute the same report program in background, i could see only a single block which is success table. Why is this?
Thanks,
Sindhu.Did you check all the pages in spool? If the report has a output which runs multiple pages, then spool might not display everything unless you change the setting to display more than certain pages. Kindly check the same.
-
Hi Friends,
How can I add blocks dynamically depending on different vendor. please can you tell any1 how to add blocks dynamically to the list in block list.and I dont know how many blocks can be there....as it depends on vendors they give in selection screen.......................
Depending on the vendor I have to create different block.
Please revert back......
requirement is to display the debitnote report. if more vendors are given in selection screen then i have to display the blocks different for different vendors..................
Thanks in Advance...................please revert its urgent............You should do this way
DATA: SORT TYPE SLIS_SORTINFO_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV.
SORT-FIELDNAME = 'VBELN'.
SORT-SPOS = '1'.
SORT-GROUP = '*'.
SORT-UP = 'X'.
APPEND SORT TO IT_SORT.
if you do this way it will dynamically do block display based on the field you sepecify.
Still if you face problem you check this sample code
REPORT ZALV_LIST_SUBTOTAL .
type-pools: slis.
data: f_fldcat type slis_fieldcat_alv,
t_fldcat type slis_t_fieldcat_alv,
l_layout type slis_layout_alv,
f_event type slis_alv_event,
t_event type slis_t_event.
data: begin of itab occurs 0,
vbeln like vbap-vbeln,
posnr like vbap-posnr,
zmeng like vbap-zmeng,
text(35),
end of itab.
select vbeln posnr zmeng from vbap
into table itab up to 20 rows.
loop at itab.
itab-zmeng = sy-tabix.
modify itab index sy-TABIX.
endloop.
f_fldcat-fieldname = 'text'.
f_fldcat-col_pos = 1.
f_fldcat-outputlen = 15.
*f_fldcat-checkbox = 'X'.
*f_fldcat-edit = ''.
append f_fldcat to t_fldcat.
clear f_fldcat.
f_fldcat-fieldname = 'VBELN'.
f_fldcat-taBname = 'itab'.
f_fldcat-seltext_l = 'VBELN'.
f_fldcat-col_pos = 2.
f_fldcat-outputlen = 30.
f_fldcat-just = 'C'.
f_fldcat-edit = 'X'.
append f_fldcat to t_fldcat.
clear f_fldcat.
f_fldcat-fieldname = 'POSNR'.
f_fldcat-tabname = 'itab'.
f_fldcat-seltext_l = 'POSNR'.
f_fldcat-col_pos = 3.
f_fldcat-edit = 'X'.
append f_fldcat to t_fldcat.
clear f_fldcat.
f_fldcat-fieldname = 'ZMENG'.
f_fldcat-tabname = 'itab'.
f_fldcat-seltext_l = 'ZMENG'.
f_fldcat-col_pos = 4.
f_fldcat-edit = 'X'.
f_fldcat-do_sum = 'X'.
append f_fldcat to t_fldcat.
clear f_fldcat.
DATA: SORT TYPE SLIS_SORTINFO_ALV,
IT_SORT TYPE SLIS_T_SORTINFO_ALV.
SORT-FIELDNAME = 'VBELN'.
SORT-SPOS = '1'.
SORT-GROUP = '*'.
SORT-UP = 'X'.
SORT-SUBTOT = 'X'.
*SORT-OBLIGATORY = 'UL'.
APPEND SORT TO IT_SORT.
l_layout-TOTALS_TEXT = 'total text'.
l_layout-SUBTOTALS_TEXT = 'subtotal text'.
*l_layout-totals_only = 'X'.
data: prg type sy-repid.
prg = sy-repid.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER =
* I_BUFFER_ACTIVE = ' '
I_CALLBACK_PROGRAM = SY-REPID
* I_CALLBACK_PF_STATUS_SET = ' '
* I_CALLBACK_USER_COMMAND = ' '
* I_STRUCTURE_NAME =
IS_LAYOUT = L_LAYOUT
IT_FIELDCAT = T_FLDCAT
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
IT_SORT = IT_SORT[]
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
IT_EVENTS = T_EVENT
* 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
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
T_OUTTAB = ITAB
* 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. -
Hi all,
can i know in which type of scenarios BLOCK LISTS IN ALV are used.raju,
2. BLOCK REPORT
This is used to have multiple lists continuously.
The important functions used in this report are:
A. REUSE_ALV_BLOCK_LIST_INIT
B. REUSE_ALV_BLOCK_LIST_APPEND
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
D. REUSE_ALV_BLOCK_LIST_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
Parameters:
I. I_CALLBACK_PROGRAM
II. I_CALLBACK_PF_STATUS_SET
III. I_CALLBACK_USER_COMMAND
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
Parameters :
Export :
I. is_layout : layout settings for block
II. it_fieldcat : field catalog
III. i_tabname : internal table name with output data
IV. it_events : internal table with all possible events
Tables :
i. t_outtab : internal table with output data.
This function module adds the data to the block.
Repeat this function for all the different blocks to be displayed one after the other.
C. REUSE_ALV_BLOCK_LIST_HS_APPEND
This function module is used for hierarchical sequential blocks.
D. REUSE_ALV_BLOCK_LIST_DISPLAY
Parameters : All the parameters are optional.
This function module display the list with data appended by the above function.
Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.
Pls. Mark if useful -
hi all,
in my object i have displayed the output using alv block list ... when i print that one i am geting each block in seperate page ... but i need to print all in a single page ... please help me out in solving this
thanks in advance
lokeshHi Lokesh,
Refer the sample code:
CLEAR w_event.
w_event-name = slis_ev_top_of_page.
w_event-form = 'TOP_OF_PAGE'.
APPEND w_event TO i_events1.
CLEAR w_event.
w_event-name = slis_ev_top_of_page.
w_event-form = 'XTOP_OF_PAGE'.
APPEND w_event TO i_events2.
DATA: lv_repid LIKE sy-repid.
lv_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = lv_repid
i_callback_user_command = 'USER_COMMAND'
i_callback_pf_status_set = 'PF_STATUS'.
*-- Vendor Schedule List
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
it_fieldcat = i_field_cat1
is_layout = w_lay_out1
i_tabname = '<I_TABLE>'
it_events = i_events1
TABLES
t_outtab = <i_table>.
*-- Error Lsit display
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
it_fieldcat = i_field_cat2
is_layout = w_lay_out2
i_tabname = 'I_ERROR'
it_events = i_events2
TABLES
t_outtab = i_error[].
w_print-reserve_lines = 2.
w_print-no_print_listinfos = c_x.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
is_print = w_print.
ENDFORM. " f0504_create_list
Reward points if this Helps.
Manish -
Manual Fieldcatalog and ALV list display.
Hi,
Could anyone help me to know the step by step procedure to create a fieldcatalog manually and then using it for ALV list display?
Thanks,
Sandeep.Hi Sandeep,
Refer this code :
FORM build_fieldcatlog USING p_it_fieldcat TYPE slis_t_fieldcat_alv.
DATA: itab_fieldcat TYPE slis_fieldcat_alv.
FOR LIGHTS
CLEAR itab_fieldcat.
itab_fieldcat-col_pos = '1'. " POSITION OF THE COLUMN.
itab_fieldcat-fieldname = 'V_LIGHTS'. " FIELD FOR WHICH CATALOG ID FILLED.
itab_fieldcat-tabname = 'It_matstock'. " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
itab_fieldcat-emphasize = 'C410'. " COLOR OF THIS COLUMN.
itab_fieldcat-seltext_l = 'Category'. " LONG TEXT FOR HEADER.
itab_fieldcat-seltext_m = 'Category'. " MEDIUM TEXT FOR HEADER.
itab_fieldcat-seltext_s = 'Category'. " SHORT TEXT FOR HEADER.
itab_fieldcat-outputlen = 7. " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
APPEND itab_fieldcat TO p_it_fieldcat.
FOR CHECK BOX
CLEAR itab_fieldcat.
itab_fieldcat-col_pos = '2'. " POSITION OF THE COLUMN.
itab_fieldcat-fieldname = 'V_CHKBOX'. " FIELD FOR WHICH CATALOG ID FILLED.
itab_fieldcat-tabname = 'It_matstock'. " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
itab_fieldcat-emphasize = 'C410'. " COLOR OF THIS COLUMN.
itab_fieldcat-seltext_l = 'CHECKBOX'. " LONG TEXT FOR HEADER.
itab_fieldcat-seltext_m = 'CHKBOX'. " MEDIUM TEXT FOR HEADER.
itab_fieldcat-seltext_s = 'CHKBOX'. " SHORT TEXT FOR HEADER.
itab_fieldcat-checkbox = 'X'. " CHECK BOX
itab_fieldcat-edit = 'X'.
itab_fieldcat-outputlen = 2. " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
APPEND itab_fieldcat TO p_it_fieldcat.
*FOR MATERIAL NO (IT_MATSTOCK-MATNR)
CLEAR itab_fieldcat.
itab_fieldcat-col_pos = '3'. " POSITION OF THE COLUMN.
itab_fieldcat-fieldname = 'MATNR'. " FIELD FOR WHICH CATALOG ID FILLED.
itab_fieldcat-tabname = 'IT_MATSTOCK'. " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
itab_fieldcat-emphasize = 'C410'. " COLOR OF THIS COLUMN.
itab_fieldcat-seltext_l = 'MATERIAL NO'. " LONG TEXT FOR HEADER.
itab_fieldcat-seltext_m = 'MATNO'. " MEDIUM TEXT FOR HEADER.
itab_fieldcat-seltext_s = 'MATNO'. " SHORT TEXT FOR HEADER.
itab_fieldcat-hotspot = 'X'. " HOT SPOT
itab_fieldcat-outputlen = 20. " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
APPEND itab_fieldcat TO p_it_fieldcat.
FOR PLANT (IT_MATSTOCK-WERKS)
CLEAR itab_fieldcat.
itab_fieldcat-col_pos = '4'. " POSITION OF THE COLUMN.
itab_fieldcat-fieldname = 'WERKS'. " FIELD FOR WHICH CATALOG ID FILLED.
itab_fieldcat-tabname = 'IT_MATSTOCK'. " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
itab_fieldcat-emphasize = 'C510'. " COLOR OF THIS COLUMN.
itab_fieldcat-seltext_l = 'PLANT'.
itab_fieldcat-seltext_m = 'PLANT'.
itab_fieldcat-seltext_s = 'PLANT'.
itab_fieldcat-outputlen = 10. " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
APPEND itab_fieldcat TO p_it_fieldcat.
FOR STORAGE LOCATION (IT_MATSTOCK-LGORT)
CLEAR itab_fieldcat.
itab_fieldcat-col_pos = '5'. " POSITION OF THE COLUMN.
itab_fieldcat-fieldname = 'LGORT'. " FIELD FOR WHICH CATALOG ID FILLED.
itab_fieldcat-tabname = 'IT_MATSTOCK'. " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
itab_fieldcat-emphasize = 'C610'. " COLOR OF THIS COLUMN.
itab_fieldcat-seltext_l = 'STORAGE LOCATION'.
itab_fieldcat-seltext_m = 'STORAGE LOC'.
itab_fieldcat-seltext_s = 'SLOC'.
itab_fieldcat-outputlen = 10. " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
APPEND itab_fieldcat TO p_it_fieldcat.
FOR QUANTITY (IT_MATSTOCK-LABST)
CLEAR itab_fieldcat.
itab_fieldcat-col_pos = '6'. " POSITION OF THE COLUMN.
itab_fieldcat-fieldname = 'LABST'. " FIELD FOR WHICH CATALOG ID FILLED.
itab_fieldcat-tabname = 'IT_MATSTOCK'. " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
itab_fieldcat-emphasize = 'C710'. " COLOR OF THIS COLUMN.
itab_fieldcat-seltext_l = 'QUANTITY'.
itab_fieldcat-seltext_m = 'QUANTITY'.
itab_fieldcat-seltext_s = 'QUAN'.
itab_fieldcat-outputlen = 10. " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
APPEND itab_fieldcat TO p_it_fieldcat.
FOR UNIT OF MEASUREMENT (IT_MATSTOCK-MEINS)
CLEAR itab_fieldcat.
itab_fieldcat-col_pos = '7'. " POSITION OF THE COLUMN.
itab_fieldcat-fieldname = 'MEINS'. " FIELD FOR WHICH CATALOG ID FILLED.
itab_fieldcat-tabname = 'IT_MATSTOCK'. " INTERNAL TABLE TO WHICH THE FIELD BELONGS TO.
itab_fieldcat-emphasize = 'C110'. " COLOR OF THIS COLUMN.
itab_fieldcat-seltext_l = 'UNIT OF MEASURE'.
itab_fieldcat-seltext_m = 'UNIT OF MSURE'.
itab_fieldcat-seltext_s = 'UOM'.
itab_fieldcat-outputlen = 10. " TO DEFINE OUTPUT LENGTH OF THE COLUMN.
APPEND itab_fieldcat TO p_it_fieldcat.
FORM alv_display_grid .
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER = ' '
I_BUFFER_ACTIVE = ' '
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
I_CALLBACK_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_TOP_OF_PAGE = ' '
I_CALLBACK_HTML_END_OF_LIST = ' '
i_structure_name = 'D_STRUCTURE'
I_BACKGROUND_ID = ' '
i_grid_title =
I_GRID_SETTINGS =
is_layout =
it_fieldcat = it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort =
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
is_variant =
IT_EVENTS = I_EVENTCAT
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_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
I_HTML_HEIGHT_TOP =
I_HTML_HEIGHT_END =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_matstock
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. " ALV_DISPLAY_GRID
Reward points if helpful.
Regards,
Hemant -
Certain Lists Display and All Lists Display in Webcenter Space
Hi All Experts,
I am trying to find a way to display certain lists from Lists Service as well as all lists from Lists Service. The reason being is we are going to have a lot of projects to be tracked by using Lists Service in Webcenter space, then we want to display different set of lists (projects items) in separate tables for different initiatives and then ultimately one table to display all lists (all projects items) for all initiatives.
If there is a tag function for each list, then we can group all the related lists by using tags. However, I don't think we are able to tag a list so this is not possible. Now, I am not sure how can I display group lists accordingly. Also, I am not sure how can I display all lists in one table easily (ie. List Name, Assigned to Person, Open/Closed).
I tried to think of a scalable way to handle a lot of projects by using Lists Service. However, if you have any other solution, please feel free to recommend me.
Thanks and best regards,
user12626393Hi,
Lists are not designed to be used with API(s), because it's a WebCenter Spaces only feature, but you can ofcourse put them under each other by surrounding them all with a movable box, but if you want something more customizable, and more business oriented, I'd suggest building your own custom lists using taskflows -
Difference bet alvgrid display and normal list display
can any body tell difference bt reuse_alv_grid display and reusealv_list_display. i
Hi,
For all practical purposes, they are the same.
2. Some differences:
a) from abap coding point of view,
alv list is done with Function modules,
alv gris can also be done with FM,
but can also be done using OO concepts.
b) Alv grid (using oo concept) requires
designing the screen layout .
Hence, in one screen, we can show more
then one alv grid
(we cannot show more than
one alv list on one screen)
c) ALV grid uses ActiveX controls
present on the Presentation Server.
Hence, it consumes More Memory
on the presentation server.
d) ALV LIST is Display Only.
Whereas
ALV Grid Can Be made EDITABLE for entry purpose.
e) In alv grid, these options are possible,
but not in alv list.
without horizontal lines
without vertical lines
without cell merging during sorts
display total lines above the entries
ALV LIST Can be coded using only FMs
ALV GRID Can be coded using FMs and object oriented concepts
ALV LIST Can be displayed hieraicharlly
ALV GRID cannot be displayed hierarichally
Regards,
Sreevani -
0Orgunit(hierarchy) and authorization object display getcell error in Webi
Hello,
We are facing with GetCellData error in WebI to SAP BEx Query.
This works perfectly fine in Bex for a particular test user who has access to particular org unit value.
But in Webi we are getting this Getcelldata error.
Tried all the options and message as recommended in sdn group.
mdxtest returns no value.
looked at all below messages but no luck.
GetCellData error in WebI to SAP BEx Query
Re: SAP BO WebI Report on top of BI Bex Query with Authorization Variable
in the rsecadmin, we get the same error like mentioned in below message
Hierarchy Authorization doesn't work for MDX but works for BEx Query.
Is any authorization required for this user to execute and view the authorized values in Webi?
or we have to assign any authorization ?(0BI_ALL is not assigned).
Please find below screenshots of BEx query auth log or Webi auth log (differences)
Bex auth log:
The Following Attributes Are Authorized and Thus Are Visible
0BBPPURGRPX
0BBPPURORGX
0BBP_BUYID
0BBP_ISCOMP
0BUS_AREA
0COMP_CODE
0CO_MST_AR
0CRMSALGRPX
0CRMSALOFFX
0CRMSALORGX
0CRMSRVTGRP
0CRM_SALGRP
0CRM_SALOFF
0CRM_SALORG
0CRM_SRVORG
0LEAVERS
0LOGSYS
0MAST_CCTR
0PERS_AREA
0PERS_SAREA
0PLANT
0PURCH_ORG
0PUR_GROUP
0SALESORG
0SALES_GRP
0SALES_OFF
This above log is missing for mdxtest auth log.
Is this the issue?
Any quick reponse or help really appreciated.
Regards,
Ravi
Edited by: Ravi Gadicherla on Feb 28, 2010 5:36 PMHi,
Here is the log of MDXtest:
Buffering the Authorization Data
Buffering for InfoProvider 0PA_C01 and Users HRTEST93
InfoObject Properties Defined
Reading of Directly Assigned Authorizations
Direct Assignment Does Not Include Universal Authorization 0BI_ALL
Reading the Indirect Assignments with Authorization Object S_RS_AUTH
Does user have OBI_ALL?
No, the User Does Not Have Universal Authorizion 0BI_ALL
Negative Entry in SU53 Result of Failed Check for 0BI_ALL
Indirect assignments found; no universal authorization
Regards,
Ravikanth -
Imovie update and event list display
I just updated imovie and I don't like the way that it looks. Big problem with reading the event name. I have a 13" mac book pro and a genius bar consultant confirmed that I will not be able to make the left hand column any bigger. The little side-to-side arrows show up when I place the cursor on the edge of the column but I can not widen the column. This is possible on the 15" mac pro. It is very frustrating. I have to click on every event to find the one that I want!
BUMP
Posted this a while ago, no replies. Still wondering if anyone else is having this problem with the event editor display. -
AT Line selection event in ALV blocked list display
Hi Exparts,
I am using
REUSE_ALV_BLOCK_LIST_INIT,REUSE_ALV_BLOCK_LIST_APPEND,
REUSE_ALV_BLOCK_LIST_DISPLAY.
My question, In a field if user double click then a specific Transaction will execute.
please help me with relevant document.dear
this is very simple when u will call alv_grid_display FM :
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
* I_INTERFACE_CHECK = ' '
* I_BYPASSING_BUFFER = ' '
* I_BUFFER_ACTIVE = ' '
i_callback_program = sy-cprog
* I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = *'USER_COMMAND'*
* I_CALLBACK_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_GRID_SETTINGS =
* IS_LAYOUT = LS_LAYOUT
it_fieldcat = ls_fieldcat[]
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
i_default = 'X'
i_save = 'A'
* IS_VARIANT =
it_events = g_events[]
* 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_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* I_HTML_HEIGHT_TOP =
* I_HTML_HEIGHT_END =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = t_output
* 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.
PERFORM user_command USING r_ucomm
rs_selfield.
*FORM user_command USING p_r_ucomm*
*p_rs_selfield.*
*CASE p_r_ucomm.*
*WHEN '&IC1'.*
*READ TABLE t_output WITH KEY check = 'X'.*
*IF t_output-check IS INITIAL.*
*MESSAGE 'Plz select the checkbox' TYPE 'E'.*
*ENDIF.*
*READ LINE sy-index FIELD VALUE t_output-vbeln.*
*CHECK NOT t_output-vbeln IS INITIAL.*
*SET PARAMETER ID 'AUN' FIELD t_output-vbeln.*
*CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.*
*ENDCASE.*
*ENDFORM. -
Header and Footer in Block ALV Display
Hi All,
My requirement includes to ALV Block List Display with header and footer.
I have made two forms TOP_OF_PAGE and END_OF_PAGE . I have pass the form and name of event to an internal table it_events.
This it_events[] is then passed to FM ' REUSE_ALV_BLOCK_LIST_APPEND' . But only Top of Page is working.
Am I missing any thing in the code? or I have to use something else.
Pls Help
Regards,
NibhaHi,
For end_of_page you need to use Events as follows:
*TO CAPTURE EVENTS AND HANDLE
DATA : it_event TYPE slis_t_event,
wa_event TYPE slis_alv_event.
*& Form BUILD_EVENTCAT
FORM build_eventcat .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
i_list_type = 0
IMPORTING
et_events = it_event
EXCEPTIONS
list_type_wrong = 1
OTHERS = 2.
READ TABLE it_event INTO wa_event WITH KEY name = 'END_OF_LIST'.
wa_event-form = 'END_OF_PAGE'. " Sub-routine that will be used to write
MODIFY it_event FROM wa_event INDEX sy-tabix. " Modify it_event
CLEAR wa_event.
ENDFORM. " F_BUILD_EVENTCAT
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = sy-repid
i_callback_top_of_page = 'TOP_OF_PAGE'
is_layout = g_t_alv_layout2
it_fieldcat = g_t_fieldcat2[]
it_events = it_event[]
TABLES
t_outtab = <fs_final_itab>.
Regards,
Mansi.
Maybe you are looking for
-
Camera Raw 8.7.1 color issues
After the recent camera raw update to 8.7.1 I have noticed some pretty bad color shifts between camera raw and photoshop cs6. The colors in camera raw look very saturated and then when moving into photoshop the saturation shift is pretty dramatic. I
-
Hi, We have terminated payment run(due to closed period). No documents were cleared or posted. We want to cancel the run so that we can select the items from the vendor with different parameters(posting dates) System currently does not allow to run t
-
No matter what parameters I save for printing it always reverts back to '4X6 borderless'. Really weird. I have to change it every time I want to print emails. What file can I throw away to change this? I've tried everything. I'm working in 10.5.2 Tha
-
DMS Solution with ECDS Systems
Hi , I wonder whether anyone deployed the DMS Solution ( TCS, MXE,TCS,DMM, Nexus on demad) with Cisco ECDS systems(MDE 3125/1125). I am working on a project where i need to deploy all these deviecs. I like to undestand the work flow between
-
Invoking Shell Script From QTP
Hi, Appreciate, if somebody tells me about how to invoke a Shell script from QTP tool..? I would also like to know any specific Approaches, Documents and related informations about this topic.. Thanks in Advance..!