cancel
Showing results for 
Search instead for 
Did you mean: 

DI Server and userdefined tables/user defined objects

Former Member
0 Kudos

Hello!

Trying to use DI Server to build a webservice/-application I encoutered the problem not to find any hint how to use user defined objects/tables. Sure, I can read all metadata and select data from user tables but how to add/update this tables.

Another problem seems to be impossibility to get access to our own user defined objects as business objects as we - for our add-on - like to modify them.

Please help me if you have any expierence in that issues.

Greetings from a little frustrated programmer

Gerd Sander

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Gerd - I haven't played with the DI server regarding UDOs yet, however it looks like there is some access.

oUserFields

oUserKeys

oUserObjectsMD

oUserTables

These objects are listed as business object schemas available through the DI server interface. have you tried playing with this example:

<?xml version="1.0" encoding="UTF-16"?>

<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">

<env:Header>

<SessionID>32D83BB6-F3AD-985F-D4BC-655B3D9ACBE2</SessionID>

</env:Header>

<env:Body>

<dis:GetByKey xmlns:dis="http://www.sap.com/SBO/DIS">

<Object>oItems</Object>

<ItemCode>X0004</ItemCode>

</dis:GetByKey>

</env:Body>

</env:Envelope>

Of course, the <Object> would change to one of the types you want to retrieve (IE - oUserObjectsMD)

Like I said, I haven't played with it too much yet and I am not sure exactly what oUserObjectsMD contains. I just thought I would offer some ideas.

Good luck!

Former Member
0 Kudos

Ty, thx for your quick reply. I tried to retrieve several objects yet. No problems at all as you allways can use "ExecuteSQL" if you have to do more than usual work.

But my task is to add new lines to user tables resp. to modify user defined objects and I can't find the syntax to do so with the "AddObject" or "UpdateObject" message.

And it's a pitty that "ExecuteSQL" explicitly forbits any write access even to my own data.

Gerd

Former Member
0 Kudos

I see. Something tells me that the functionality you seek doesn't exist in the current release. I may be completely wrong but I seem to remember hearing that it's planned for the "future". Someone please correct me if I am wrong!

Luckily, creating your own web service is not terribly difficult these days. Either vb or even something like iBolt can help you create a web service quickly that would allow you to access your own version of a "DI". You might even find that the control you gain is a bonus. Plus, in your own web service, you would not have to go through a com layer to get to your data.

Anyway, good luck again.

former_member185703
Active Contributor
0 Kudos

Hi,

You are absolutely right.

This has already been answered. Please don't forget to use the search function for this forum (e.g. search for "UDO UDT") - or post a specific proposal in SDN Suggestions forum when you think the search algorithm should be improved.

Here's the thread that is about this question:

Regards,

Frank

Former Member
0 Kudos

Hi,

I didn't know that the functionallity of DI Server is limited to the actual normal DI-API.

But anyway I thought that it should be possible to modify normal usertables like we can do using DI-APIs Usertable Object. That can be sufficient for our case because in that way we can build a workaround to move the userdata from normal usertables into UDOs by a batch process with a normal add-on.

Regards,

Gerd

former_member185703
Active Contributor
0 Kudos

Hi,

DI Server helpfile states on the first page:

"The DI Server uses the DI core to enable the same functionality provided by the DI API with the following advantages:"

In addition according to the documentation DI Server supports working with non-UDO UDTs - at least according to the documentation.

If it is not working properly, please report the bug through Service Marketplace.

Using a batch process for moving data into UDO UDTs might be a bit "dangerous" because there's a larger number of internal fields in UDO UDTs (+ remember the log tables). I recommend to stay away from working in such manner now, but to wait until DI supports also UDO objects.

If you run into problems doing it, SAP Support will certainly count this as "external modification"...

Thanks,

Frank

PS: Please note that the new "SDK Help center" can be downloaded from the Developer Area for SAP Business One! It contains all helpfiles + above all a single point to start digging into them: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/business one - sdk documentation.htm

Answers (0)