cancel
Showing results for 
Search instead for 
Did you mean: 

[DI Server] How to insert data into user defined table ?

Former Member
0 Kudos

Hi all,

I can insert data to user defined table with the DI API :

        Dim table As SAPbobsCOM.UserTable = oCompany.UserTables.Item("BSS_GNET_LOGS")
        table.Code = "1"
        table.Name = "1"
        table.UserFields.Fields.Item("U_Action").Value = "Test"
        lRetCode = table.Add()

        If lRetCode <> 0 Then
            oCompany.GetLastError(lErrCode, sErrMsg)
            MsgBox(sErrMsg)
        End If

How to do that with DI Server ? Which SOAP message do I must send ?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

The AddObject message is :

<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope">
  <env:Header>
    <SessionID>...</SessionID>
  </env:Header>
  <env:Body>
    <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS">
      <BOM>
        <BO>
          <AdmInfo>
            <Object>...</Object>
          </AdmInfo>
          ...
        </BO>
      </BOM>
    </dis:AddObject>
  </env:Body>
</env:Envelope>

How to use it with a user defined table ?

former_member185703
Active Contributor
0 Kudos

Hello David,

UDTs are handled a bit differently. For now you will have to use SQL statements when you want to deal with UDTs in conjunction with DI Server.

Sorry for the bad news,

Frank

Former Member
0 Kudos

So, /thread/521471 [original link is broken] ?

Former Member
0 Kudos

I think that DI API is more adapted than DI Server for develpment. Even if we develop a web application.

With the DI Server, we must use the SQLExecute command

  • For all selection

  • For inserting, updating and deleting data in user defined table

Is it dangerous to use the DI API in a web application ?

Former Member
0 Kudos
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope">
  <env:Header>
    <SessionID>...</SessionID>
  </env:Header>
  <env:Body>
    <dis:ExecuteSQL xmlns:dis="http://www.sap.com/SBO/DIS">
      <DoQuery>
        INSERT INTO [@BSS_GNET_LOGS](Code, Name)
        VALUES ( [%0], [%1] )        
      </DoQuery>
      <QueryParams>
        <0>Code</0>
        <1>Name</1>
      </QueryParams>
    </dis:ExecuteSQL>
  </env:Body>
</env:Envelope>

How to do with the parameters ?

former_member201110
Active Contributor
0 Kudos

Hi David,

You can use the DI API in a web application (it's just a COM object) but it is very resource hungry so would be unsuitable for any development that required more than a small number of concurrent connections to SBO.

Kind Regards,

Owen

Former Member
0 Kudos

Hi,

Would like to seek your advice whether the performance of DI server is great ?

My client is interested in linking up their portal to SBO via DI Server. Before making decision, would like to hear from you guys.

Former Member
0 Kudos

> For now you will have to use SQL statements when you want to deal with UDTs in conjunction with DI Server.

So why using DI Server and not connect directly to the database with ADO.NET for example ?

Former Member
0 Kudos

You are saying in this thread that you recommend to use direct sql statements to add to UDT when using the DI Server. But, isn't it right that we lose SAP support if we use this feature???

Answers (0)