Skip to Content
author's profile photo Former Member
Former Member

Scripting Questions

Hi Everyone,

I'm relatively new to scripting. I have a couple of issues I've run into trying to write a script for a 3rd party product (ImageNow). I'm trying to write a script for the MIGO screen that gets values from a bunch of fields and transfers over to the ME23N screen to get a few values.

On the MIGO screen I need to get values off of the Detail data tab. The problem is that some users may have this area minimized. I can set the script to maximize the tab but I need a way to check to see if it's really minimized because if it's not the button (session.findById("wnd[0]/usr/ssubSUB_MAIN_CARRIER:SAPLMIGO:0002/subSUB_ITEMDETAIL:SAPLMIGO:0302/btnBUTTON_DETAIL").press) does not exist.

I've also got something on the ME23N screen that I can't figure out...when I record a script to get a particular tab it comes back with :

session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0013/subSUB1:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1102/tabsHEADER_DETAIL/tabpTABHDT2").select

When I have users test it fails...I tried recording script under their id and it seems like the field name is slightly different:

session.findById("wnd[0]/usr/subSUB0:SAPLMEGUI:0020/subSUB1:SAPLMEVIEWS:1100/subSUB2:SAPLMEVIEWS:1200/subSUB1:SAPLMEGUI:1102/tabsHEADER_DETAIL/tabpTABHDT2").select

Is there something I can check to see what is driving the difference?

thanks for any help

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Dec 03, 2011 at 09:42 AM

    Hi Brian,

    welcome to the forum. You could solve your issue as follows.

    for example:

    . . .
    on error resume next
    session.findById("wnd[0]/usr/ssubSUB_MAIN_CARRIER:SAPLMIGO:0002/subSUB_ITEMDETAIL:SAPLMIGO:0302/btnBUTTON_DETAIL").press
    if err.number > 0 or err.number < 0 then
     'do something for example 
     session.findById("wnd[0]").maximize
     session.findById("wnd[0]/usr/ssubSUB_MAIN_CARRIER:SAPLMIGO:0002/subSUB_ITEMDETAIL:SAPLMIGO:0302/btnBUTTON_DETAIL").press
    end if
    on error goto 0
    . . .
    

    I suspect the differences of scripts are to others users in the different SAP GUI version..

    Regards,

    ScriptMan

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 08, 2011 at 05:23 PM

    Hi Brian,

    I've seen that you have now opened a new thread. Could you tell us in this thread if your problem was solved?

    Regards,

    ScriptMan

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.