2007 Dec 17 7:22 AM
Hello sir,
I have an internal table and i want to use ALV on that internal table and i want the o/p display of ALV on my self defined subscreen. how can i do that?
plz tell me the right procedure and simple code.
Plz mind it i don't have a database table to select into the internal table.
i have only internal table.
Hello sir,
I have an internal table and i want to use ALV on that internal table and i want the o/p display of ALV on my self defined subscreen. how can i do that?
plz tell me the right procedure and simple code.
Plz mind it i don't have a database table to select into the internal table.
i have only internal table.
2007 Dec 17 7:38 AM
hi vishal thakur,
use reuse_alv_fieldcatlog_merge function module to get the field catalog internal table then use reuse_alv_popup_list_display func. mod. to put in your sub screen.
2007 Dec 17 7:41 AM
Hi,
wa_itab-name = 'abc'.
append wa_itab to it_itab.
(inthis way u can fill ur internal table)
(after filling the internal table.)
call screen 100.
&----
*
& Module STATUS_0100 OUTPUT
&----
*
text
-
*
MODULE STATUS_0100 OUTPUT.
data:
fs_struct type zcl_empdata,
fs_cat type LVC_s_FCAT,
it_fcat type LVC_T_FCAT.
data: g_alv type ref to CL_GUI_CUSTOM_CONTAINER,
G_GRID TYPE REF to CL_GUI_ALV_GRID.
CREATE OBJECT G_ALV
EXPORTING
CONTAINER_NAME = 'DISPLAY'.
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 put_data_fieldcat using 'IT_DATA' 'WORK_DATE' 1 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'PROJECTID' 2 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'PROJECTNAME' 3 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'OBJECTID' 4 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'OBJECT_DESC' 5 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'ACTIVITYID' 6 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'ACTIVITY_DESC' 7 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'TIME_WORKED' 8 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'DESCRIPTION' 9 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'STATUS' 10 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'BILL_STATUS' 11 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'APPROVED_STATUS' 12 'projectid'.
perform put_data_fieldcat using 'IT_DATA' 'WORKINGSTATUS' 13 'projectid'.
CREATE OBJECT G_GRID
EXPORTING
I_PARENT = G_ALV.
CALL METHOD G_grid->SET_TABLE_FOR_FIRST_DISPLAY
CHANGING
IT_OUTTAB = it_data
IT_FIELDCATALOG = it_fcat
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
.
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 put_data
*&----
text
*----
-->P_0187 text
-->P_0188 text
*----
FORM put_data_fieldcat USING p_tabname type lvc_s_fcat-tabname
p_fieldname type LVC_s_FCAT-fieldname
p_col_pos type LVC_s_FCAT-col_pos
p_coltext type LVC_s_FCAT-coltext.
fs_cat-tabname = p_tabname.
fs_cat-FIELDNAME = p_fieldname.
FS_CAT-ROW_POS = 1.
FS_CAT-COL_POS = p_col_pos.
FS_CAT-colTEXT = p_coltext.
append fs_cat to it_fcat.
ENDFORM. " put_data_fieldcat
reward points if it helps.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |