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: 

How to auto Click on Graph Icon

former_member331934
Participant
0 Kudos

Dear Experts,

I'm trying to auto click on graph icon according to user command but nothing happens could you please help?

Here is my code under PAI --> MODULE USER_COMMAND_9000.

thanks in advance...

MODULE user_command_9000 INPUT.

  IF ok_code = 'BACK'.

   LEAVE PROGRAM.

  ELSEIF ok_code =  'EXIT'.

    LEAVE PROGRAM.

  ELSEIF  ok_code =  'CANCEL' .

    LEAVE PROGRAM.

  ELSEIF ok_code = '&GLN'.

    CALL SCREEN 9001.



  ELSEIF ok_code = '&GDN'.

    CALL SCREEN 9002.



  ELSEIF ok_code = '&SMCA'.

    CALL SCREEN 9004.

    CLEAR ok_code.

    CALL METHOD cl_gui_cfw=>set_new_ok_code

    EXPORTING new_code = '&GRAPH'.

ELSE.

ENDIF.

    EXIT.

ENDMODULE.
7 REPLIES 7

Sandra_Rossi
Active Contributor
0 Kudos

Can you tell more? Auto click what? What happens? What do you expect? (I just see that you trigger the PAI with function code &GRAPH after displaying screen 9004, but it doesn't help to understand your question)

DoanManhQuynh
Active Contributor
0 Kudos

do you mean you want to trigger an user command in screen 9004 when you call it? is it easier to put the logic in &GRAPH in a subroutine and in PBO of 9004, you call it?

former_member331934
Participant
0 Kudos

Dear sandra.rossi,

Thank you for your attention. I'm trying to autoclick graph button as soon as user clicks &SMCA button. In screen 9004 there will be an ALV report and graph format should automaticaly open together with ALV.

former_member331934
Participant
0 Kudos

Dear quynh.doanmanh,

Yes you understood my problem very well but i took Call Method part into PBO of 9004 and nothing changed

Sandra_Rossi
Active Contributor
0 Kudos

I don't think you can do it the way you propose.

thomas_mller13
Participant
0 Kudos

It makes no sense to throw a cl_gui_cfw=>set_new_ok_code in a PAI. You should call that mehtod in the control.

former_member331934
Participant
0 Kudos

Dear experts thank you for attention

i solved this question in a super easy way.

I saved variant when graph is open then graph automatically opens when i refresh the page