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

problem with interactive alv

Former Member
0 Likes
631

hai ,

I have problem with my interactive alv ,

when i double click the line item the same line item is displaying for all the selections ..

LASS lcl_event_handler IMPLEMENTATION.

METHOD on_double_click.

  • find out selected line (double click)

READ TABLE i_fd INTO w_fd INDEX e_row-index.

IF sy-subrc NE 0.

MESSAGE i075(bc412). " <-- internal error

EXIT.

ENDIF.

"CLEAR i_popup.

LOOP AT i_trdt INTO w_trdt WHERE deal_number = w_fd-rfha .

  • IF sy-tabix GT 1.

  • CLEAR w_trdt-deal_number.

  • ENDIF.

APPEND w_trdt TO i_popup.

ENDLOOP.

CLEAR : w_fd , w_trdt .

IF i_popup IS NOT INITIAL .

CREATE OBJECT ref_container

EXPORTING

  • parent =

container_name = 'CONTAINER1'

  • style =

  • lifetime = lifetime_default

  • repid =

  • dynnr =

  • no_autodef_progid_dynnr =

  • EXCEPTIONS

  • cntl_error = 1

  • cntl_system_error = 2

  • create_error = 3

  • lifetime_error = 4

  • lifetime_dynpro_dynpro_link = 5

  • others = 6

.

IF sy-subrc <> 0.

MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno

WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

ENDIF.

CREATE OBJECT ref_alv

EXPORTING

  • i_shellstyle = 0

  • i_lifetime =

i_parent = ref_container

  • i_appl_events = space

  • i_parentdbg =

  • i_applogparent =

  • i_graphicsparent =

  • i_name =

  • i_fcat_complete = space

EXCEPTIONS

error_cntl_create = 1

error_cntl_init = 2

error_cntl_link = 3

error_dp_create = 4

OTHERS = 5

.

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

PERFORM f_cat.

CALL METHOD ref_alv->refresh_table_display.

  • CALL METHOD g_alv->refresh_table_display.

ENDIF.

  • CALL METHOD g_alv->refresh_table_display.

CLEAR i_popup.

ENDMETHOD. "on_double_click

ENDCLASS. "lcl_event_handler IMPLE

Regards,

K,Vinay Kumar

5 REPLIES 5
Read only

former_member182354
Contributor
0 Likes
611

Clear workareas..

Raghav

Read only

Former Member
0 Likes
611

REFRESH i_popup before LOOP AT i_trdt ?

Read only

0 Likes
611

but still the problem is comming ..

regards,

K.vinay Kumar

Read only

0 Likes
611

i think clearing the work area before the loop's should solve the problem.

try refresfing the intab tooo

Read only

former_member787646
Contributor
0 Likes
611

Hi,

Try..

READ TABLE i_fd INTO w_fd INDEX es_row_no-index.

Hope it helps you.

Murthy