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

Closing an ALV report dynamically

former_member191562
Participant
0 Likes
2,021

Hi all,

My requirement is this. I have to display an ALV list of purchase orders,whenever I double click on a single row,the data should be extracted and used in the next screen implementation. i have done the extraction part. All I wanna know is how can I close that alv list when I double click on a row ????

Moderator Message: Do not type in Capital letters. It is considered shouting. Do not use phrase like Help Needed in the title. I've made the changes for you this time.

Edited by: kishan P on Nov 8, 2010 12:13 PM

1 ACCEPTED SOLUTION
Read only

former_member191562
Participant
0 Likes
1,588

I am not using OOPS concept. I am using REUSE_ALV FM. I have brought the ALV list output. My requirement is,If i doubleclick a row in ALV list,that list should close. What should I write inside

case sy-ucomm.

when '&ic1'

????????

endcase. ????

Hi all,

My requirement is this. I have to display an ALV list of purchase orders,whenever I double click on a single row,the data should be extracted and used in the next screen implementation. i have done the extraction part. All I wanna know is how can I close that alv list when I double click on a row ????

Moderator Message: Do not type in Capital letters. It is considered shouting. Do not use phrase like Help Needed in the title. I've made the changes for you this time.

Edited by: kishan P on Nov 8, 2010 12:13 PM

10 REPLIES 10
Read only

former_member191562
Participant
0 Likes
1,588

I am Using REUSE_AL_LIST_DISPLAY FM btw..

Read only

0 Likes
1,588

HI there,

I'm not sure i understand what you want to do. Are you attempting to close it once you double click? Currently is it opening 2 screens?

Regards

Tatenda

Read only

Former Member
0 Likes
1,588

Hi,

You can two methods either take interactive list and display the data of particular row in detailed list, in dis way both primary as well as secondary list will be outputted.

or if you do not want to display the primay list then you can make the list no = 0 using system variable sy-lsind for detailed list.

ZCL_OOPS_ALV_GRID05 chk this prog

Read only

former_member191562
Participant
0 Likes
1,589

I am not using OOPS concept. I am using REUSE_ALV FM. I have brought the ALV list output. My requirement is,If i doubleclick a row in ALV list,that list should close. What should I write inside

case sy-ucomm.

when '&ic1'

????????

endcase. ????

Read only

0 Likes
1,588

I don't know exactly Why do you want to close the ALV insted just Use just use 'LEAVE TO SCREEN <YOUR SCREEN NUMBER>'

Hope this helps

Read only

0 Likes
1,588

Hi

Check the interface of the routine for the user-comand you should find out the flag for the exit:

case sy-ucomm.
   when '&ic1'
          rs_selfield-exit = 'X'.
endcase. 

Max

Read only

prince_isaac
Active Participant
0 Likes
1,588

Hi

handle the double click event by calling FM REUSE_ALV_EVENTS_GET


* Fill eventtab
  refresh lt_events.
  call function 'REUSE_ALV_EVENTS_GET'
    exporting
      i_list_type = 0
    importing
      et_events   = lt_events_tmp.

  loop at lt_events_tmp into l_events.
    case l_events-name .
      when slis_ev_user_command.
        move c_evt_usercommand to l_events-form.
      when others.
        continue.
    endcase.
    append l_events to lt_events.
  endloop.
.
.*then in REUSE FM pass the table lt_events
  call function 'REUSE_ALV_GRID_DISPLAY'
    exporting
      i_callback_program = sy-repid
      it_fieldcat        = i_fieldcat
      is_layout          = it_layout
      i_default          = 'X'
      i_save             = 'A'
      is_variant         = l_variant
      it_events          = lt_events[]
    tables
      t_outtab           = gt_outtab.

regards

Isaac Prince

Read only

Former Member
0 Likes
1,588

Hi

if you are using function module then u can try this, whn your ALV gets outputted read the data of line and place it in some variable means when you double click on any row, use the event double-click and under that give statement exit. or decrease the sy-lsind value.

Read only

former_member191562
Participant
0 Likes
1,588

@Max..

This is exactly what i was looking for.. I am amazed.. You have answers for everything.

Read only

0 Likes
1,588

Hi

Probably I've been working with ABAP for a longer time than you

I'm here for this

Thanks

Max