cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamically create datawindow/datastore from xml

02-17-2015 2:03 PM
819 views 6 comments Go to solution
0 Likes
SAP Managed Tags
Subscribe

Is it possible to dynamically create a datawindow or datastore from a xml string, much like the .SyntaxFromSQL /.Create combination?

For example, I would like a "fleet"-datastore, where the "cars" are the rows, and "id", "color" and "make" are the columns.


<fleet>

  <car>

  <id>1234</id>

  <color>red</color>

  <make>Toyota</make>

  </car>

  <car>

  <id>5678</id>

  <color>blue</color>

  <make>Opel</make>

  </car>

</fleet>

I'm using PB12.5.2.5703. (Classic)

0 Likes

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi Erik;

1) No.   FWIW: I think that being able to create a DWO from XML feature would be awesome.

2) You can create a DWO of course from not only SQL but also an ANSI result set (have a look at the CreateFrom method).

Option#1

So, what you could do (in a round about way) in the case of #2.

a) Pass a 1 row ANSI Result Set

b) Build a DWO from  (a) using the CreateFrom ( ) method

c) Pass the XML

d) Import the XML into the DWO as build in step (b)

Option#2 - same as #1 but pass in an SQL statement.

Option#3 - Build your own XML => SQL generator.

Regards ... Chris

Former Member
0 Likes

Thank you Chris, much appreciated. I will take the given options into consideration.

Answers (1)

Answers (1)

CobyKako
Product and Topic Expert
Product and Topic Expert
0 Likes

Hello Erik,

Please find below an example from old Sybase CodeXchange web site that we are being migrated to the SAP wiki page sooner or later:

SAP Mobile Documents

HTH,

Jacob

Former Member
0 Likes

Thanks Jacob! I came across the mention of such example earlier, but could not find the "new CodeXchange".

With this, and the reply from Chris, I think I can manage.

Thanks a lot guys!

Former Member
0 Likes

Maybe since SAP has placed PowerBuilder under Mobile in it's management structure, it should consider bringing back PocketBuilder and give it the ability to deploy to Android, iOS and Windows Mobile devices. Also, it should not be restricted to use only SQL Anywhere. It should be able to use whatever DBMS is most common on the platform.

Former Member
0 Likes

Wow - An XML question that gives us a PocketBuilder flashback ... interesting (but off topic) <bg>!