Hierarchical Table Commands in MDM API
Hi,
I found only RetrieveLimitedHierTreeCommand,RetrieveLimitedHierChildrenCommand in MDM API for hierarchical tables.
So how can we add a child or a sibling, delete a child or sibling to the nodes of the tree.
Can anyone please give me links or some documentation on how to proceed with this.
The other problem we are facing when retrieving the children using RetrieveLimitedHierTreeCommand
When we add a search on the command it does not retrieve the children. it says the children for the level one node are null but if i donto set search it retrieves the children for all the nodes.
Is there any specific setting that has to be done for using the search.
Please let me know
Thanks,
Padmaja
Hi Greg,
I am adding the code snippet below. Can you please look into this and check if there are any problems
RetrieveLimitedHierTreeCommand hr=new RetrieveLimitedHierTreeCommand(conAccessor);
Search ser=new Search(repoSchemacmd.getRepositorySchema().getTable("New_Code").getId());
FieldId fldId =repoSchemacmd.getRepositorySchema().getTableSchema("New_Code").getField("New_Code").getId();
StringValue fldVal = new StringValue("G0440");
ser.addSearchItem(new FieldSearchDimension(fldId),new TextSearchConstraint(fldVal.getString(),TextSearchConstraint.EQUALS));
hr.setSearch(ser);
ResultDefinition rd=new ResultDefinition(repoSchemacmd.getRepositorySchema().getTable("New_Code").getId());
rd.setSelectFields(repoSchemacmd.getRepositorySchema().getTableSchema("New_Code").getFieldIds());
hr.setResultDefinition(rd);
hr.setSession(userSessionID);
try {
hr.execute();
} catch (CommandException e) {
e.printStackTrace();
When i execute this part of code and get the children. i get the children as null.
Thanks,
Padmaja
Similar Messages
-
Error while creating new user via new MDM API
Hi
I have two questions:
1) Is it possible to create a user in MDM via MDM4J?
2) I am trying to create a user through new MDM API (not the MDM4J). When I execute the command CreateUserCommand, I get following error:
com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: MDM repository data is out-of-date or is locked by another MDM Server. Refresh the data and try the operation again. If the error persists, contact the system administrator.
at com.sap.mdm.security.commands.CreateUserCommand.execute(CreateUserCommand.java:93)
at demo.dm.GetRoleList.main(GetRoleList.java:206)
Here is the code that I execute:
CreateUserCommand createusercommand =
new CreateUserCommand(connections);
createusercommand.setSession(repsessionId);
UserProperties userpp = new UserProperties();
userpp.setName("Vijendra");
//userpp.setRoleIds(roleids);
createusercommand.setUser(userpp);
//createusercommand.setInChangeStamp(-1);
//System.out.println(createusercommand.getOutChangeStamp());
try {
createusercommand.execute();
} catch (CommandException e) {
e.printStackTrace();
return;
Thanks
Vijendra
Edited by: Vijendra Bhanot on Feb 22, 2008 6:42 PM
Edited by: Vijendra Bhanot on Feb 22, 2008 6:49 PMHi
I am also getting same exception.
com.sap.mdm.internal.protocol.manual.ServerException: MDM repository data is out-of-date or is locked by another MDM Server. Refresh the data and try the operation again. If the error persists, contact the system administrator.
Please help me.
Thanks & Regards
Vinit -
MDM API for key Mapping.
Hi All,
Can anyone tell me how to use MDM API for updating key mapping ?
I want to create a webservice which will take customer,client system and key for updating key mapping in mdm.
Can anyone give me clue on thisHello Rama:
Under Java you can do these things:
Delete key mapping:
CatalogData.DeleteKeyMapping(ClientSystem : String, Table :
String, RecordID : int, Keys : String[])
Argument Description
ClientSystem -> Client system name
Table -> Table name
RecordID -> Record ID
Keys -> Remote keys to remove
Set a new keymapping:
CatalogData.SetKeyMapping(ClientSystem : String, Table :
String, RecordID : int, Keys : String[], DefaultKeyIndex
: int)
Argument Description
ClientSystem -> ClientSystem name
Table -> Table name
RecordID -> Record ID.
Keys -> Remote Keys you want to add
DefaultKeyIndex -> Index entry into the key parameter
indicating the key value as the default.
I hope that helps
Alejandro -
Does MDM APIs work in CE 7.2 landscape?
Hello Experts,
We have a requirement to fetch data from MDM tables and display in WD Java applications. We have to use MDM APIs for that. Our landscape is as follows:
Portal server is on CE 7.2
MDM Server version is 7.1 SP05
Now, the major problem is, in order to establish a connection to repository by MDM API, we need to provide "MDM System Alias" in the code. This alias is for the system of type MDM created in portal system administration --> System Config.
As far as I know, we need this alias created if we want to establish a connection. But following documentation on help.sap.com says that MDM Business Package isn't supported for CE 7.2 version. And until we deploy MDM BP, system template of type MDM isn't avaialble on portal.
http://help.sap.com/saphelp_mdm71/helpdata/en/5e/48a04270600d31e10000000a1550b0/frameset.htm (See the Prerequisites section)
What should we do in this case? Is it so that MDM APIs are not supported for CE 7.2 version at all? Or is there any other way to achive it?
Please help me with your valuable inputs.
Thank You,
Ameya
Edited by: Ameya Pimpalgaonkar on Jun 21, 2011 12:12 PM
Edited by: Ameya Pimpalgaonkar on Jun 21, 2011 12:14 PMHello Kanstantsin Chernichenka,
Thank you very much for the reply. There is no way I can do this in SP 05? or do I have to upgrade to SP7 only? I am not sure if we can upgrade to SP7 that's why I am a bit concerned.
And it is supported in SP07 means that I can deploy a business package for MDM on CE 7.2, only if MDM SP is 07?
Ameya
Edited by: Ameya Pimpalgaonkar on Jun 21, 2011 12:54 PM -
Abap MDM API query with OR operation
Hi experts,
not sure this is the proper section for the thread, anyway; dealing with ABAP MDM API, is there a way to build up a query which involves several clause in OR conjunction?
This is the scenario: I've got to extract several items on the basis of exact product codes. Tipically, I've got huge vectors of hundreds of product codes; actually, I could easily retrieve data by looping over them and, for each code, perform a query on MDM via QUERY method building the clause as follows:
ls_query-parameter_code = 'MDMSRM_PART_NO'. "Field code
ls_query-operator = 'EQ'. "Contains
ls_query-dimension_type = mdmif_search_dim_field. "Fieldsearch
ls_query-constraint_type = mdmif_search_constr_text. "Text search
lv_text = wa_codes-product_code.
GET REFERENCE OF lv_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
This will however result in hundreds of query in the LOOP itself.
Is there any way to build a query with OR operators ?
Thanks,
M.Hi,
I see you are not clearing your local structure "ls_query". This could be reason of problem, try this and let us know the result:
DATA lt_query TYPE mdm_query_table.
DATA ls_query TYPE mdm_query.
DATA lv_search_text TYPE string.
DATA lt_result_set TYPE mdm_search_result_table.
DATA ls_result_set LIKE LINE OF lt_result_set.
Fill query structure with FIRST parameter
ls_query-parameter_code = 'Name'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = 'BMW'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
CLEAR ls_query.
Fill query structure with SECOND parameter
ls_query-parameter_code = 'Model'.
ls_query-operator = 'CS'.
ls_query-dimension_type = mdmif_search_dim_field.
ls_query-constraint_type = mdmif_search_constr_text.
lv_search_text = '2009'.
GET REFERENCE OF lv_search_text INTO ls_query-value_low.
APPEND ls_query TO lt_query.
CLEAR ls_query.
Query on records (search for value 'BMW' model '2009' in table Products)
CALL METHOD lr_api->mo_core_service->query
EXPORTING
iv_object_type_code = 'Products'
it_query = lt_query
IMPORTING
et_result_set = lt_result_set. -
Error when creating record from portal into MDM using MDM API's
Hi All,
When trying to create a new record from Portal we are getting the below error. It is working fine till yesterday.
We are using MDM API's from webdynpro java for creating.
What could be the reason for this. Not sure whether this error is ocuring for all the users or for single user.
"Exception: CommandException com.sap.mdm.commands.CommandException: com.sap.mdm.internal.protocol.manual.ServerException: Database command execution error. A SQL statement failed to execute. The actual error may have been written to a log file."
Please help to resovle this.
Thanks
SatishHello Satish
Suppose your Portal was upgrated
if it right - search and deploy new mdm packages
Regards
Kanstantsin -
Server return code 0x80020004 : Error reading fileu201D from ABAP MDM API
Hello,
I am trying use ABAP APIs to create records in a qulifier table in SRM MDM catalog . The tabel i am trying to update is Contract price. it has 4 non qualifier fields and 5 qualifier fields. I am using below code to create it.
CALL METHOD lr_api->mo_core_service->create_simple
EXPORTING
iv_object_type_code = 'MDMSRM_CONTRACT_PRICE'
is_ddic_structure = ls_retrive
IMPORTING
ev_new_internal_id = lv_key.
But it retuns an exception cx_mdm_server_rc_code : Server return code 0x80020004 : Error reading file . My ID has admin auth in MDM data manger and able to create recrds direclty in data manager. But API retuns an error.
Requst you to help me ith this . Please advice if i have posted it in wrong section.
Thanks,
DIvya.done. This API is working from MDM7 version, not available in MDM5
-
How can I use one hierarchical table as a node of another hierarchical tabl
I have a requirement where I have two hierarchical tables and one table should work as node for other table . How to achieve this??
To elaborate more the structure is like
Main Table (Company Structure)
Sub table Consolidation Groups which has got hierarchical structure
Sub table Entity which is also hierarchical.
The Entity table should act as a node for table Consolidation Groups
How can I achieve this functionality??
Thanks
Suvarnayou misunderstood me apparently. I said you can't organinze to tables so one serves as a node's value of the other. Let me show you wnat I suggested by an example.
First table has such values:
-A
|-B
|-C
and the second one is
-x
|-y
|-z
-p
|-r
|-s
I thought you wanted to confine relationships between them so fo B node be able to select only x's branch and for C - only p's branch. If it's similar to the truth then let's create another table with two fields. Field one points to table containing capital letters and field two - lower case letters. Both fields are of type lookup pointing to an hierachial tables. Now when you populate this table you'll create records like (I list two columns):
B - y
B - z
C - r
C - s
from your orinal table from now you should point to the above table. So instead of having two fields each pointing to its own table and compeling you to think how to organize two hierarchies, now you have only one field pointing to a table with all valid combinations. When you populate this table though YOU have to decide what such combinations are. It may make sense (if you have different users) to restrict access to this table on read-only level for regular users to preserve the valid combinations.
Hope it helps but if I understood your wrong give a concrete example. -
KM Scheduler job with MDM APIs
Hi,
I am trying to write a background job that makes use of MDM APIs. I created a Portal Application Project and put in the required code. I added the required MDM jar fiels in to the java build path. How ever, I don't know how to add Library Reference with value "com.sap.mdm.tech.mdm4j" since this is not a Webdynpro project. Without this the KM Scheduler fails to run the job thowing an exception ''NoClassDefFoundError...".
Can any one tell me how do I go about?
Thanks,
SudheerTrying to post the question under different category
-
How to insert records in user defined tables through DI Server API
Hi All,
I have created a UDO using some userdefined tables .I am able to insert records in the user defined tables using DI API but problem is that now I want to insert records in those tables using DI Server API but I dont know how to do that please give me some way to do that
Thanks and Regards
UtpalThe 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 ? -
How to refer the class package "com.sapportals.connector" for MDM API?
Hi,
Iam trying to execute one example mdm api program in dynpro/ejb.
I could not refer the class package com.sapportals.connector.
What SCA or build path package needed for dev time and runtime and where do i get that.
Please help me.
Thanks
HariHi Armin,
Sorry that I still got problem on importing and make use of the class for knowledgemanagement. I can found the cooresponding .jar file in folder "jakarta-tomcat-3.3.2\webapps\irj\WEB-INF\plugins\portal\services\knowledgemanagement\lib". And added the services reference as "ServicesReference=htmlb, knowledgemanagement". However, I still can't use the class for KM.
I have read those code sample from KM in SDN, but they are mentioning the programming part and not the setting. Can you suggest the detail steps and code on adding the KM class into my customize class?
I am using Eclipse as my development tools.
Thanks & Regards
Sam
Message was edited by: Sam Choy -
How could i get access to MDM API,Is it available to all Enterprise accounts?e
Hi ,
I am trying to develop an enterprise application which needs to list all the installed Enterprise apps in the device.Also there is an option to delete the installed enterprise apps from device.I found that this can be done only by setting up a customized MDM server.My company already has an enterprise account.I have some doubts related to this
1 . Is it possible to setup a custom MDM server using MDM API's?
2. How could i get access to MDM API's to setup a custom MDM server/
3. Is MDM server provided only by third party vendors?
4. Is MDM server /MDM API available to all enterprise accounts?
Looking forward for a quick response.
Thanks in advanceA backup of a device with a newer version of iOS cannot be retored to a device with an older version. The solution is to connect to itunes and update the new device's iOS, then perform a restore.
-
How to create a listener using the new MDM API
Does anyone have an example on how to create a addrecord listener using the new MDM API?
Refresh!
Hi all,
Looking for some sample codes on the same
Best regards,
Arun prabhu S -
Does Create as table command works in sql server
Hi friends,
does Create as table command works in sql server,if yes pls help me with syntax> does Create as table command works in sql server,if
yes pls help me with syntax
Just out of interest, what is it supposed to do? There is no "CREATE AS TABLE" command in Oracle. -
Reg: Truncate table command in Stored Procedures
Hi All,
I wrote one procedure in which i used 'Truncate Table command' and while compiling I am getting an error. I searched on google but again many queries has been asked there but no suitable solution is there. So please help me in understanding this matter.I will be really obliged of you.
Gursimran SinghHi thanks for your reply. The error I am getting is here
PLS-00103: Encountered the symbol "TABLE" when expecting one of the following:
:= . ( @ % ;
The symbol ":= was inserted before "TABLE" to continue.
I appreciate your step to use 'execute immediate 'truncate table table_name';. but the thing is that the system is not allowing my to use TRUNCATE than how come i use the above expression.
Second thing is that there is no error in syntax, everything is fit and fine.
Gursimran
Maybe you are looking for
-
I want to get rid of the Nav Bar which contains Prev, Next Refresh and hide buttons. We can hide the buttons in that bar by commenting writeToolBar(); in whskin_mbars.htm file. But still unable to hide the complete bar. I am using RoboHelp 7 with Web
-
HP printers and os 10.9.5
After the most recent update (Sept 25) of 10.9.5, I'm getting a message "the disk you inserted was not readable by this computer" when connecting by USB printer cable. Yes, have rebooted, restarted, cleared printers etc. Now in Printers and Scanner
-
N8 - Downloaded OVI maps won't work offline
I have recently downloaded two map sets, so they could help me find my way outside my homecity. Since I downloaded them, I expected to have them available even without a network, simply because there's no network in many places I go to. However, I ca
-
RFC - XI - Mail scenario special characters
Hi Experts, I'm developing the mentioned scenario and have one problem. In my scenario I have one transformation RFC -> XML that uses graphical mapping one second transformation XML -> Mail package that is a java mapping where I take one of the field
-
Mac on Snow Leopard keeps looping back to login screen
Hi, Everyone, I have a MacBook, late 2008 It originally had 120 GB hard drive. Because I had less than 10 GB of space left, I replaced that with a 320 Western Digital Scorpio Blue HD (by myself, with an antistatic strap, etc). Everything seemed fine