Application Development 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: 

ALV - call method gets called 2x, after call Transaction and F3

Former Member
0 Kudos

hi,

we are facing a strange behaviour in an abap oo eventhandler class.

the status quo: a doubleclick on an alv-grid triggers a method, which contains a

CALL TRANSACTION 'IE03' AND SKIP FIRST SCREEN.

When inside the Transaction IE03 we hit the Back-Button (F3). Now in the debugger we can see, that the cursor jumps one row deeper (after the call transaction), which is expected. <b>But then we would expect the pbo of the dynpro with the alv-grid. Instead the method, which responds to the doubleclick is called again, which again contains the call transaction....</b>

In fact we need to clicks back, twice F3, to return to our ALV dynpro.

Can somebody lpease shed some light on this?

thanx, matthias

1 ACCEPTED SOLUTION

former_member188685
Active Contributor
0 Kudos
FORM HANDLE_HOTSPOT_CLICK USING I_ROW_ID TYPE LVC_S_ROW
                                I_COLUMN_ID TYPE LVC_S_COL
                                IS_ROW_NO TYPE LVC_S_ROID.

  READ TABLE IT_FINAL INDEX I_ROW_ID  .
  IF SY-SUBRC = 0.
    IF I_COLUMN_ID-FIELDNAME = 'VGBEL'.
      PERFORM FORM_REFRESH.
      SET PARAMETER ID 'AUN' FIELD IT_FINAL-VGBEL.
      CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDIF.
**if user clicks on Delivery
    IF I_COLUMN_ID-FIELDNAME = 'VBELN'.
      PERFORM FORM_REFRESH.
      SET PARAMETER ID 'VL' FIELD IT_FINAL-VBELN.
      CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDIF.
ENDFORM .                    "handle_hotspot_click  
FORM FORM_REFRESH.
CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
    EXCEPTIONS
      FINISHED = 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.
ENDFORM.

just i am giving a pice of code.. try to call method refresh.

vijay

4 REPLIES 4

former_member188685
Active Contributor
0 Kudos
FORM HANDLE_HOTSPOT_CLICK USING I_ROW_ID TYPE LVC_S_ROW
                                I_COLUMN_ID TYPE LVC_S_COL
                                IS_ROW_NO TYPE LVC_S_ROID.

  READ TABLE IT_FINAL INDEX I_ROW_ID  .
  IF SY-SUBRC = 0.
    IF I_COLUMN_ID-FIELDNAME = 'VGBEL'.
      PERFORM FORM_REFRESH.
      SET PARAMETER ID 'AUN' FIELD IT_FINAL-VGBEL.
      CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDIF.
**if user clicks on Delivery
    IF I_COLUMN_ID-FIELDNAME = 'VBELN'.
      PERFORM FORM_REFRESH.
      SET PARAMETER ID 'VL' FIELD IT_FINAL-VBELN.
      CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    ENDIF.
  ENDIF.
ENDFORM .                    "handle_hotspot_click  
FORM FORM_REFRESH.
CALL METHOD G_GRID->REFRESH_TABLE_DISPLAY
    EXCEPTIONS
      FINISHED = 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.
ENDFORM.

just i am giving a pice of code.. try to call method refresh.

vijay

Former Member
0 Kudos

sorry, the ref_var for the eventhandler class was crfeated each pbo and not checked, if initial or not...

regards, matthias

0 Kudos

hi

Now you got the solution..

please reward points for helpful answers.

vijay

0 Kudos

i did reward 2 helpful points as i found the solution on my own,

thank you agin, matthias