‎2007 Apr 11 10:15 AM
Hi
I want to know how can i build group of alv in one screen.
The fields in the alv's will be different.
For example:
In alv 1 i will have fields material , description.
In alv 2 i will have fields company code , plant.
In alv 3 i will have fields material , kind , unit.
i want the all the alv will be in one screen.
Thanks
have a nice day
‎2007 Apr 11 10:19 AM
‎2007 Apr 11 10:19 AM
‎2007 Apr 11 10:19 AM
‎2007 Apr 11 10:22 AM
Hi,
Solution is a Blocked ALV List
for example refer to
REPORT zvnm_blocked_alv.
TYPE-POOLS: slis.
DATA: BEGIN OF it_ekko OCCURS 0,
ebeln TYPE ebeln,
bukrs TYPE bukrs,
END OF it_ekko,
BEGIN OF it_ekpo OCCURS 0,
ebeln TYPE ebeln,
ebelp TYPE ebelp,
END OF it_ekpo,
it_fieldcat1 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
it_fieldcat2 TYPE slis_t_fieldcat_alv WITH HEADER LINE,
it_events1 TYPE slis_t_event WITH HEADER LINE,
it_events2 TYPE slis_t_event WITH HEADER LINE,
st_layout TYPE slis_layout_alv,
v_ebeln TYPE ebeln.
SELECT-OPTIONS: s_ebeln FOR v_ebeln.
START-OF-SELECTION.
SELECT ebeln
bukrs
FROM ekko
INTO TABLE it_ekko
WHERE ebeln IN s_ebeln.
SELECT ebeln
ebelp
FROM ekpo
INTO TABLE it_ekpo
WHERE ebeln IN s_ebeln.
it_fieldcat1-fieldname = 'EBELN'.
it_fieldcat1-tabname = 'IT_EKKO'.
it_fieldcat1-seltext_l = 'PO Number'.
APPEND it_fieldcat1.
CLEAR it_fieldcat1.
it_fieldcat1-fieldname = 'BUKRS'.
it_fieldcat1-tabname = 'IT_EKKO'.
it_fieldcat1-seltext_l = 'Company Code'.
APPEND it_fieldcat1.
CLEAR it_fieldcat1.
Item
it_fieldcat2-fieldname = 'EBELN'.
it_fieldcat2-tabname = 'IT_EKPO'.
it_fieldcat2-seltext_l = 'PO Number'.
APPEND it_fieldcat2.
CLEAR it_fieldcat2.
it_fieldcat2-fieldname = 'EBELP'.
it_fieldcat2-tabname = 'IT_EKPO'.
it_fieldcat2-seltext_l = 'PO Item Number'.
APPEND it_fieldcat2.
CLEAR it_fieldcat2.
it_events1-name = 'TOP_OF_PAGE'.
it_events1-form = 'F_TOP_OF_PAGE_ONE'.
APPEND it_events1.
CLEAR it_events1.
it_events2-name = 'TOP_OF_PAGE'.
it_events2-form = 'F_TOP_OF_PAGE_TWO'.
APPEND it_events2.
CLEAR it_events2.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
EXPORTING
i_callback_program = sy-repid
I_CALLBACK_PF_STATUS_SET = ' '
I_CALLBACK_USER_COMMAND = ' '
IT_EXCLUDING = IT_EXCLUDING
.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = st_layout
it_fieldcat = it_fieldcat1[]
i_tabname = 'IT_EKKO'
it_events = it_events1[]
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
t_outtab = it_ekko[]
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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
EXPORTING
is_layout = st_layout
it_fieldcat = it_fieldcat2[]
i_tabname = 'IT_EKPO'
it_events = it_events2[]
IT_SORT = IT_SORT
I_TEXT = ' '
TABLES
t_outtab = it_ekpo[]
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.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
IS_PRINT = IS_PRINT
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 = E_EXIT_CAUSED_BY_CALLER
ES_EXIT_CAUSED_BY_USER = ES_EXIT_CAUSED_BY_USER
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.
&----
*& Form top_of_page_one
&----
text
----
FORM f_top_of_page_one.
WRITE: / 'Header details'.
ENDFORM. "top_of_page_one
&----
*& Form top_of_page_one
&----
text
----
FORM f_top_of_page_two.
WRITE: / 'Item details'.
ENDFORM. "top_of_page_one
santhosh
‎2007 Apr 11 10:23 AM
‎2007 Apr 11 10:26 AM
‎2007 Apr 11 10:26 AM
Hello,
Use alv block.
funtions involved are.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'.
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
Call this function three times passing three different tables as per your requirement..
CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'