There are many ways to read the system variable in SAP SDK. But Simplest way is to read directly from data source. based on the Variable ID
Reading the SYSTEM Variable in User Data Source string
Remote System Login through VB Code
You can do a remote login using VB or C# code. Only few things is required; Like IP, User Name and Password
Remote Login and Copy File
'''''''''''''''Login
To Remote system Share Folder '''''''''''''''''''''''
Open_Remote_Connection(ServerIP, ServerUser,
ServerPass)
'''''''''''''''Copy
File Share Folder '''''''''''''''''''''''
''' To Copy a file please create a shared folder in the destination system with full access.
System.IO.File.Copy(strFullFile, ServerPath
+ strDocentry + "_" +
strCardCode.Trim() + ".xls")
Private Sub Open_Remote_Connection(ByVal
strComputer As String,
ByVal strUserName As
String, ByVal
strPassword As String)
Try
Dim
ProcessStartInfo As New
System.Diagnostics.ProcessStartInfo
ProcessStartInfo.FileName = "net"
ProcessStartInfo.Arguments = "use \\" & strComputer & "\c$ /USER:" & strUserName & " " & strPassword
ProcessStartInfo.WindowStyle =
ProcessWindowStyle.Hidden
System.Diagnostics.Process.Start(ProcessStartInfo)
System.Threading.Thread.Sleep(2000)
Catch
ex As Exception
End Try
End Sub
Subscribe to:
Posts (Atom)