Sunday, July 23, 2023

2315907 - Starting HANA automatically after Host has been started

 

Symptom

By default the SAP HANA database is configured so that it is not started automatically when the SAP HANA host is rebooted.



Environment

SAP HANA Platform

Resolution

If required, you can change this configuration by modifying the profile of the SAP HANA database as follows:

  1. Log on to the SAP HANA host as a user with root authorization.
  2. Change to the system profile directory /usr/sap/<SID>/SYS/profile.
  3. Edit the profile <SID>_HDB<instance number>_<host name>.
  4. Change the parameter setting Autostart = 0 to Autostart = 1 .
  5. Save the profile <SID>_HDB<instance number>_<host name>.

Tuesday, June 13, 2023

Samba Service Commands

Enable and start Samba service to save the changes:
# sudo systemctl enable smb
# sudo systemctl enable nmb
# sudo systemctl start smb
# sudo systemctl start nmb

To check the status of the Samba services:
# sudo systemctl status smb
# sudo systemctl status nmb

To stop the Samba services:
# sudo systemctl stop smb
# sudo systemctl stop nmb

To restart the Samba services:
# sudo systemctl restart smb
# sudo systemctl restart nmb

Wednesday, May 3, 2023

[SUSE Linux Pre- Setup before HANA Installation]

 

Since I always find it hard to gather the “right” packages for a fresh install of SLES for SAP Business One, here is a summary of repositories and associated packages required.

The following information was gathered from installing using the “SLE-15-SP3-Full-x86_64-QU2-Media1.iso”, however, the same should apply when installing from the “GM” release, or the newest “QU3” release. Packages were validated against the SAP Business One Administrator’s Guide, version for SAP HANA corresponding to FP2202 (the latest as of now).

During installation (or after), enable the following repositories, so that you can install the packages they provide:

  • Basesystem-Module 15.3-0
    • bc (not documented, but required)
    • glibc-i18ndata
    • insserv-compat (not documented, but required)
    • libcap-progs
    • libssh2-1
    • nfs-kernel-server
    • python
    • samba
    • samba-client
    • zip
  • Legacy-Module 15.3-0
    • libicu60_2
  • Python2-Module 15.3-0
    • python2-pyOpenSSL
  • SLEWE15-SP3 15.3-0 (SUSE Linux Enterprise Workstation Extension 15)
    • python-gtk
  • Development-Tools-Module 15.3-0
    • rpm-build
  • Server-Applications-Module 15.3-0
    • xmlstarlet

If the required repositories are enabled, you should be able to install all the prerequisites with the following one-liner:

zypper in -y bc glibc-i18ndata insserv-compat libcap-progs libssh2-1 nfs-kernel-server python samba samba-client zip libicu60_2 python2-pyOpenSSL python-gtk rpm-build xmlstarlet

If you do need to enable the required repositories after the installation, and have an active subscription or trial code, here are the commands to do so. Note that the Workstation Extension requires a separate registration code. Instead of activating the repositories online, you can use the “Full” media and enable these repositories during installation or from yast2.

SUSEConnect -p sle-module-basesystem/15.3/x86_64
SUSEConnect -p sle-module-legacy/15.3/x86_64
SUSEConnect -p sle-module-python2/15.3/x86_64
SUSEConnect -p sle-we/15.3/x86_64 -r <registration-code>
SUSEConnect -p sle-module-development-tools/15.3/x86_64
SUSEConnect -p sle-module-server-applications/15.3/x86_64

If you plan to only install SAP HANA (2.0 SP05 SPS 056) on the same machine, the prerequisites are much more simple:

  • Basesystem-Module 15.3-0
    • libatomic1
    • insserv-compat
zypper in -y libatomic1 insserv-compat


Tuesday, February 7, 2023

Prevent error activating calculated view in new schemas: user is not authorized (2950)

 

Scenario: you want to create a Calculation View and once you execute receive error .


Repository: Encountered an error in repository runtime extension;Model inconsistency. Create Scenario failed: The following errors occurred: user is not Authorize (2950)



Solution :


Run the below command for each Schema.


GRANT SELECT ON SCHEMA "SBOCONENERGY_TEST" TO _SYS_REPO WITH GRANT OPTION;

Tuesday, December 27, 2022

Extract Chart of Account COA Query

 

Select  AccountCode,AccountName,Title  from (

   Select OACT.AcctCode as AccountCode, OACT.AcctName as AccountName,OACT.GroupMask,OACT.GrpLine,OACT.Postable as Title

   from OACT

   Where OACT.Postable='Y'


   UNION ALL


   Select OACT.AcctCode as AccountCode, OACT.AcctName as AccountName,OACT.GroupMask,OACT.GrpLine,OACT.Postable as Title

   from OACT

   Where OACT.Postable='N'

   ) as T


   ORDER BY T.GroupMask,T.GrpLine


Sunday, December 4, 2022

[Part 1-3] Single Sign on Connection

Properties current SAP Connection command line argument: 0030002C0030002C00530041005000420044005F00440061007400650076002C0050004C006F006D0056004900490056 


using System;

using System.Collections.Generic;

using System.Linq;

using System.Threading.Tasks;

using System.Windows.Forms;

using SAPbobsCOM;


namespace MySAPB1WinFormApp

{


  



    static class Program

    {

        /// <summary>

        /// The main entry point for the application.

        /// </summary>

        /// 


        public static SAPbouiCOM.Application oApplication = null;

        public static SAPbobsCOM.Company oCompany = null;

        [STAThread]

        static void Main()

        {

            if(IsSAPConnected()==true)

            {


            }

        }



        public static bool IsSAPConnected()

        {

            try

            {

                int oErrorValue = -1;

                string oErrorMessage = string.Empty;



                //***Step:1

                //***** in this step we getting the Application 

                SAPbouiCOM.SboGuiApi oSboGuiApi = new SAPbouiCOM.SboGuiApi();

                string[] strCon = Environment.GetCommandLineArgs();

                oSboGuiApi.Connect(strCon[1]);

                oApplication = oSboGuiApi.GetApplication(-1);

                //**************************************************



                oApplication.StatusBar.SetText("SampleFormAddon is Connection", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Success);



                //*** Step 2

                // in this step company object generates the cookie for the current session  with the help of  method  GetContextcookie()


                oCompany = new SAPbobsCOM.Company();

                string oCookies =(string) oCompany.GetContextCookie();


                //**********************************************************


                //*** Step 3

                //****** in this step  GetConnectionContext(oCookies) method of the application object encrypt the connection string with the help of Cookies provided by the DI API


                string constr = oApplication.Company.GetConnectionContext(oCookies);


                //*************************************


                if (oCompany.Connected == true)

                    oCompany.Disconnect();


                //***Step4

                //*** in this step  setsbologincontext(constr) method of company object deciphers the encrypted  connection information and sets the connection parameter to the company object


                oCompany.SetSboLoginContext(constr);

                //**************************************************



                ///**Step 5

                ///*** in this step with the help of connect() method we establish connection with the company


                oErrorValue = oCompany.Connect();


                if (oErrorValue == 0)

                {

                    oApplication.MessageBox("Single Sign on  connection established", 1, "Alert", "", "");

                    return true;

                }


                else

                    oCompany.GetLastError(out oErrorValue, out oErrorMessage);

                    oApplication.MessageBox("ErrorCode" + oErrorValue + "ErroMessage" + oErrorMessage.ToString(), 1, "Error", "", "");

                    return false;


            }

            catch (Exception ex)

            {


                throw new Exception(ex.ToString());

            }

        }

    }

}

Crystal Report Formula Convert Amount into Words

 numbervar x := {OINV.DocTotal};


numbervar ipart;


numberVar decpart;


ipart := int(x);


decpart := x - ipart;


Propercase(Replace(towords(ipart)," and xx / 100",""))& " Ringgit" &


if decpart = 0 then "" else " and "&Propercase(Replace(towords(decpart*100)," and xx / 100","")) &" sen";

Tuesday, June 21, 2022

save and Run SQL Queries in SAP Business one

 

Step 1: Go to Tools > Query generator >



Step 2:  Query Generator window show> Click Execute



Step 3: click on edit button and paste the query and execute


Step4: Save the Query for future.


















                                                                                                                                                         





Tuesday, April 5, 2022

SAP HANA IMPORT AND EXPORT DB

 IMPORT "MTU_LIVE_V2"."*" AS BINARY FROM '/hana/shared/backup_service/backups/V2/'

WITH IGNORE EXISTING THREADS 10 

RENAME SCHEMA  MTU_LIVE_V2 TO MTU_TESTING_V2;





Thursday, March 31, 2022

https://blogs.sap.com/2015/05/29/updating-exchange-rates-automatically-in-sap-business-one/

 Using DI API:

 https://blogs.sap.com/2015/05/29/updating-exchange-rates-automatically-in-sap-business-one/



Using B1IF:

https://blogs.sap.com/2015/06/23/how-to-import-exchange-rates-using-b1if/



Using Service Layer and HANAXS:


https://blogs.sap.com/2018/08/27/update-sap-b1-rates-using-hana-xs-and-servicelayer/

How to check automatic exchange rate difference posting in SAP Business One

 https://blogs.sap.com/2017/04/20/automatic-journal-transactions-for-exchange-rate-differences/?preview_id=478064

How does SAP Business One handle Exchange Rate Differences

 

https://blogs.sap.com/2020/07/01/how-does-sap-business-one-handle-exchange-rate-differences/




Tuesday, March 29, 2022

TEST GIF

 


SAP B1 HANA Crystal Report Connection Setup

 

SAP HANA Crystal Report setup required  ODBC to Setup.


ODBC:




ODBC RDO Connection String

DRIVER={B1CRHPROXY};SERVERNODE=Server IP:30013;DATABASE=SBODEMOAU;databaseName=HDB





Sunday, March 27, 2022

SAP Business one G/L Account Determination and Journal Entries [Inventory]

 G/ L account Determination:


https://drive.google.com/file/d/1DCnxZ95_74VAYuMPM31IhImK3iqd3kTr/view?usp=sharing

SAP business one Line Remarks in Journal Entry Remarks

 one of the biggest challenge every SAP  B1 Client ask . the Line Remarks (Description) to updated in

 Journal Entry .  





there is a solution available using SAP POST Transaction Notification  . 


IF @transaction_type IN ('A') AND @object_type = '13'
begin 
 UPDATE JDT1 
 SET JDT1.LineMemo=(Select INV1.Dscription from INV1  
                     inner join OINV ON INV1.DocEntry=OINV.DocEntry
Where INV1.AcctCode=JDT1.Account and INV1.LineNum=JDT1.DocLine and 
OINV.DocEntry=@list_of_cols_val_tab_del)
 FROM JDT1
 INNER JOIN OJDT ON OJDT.TransId=JDT1.TransId
 inner join OINV ON OINV.TransId=OJDT.TransId 
 inner join INV1 ON INV1.DocEntry=OINV.DocEntry
 
 Where OINV.DocEntry=@list_of_cols_val_tab_del


end


after executing the POST Transaction Notification the Journal Entry on each Add will be updated automatically with description from the Invoice .

Journal Entry Preview after Add: 











HANA Administration Administration and Troubleshooting

 


https://docs.google.com/presentation/d/1os2mp_YQ4r4Cl07xfsqa04CGrdNrhDUl/edit?usp=sharing&ouid=110438426383198798957&rtpof=true&sd=true

Friday, March 25, 2022

SUSE Linux Firewall [Status, Enable, Disable] Command

Firewall Status checking

sudo firewall-cmd --stat







Start and Stop Firewall Service

sudo systemctl stop firewalld
sudo systemctl start firewalld



Disable and Enable Firewall Service

sudo systemctl disable firewalld
sudo systemctl enable firewalld








SAP Business one Marketing document Unit Price unable to change

 

Scenario : the user  is fully authorize to create Purchase or any Marketing document but unable to edit the price .



Solution : The issue is due General Authorization .  check the below setting in General Authorization

  1. Change Row Amount





  

Thursday, March 24, 2022

1051254 - Firewall or antivirus blocking SAP Business One components

Please find the original document at https://launchpad.support.sap.com/#/notes/ 1051254


 Symptom

One of the following may not work properly:

SAP Business One license service

•SBO Mailer

•DI API

•DI service

•integration framework for small and midsize enterprises (B1i)



Cause

A user´s operating system, firewall, or antivirus program may be blocking the ODBC/COM/UDP or TCP IP communication protocols, causing SAP Business One components that use these protocols to fail.


License Service:

This communication requires an unblocked networking infrastructure because in addition to the well-known and configurable ports, it uses some dynamically assigned TCP IP ports which cannot be changed. These dynamic ports change each time the license service is started. In the advanced network infrastructure, it is difficult to allow some exceptions for randomly assigned TCP IP ports for the license service.

Because the SAP Business One component requires a direct communication with the license service (B1 Client, DI API, DI service, B1i, etc.), no network limitation should be set.


SBO Mailer:

The main policy here is to allow the outgoing communication for the TCP IP port of the SMTP server, which has been defined for the SBO mailer configuration.


Integration Framework:

If B1i does not require any interaction with the B1 license service, then the network can be easily configured because B1i uses static TCP IP ports for communication (for example, 8080, 8443, 8005, 2099, and so on). On the other hand, they are changeable if they can be configured according to the network and user requirements.

Solution

Ensure that your operating system, firewall, or antivirus program is not blocking any of these protocols


https://drive.google.com/file/d/1mDqqZ_FsHj8MtievaAegR42AB5JGf54S/view?usp=sharing

2315907 - Starting HANA automatically after Host has been started

  Symptom By default the SAP HANA database is configured so that it is not started automatically when the SAP HANA host is rebooted. Environ...