Application Development and Automation 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: 
Read only

ALV

vallamuthu_madheswaran2
Active Contributor
0 Likes
324

Hi friends,

I am using the below code now i want the result in ALV Grid. is it possible? please giv the solution.

DATA BEGIN OF itab_list OCCURS 0.

INCLUDE STRUCTURE abaplist.

DATA END OF itab_list.

DATA: BEGIN OF vlist OCCURS 0,

field1(1000) TYPE c,

END OF vlist.

SUBMIT rahafa01 EXPORTING LIST TO MEMORY VIA SELECTION-SCREEN AND RETURN.

CALL FUNCTION 'LIST_FROM_MEMORY'

TABLES

listobject = itab_list

EXCEPTIONS

not_found = 4

OTHERS = 8.

CALL FUNCTION 'LIST_TO_ASCI'

EXPORTING

list_index = -1

  • with_line_break = ' '

TABLES

listasci = vlist

listobject = itab_list

EXCEPTIONS

empty_list = 1

list_index_invalid = 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.

IF sy-subrc NE '0'.

WRITE:/ 'LIST_TO_ASCI error !! ', sy-subrc.

ELSE.

LOOP AT vlist.

WRITE:/ vlist-field1.

MOVE vlist-field1 TO i_main.

APPEND i_main.

ENDLOOP.

CLEAR vlist. REFRESH vlist.

WRITE: ' success '.

ENDIF.

Thanks & Regards,

Vallamuthu.M

1 REPLY 1
Read only

vallamuthu_madheswaran2
Active Contributor
0 Likes
292

This message was moderated.