cancel
Showing results for 
Search instead for 
Did you mean: 

Personas 3.0 "Control not found" error in script for GOS menu item selection

Former Member
0 Kudos

Hi,

I have recorded a script for "Attachment List" option of General Object Services (GOS) menu in ME54N. The script simply contains two lines:

// The script recorder will ignore event 'MenuAccess' for control object type 'GuiButton'.

session.findById("wnd[0]/titl/shellcont/tbar[0]/dropmenuGOS_TOOLBOX/shell/itemGOS_VIEW_ATTA").select();

when i execute the script, i get following error:

Received "control not found" on batch step: {"post":"action/4/wnd[0]/titl/shellcont/tbar[0]/dropmenuGOS_TOOLBOX/shell/itemGOS_VIEW_ATTA"}

The complete batch was:
[{"post":"action/4/wnd[0]/titl/shellcont/tbar[0]/dropmenuGOS_TOOLBOX/shell/itemGOS_VIEW_ATTA"},{"get":"state/ur/"}]


After a lot of analyses, i have figured out that the script fails because the script recorder is not recording the click of the GOS menu button. Instead, it says that "MenuAccess" event is ignored (as stated in the first line of the script). I have searched a lot in the forums, but i could not find a way to trigger this "MenuAccess" event. if i first click on GOS menu and then execute the script, it does not give any error!


It is also noteworthy that i had a script in Personas 2.0 (in a different server) for the same requirement and it is working like a charm.


System is ECC 6.0 with EHP 7. Personas 3.0 SP02.

Snapshot of the personas script editor is attached.


Looking forward for helpful responses.

Salman

Accepted Solutions (0)

Answers (3)

Answers (3)

thomas_herz
Explorer
0 Kudos

Hi Salman,

Have you found a solution for that problem ? I'm facing the same challenge :-(((

Regards

Thomas

0 Kudos

Hi Salman,

It looks like the client sources are not up to date. The latest version of SAP Screen Personas 3.0 SP02 supports a lot more events. Kindly update the client sources to version 23 of the following SAP Note:

2222774 - SAP Screen Personas 3.0 SP02 : Update of Client Sources Files

Alternatively, you can upgrade to 3.0 SP03 if possible.

Best regards

Kranthi

dmitry_sharshatkin
Active Participant
0 Kudos

Hello Salman,

I don't know if it helps. In fact I had no problems with clicking on the GOS menu buttons, but I could not check if it "Is Visible" or if it "Does Exist". I think the buttons which are greyed out are not visible to Personas. I was told this is kind a bug. Instead I used web rfc function to check if there is an attachment. I used the result for IF condition and if attachment is there, then I pressed a button, which is visible. If not, then i skipped the step for not getting the error.

And by the way, i was using SSP 2.0 not 3.0

Hope this can help...

BR, Dima

Former Member
0 Kudos

hi Dmitrii,

Can you tell me which web rfc function you used to check if there is an attachment? Is it a standard rfc function or did you build it yourself? I would like to use this method to build something similair for transaction IW21 in SP 2.0 sp2.

Thanks,

BR,Jasper

dmitry_sharshatkin
Active Participant
0 Kudos

Hello Jasper,

It was my own one. I used  cl_binary_relation=>read_links_of_binrels.

" Fill BO data

     ls_lpor-instid = lv_notif_no.

     ls_lpor-typeid = 'BUS2038'.

     ls_lpor-catid  = 'BO'.

     " Fill links data (attachments only)

     ls_relation_options-sign   = 'I'.

     ls_relation_options-option = 'EQ'.

     ls_relation_options-low    = 'ATTA'.

     append ls_relation_options to lt_relation_options[].

     " Get Binary Links

     try.

         call method cl_binary_relation=>read_links_of_binrels

           exporting

             is_object           = ls_lpor

             it_relation_options = lt_relation_options

             ip_role             = 'GOSAPPLOBJ'

             ip_no_buffer        = abap_true

           importing

             et_links            = lt_links.

       catch cx_obl_parameter_error .

       catch cx_obl_internal_error .

       catch cx_obl_model_error .

     endtry.


BR, just Dima