cancel
Showing results for 
Search instead for 
Did you mean: 

FM for display internal table in popup display and select single line.

Former Member
0 Kudos
4,954

HI,

I need a FM which display internal table into a popup display and then allows selection of single lines. which will return to calling program.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

uwe_schieferstein
Active Contributor
0 Kudos

Hello

I believe that function module <b>REUSE_ALV_POPUP_TO_SELECT</b> matches your demands.

Regards

Uwe

Answers (3)

Answers (3)

Former Member
0 Kudos

use function module

biuld a catalog first and pass tht too to this fm

sample code for catalogue

FORM fieldcatalog_populate USING p_ad_fdcat TYPE slis_t_fieldcat_alv.

  • declaring field catalog

DATA: ad_fdcat TYPE slis_fieldcat_alv.

  • defining its colums

ad_fdcat-col_pos = 1.

ad_fdcat-fieldname = 'NETPR'.

ad_fdcat-tabname = 'it_data'.

*AD_FDCAT-EMPHASIZE = 'C311'.

ad_fdcat-seltext_l = 'PRICE'.

ad_fdcat-hotspot = 'X'.

APPEND ad_fdcat TO p_ad_fdcat.

ad_fdcat-col_pos = 2.

ad_fdcat-fieldname = 'WAERS'.

ad_fdcat-tabname = 'it_data'.

ad_fdcat-emphasize = 'C511'.

ad_fdcat-seltext_l = 'CURRENCY'.

ad_fdcat-hotspot = 'X'.

APPEND ad_fdcat TO p_ad_fdcat.

ad_fdcat-col_pos = 3.

ad_fdcat-fieldname = 'MEINS'.

ad_fdcat-tabname = 'it_data'.

ad_fdcat-emphasize = 'C311'.

ad_fdcat-seltext_l = 'UNIT'.

ad_fdcat-hotspot = 'X'.

APPEND ad_fdcat TO p_ad_fdcat.

now call function module

cALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'

EXPORTING

  • I_TITLE =

i_selection = 'X'

  • I_ALLOW_NO_SELECTION =

  • I_ZEBRA = ' '

  • I_SCREEN_START_COLUMN = 0

  • I_SCREEN_START_LINE = 0

  • I_SCREEN_END_COLUMN = 0

  • I_SCREEN_END_LINE = 0

  • I_CHECKBOX_FIELDNAME =

  • I_LINEMARK_FIELDNAME =

  • I_SCROLL_TO_SEL_LINE = 'X'

i_tabname = 'it_data'

  • I_STRUCTURE_NAME = 'ty_data'

it_fieldcat = ad_fdcat

  • IT_EXCLUDING =

i_callback_program = ad_repid

  • I_CALLBACK_USER_COMMAND =

  • IS_PRIVATE =

IMPORTING

es_selfield = it_selfield

  • E_EXIT =

TABLES

t_outtab = it_data

  • 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.

*IFLAG = 0 .

ENDIF.

it_data is ur internal table name

es_selfield gives index of the selected row

and the from ur internal table take that row and display

look at sample code for this

loop at internaltable index it_selfield

do somethn

endloop.

hope it helps

regards

navjot

reward accordingly

Former Member
0 Kudos

Hi,

Use FM POPUP_WITH_TABLE

This will solve your problem.

Jogdand M B

PS: Reward if helpful

Former Member
0 Kudos

popup_with_table

popup_with_table_display

POPUP_WITH_TABLE_DISPLAY_OK

.

regards

shiba dutta

Message was edited by:

SHIBA DUTTA