cancel
Showing results for 
Search instead for 
Did you mean: 

Advanced DSO creation

former_member182537
Active Participant
0 Kudos

    hi,

We need to create huge number of ADSO - as you know frm 7.4/7,5 adso is only generated in eclipse based modelling which takes time in creation.

Any other quick way to get this created via some program ?

regards

Accepted Solutions (1)

Accepted Solutions (1)

former_member216578
Participant
0 Kudos

Hi, Nilesh.

I've found a program that you can play with: se38 -> RSO_ADSO_MODEL_OPERATIONS. It creates ADSO from xml.

Here're brief steps I tried to get things done.

1. Create an  ADSO to find out the format you should use.

I've used infoobject+field based approach for demo purposes. DSO was created from "Standard DSO" template.

2. Get XML representation of this ADSO.

Go to RSA1 -> your infoarea -> your ADSO -> double-click. Here you get some maintenance screen. Select an "A" version and click "View XML". On popup window select "See source code" from right-click menu to get a cleaned version of XML (without dashes before each tag) and save it somewhere.

3. Prepare your new ADSO xml.

I'll change only a name of ADSO, infoarea and "CHANGEDBY" properties for demo purposes (and lack of time), but you should try to change another properties to find out their influence on the result. Notice that there're generated DDIC table names at the bottom of xml.

4. Create new ADSO.

Go to se38 -> RSO_ADSO_MODEL_OPERATIONS -> execute.

Insert new DSO name, create/activate radiobutton, check "New object" flag and path to your new xml. Execute.

5. See results.

So you should generate your DSO xmls and then run this procedure to get them in your BW.

I'll try to blog it later

Regards,

Andrey.

former_member182537
Active Participant
0 Kudos

Many Thanks Andrey - I wil try this however my issue is that my BW box is brand new so we dont even have Classical DSO , so to try this first need generate those DSO + InfoObjects.

anyways thanks a lot

former_member216578
Participant
0 Kudos

Hi, Nilesh.

It's not an issue

In my scenario there's no any "preset" DSO. Create an ADSO and change settings in it (switch template, change field properties etc) in order to only map graphical settings to xml attributes (this is exactly what I've done in previous post). It will be just an investigation of corresponding xml. You can do it for one ADSO, after it you'll know what xml you should generate, because you will understand how settings will be presented in xml. Then create your DSO "structure" (as an xls table like <dsoname, fieldname, fieldtype, iskey, isinfoobject> or some modeling tools like PowerDesigner, ERWin etc) and generate xml from this structure.

Hope I was clear.

Regards,

Andrey.

former_member182537
Active Participant
0 Kudos

thanks Andrey- what is quickest way to generate xml from excel - any idea

former_member216578
Participant
0 Kudos

Nilesh,

Maybe it will look too cumbersome, but I think my choice will be to save excel as xml and then use XSLT. Just because I've never worked with xml in VBA and generate xml as text concatenation is too long and buggy. Maybe the better option is to start with the simple xml that you'll transform to the target format. Or try to map hierarchical xml to excel spreadsheet and then transform it (in order to edit it with excel with).

That simple xml may look like attached one.

I'll provide a transformation of this xml later.

UPD: I've rethought my demo format of xml and linked it to excel (to simplify things). So I'll create XSLT for this format and post it with excel wb later (tomorrow evening maybe). Think it will be helpful.

Regards,

Andrey.

former_member182537
Active Participant
0 Kudos

Andrey thanks - i am just trying to figure out what would be columns/format of excel liek data type, etc that we need as input.

Let me know if you able to figure out as i  am also trying from my end.

thanks

former_member216578
Participant
0 Kudos

Nilesh,

I've created a beta version of generation template (it's very rough with a bunch of hardcode) and will post it here with explanation in 3-4 hours (when I get home). It worked for dield-based approach but requires slight adjustments to work with iobj.

Regards,

Andrey.

former_member182537
Active Participant
0 Kudos

Hi Andrey - Many thanks

I also need field based appraoch only

regards

Nilesh

former_member216578
Participant
0 Kudos

Nilesh,

I've attached files that I used to generate ADSO models. Description follows.

1. Excel file (via external link as long as I cannot attach xlsx file).

It consists of thee main sheets: DSO list with their properties, DSO Field Groups (that you can see in field creation tab) - they're not mandatory, DSO Fields. Also there's first sheet with technical data (lists for dropdown selection on main sheets). For each sheet there're some corresponding settings, but not all. You have to fill DSO list on the DSO sheet (the second), then fill DSO fields on the DSOFields sheet (the fourth).

Also excel file contains a schema mapping to export its data to xml. You can view mapping in this way: "Developer" tab on the Ribbon -> "Source" button. Here's the explanation.

When you finish to fill excel file, click "Export" button on Developer tab and save result to xml.

2. XSLT transformation file (the same reason).

This file takes your previously saved xml as input and converts it to the target format. I've filled it with comments in main blocks, but you also should try to find out how ADSO settings are represented in xml (create sample ADSO, play with its settings and see the influence in "RSA1"->"Double-click on ADSO"->"View XML"). This transformation takes one input and produces multiple outputs: one xml file for one ADSO object in source, filename is <DSONAME>.xml. You should change your target path in the 21 line (default is Z:\Temp).

To run this transformation I've used Eclipse XML project and Saxon 9.7 transformer in order to allow multiple outputs.

To make xml tools available and ready to run:

  • Go to (in Eclipse) Help->Install new software->Select your main Eclipse repository URL, set checkbox "Group items by category"->Go to "Web, XML, JavaEE ..."->Select "Eclipse XML Editors and Tools" and "Eclipse XSL Developer tools" and install it.
  • Create a new project to hold your xmls. Switch to XML perspective (Window->Open perspective->Other->XML). Add a new XML file in your project (this will be exactly the same file that you exported data into from excel). Add a new XSL file and insert transformation code in it.
  • Make Saxon avalable as a transformer. Go to http://saxon.sourceforge.net/#F9.7HE and download Saxon for Java (v 9.7 in my case). Extract downloaded files somewhere you can access them. Then go to (in Eclipse) Window->Preferences->XML->XSL->Java Processors. Click "Add" button->Add external JAR->navigate to extracted files and select saxon9he.jar.
  • Go to your transformation file ->Run As->XSL Transformation->Select your source XML file. In the settings window select Processors tab->Use specific processor->Your added Saxon processor. Then you can press "run" and see your output files in target directory. If something goes wrong you'll see the line# with error in output (on the top of the error stack).

3. After you've run the transformation and get output XMLs you can go to RSO_ADSO_MODEL_OPERATIONS, paste new DSO option, select corresponding xml file, select "Save/Activate" radiobutton, select "Create new object" checkbox and run a report. Then navigate to your infoarea in BWMT and review resulted ADSO. If something goes wrong you won't be able to activate ADSO via RSO_ADSO_MODEL_OPERATIONS (it throws an error window as with regular DSO activation). If the result is "buggy" then correct errors manually or fix a bug in the transformation (in order to generate future DSOs without that bug), generate a new xml file, manually delete your ADSO and reimport it.

Also I've attached an exported xml input to show how it looks like.

If you have any questions, I'll try to answer them. But I'm not a XSLT guru and target format is a result of my explorations.

Regards,

Andrey.

former_member182537
Active Participant
0 Kudos

many thanks- I will try these and update 

regards

former_member182537
Active Participant
0 Kudos

Andrey- I tried this but got below error. i was trying to essentially export xml version of my current adso and then try to fill details in that template but not able to export to XML. Any help on this?

thanks for all help so far

thanks

muthuram_shanmugavel2
Contributor
0 Kudos

Hi Andrey,

I followed the same steps.

I copied XML from existing ADSO and changed ADSO name in XML and saved it.

I executed the program but I am getting the following error.

Can you please help me how to resolve this issue?

Regards,

Muthuram

Answers (1)

Answers (1)

sander_vanwilligen
Active Contributor
0 Kudos

Hi,

It is possible to crerate a new aDSO with an object template, e.g. a classic DSO. Please also refer to SAP Help. I don't know if you have such object templates, e.g. for migration of current classic DSOs or do you have to create brand-new objects?

In the latter case, a two-step approach might help you. You write a small program which is using the BAPIs BAPI_ODSO_CREATE (to create a classic DSO) and BAPI_ODSO_ACTIVATE (to activate a created classic DSO). The classic DSO created in the first step can then serve as an object template for creating the aDSO in the Eclipse-based modeling environment.

Best regards,

Sander

former_member182537
Active Participant
0 Kudos

TThx sander yes I have to create brand new objects ..so I will try second option.

many thanks..

sander_vanwilligen
Active Contributor
0 Kudos

Hi,

I guess that you also have to create a lot of InfoObjects from scratch or activate from Business Content. I created two Add-ons for generating InfoObjects. Both Add-ons also generate a template Infoprovider which can serve as an object template for the aDSO.

Please check out these Add-ons:

  • ;
  • .

Best regards,

Sander