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 and transaction variant

himanshu_gupta2
Participant
0 Likes
1,395

In my ALV report i have some buttons like display, edit , duplicate for the service notifications ( IW5x)

In this button i called the transaction through variant (SHD0 )  using FM " RS_HDSYS_CALL_TC_VARIANT".

These function are working fine.

Problem persists

1) when i click on these button and click on back , it will back to my ALV report

2) when i double click on alv row , it open the IW5x transaction and when i click on back button it back to my method double_click and show the transaction again.

3) if click button more then it will display the transaction that many time.

anyone have idea about what is going on ?

1 ACCEPTED SOLUTION
Read only

himanshu_gupta2
Participant
0 Likes
1,163

Problem has been solved now.

I dont know why the double click event is called every time.

I just make sure that double click event will only call when the ALV grid object will create.

If anyone knows the reason behind it please share.

7 REPLIES 7
Read only

Former Member
0 Likes
1,163

Hi,

You can't do anything about it. This is because once you call a standard transaction, the control goes over to the standard program. User command 'BACK' in standard program decides how the system should react. In most cases, it goes back to the screen calling it.

Please note the solution provided below is not recommended.

In case, you want to change the behaviour, find some implicit enhancement in the PAI of the standard screen and change the code. There you need to check

If sy-calld = 'X'             . "Called by call transaction

and sy-cprog  = 'your program'   ".

** Your expected result on clicking the back button

endif.

Regards,

DPM

Read only

0 Likes
1,163

Hello ,

thanks for the reply ,

But problem is not in the standard code.

Problem is that my event double click will automatically trigger by number of time  = i go to transaction varaints through button.

note: in doulble click also i call the same transaction variant.

Read only

0 Likes
1,163

Hi Himanshu,

It is problem for not clearing/refreshing variables using before calling transaction.

Thanks and Regards

Srimanta

Read only

0 Likes
1,163

Hello srimant,

could you please elaborate ... which variable ??

After i edit  a couple of entries or any other function on my application toolbar button , and then double click on the notification , then in notification screen ,the back button does not go back directly to the ALV. Instead it keeps on moving back to n times(no. of times i clicked on edit button).

Read only

Former Member
0 Likes
1,163

Could you share the code?

Read only

0 Likes
1,163

FORM handle_double_click  USING    ps_row    TYPE lvc_s_row

                                    ps_column TYPE lvc_s_col

                                    ps_row_no TYPE lvc_s_roid.

   DATA : ls_notification_list TYPE ts_notification_list.

*Read the notification selected

   READ TABLE gi_notification_list

   INTO ls_notification_list

   INDEX ps_row_no-row_id.

* consult notification

   PERFORM consult_notification USING ls_notification_list.

   CALL METHOD go_grid->refresh_table_display.

ENDFORM.                    " HANDLE_DOUBLE_CLICK


FORM launch_transaction_variant  USING    pw_tcode   TYPE tcode

                                           pw_variant TYPE tcvariant

                                  CHANGING pw_error   TYPE abap_bool.

   CALL FUNCTION 'RS_HDSYS_CALL_TC_VARIANT'

     EXPORTING

       tcode                     = pw_tcode

       variant                   = pw_variant

       i_flag_client_independent = k_x

       call_mode                 = abap_true

       variant_check             = ''

       i_flag_skip_first_screen  = k_x

     EXCEPTIONS

       no_variant                = 1

       no_authority_tcode        = 2

       OTHERS                    = 3.

   IF sy-subrc <> 0.

     pw_error = abap_true.

   ENDIF.

ENDFORM.                    " LAUNCH_TRANSACTION_VARIANT

Read only

himanshu_gupta2
Participant
0 Likes
1,164

Problem has been solved now.

I dont know why the double click event is called every time.

I just make sure that double click event will only call when the ALV grid object will create.

If anyone knows the reason behind it please share.