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

BACK from CALL TRANSACTION

Former Member
0 Likes
1,961

Hi,

Below is the code in which I am finding an issue,

CLASS respond_events IMPLEMENTATION.

   METHOD respond_hotspot_click.

     READ TABLE tab1 INTO wa INDEX e_row_id.
       IF sy-subrc EQ 0.
         IF  e_column_id = 'BELNR'
         AND wa-belnr IS NOT INITIAL.
           SET PARAMETER ID 'BLN' FIELD wa-belnr.
           SET PARAMETER ID 'BUK' FIELD wa-bukrs.
           SET PARAMETER ID 'GJR' FIELD wa-gjahr.
           CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

    ENDMETHOD .                 "respond_hotspot_click
ENDCLASS .                    "respond_events IMPLEMENTATION

The problem here when I am into the transaction FB03 for the first time I click BACK it takes me to my report display. The second time it costs me 2 BACK to come out of the transaction and this gets increased consecutively every time I am in FB03. I tried with FLUSH/DISPATCH too. Not working.

Any leads on this?



1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,729

Thanks guys. The issue got solved. The problem was there was no custom container check while displaying the ALV and everytime the SET HANDLER was getting executed.

IF g_custom_container IS INITIAL.
     CREATE OBJECT g_custom_container
       EXPORTING
         container_name
         ='CTRL_AREA'.
     CREATE OBJECT alv_grid
       EXPORTING
         i_parent = g_custom_container.

     SET HANDLER w_respond_events->respond_hotspot_click FOR alv_grid.
ELSE.
     CALL METHOD alv_grid->refresh_table_display.
ENDIF.

Hi,

Below is the code in which I am finding an issue,

CLASS respond_events IMPLEMENTATION.

   METHOD respond_hotspot_click.

     READ TABLE tab1 INTO wa INDEX e_row_id.
       IF sy-subrc EQ 0.
         IF  e_column_id = 'BELNR'
         AND wa-belnr IS NOT INITIAL.
           SET PARAMETER ID 'BLN' FIELD wa-belnr.
           SET PARAMETER ID 'BUK' FIELD wa-bukrs.
           SET PARAMETER ID 'GJR' FIELD wa-gjahr.
           CALL TRANSACTION 'FB03' AND SKIP FIRST SCREEN.

    ENDMETHOD .                 "respond_hotspot_click
ENDCLASS .                    "respond_events IMPLEMENTATION

The problem here when I am into the transaction FB03 for the first time I click BACK it takes me to my report display. The second time it costs me 2 BACK to come out of the transaction and this gets increased consecutively every time I am in FB03. I tried with FLUSH/DISPATCH too. Not working.

Any leads on this?



10 REPLIES 10
Read only

Former Member
0 Likes
1,729

Try refreshing the grid after the call transaction.

CL_GUI_ALV_GRID->REFRESH_TABLE_DISPLAY.

Cheers!

Abhinab

Read only

0 Likes
1,729

Yeah tried that.. No use

Read only

Former Member
0 Likes
1,729

Hi Sharan,

Try Call Screen <Screen Number> or Debug to see why it needs BACK press increasingly by 1 every time.

BR,

Ankit.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,729

Problem seems not to be in this part code, what do your code perform after this call, how do you get back to ALV ?

Regards,

Raymond

Read only

0 Likes
1,729

There isn't any specific routine to get back and I don't even have my PAI implemented for the screen. It is just like any other normal transaction and gets back. Do I need to do any while BACK? Further its the BACK of the transaction and nothing can be done from the program I guess.

Read only

0 Likes
1,729

Hi Sharan,

Please tell how are you trigerring it and post full code, if possible.

BR,

Ankit.

Read only

Former Member
0 Likes
1,729

Try using FM 'FI_DOCUMENT_DISPLAY_RFC' with destination 'NONE'

BR

Read only

DirkAltmann
Active Participant
0 Likes
1,729

Hi,

do you have check what happened before you calling the method? It seems that calling the method increase and so the methed calles n-time and the FB03 dynpros lay over each other.

@Mohamed,

The FM 'FI_DOCUMENT_DISPLAY_RFC' do the same as Sharans code.

Regards,

Dirk

Read only

former_member206575
Participant
0 Likes
1,729

Looks like the table is not refreshed, but build again, when you return. The quick fix would then be to free the ALV table befor calling the transaction.

Other possibilities:

Are you using the get_selected_rows method?

Before using the get_selected_rows method, first call method 'get_metadata'…

CALL METHOD lr_table->get_metadata.  " call this method....

* Then Get the selected rows/cell.

      lr_selections = <rf_ref_table>->get_selections(  ).

      lt_rows = lr_selections->get_selected_rows( ).

      ls_cell = lr_selections->get_current_cell( ).

If that does not work, free the ALV table and rebuild if again (for first display).

Read only

Former Member
0 Likes
1,730

Thanks guys. The issue got solved. The problem was there was no custom container check while displaying the ALV and everytime the SET HANDLER was getting executed.

IF g_custom_container IS INITIAL.
     CREATE OBJECT g_custom_container
       EXPORTING
         container_name
         ='CTRL_AREA'.
     CREATE OBJECT alv_grid
       EXPORTING
         i_parent = g_custom_container.

     SET HANDLER w_respond_events->respond_hotspot_click FOR alv_grid.
ELSE.
     CALL METHOD alv_grid->refresh_table_display.
ENDIF.