We have added search box. Key in SAP issue keyword to search
TopBottom

Announcement: wanna exchange links? contact me at sapchatroom@gmail.com.

RE:[sap-dev] How to Choose a Specific Layout by Name, Instead of ID?

Posted by Admin at
Share this post:
Ma.gnolia DiggIt! Del.icio.us Yahoo Furl Technorati Reddit

Reply from ChrisW_at_Work on Jul 16 at 2:32 AM
Hi Szaboa,
Are you trying to export data from the control?
If so, then I use this to get all the Column names then export the data.
' this is in VBA for excel
'NB this is for a different SAP screen to yours!
'"======="
' get the control type
Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").Type
' get the control name
Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").Name
' get the control object type. Important.
Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").Text
Debug.Print "--------------"

' select all columns
s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").SelectAll
' get all the column names into a collection
Set A = s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").SelectedColumns
; the collection is zero based
For i = 0 To A.Count – 1
' get first name
sColumnName = A.Item(i)
' get the data for a row that column
Debug.Print s.findById("wnd[0]/usr/cntlGRID1/shellcont/sh ell/shellcont[1]/shell").GetCellValue(irow, sColumnName)
Next
'==
Best wishes
Chris

---------------Original Message---------------
From: szaboa
Sent: Wednesday, July 15, 2015 6:54 AM
Subject: How to Choose a Specific Layout by Name, Instead of ID?

Hi!

I would like to create a script where the script chooses a specific layout, but not via currentcellrow like here:

session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").currentCellRow = 2
session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").firstVisibleRow = 0
session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").selectedRows = "2"
session.findById("wnd[1]/usr/ssubD0500_SUBSCR EEN:SAPLSLVC_DIALOG:0501/cntlG51_CONTAINER/shellcont/ shell").clickCurrentCell

In spite of that I need to choose the layout by name? So choose layout "/HUF"

Thanks for your help:
Attila

 
Reply to this email to post your response.
 
__.____._
Manage Settings | Unsubscribe | Create FAQ | Send Feedback
  
Copyright © 2015 Ziff Davis, LLC. and message author.
Ziff Davis, LLC. 28 E 28th Street New York, NY 10016
ChrisW_at_Work  
 
Mark as helpful
View this online
Ask a new question
 
In the Spotlight
Earn Recognition for Your Contributions at Toolbox for IT. Gain Points for Community Achievements

_.____.__

0 comments:

Post a Comment

T r a n s l a t e to your language