cancel
Showing results for 
Search instead for 
Did you mean: 

SAP MII How insert data to MDO throught illuminator

rafi9393
Explorer
0 Kudos

Hi Everyone,

I am trying pass arguments to my MDO throught illuminator. I create link like this:
http://<server>:<port>/XMII/Illuminator?server=MDOConnector&Mode=Insert&MDO=Project%2FMIIOBJ%2FMDOTest&Col1=Value1&Col2=Value2.

When I execute this link I recieve message in my browser that "Command Query Successful". After this when I check MDO in workbench I can see that It looks like this:
MDO.png

Why I can't see my values? Do I need to change anything in permissions?

Is there any different option to dynamically push data to MDO?

Accepted Solutions (1)

Accepted Solutions (1)

murali_manohar
Participant
0 Kudos

Hi Rafi,
when you are trying to pass the input values for a MDO insert query via illuminator services, make sure you have provided parameters correctly.
1. in the insert query mode of MDO, you can pass it directly as AttributeValue.1/2/3.. etc or you can pass them as parameters such as passing [Param.1] in the input field for Attribute.1, etc

2. once after you have created the MDO query ready with necessary parameters, build your url with illuminator services as below 
http://<server>:<port>/XMII/Illuminator?QueryTemplate=<Path of your insert MDO query>&Param.1=<value>&Param.2=<value>

now run the url in the browser with your values for the parameters, the data should be inserted in the respective MDO tables you have created.

you can try this and let me know if you have any questions.

rafi9393
Explorer
0 Kudos

Hi Murali_Manohar,
I have tried your solution and still nothing. Maybe I am doing something wrong. My MDO looks like this:
java_eb1LbVC6vE.png

 And I have created MDOQuery in insert mode. It looks like this:
java_cNBuIF6i63.png

And my link looks like this:
XMII/Illuminator?QueryTemplate=My_Project/MDOQueris/InsertMDO&Param.1=MyValue1&Param.2=MyValue2
or:
XMII/Illuminator?QueryTemplate=My_Project/MDOQueris/InsertMDO&Col1=MyValue1&Col2=MyValue2
After runing the url in browser I recieve message like this:
msedge_jhnFMcxvhU.png
And after this I have the same result like before:
java_9tAiztQ3gx.png

murali_manohar
Participant
0 Kudos

Hi Rafi,
Did you provided the params in the insert query mode as below screenshot?WhatsApp Image 2024-05-07 at 3.24.10 PM.jpeg

rafi9393
Explorer
0 Kudos
I didn't and that was a problem. Now works as it should. I have another question. Can I use illuminator services to update one record in my MDO? For example I have MDO with 100 existing records and want to update one of them. Is it possible with MDO query in update mode? If Yes, can you provide me with an example?
murali_manohar
Participant
0 Kudos

Hi Rafi,

Yes, you can use the update mode in the MDO query and in the attributes try to add only the columns of table you wanted to update. and as earlier assign the params accordingly.
once it is done, place the condition when you want to update those selected attributes. eg. [column.Name]=[Param.1]

and in the illuminator service just place the path of the update query and the associated params and pass the values.
It will work.

Answers (1)

Answers (1)

rafi9393
Explorer
0 Kudos

Ok, I got it, but what if I have table like this:
Col 1                   Col2
Value1              Value5
Value2              Value6
Value3              Value7
Value4              Value8

And I would like to update value3 in Col1 to different value. Is it even possible throught illuminator service?

murali_manohar
Participant
0 Kudos

 

yes,

That is possible, all you have to do is add only the attributes you want to update and the update condition in the query as below

murali_manohar_0-1716038966278.png

for e.g., here i have only add 3 columns to get updated and the value will be updated based on the condition provided such as empid= param.1. and the update column values as param.2/3/4.

once your query is working fine here(from the workbench. test providing values in parameters tab, execute and see if the values are getting updated as expected or not.). then using the illuminator services, create a url and execute the url as below:

http://<server>:<port>/XMII/Illuminator?QueryTemplate=<your query path>&Param.1=<empid>&Param.2=<salary>&Param.3=<Designation>&Param.4=<Location>

 

murali_manohar
Participant
0 Kudos

Hi Rafi,

You can also refer to this video, which might answer your questions: 

this video clearly explains the MDO object creation, MDO query creation, consume the queries using url & parameters via illuminator services.

Thank You!