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: 

Data transfer to ALV after selection screen

Former Member
0 Kudos

Hi All

i want to select the record on slection screen and then want to display that data in ALV grid control .. can any one help me in term of code

Regards

Ammad

6 REPLIES 6

Former Member
0 Kudos

This message was moderated.

jayanthi_jayaraman
Active Contributor
0 Kudos

Hi,

Check this link. I am explaining the basic OOPS ALV concepts step by step.

https://wiki.sdn.sap.com/wiki/pages/pointstab/viewpageversion.action?pageId=33636&version=4

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

DATA: t_fc TYPE slis_t_fieldcat_alv.

  • Populate your Internal Table with whatever data you want.

  • The following function module will create a catalog t_fc that has all the fields of the internal table. It is similar to your catalog that you get for a TV.

CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'

EXPORTING

i_program_name = sy-repid

i_internal_tabname = 'ITAB'

i_inclname = sy-repid

CHANGING

ct_fieldcat = t_fc[]

EXCEPTIONS

INCONSISTENT_INTERFACE = 1

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

  • The following function module will make use of your catalog and the internal table that you send and it will create a Grid display.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'

EXPORTING

i_bypassing_buffer = 'X'

i_buffer_active = ' '

i_callback_program = sy-repid

it_fieldcat = t_fc

TABLES

t_outtab = itab

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.