SAP Business One SDK Support

SAP Patch Release Details

Software Component Version
Patch Level
Planned Availability
SAP Business One 10.0
01 Jan 17, 2020
00 Delivered: Nov 18, 2019. Patch Note: 2842030
SAP Business One 9.3*
13 Feb 21, 2020
12 Dec 6, 2019
11 Delivered: Aug 28, 2019. Patch Note: 2801356
SAP Business One 9.2*
11 Delivered: May 18, 2018. Patch Note: 2547047

Server Commands for SAP B1 HANA

1.To start HANA Database
Logon Linux server with GISADM user id then go to
usr/sap/<sid>/HDB00/
Now in terminal type
./HDB start

2.To check the SLD status
 /etc/init.d/sapb1servertools status


3.To Start the SLD
 /etc/init.d/sapb1servertools start


4.To stop the SLD
 /etc/init.d/sapb1servertools stop

5.To Start the Service layer
 /etc/init.d/b1s start


6.To stop the Service layer
 /etc/init.d/b1s stop

7.Install a RPM package
rpm –ivh packagename.rpm

8.Verify a RPM package was installed
rpm -qa | grep packagename
locate packagename

9.To find a file location
find . -name <file name>

10.To confirm Business One is installed
rpm -q -a | grep B1

11.To remove Business One
rpm -q -a | grep B1 | xargs rpm -e



Menu ID list of SAP B1

The following table lists the business objects that are exposed through the DI API.
Object Name Object ID Description



ID Name
257
&About SAP Business One
272
&Help       
275
&Context Help    F1  
276
H&elp Settings      
512
&File    
514
&Close    
518
&Page Setup      
519
P&rint Preview      
520
Pr&int    Ctrl+P   
523
&Launch Application      
524
Loc&k Screen   
526
Exi&t Ctrl+Q   
768
&Edit    
769
&Undo Ctrl+Z   
770
&Redo Ctrl+Shift+Z   
771
&Cut Ctrl+X   
772
C&opy Ctrl+C   
773
&Paste Ctrl+V   
774
&Delete Del   
775
&Select All   
1024
&Window    
1025
&Cascade    
1026
C&lose All    
1029
M&essages/Alert Overview   
1030
&Main Menu Ctrl+0  
1280
&Data    
1281
&Find Ctrl+F   
1282
&Add Ctrl+A   
1283
&Remove    
1284
&Cancel    
1285
R&estore    
1286
Cl&ose    
1287
&Duplicate Ctrl+D   

Read Excel using SQL


Excel reading is possible only if system is installed with AccessDatabaseEngine(32 or 64bit), and below configuration is done in SQL;

Step 1 : Re-Configure the SQL settings for reading Excel.

 sp_configure 'show advanced options', 1;
 GO
 RECONFIGURE;
 GO
 sp_configure 'Ad Hoc Distributed Queries', 1;
 GO
 RECONFIGURE;
 GO

sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Ole Automation Procedures', 1;
GO
RECONFIGURE;
GO

EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
GO
EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
GO



Step 2 : Reading Excel

Excel must be inside any of the Drive folder with full permission of system having SQL Installed.

Execute the below query; Were excel is in D:\ExcelUpload folder

SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=D:\ExcelUpload\YourExccelName.xlsx', 'select * from [Sheet1$]')

Reading the SYSTEM Variable in User Data Source string

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



 strTotal = PForm.DataSources.UserDataSources.Item("SYS_85").ValueEx;

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

Check Tables in View \ Procedure \ SQL Job

Most of the cases, it will difficult to find where the table or column or procedure is used any where in the Procedures in the database; Below quires will help to search through the data base and find the table or procedure the keywords are used


Below query will help to check the table is used any where in View or Procedure


SELECT j.Name, s.Database_name, s.Command
FROM msdb.dbo.sysjobsteps s
INNER JOIN msdb.dbo.sysjobs j
ON s.job_id = j.job_id
WHERE s.command LIKE '%TableName%'
AND s.database_name LIKE '%DBName%'



Below query will help to check the table is used any where in SQL Job

SELECT DISTINCT so.Name
FROM syscomments sc
INNER JOIN sysobjects so ON sc.id=so.id
WHERE sc.TEXT LIKE '%OBTN%'