Quantcast
Channel: SCN : Discussion List - Scripting Languages
Viewing all 325 articles
Browse latest View live

Focus on SAP window using VBA

$
0
0

Hi Im new here.

Can somebody help me with excel and SAP junction through VBA? I beg for help with focusing on another window during script being processed. Its SAP window. Its SAP ARP - transaction CO02 - change of order - adding an attachment. Im in the final step where small import window pops up and I just need to insert or search for the path of the file I want to add. Its kind of microsoft window - on the left are large buttons with desktop, documents and 2-3 more. But its called Import on the left upper corner. I want to use the sendkeys prompt - the path will be allways the same eg C:\File\xxx.pdf. So I thought it will be very easy just call the macro recorded in sap until the window shows, then sendkeys "C:\File\xxx.pdf" then continue with SAP macro to okay it and save - end.

Problem is when the window show and I sendkeys - it does not write anything in path box. When i run the macro until the window shows and type something on kb it write normally in the box.

 

Can somebody help me please with this? Ive tried an application"focus" ("microsoft") prompt (quotes are for I cant remember the exact phrase I dont have the excel and file with macro here or SAP) It does not help... maybe because its not windows window but SAP window.

Windows 7, Office 2007, work computer - so I dont have access to all OS features, but I think it does not matter. 

If somebody can tell me how the prompt is called in sap, then it will be easy: Something like: findbyID.......importwindow.input.text = the way to the file...

:

Thanks very much for your replies.

Mirek


GUI script in transaction EPRODCUST via Excel VBA

$
0
0

I am attempting to script transaction EPRODCUST for test data setup. The data entry recording works flawlessly, so thats nice. IE:

Session.findById("wnd[0]/usr/cntlCC_PARAM_LIST/shellcont/shell").modifyCell 1, "VALUE", DATEFROM

This will correctly place my test data into the cell of the referenced MDT.

 

My issue arises when I "press" the get key button in the toolbar, then attempt to read the created key out of the grid for later reference.

 

The recording has an unfamiliar syntax, & Google isn't super useful in helping interpret where I'm going wrong.

 

Session.findById("wnd[0]/usr/cntlCC_PARAM_LIST/shellcont/shell").Cell 6, "VALUE"

 

How do I read the contents of this cell into a variable?

I've tried TESTVAR = Session.findById("wnd[0]/usr/cntlCC_PARAM_LIST/shellcont/shell").Cell 6, "VALUE" & it fails syntax check.

 

Apparently I know just enough to get myself into trouble...

Im more familiar with the syntax:

Session.findById("wnd[2]/usr/tblSAPLSZA6T_CONTROL2/txtADTEL-REMARK[6,0]").Text

where I declare the cell reference completely & use ".text" to read its contents.

 

cheers.

How to relate the SAP objects with VBA programming?

$
0
0

Hi folks,

 

 

I am new to SAP.I was looking to automate some reports from SD modules.I want to know that Is it possible to work on SAP objects through VBA programming? If yes,tell me how to explore the SAP objects.

 

 

With Regards,

Hemanth chalamalasetti

How to connect Access VBA with a customer specific function module using RFC

$
0
0

Hello,

 

I try to fetch some data from our SAP ERP system by using a customer specific function module.

The connection via RFC is working. Unfortunately, after trying to add the SAP function module to the connection, the result is still nothing.

 

I have a VBA function for the connection. The return value of this function is the working connectin to SAP system.

 

Private Function sapConnect() As Object
'---------------------------------------------------------------------------------------
' Procedure : sapConnect
' Author    : Steffen Retz
' Date      : 22.11.2013
' Purpose   :
'---------------------------------------------------------------------------------------
'
Dim sapConnection   As Object
Dim sapFunction     As Object
Dim RetVal          As Variant
Dim ME5             As Variant
Dim strSAP_System   As String   On Error GoTo sapConnect_Error
'Set sapConnect = False
Set sapFunction = CreateObject("SAP.Functions")
Set sapConnection = sapFunction.Connection
With sapConnection    .ApplicationServer = "xx.xxx.xx.xx"    .SystemNumber = xxx    .System = "xxx"    .client = "xxx"    .Language = "EN"    .User = m_strcUserName 'InputBox("Please insert your SAP user name", "SAP Connection: User")    '.Password = InputBox("Please insert you SAP password", "SAP Connection: Password")    RetVal = SysCmd(acSysCmdSetStatus, "Connecting to " & strSAP_System & " . . . ")            If .logon(0, True) <> True Then        If .logon(0, False) <> True Then            'No connection -> Error            .LastError             Exit Function        End If                Set sapConnect = sapFunction    End If    
End With
sapConnect_Exit:    On Error Resume Next    Exit Function    
sapConnect_Error:    Err.Number = vbObjectError + 1    Err.Source = m_strcClassName    Err.Description = "Error" & " <<>> " & Err.Description    LogError Err, Critical, "sapConnect"    GoTo sapConnect_Exit       On Error GoTo 0
End Function

 

The other function is using the returning connection to retrieve the data from the SAP system.

After adding the function module to the connection, I recognized that the object MyFunc is still empty.

 

Set MyFunc = R3.Add("Z_ZZMHP_HR_SAP_NOTES_READ")

 

I also tried this with RFC_READ_TABLE and BAPI_USER_GETLIST. Both function are working.

 

 

Private Function RFC_SAP_NOTES_READ(sapConnection As Object, arrSAPNotes As Variant) As Boolean
'---------------------------------------------------------------------------------------
' Procedure : RFC_SAP_NOTES_READ
' Author    : Steffen Retz
' Date      : 03.12.2013
' Purpose   : FM in SAP: Z_ZZMHP_HR_SAP_NOTES_READ
'---------------------------------------------------------------------------------------
'
 Dim strTemp As String
 Dim RetVal As Variant, nSecondsLeft As Long, nTotalSeconds As Long
 Dim R3, MyFunc, App As Object
 Dim j As Integer
' Define the objects to hold IMPORT parameters
 Dim IT_SAP_NOTES_KEY As Object
' Define the objects to hold the EXPORT parameters
 Dim ZZMHP_TT_HR_SAP_NOTES_ERRORMSG As Object
 Dim ET_SAP_NOTES As Object
 ' Use to write out results
 Dim ROW As Object
 Dim Result As Boolean
 Dim iRow, iColumn, iStart, iStartRow, iField, iLength As Integer   On Error GoTo RFC_SAP_NOTES_READ_Error
If sapConnection Is Nothing Then    Set R3 = sapConnect
Else    Set R3 = sapConnection
End If
 '*****************************************************
 'Call RFC function Z_ZZMHP_HR_SAP_NOTES_READ
 '*****************************************************
 Set MyFunc = R3.Add("Z_ZZMHP_HR_SAP_NOTES_READ")
'EXPORTS
Set IT_SAP_NOTES_KEY = MyFunc.exports("IT_SAP_NOTE_KEY")
IT_SAP_NOTES_KEY.Value = arrSAPNotes
'IMPORTS
Set ZZMHP_TT_HR_SAP_NOTES_ERRORMSG = MyFunc.imports("ZZMHP_TT_HR_SAP_NOTES_ERRORMSG")
Set ET_SAP_NOTES = MyFunc.imports("ET_SAP_NOTES")
 RetVal = SysCmd(acSysCmdSetStatus, "Extracting " & j & " . . . ")
MyFunc.Call
' Result = MyFunc.Call
' If Result = True Then
'     Set DATA = MyFunc.Tables("DATA")
'     Set FIELDS = MyFunc.Tables("FIELDS")
'     Set OPTIONS = MyFunc.Tables("OPTIONS")
' Else
'     MsgBox MyFunc.EXCEPTION
'     R3.Connection.LOGOFF
'     Exit Function
' End If      
 Close #2
 RetVal = SysCmd(acSysCmdRemoveMeter)
 RFC_SAP_NOTES_READ = True
RFC_SAP_NOTES_READ_Exit:    On Error Resume Next    Exit Function    
RFC_SAP_NOTES_READ_Error:    RFC_SAP_NOTES_READ = False    Err.Number = vbObjectError + 1    Err.Source = m_strcClassName    Err.Description = "Error" & " <<>> " & Err.Description    Debug.Print Err.Description    LogError Err, Critical, "RFC_READ_TABLE"    GoTo RFC_SAP_NOTES_READ_Exit       On Error GoTo 0
End Function

I can't find the error. Do I have to use a specific method for a customer specific fuction module?

Or is it not possible to use a customer specific function module?

 

Thanks for any help.

 

Best regards,

 

Steffen

Reading Excel Cell values using VB script

$
0
0

Hi All,

 

I am currently try to work on a blog where its aim to input the values from excel and based on the values it has to get the values from DB in sap and display it in the Output portion of the excel as mentioned in the following blog http://scn.sap.com/docs/DOC-31015. I have created the FM and done the basic things mentioned in the blog but I am facing an error "Run Tme Error '40036' Application-defined or object-defined error". Please find my code below and help to resolve the issue.

Attachment.png

With Regards,

Giriesh M

How to Info record long text with VBA

$
0
0

I am very new to VBA and I am trying to create a macro to copy the contents of an existing PIR in ME13 and create a new PIR in ME11.

I can get my macro (excel VBA) to copy all of the fields except for the two text fields. Can someone show me an example of how to copy the long text?

 

I have searched for answers in the forums but have not found any that I can make sense of.  I have never used or accessed the tables that I have seen referenced.

 

Any help would be greatly appreciated.

Is it possible to use RFC_READ_TEXT using existing connection??

$
0
0

Hello all!  I am new to VBA and know very little, your assistance is greatly apprecitated.

I am trying to create a macro that will copy long texts from a PIR.  The only way I have found to do it so far is using RFC_READ_TEXT.

My macro starts out using a SAP screen/connection that I already have open but when it gets to the RFC_READ_TEXT it wants me to sign in again.

Is there another way to call the read_text function module that will use my pre-existing conection?

Here is what I haave so far.

 

Sub pirCopier()

Dim Application, SapGuiAuto, Connection, session
Dim SID, bh1Wnd, CollCon, i, CollSes

Dim materialGroup
Dim vendor
Dim orderUnit
Dim sortTerm
Dim piDelivTime
Dim shippgInstr
Dim condition1
Dim condition2
Dim condition3
Dim condition4
Dim condition5
Dim description
Dim noteText
Dim poText


Set SapGuiAuto = GetObject("SAPGUI")
Set Application = SapGuiAuto.GetScriptingEngine
  Set CollCon = Application.Connections()
      If Not IsObject(CollCon) Then
        Exit Sub
      End If

 

'- Find R3 window -------------------------------------------
        For i = 0 To CollCon.Count() - 1

          Set Connection = Application.Children(CLng(i))
          If Not IsObject(Connection) Then
            Exit Sub
          End If

          Set CollSes = Connection.sessions()
          If Not IsObject(CollSes) Then
            Exit Sub
          End If
       
                    Set session = Connection.Children(0)
                    SID = session.info.systemname()
                   If Not IsObject(bh1Wnd) Then
                    If SID = "BH1" Then Set bh1Wnd = Application.Children(CLng(i)) 'R3
                   End If
        Next

If Not IsObject(bh1Wnd) Then
MsgBox "SAP R/3 window not found. Please open at least on session of SAP R/3."
Exit Sub
End If

 

'-------------- start pirCopier -------------

Set Connection = bh1Wnd
Set session = Connection.Children(0)

'open pir to be copied
session.findById("wnd[0]/tbar[0]/okcd").text = "/nME13"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/radRM06I-NORMB").Select
session.findById("wnd[0]/usr/ctxtEINA-LIFNR").text = ""
session.findById("wnd[0]/usr/ctxtEINA-MATNR").text = ""
session.findById("wnd[0]/usr/ctxtEINE-EKORG").text = "1001"
session.findById("wnd[0]/usr/ctxtEINE-WERKS").text = "0002"
session.findById("wnd[0]/usr/ctxtEINA-INFNR").text = Range("B2")
session.findById("wnd[0]/usr/radRM06I-NORMB").SetFocus
session.findById("wnd[0]").sendVKey 0

vendor = session.findById("wnd[0]/usr/ctxtEINA-LIFNR").text
desciption = session.findById("wnd[0]/usr/txtEINA-TXZ01").text
orderUnit = session.findById("wnd[0]/usr/ctxtEINA-MEINS").text
sortTerm = session.findById("wnd[0]/usr/txtEINA-SORTL").text
session.findById("wnd[0]/tbar[1]/btn[7]").press
piDelivTime = session.findById("wnd[0]/usr/txtEINE-APLFZ").text
shippgInstr = session.findById("wnd[0]/usr/ctxtEINE-EVERS").text
session.findById("wnd[0]/tbar[1]/btn[8]").press


'--- start of copy long texts ---------------------------------------------

Set funcControl = VBA.CreateObject("SAP.Functions")
Set RFC_READ_TEXT = funcControl.Add("RFC_READ_TEXT") '<------------ This is where it wants me to re sign in
Set tblText_Lines = RFC_READ_TEXT.Tables("TEXT_LINES")

 

'----- copy po long

 

text from pir ---------

tblText_Lines.AppendRow
tblText_Lines(1, "TDOBJECT") = "EINE"
tblText_Lines(1, "TDNAME") = Range("B2") & "100100002"
tblText_Lines(1, "TDID") = "BT" 'PO text

If RFC_READ_TEXT.Call = True Then
   
        If tblText_Lines.RowCount > 0 Then
   
            For intRow = 1 To tblText_Lines.RowCount ' Change Next line to write a different header row
       
                If intRow = 1 Then
                poText = tblText_Lines(intRow, "TDLINE")
                Else
                poText = poText & vbCrLf & tblText_Lines(intRow, "TDLINE")
                End If
            Next
        Else
       
            GoTo poTextEnd
   
        End If

    Else

        MsgBox "ERROR CALLING SAP REMOTE FUNCTION CALL FOR PO TEXT"

    End If
   
    'Result Table set back
Do Until tblText_Lines.RowCount = 0
     Call tblText_Lines.rows.Remove(1)
Loop

poTextEnd:


End Sub

VBS Input Data Into Shell Container (Long Text Editor)

$
0
0

Greetings,

 

I am having an issue with using VBS to place text within shell container. Transaction CG12, create a phrase, click phrase item, then double click on your entered phrase text to open the long text editor. Trying to make script write to this word application within the SAP GUI, haven't had much luck. If you're a script master please assist. A simple subset of the code is below, simply get the focus within the window to set text using hard coded text or a variable.

 

Can run this script after navigating to CG12 if you like.

 

CG12_longtext_editor.png

Sub Phrase_Load()

 

If Not IsObject(App) Then

   Set SapGuiAuto = GetObject("SAPGUI")

   Set App = SapGuiAuto.GetScriptingEngine

End If

If Not IsObject(Connection) Then

   Set Connection = App.Children(0)

End If

If Not IsObject(session) Then

   Set session = Connection.Children(0)

End If

If IsObject(WScript) Then

   WScript.ConnectObject session, "on"

   WScript.ConnectObject App, "on"

End If

 

session.findById("wnd[0]").maximize

session.findById("wnd[0]/tbar[1]/btn[18]").press

session.findById("wnd[0]/usr/ctxtRCGPHIOT-PHRGRP").Text = "GRAPHIC"

session.findById("wnd[0]/usr/txtRCGPHIOT-PHRTEXT").Text = "Jelly beans on the sidewalk"

session.findById("wnd[0]/usr/txtRCGPHIOT-PHRTEXT").SetFocus

session.findById("wnd[0]/usr/txtRCGPHIOT-PHRTEXT").caretPosition = 5

session.findById("wnd[0]").sendVKey 0

session.findById("wnd[0]/tbar[1]/btn[6]").press

session.findById("wnd[0]/usr/tblSAPLC115LG_IOTAB_CTR/txtRCGPPIOT-PHRTEXT[1,3]").SetFocus

session.findById("wnd[0]/usr/tblSAPLC115LG_IOTAB_CTR/txtRCGPPIOT-PHRTEXT[1,3]").caretPosition = 23

session.findById("wnd[0]").sendVKey 2

container_text = session.findById("wnd[0]/usr/cntlSCMSW_CONTAINER_2102/shellcont/shell").Text

'session.findById("wnd[0]/usr/cntlSCMSW_CONTAINER_2102/shellcont/shell").setDocument 1, "SAP.DocumentContainerControl.1"

 

End Sub


Column name of a Table

$
0
0

Hello,

i am a biginner.

 

i use a Windows Visual Basic script.

 

 

the script calls a SAP Table

I have to read the Content of some cells.

But sometimes a User have an other Layout of the table and the Column is not listetd.

How can i check the Column name is available

 

how can i check the column Names of the Table.

 

session.findbyid("Wnd[0]......").columns(3).title

 

don't work.

Laufzeitfehler 438

 

Antworten gerne auch in deutsch.

error on calling a function from vba

$
0
0

hello guys

 

I have an ABAP function developed on our SAP environment called /TENR/CFBPP_SAP_ACT_TO_SQE

It works fine when called from SE37 transaction, but when I call it from my VB app, I get a SYSTEM_FAILURE error at MyFunC.Call

 

I guess I can call it just like a BAPI function, so I created the code above (I supressed the connection because it works)

-----------------------------------------------------------------------------------------------------

...

        MyFunC = R3.Add("/TENR/CFBPP_SAP_ACT_TO_SQE")

 

        MyFunC.Exports("I_PEP").value = "P/87620/E.AAF"

        MyFunC.Exports("I_CLASE_ORDEN").value = "CF02"

 

 

        'MyFunC = R3.Add("BAPI_USER_GETLIST")

        'MyFunC.Exports("MAX_ROWS").value = "100"

        'MyFunC.Exports("WITH_USERNAME").value = ""

 

        If MyFunC.Call Then

 

           Dim objReturn As Object

           'objReturn = MyFunC.TABLES("USERLIST")

           objReturn = MyFunC.imports("T_ACTIVIDADES")

           Return objReturn.rowcount

 

        Else

            Return MyFunC.Exception

        End If

-----------------------------------------------------------------------------------------------------

 

when I toogle to call BAPI_USER_GETLIST which have similiar params, it works fine

 

I checked function name and param names and they are ok.

How to Create Script Mass User Login & Doing Transaction

$
0
0

Hi SAP Experts,

 

I have a activity to do performance test with 100 concurrent users.

But unfortunately i have no supplement PT software for this activity (Like Rational PT or Loadrunner).

So i think i will do it with sapgui script.

Is it possible to create vb script (SAP GUI Scripting) to fulfill my requirement to do this activity. If yes how to create this script.

 

Thanks & Best Regards,

Husin

CC07 - Change number-> How to get node value

$
0
0

Hi.
Im back...

Can someone help me here again?
Im doing some macros for seeking part numbers in sap database and examine they if they are in "collision" for change. When you want change part number step by step manufacturing recipe, you have to put part number in change (so the PN musnt be in other change, therefore collision) and make report. change is for everyone, who work with PN, report is for us... maybe you know all of this...
Now change and report are bonded via document flow. ... what I need. I have change number and need some macro for fast search for report.
Im using trsction cc07 - insert change number - list shows. I can expand nodes - twice do it and there is my report. When I click on it and do ctrl+ c it works - I can paste it in excel and work with it. With macro it doesnt work. When I end the macro with sendkeys ("^c") and then manualy paste in excel, it paste the sap script.

So I think of another route>


session.findById("wnd[0]").maximize
session.findById("wnd[0]/tbar[0]/okcd").text = "cc07"
session.findById("wnd[0]").sendVKey 0
session.findById("wnd[0]/usr/ctxtG_CHG_NR-LOW").text = "500001684513"
session.findById("wnd[0]/usr/ctxtG_CHG_NR-LOW").caretPosition = 12
session.findById("wnd[0]/tbar[1]/btn[8]").press
session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").hierarchyHeaderWidth = 116
session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").expandNode "          1"
session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").topNode = "          1"
session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").expandNode "          2"
session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").topNode = "          1"
session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").selectNode "          4"
session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").doubleClickNode "          4"

So Now I just need some like this:

Sheet1.Range("A1").Value = session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").selectedNode.Value/Text/Line/.....

If I use:
Sheet1.Range("J41").Value = session.findById("wnd[0]/shellcont/shell/shellcont[1]/shell[1]").selectedNode
Then in A1 will be "4".... its the node number, now I need the value....

Do someone know the end code?

Thanks in advance.

Script pauses when windows dialog box asks for file save location...

$
0
0

Whenever i attempt to export a report from SAP to excel using VBA the script pauses because a windows dialog box opens that prompts the user to select a file name and location...As a work around to this issue i would like to select the columns, copy and paste them into excel.  I have been successful in selecting all the columns

 

with session.    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "EBELP"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "BSART"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "WERKS"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "MATNR"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "TXZ01"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "BEDNR"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "AUFNR"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "NAME1"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "PMATN"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "AEDAT"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "ZSLFDT"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "MENGE"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "NETPR"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "STPRS"    .findById("wnd[0]/usr/cntlGRID1/shellcont/shell").selectColumn "ZWEMNG"
end with

However, i cannot find the vkey to copy the data.  Can anybody help?

Check other Modus is aktually opend, and close Modus

$
0
0

Hello,

 

does everyon know a possibility to check if an other Modus is aktually opend.

And if an other Modus is open how can i close the Modus.

I cant find any documentation.Modus.jpg

 

 

Regards,

Emil

Is there a good way to get an xpath reference from SAP for use in SAP GUI?

$
0
0

I am doing a fair bit of SAP GUI scripting with VBA.

 

Most of the time I record an SAP GUI script via the recorder and edit it appropriately. However, increasingly often as I am familiar with SAP GUI and begin modifying existing scripts, I want to know the x-path reference for menu items so I can incorporate them in my scripts.

 

For example, my most recent pursuit was a confirmation yes/no button which resulted with:

 

    m_Session.findById("wnd[1]/usr/btnSPOP-OPTION1").press

 

in exploring the SAP interface I've not been able to find a good way to get this path (wnd[1]/usr/btnSPOP-OPTION1) from SAP. I know I can go into m_Session on the VBA side with the properties explorer and eventually get the path in a format like - "/app/con[0]/ses[0]/wnd[1]/usr/btnSPOP-OPTION1" - which kind of works. This is a huge hassle to gothrough in many cases 4+ layers to get there though. Plus many of the SAP field names aren't exactly the most clear and it takes a while to figure out what the correct one is.

 

I'd like to be able to do something similar to the F1 (help) --> technical information query which can give some of the information I want.

 

Is this possible to get from SAP? Or should I just write a "SAP GUI scraper" in VBA which reports out ALL x-paths contained within the session object and try to get enough information to make this meaningful?


Extract data from a Shell container using VBS - S_ALR_87012168

$
0
0

Hello everyone,

 

I'm trying to automate the extraction of informations to excel in some transactions, i was able to do this but im still missing a very important part, in transaction "S_ALR_87012168", i need to find a way to get this information from column Due-Total OI, row (Doc. Type=DG), is there a way to do this??

 

Thanks in advance for your help!!

How to Logon with RFC

$
0
0

Good Day!

 

I want do do a login with RFC SAP.Logoncontrol.1. I dont want to use SSO instead of Username and password.

 

Has anybody expierience with this? i am not sure what to type in the values marked red

 

    Dim oConnection As Connection

    Set oConnection = oLogonControl.NewConnection

   

    With oConnection

        .ApplicationServer = "pkgps50d.os.fth.sbs.de"

        .Client = 470

        .SystemNumber = 46

        .System = "PS5"

        .SystemID = "PS5"

        .Language = "DE"

        .SNC = True

        .SNCQuality = 9

        .SNCName = ""

        .UseSAPLogonIni = True

        .Logon 0, False

    End With

 

 

Would be appreciated if someone can help me.

 

Max

failed to connect to sap using php

$
0
0

In intranet it was connecting .. When I tried to connect to the client server the following error..

 

 

Failed to connect to the SAP serverRFC Error Info : Key : RFC_IO5 Status : RFC DRV=??? ??? Message : >>> RfcOpenEx ... Got following connect_param string: ASHOST=[ipaddress] SYSNR=01 CLIENT=100 USER=IMP_SLCM PASSWD=******* CODEPAGE=1100 <<< RfcOpenEx failed Internal: IO HANDLE=1 DRV=??? LINE=1068 CODE=5

 

 

Can any one help me on this .. thanks in advance..

Copy-Paste dates from Excel in SAP script

$
0
0

Hello,

 

I did a script in SAP. It goes in an Excel file to copy delivery dates and goes and paste them in a purchase order.

The date format in Excel is the same one as in SAP (YYYY/MM/DD), except that the script pastes the date format shown in the toolbar only (YYYY-MM-DD). Which is different and blocks the script.

date.gif

I know you can change the regional settings of the computer, but to get YYYY/MM/DD I need to put it to English South Africa which is not good because it changes other settings. I can also change the date format in SAP to make it match to my Excel file, but this is not good either because the people using this script will have a date format in SAP different then the other users and will cause confusion.

 

Is there a way for the SAP script to copy-paste the date format in the cell 2014/01/16 and not the 2014-01-16?

 

 

Patricia

How to grab the value of an RC return on stms table?

$
0
0

I have to do a massive amount of transports in order from sap gui becouse of the athorization level i got on my company.

i've been using sapgui script to do some simple tasks like adding roles or adding a massive amount of transport request to the stack.

 

Now i want to make a script that transports some orders one by one in order but only after the previus one is over and the RC=0.

 

for that I'm planing on readign the icon on the third column to know if its green to proceed.

i've tried to get the value as a text like this:

 

session.findById("wnd[0]/usr/lbl[24,6]").text

 

but it doenst return any text.

 

Do you know how can i get the icon or the tooltip value that apears when i drag the mouse over the icon as a text?

 

I would really apreciate your help.

Viewing all 325 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>