Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

concatenated values not displaying in ALV output

manish_malakar0316
Active Participant
0 Kudos
350

Hi all,

I am facing an issue while trying to display some values which are concatenated from other tables. The strange thing is that in the debugger mode, the values are coming correctly but while displaying them in ALV, they are coming in numeric format . This is happening only for the last 2 columns.

Below is the complete code:

REPORT ztest_report.

TYPE-POOLS: slis.


TYPES: BEGIN OF ty_ausp,
objek TYPE objnum,
atinn TYPE atinn,
atzhl TYPE wzaehl,
mafid TYPE klmaf,
klart TYPE klassenart,
adzhl TYPE adzhl,
atwrt TYPE atwrt,
atflv TYPE atflv,
atflb TYPE atflb,
END OF ty_ausp,

BEGIN OF ty_str,
objek TYPE objnum,
atinn TYPE atinn,
atzhl TYPE wzaehl,
atwrt TYPE atwrt,
END OF ty_str,

BEGIN OF ty_release,
l_release TYPE objnum,
END OF ty_release,

BEGIN OF ty_t16fs,
frggr TYPE frggr,
frgsx TYPE frgsx,
frgc1 TYPE frgco,
frgc2 TYPE frgco,
frgc3 TYPE frgco,
frgc4 TYPE frgco,
frgc5 TYPE frgco,
frgc6 TYPE frgco,
frgc7 TYPE frgco,
frgc8 TYPE frgco,
END OF ty_t16fs,

BEGIN OF ty_t16fw,
frggr TYPE frggr,
frgco TYPE frgco,
objid TYPE actorid,
END OF ty_t16fw,

BEGIN OF ty_kssk,
objek TYPE objnum,
statu TYPE clstatus,
END OF ty_kssk,

BEGIN OF ty_final,
objek TYPE objnum,
doc_type TYPE atwrt,
pur_grp(30) ,
val(10),
zpr_plant TYPE string,
release_code TYPE string,
agent_name TYPE string,
END OF ty_final.

DATA: lt_ausp TYPE TABLE OF ty_ausp,
lt_ausp2 TYPE TABLE OF ty_ausp,
lt_t16fs TYPE TABLE OF ty_t16fs,
lw_t16fs TYPE ty_t16fs,
lt_t16fw TYPE TABLE OF ty_t16fw,
lw_t16fw TYPE ty_t16fw,
lt_rel TYPE TABLE OF ty_release,
lw_rel TYPE ty_release,
lw_ausp TYPE ty_ausp,
lt_final TYPE TABLE OF ty_final,
lw_final TYPE ty_final,
lt_kssk TYPE TABLE OF ty_kssk,
lw_kssk TYPE ty_kssk,
lt_str TYPE TABLE OF ty_str,
lw_str TYPE ty_str,
lT_EVENT TYPE SLIS_T_EVENT ,
lW_EVENT TYPE SLIS_ALV_EVENT,
lt_func TYPE TABLE OF sy-ucomm,
l_channel(30),
lw_pur_grp(30),
l_grp(2),
l_strat(2),
lw_var1(255),
lw_var2 TYPE atflv,
lw_var3(255),
l_val1(16),
l_val2(16),
l_num1(10),
l_num2(10),
l_rel1(12),
l_rel2(12),
l_rel3(12),
l_rel4(12),
l_rel5(12),
l_rel6(12),
l_rel7(12),
l_rel8(12),
l_agent(255),
l_frggr TYPE frggr,
l_frgsx TYPE frgsx,
l_objid TYPE actorid,
wa_layout TYPE slis_layout_alv,
it_cata TYPE TABLE OF slis_fieldcat_alv,
wa_cata TYPE slis_fieldcat_alv.


SELECT-OPTIONS: s_frggr FOR l_frggr,
s_frgsx FOR l_frgsx,
s_objid FOR l_objid.


START-OF-SELECTION.

PERFORM SUB_DATA_POPULATE.
PERFORM sub_modify_table.
PERFORM sub_fcat.
PERFORM sub_event.
PERFORM SUB_DISPLAY.

*&---------------------------------------------------------------------*
*& Form SUB_DATA_POPULATE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM sub_data_populate .

SELECT frggr
frgsx
frgc1
frgc2
frgc3
frgc4
frgc5
frgc6
frgc7
frgc8
FROM t16fs
INTO TABLE lt_t16fs
WHERE frggr IN s_frggr
AND frgsx IN s_frgsx.

IF lt_t16fs IS NOT INITIAL.

SELECT frggr
frgco
objid
FROM t16fw
INTO TABLE lt_t16fw
FOR ALL ENTRIES IN lt_t16fs
WHERE frggr = lt_t16fs-frggr
AND objid IN s_objid.

ENDIF.

LOOP AT lt_t16fs INTO lw_t16fs.
"l_grp = lw_t16fs-frggr.
"l_strat = lw_t16fs-frgsx.
CONCATENATE lw_t16fs-frggr lw_t16fs-frgsx INTO lw_var1.
CONDENSE lw_var1 NO-GAPS.
lw_rel-l_release = lw_var1.
APPEND lw_rel TO lt_rel.
CLEAR: lw_rel, lw_var1, lw_t16fs.
ENDLOOP.

SORT lt_rel BY l_release.
DELETE ADJACENT DUPLICATES FROM lt_rel COMPARING l_release.
IF lt_rel IS NOT INITIAL.

SELECT
objek
atinn
atzhl
mafid
klart
adzhl
atwrt
atflv
atflb
FROM ausp
INTO TABLE lt_ausp
FOR ALL ENTRIES IN lt_rel
WHERE objek = lt_rel-l_release.
ENDIF.

lt_ausp2[] = lt_ausp[].
SORT lt_ausp2 BY objek.
DELETE ADJACENT DUPLICATES FROM lt_ausp2 COMPARING objek.
IF lt_ausp2 IS NOT INITIAL.

SELECT objek
statu
FROM kssk
INTO TABLE lt_kssk
FOR ALL ENTRIES IN lt_ausp2
WHERE objek = lt_ausp2-objek.

DELETE lt_kssk WHERE statu NE '1'.
ENDIF.


LOOP AT lt_ausp INTO lw_ausp.
MOVE-CORRESPONDING lw_ausp TO lw_str.
APPEND lw_str TO lt_str.
CLEAR: lw_str, lw_ausp.
ENDLOOP.

"read table lt_ausp into lw_ausp with key objek = lw_AUSP-OBJEK.
"if sy-subrc = 0.

LOOP AT lt_kssk INTO lw_kssk.
lw_final-objek = lw_kssk-objek.
APPEND lw_final TO lt_final.
ENDLOOP.

ENDFORM.
*&---------------------------------------------------------------------*
*& Form SUB_MODIFY_TABLE
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM sub_modify_table .
SORT lt_final BY objek.
DELETE ADJACENT DUPLICATES FROM lt_final COMPARING objek.

LOOP AT lt_str INTO lw_str WHERE atinn = '0000000816'.

l_channel = lw_str-atwrt.

CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .

AT END OF atinn.
lw_final-zpr_plant = lw_var3.
SHIFT lw_final-zpr_plant LEFT .
MODIFY lt_final FROM lw_final TRANSPORTING zpr_plant WHERE objek = lw_str-objek.
CLEAR: lw_final, lw_var3, l_channel, lw_str.
ENDAT.

ENDLOOP.

LOOP AT lt_str INTO lw_str WHERE atinn = '0000000817'.

lw_final-doc_type = lw_str-atwrt.
MODIFY lt_final FROM lw_final TRANSPORTING doc_type WHERE objek = lw_str-objek.
CLEAR: lw_final, lw_str.

ENDLOOP.

LOOP AT lt_str INTO lw_str WHERE atinn = '0000000818'.
l_channel = lw_str-atwrt.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
AT END OF atinn.
lw_final-pur_grp = lw_var3.
SHIFT lw_final-pur_grp LEFT .
*lw_final-pur_grp = lw_str-atwrt.
MODIFY lt_final FROM lw_final TRANSPORTING pur_grp WHERE objek = lw_str-objek.
CLEAR: lw_final, lw_str, lw_var3, l_channel.
ENDAT.

ENDLOOP.

LOOP AT lt_ausp INTO lw_ausp WHERE atinn = '0000000820'.

CALL FUNCTION 'QSS0_FLTP_TO_CHAR_CONVERSION'
EXPORTING
i_number_of_digits = 0
i_fltp_value = lw_ausp-atflv
* I_VALUE_NOT_INITIAL_FLAG = 'X'
* I_SCREEN_FIELDLENGTH = 16
IMPORTING
e_char_field = l_val1.

CALL FUNCTION 'QSS0_FLTP_TO_CHAR_CONVERSION'
EXPORTING
i_number_of_digits = 0
i_fltp_value = lw_ausp-atflb
* I_VALUE_NOT_INITIAL_FLAG = 'X'
* I_SCREEN_FIELDLENGTH = 16
IMPORTING
e_char_field = l_val2.

l_num1 = l_val1 / 100000.
l_num2 = l_val2 / 100000.

IF l_num2 = 25.
l_num2 = '0-25'.
ELSEIF l_num2 > 25.
l_num2 = '25+'.
ENDIF.
lw_final-val = l_num2.
MODIFY lt_final FROM lw_final TRANSPORTING val WHERE objek = lw_ausp-objek.
CLEAR: lw_final, lw_ausp, l_val1, l_val2, l_num1, l_num2.
ENDLOOP.

LOOP AT lt_t16fs INTO lw_t16fs.
CONCATENATE lw_t16fs-frggr lw_t16fs-frgsx INTO lw_var1.
CONDENSE lw_var1 NO-GAPS.
"read table lt_ausp2 into lw_ausp2 with key objek = lw_var1.
CONCATENATE lw_t16fs-frgc1 lw_t16fs-frgc2 lw_t16fs-frgc3 lw_t16fs-frgc4 lw_t16fs-frgc5 lw_t16fs-frgc6
lw_t16fs-frgc7 lw_t16fs-frgc8 INTO lw_var3 SEPARATED BY ',' .
lw_final-release_code = lw_var3.
MODIFY lt_final FROM lw_final TRANSPORTING release_code WHERE objek = lw_var1.
CLEAR: lw_final, lw_var1, lw_var3.
ENDLOOP.

LOOP AT lt_t16fs INTO lw_t16fs.
READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc1.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel1 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc2.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel2 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc3.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel3 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc4.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel4 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc5.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel5 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc6.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel6 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc7.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel7 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

READ TABLE lt_t16fw INTO lw_t16fw WITH KEY frggr = lw_t16fs-frggr
frgco = lw_t16fs-frgc8.
IF sy-subrc = 0.
l_channel = lw_t16fw-objid.
CONCATENATE lw_var3 l_channel INTO lw_var3 SEPARATED BY ',' .
l_rel8 = lw_var3.
CLEAR: l_channel, lw_var3.
ENDIF.

CONCATENATE l_rel1 l_rel2 l_rel3 l_rel4 l_rel5 l_rel6 l_rel7 l_rel8 INTO l_agent SEPARATED BY ',' .
lw_final-agent_name = l_agent.
CONCATENATE lw_t16fs-frggr lw_t16fs-frgsx INTO lw_var1.
CONDENSE lw_var1 NO-GAPS.
MODIFY lt_final FROM lw_final TRANSPORTING agent_name WHERE objek = lw_var1.
CLEAR :lw_final, lw_var1, l_rel1, l_rel2, l_rel3, l_rel4, l_rel5, l_rel6, l_rel7, l_rel8.
ENDLOOP.

ENDFORM.
*&---------------------------------------------------------------------*
*& Form SUB_FCAT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM sub_fcat .
wa_cata-fieldname = 'OBJEK' .
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'OBJECT' .
wa_cata-col_pos = '1' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

wa_cata-fieldname = 'DOC_TYPE' .
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'DOC_TYPE' .
wa_cata-col_pos = '2' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

wa_cata-fieldname = 'PUR_GRP' .
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'PUR_GRP' .
wa_cata-col_pos = '3' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

wa_cata-fieldname = 'VAL' .
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'VAL' .
wa_cata-col_pos = '4' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

wa_cata-fieldname = 'ZPR_PLANT' .
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'ZPR_PLANT' .
wa_cata-col_pos = '5' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

wa_cata-fieldname = 'RELEASE CODE' .
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'RELEASE_CODE' .
wa_cata-outputlen = '100'.
wa_cata-col_pos = '6' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

wa_cata-fieldname = 'AGENT NAME' .
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'AGENT_NAME' .
wa_cata-col_pos = '7' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

wa_layout-colwidth_optimize = 'X' .
ENDFORM.
*&---------------------------------------------------------------------*
*& Form SUB_EVENT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM sub_event .
CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
EXPORTING
I_LIST_TYPE = 0
IMPORTING
ET_EVENTS = lT_EVENT
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.

READ TABLE lT_EVENT INTO lW_EVENT WITH KEY NAME = 'USER_COMMAND'.
IF SY-SUBRC = 0 .

lW_EVENT-FORM = 'SUB_USER_COMMAND'.

MODIFY lT_EVENT
FROM lw_EVENT
TRANSPORTING FORM
WHERE NAME = 'USER_COMMAND' .
ENDIF.

READ TABLE lT_EVENT INTO lW_EVENT WITH KEY NAME = 'PF_STATUS_SET'.
IF SY-SUBRC = 0 .

LW_EVENT-FORM = 'SUB_PF_STATUS_SET'.

MODIFY lT_EVENT
FROM lW_EVENT
TRANSPORTING FORM
WHERE NAME = 'PF_STATUS_SET' .
ENDIF.

ENDFORM.


*&--------------------------------------------------------------------*
*& Form SUB_USER_COMMAND
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->R_UCOMM text
* -->R_SELFIELD text
*---------------------------------------------------------------------*
FORM SUB_USER_COMMAND USING R_UCOMM TYPE SY-UCOMM
R_SELFIELD TYPE SLIS_SELFIELD .

case r_ucomm .

WHEN 'EXCEL'.

CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
file_name = 'C:\Users\10648767\Desktop\Matt'
* CREATE_PIVOT = 0
* DATA_SHEET_NAME = ' '
* PIVOT_SHEET_NAME = ' '
* PASSWORD = ' '
* PASSWORD_OPTION = 0
TABLES
* PIVOT_FIELD_TAB =
DATA_TAB = lt_final[]
* FIELDNAMES =
* EXCEPTIONS
* FILE_NOT_EXIST = 1
* FILENAME_EXPECTED = 2
* COMMUNICATION_ERROR = 3
* OLE_OBJECT_METHOD_ERROR = 4
* OLE_OBJECT_PROPERTY_ERROR = 5
* INVALID_PIVOT_FIELDS = 6
* DOWNLOAD_PROBLEM = 7
* OTHERS = 8
.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.

WHEN 'BACK'.
leave to SCREEN 0.

ENDCASE .
ENDFORM.

*&--------------------------------------------------------------------*
*& Form SUB_PF_STATUS_SET
*&--------------------------------------------------------------------*
* text
*---------------------------------------------------------------------*
* -->R_EXTAB text
*---------------------------------------------------------------------*
FORM SUB_PF_STATUS_SET USING R_EXTAB TYPE SLIS_T_EXTAB .
SET PF-STATUS 'STATUS'." EXCLUDING r_extab.
ENDFORM . "SUB_PF_STATUS_SET
*&---------------------------------------------------------------------*
*& Form SUB_DISPLAY
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM sub_display .

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 = 'PF_STATUS'
* I_CALLBACK_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 = wa_layout
it_fieldcat = it_cata
* IT_EXCLUDING =
* IT_SPECIAL_GROUPS =
* IT_SORT =
* IT_FILTER =
* IS_SEL_HIDE =
* I_DEFAULT = 'X'
* I_SAVE = ' '
* IS_VARIANT =
IT_EVENTS = LT_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
* I_HTML_HEIGHT_TOP = 0
* I_HTML_HEIGHT_END = 0
* IT_ALV_GRAPHICS =
* IT_HYPERLINK =
* IT_ADD_FIELDCAT =
* IT_EXCEPT_QINFO =
* IR_SALV_FULLSCREEN_ADAPTER =
* IMPORTING
* E_EXIT_CAUSED_BY_CALLER =
* ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = lt_final[]
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
ENDFORM.

When I check the final internal table LT_FINAL, the output comes correctly (ignore the commas for now) for all the fields including the last 2 fields:

But when I get the records in the ALV output, the last 2 fields show incorrect values:

Can anyone tell me why this is happening ?

Regards,

Manish

1 ACCEPTED SOLUTION

Tomas_Buryanek
Active Contributor
123

You have typo in field catalog fieldname (missing underscore).

-- Tomas --
4 REPLIES 4

Tomas_Buryanek
Active Contributor
124

You have typo in field catalog fieldname (missing underscore).

-- Tomas --

0 Kudos
123

I am sorry, but I cant find the typo. Can you please point it out to me ?

123

Hi Manish,

Correct the fieldname provided in fieldcatalog, field names like "AGENT_NAME" and "RELEASE_CODE". The underscore is missing in the field name.


rmnachi_kx
Explorer
123

First thing... Why still using REUSE ALV ? Try factory method. Its very simple and you dont need to build field catalog.

BTW, Tomas has pointed out exactly and you should search your code before posting a response 🙂

Anyways, I'm pasting your code here and highlighting the issue..

wa_cata-fieldname = 'RELEASE CODE' . >>>>>>> Here change to 'RELEASE_CODE'
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'RELEASE_CODE' .
wa_cata-outputlen = '100'.
wa_cata-col_pos = '6' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .


wa_cata-fieldname = 'AGENT NAME' . >>>>>>>>> Here change to 'AGENT_NAME'
wa_cata-tabname = 'LT_FINAL' .
wa_cata-seltext_l = 'AGENT_NAME' .
wa_cata-col_pos = '7' .
APPEND wa_cata TO it_cata .
CLEAR wa_cata .

Again, remember to check and try Factory method. Its very simple. Let me give you the taste of it 😉 This will display JUST ALV. For additional functionalities, search SDN ......

DATA : lo_alv TYPE REF TO cl_salv_table.
  TRY.
      cl_salv_table=>factory(
        EXPORTING
          list_display = <<<<<abap_false>>>>>> 
        IMPORTING
          r_salv_table = lo_alv
        CHANGING
          t_table      = <<<<Your Internal table here>>>> ).
    CATCH cx_salv_msg .
  ENDTRY.
*Display the alv
  lo_alv->display().