11-06-2007 5:13 AM
Hi exports,
can any one explain abt
REUSE_ALV_BLOCK_LIST_INIT
REUSE_ALV_BLOCK_LIST_APPEND
REUSE_ALV_BLOSK_LIST_DISPLAY
thanks in advance
points wl be rewarded
11-06-2007 5:19 AM
REPORT ZSR_ALV_BLOCKED.
TABLES: KNA1,LFA1.
SELECT-OPTIONS : CUST FOR KNA1-KUNNR,
VENDOR FOR LFA1-LIFNR.
DATA : BEGIN OF ITAB OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
LAND1 LIKE LFA1-LAND1,
NAME1 LIKE LFA1-NAME1,
END OF ITAB.
DATA : BEGIN OF JTAB OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
LAND1 LIKE KNA1-LAND1,
NAME1 LIKE KNA1-NAME1,
END OF JTAB.
TYPE-POOLS : SLIS.
DATA : KNA1_B TYPE SLIS_T_FIELDCAT_ALV,
LAYOUT TYPE SLIS_LAYOUT_ALV,
EVENTS_B TYPE SLIS_T_EVENT.
DATA : REPID LIKE SY-REPID.
REPID = SY-REPID.
SELECT KUNNR
LAND1
NAME1
FROM KNA1
INTO TABLE ITAB
WHERE KUNNR IN CUST.
SELECT LIFNR
LAND1
NAME1 FROM LFA1
INTO
TABLE JTAB
WHERE LIFNR IN VENDOR.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = REPID.
PERFORM APPENDBLOCK TABLES ITAB USING 'ITAB'.
PERFORM APPENDBLOCK TABLES JTAB USING 'JTAB'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
FORM APPENDBLOCK TABLES JTAB USING ITAB.
REFRESH KNA1_B.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = ITAB
I_INCLNAME = REPID
CHANGING
CT_FIELDCAT = KNA1_B.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = KNA1_B
I_TABNAME = ITAB
IT_EVENTS = EVENTS_B
TABLES
T_OUTTAB = JTAB.
ENDFORM.
used this functions
REUSE_ALV_BLOCK_LIST_INIT'
inside loop and enloop itab header.
REUSE_ALV_BLOCK_LIST_APPEND'
and then
REUSE_ALV_BLOCK_LIST_DISPLAY'
the report function right with one material, but no with much materials.
I can' t use the function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY because the reporte have many columns.
Please give me reward points if it is useful...
11-06-2007 5:20 AM
Refer : CS12,CS13,CS11 Transactions to get simliar output
Take the program BALVBT01 as a reference
Please give me reward points if it is useful...
11-06-2007 5:20 AM
These FMs used for the BLOCKs list.
BLOCK list is if you want differnet ALVs with different Fieldcatalog in the same screen than you can use these FMs.
REUSE_ALV_BLOCK_LIST_INIT - To start the Blockked list
REUSE_ALV_BLOCK_LIST_APPEND - To append the lists into the screen, you may have to use this FM more than once as per your requirment of ALV
REUSE_ALV_BLOSK_LIST_DISPLAY - TO dispaly all appended blocks ...
Regards,
Naimesh Patel
11-06-2007 5:21 AM
Hi,
<b>REUSE_ALV_BLOCK_LIST_INIT</b>
This is for initializing the block list output. But if you check the function module documentation, you will see that the function module has not actually been "released" yet. So SAP recommends that you do not use it.
<b>REUSE_ALV_BLOCK_LIST_APPEND</b>
If you want to create the blocked alv then first you have to initialise the block then you can append one by one
<b>REUSE_ALV_BLOSK_LIST_DISPLAY</b>
you have to call the funciton module for dipslay
Regards,
Priyanka.
11-06-2007 5:23 AM
Hi,
Check the sample program BALVBT01 which uses the function modules
REUSE_ALV_BLOCK_LIST_APPEND
REUSE_ALV_BLOCK_LIST_DISPLAY
Have a look at the following sample reports:
ZUS_SDN_TWO_ALV_GRIDS
ZUS_SDN_THREE_ALV_GRIDS
And if you need more than two or three ALV grids then have a look at my sample report ZUS_SDN_SPLITTER_CONTAINER in thread
Max no of ALV grid's in single screen?
Regards
11-06-2007 5:24 AM
REPORT ZDEMO_733991.
TABLES: KNA1,LFA1.
SELECT-OPTIONS : CUST FOR KNA1-KUNNR,
VENDOR FOR LFA1-LIFNR.
DATA : BEGIN OF ITAB OCCURS 0,
LIFNR LIKE LFA1-LIFNR,
LAND1 LIKE LFA1-LAND1,
NAME1 LIKE LFA1-NAME1,
END OF ITAB.
DATA : BEGIN OF JTAB OCCURS 0,
KUNNR LIKE KNA1-KUNNR,
LAND1 LIKE KNA1-LAND1,
NAME1 LIKE KNA1-NAME1,
END OF JTAB.
TYPE-POOLS : SLIS.
DATA : KNA1_B TYPE SLIS_T_FIELDCAT_ALV,
LAYOUT TYPE SLIS_LAYOUT_ALV,
EVENTS_B TYPE SLIS_T_EVENT.
DATA : REPID LIKE SY-REPID.
REPID = SY-REPID.
SELECT KUNNR
LAND1
NAME1
FROM KNA1
INTO TABLE ITAB
WHERE KUNNR IN CUST.
SELECT LIFNR
LAND1
NAME1 FROM LFA1
INTO
TABLE JTAB
WHERE LIFNR IN VENDOR.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
I_CALLBACK_PROGRAM = REPID.
PERFORM APPENDBLOCK TABLES ITAB USING 'ITAB'.
PERFORM APPENDBLOCK TABLES JTAB USING 'JTAB'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
FORM APPENDBLOCK TABLES JTAB USING ITAB.
REFRESH KNA1_B.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
I_PROGRAM_NAME = SY-REPID
I_INTERNAL_TABNAME = ITAB
I_INCLNAME = REPID
CHANGING
CT_FIELDCAT = KNA1_B.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
IS_LAYOUT = LAYOUT
IT_FIELDCAT = KNA1_B
I_TABNAME = ITAB
IT_EVENTS = EVENTS_B
TABLES
T_OUTTAB = JTAB.
ENDFORM.
Reward if helpful.
11-06-2007 5:26 AM
This looks like a simple report but this report has the features of sorting and filtering only.
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_DISPLAY
A. REUSE_ALV_BLOCK_LIST_INIT
This function module is used to set the default gui status etc.
B. REUSE_ALV_BLOCK_LIST_APPEND
This function module adds the data to the block.
C. REUSE_ALV_BLOCK_LIST_DISPLAY
This function module display the list with data appended by the above function.