Modify MDM Record
HI,
When i am trying to Modify an existing MDM Record in Products Table using 7.1 Java API, i am getting the following error.
Can not update record with modification status NEW
When i directly modify the record in MDM Data Manager, it works fine, but when i try updating the record using Java API, i am getting the above Error. Can anyone advice what's wrong in here, i am using the following code.
ModifyRecordCommand modifyRecordsCommand = new ModifyRecordCommand(connecPool);
modifyRecordsCommand.setSession( usrSessionIdAdm );
modifyRecordsCommand.setRecord(emptyRecordProduct);
modifyRecordsCommand.setModifyAnyway(true);
//Create Record in MDM
modifyRecordsCommand.execute();
On "execute" command, i am getting the error.
Your help is really appreciated.
Thanks
Vijay Budati
Greg,
Thanks for the reply.
I am using the following code. "emptyRecordProduct" is not but creating an empty record first and then updated values to the fields and then telling to modify the record using "ModifyRecordCommand". As you mentioned, when i use RecordFactory.createEmptyRecord, it might mis-understood that i am trying to create a new record. If this is not the right way to use, could you advice which record i should use?
Record emptyRecordProduct = RecordFactory.createEmptyRecord(tableId) ;
emptyRecordProduct.setFieldValue(...., .....);
//Pass all the required values
ModifyRecordCommand modifyRecordsCommand = new ModifyRecordCommand(connecPool);
modifyRecordsCommand.setSession( usrSessionIdAdm );
modifyRecordsCommand.setRecord(emptyRecordProduct);
modifyRecordsCommand.setModifyAnyway(true);
//Create Record in MDM
ModifyRecordsCommand.execute();
Thanks for your help.
Thanks
Vijay Budati
Similar Messages
-
When I use MDM java api thruogh WebDynpro portal try to save a record to MDM, I got this error:
com.sap.internal.protocol.manual.ServerException: The selected node has children.
Any help will be appriciated.Jitesh:
thanks for your answer. It is great help.
Let me put this way, if that is the problems cause, this only happens for one category when I try to save. I can save records to other category through portal application. So it is not portal problem.
Then we come to MDM, how do I find out what is wrong with this category? Why other categories work and this one does not work?
How do I find out why I have reference to parent node instead of leaf node for this category?
What I can do in MDM side to find problem?
thanks,
Eric -
End Routine - Modify a record in the cube
Hello Guys,
In the end routine I have to update a field . The transformation is the same cube to the cube. I want the record to be modified like add a value to a field in the end routine. Since it is a cube it creates a new record instead of overwriting the existing record. Is there anyway I can modify the record. I know I can make the existing record 0.00 and then create a new record with the new value.Is there any other solution.
For example:This is the existing record in the cube
sales order Item No Backlog Amount Indicator
1000 10 1000.00
After applying the end routine it has 2 records ( I modify the record with the indicator value)
sales order Item No Backlog Amount Indicator
1000 10 1000.00
1000 10 1000.00 REV
After applying the end routine I need the record to be like overwrite(similar to DSO)
sales order Item No Backlog Amount Indicator
1000 10 1000.00 REV
How to achieve the above result in end routine.
Thanks
SenthilHi there,
Since you create new records in end routine in the InfoCube, why not delete the old ones?
You can use the
delete RESULT_PACKAGE where ...
Therefore deleting the old records after inserting the new ones.
Diogo. -
Question reg. modifying latest record in internal table
Can you tell me if it is possible to modify the last appended record to the internal table?
I just want to modify the record in the internal table which is appended at the latest. Please tell me the logic for this.
Thanks a lot,
KrishenHi try with this:
DATA line TYPE I.
DATA wa_itab TYPE LINE OF it_itab.
DESCRIBE TABLE IT_TABLE LINE line.
READ TABLE IT_TABLE INTO wa_itab INDEX line.
WA_TABLE-FIELD = 'new value'.
MODIFY TABLE IT_TABLE FROM wa_itab
TRANSPORTING field.
Best regards. -
Problem in modifying existing records in dbtab
Hi Experts,
I am doing a report where I have created two dbtab's , one for data getting saved and
other for fetching data and modifying exsiting records..
For eg - let ZABC be the table where I need to insert or update records and ZXYZ is the table where
I need to fetch and modify existing records.
Now my probelm is :
In case of inserting new records (multiple records ) into my dbtab ( ZABC ) its working ,
but modifying existing records in another dbtab (ZXYZ ) its not wroking !! plz advice !!
If my select querry for modifying exsiting records is:
SELECT * FROM ZXYZ INTO TABLE ITAB WHERE MATNR EQ S_MATNR.
*****then its inserting a newline along with the existing records.
but when my querry is,
SELECT single * FROM ZXYZ WHERE MATNR EQ S_MATNR.
then its modifying the existing records, but only the first record.
Loop at itab.
if sy-tabix = 1.
zabc-matnr = matnr.
zabc-idnrk = idnrk.
zabc-budat = s_budat.
zabc-menge = menge1.
ZXYZ-menge = ZABC-Menge + MENGE1.
ZXYZ-BALC = ZXYZ-Menge - MENGE1.
ELSEIF sy-tabix = 2.
zabc-matnr = matnr.
zabc-idnrk = idnrk.
zabc-budat = s_budat.
zabc-menge = menge2.
ZXYZ-menge = ZABC-Menge + MENGE2.
ZXYZ-BALC = ZXYZ-Menge - MENGE2.
ELSEIF sy-tabix = 3.
zabc-matnr = matnr.
zabc-idnrk = idnrk.
zabc-budat = s_budat.
zabc-menge = menge3.
ZXYZ-menge = ZABC-Menge + MENGE3.
ZXYZ-BALC = ZXYZ-Menge - MENGE3.
ENDIF.
INSERT ZABC.
IF SY-SUBRC EQ 0.
MODIFY ZXYZ.
IF SY-SUBRC = 0.
MESSAGE : I002 WITH 'RECORD CREATED'.
ENDIF.
ENDIF.
Please advice
Karthik
Edited by: Karthik R on Aug 24, 2009 9:42 PMHi,
This is because in the second case you are not selecting records into an internal table.
As a result only the first record which satisfies the where condition is fetched.
Check if the program goes into the loop when you write second select query.
KR Jaideep, -
First checkout record then modify the record but failed !
//check out record
CheckoutRecordsCommand cout = new CheckoutRecordsCommand(simpleConnection);
cout.setTableId(mainTableId);
cout.setSession(sessionIdu);
cout.setRecordIds(rdids);
cout.execute();
//modify record
rds[0].setFieldValue(fieldsMT[1], new StringValue("xhj modify !"));
ModifyRecordCommand mrc = new ModifyRecordCommand(simpleConnection);
mrc.setSession(sessionIdu);
mrc.setRecord(rds[0]);
mrc.setModifyAnyway(false);
mrc.execute();
when execute the modify command the exception happened the info is "the record have been protected!"!
so how can i implement a modify to record that check out first.after checkout, you will get a new record id.
I think your modification should base on the new record id. -
Problem in Modifying the records
Hi all,
I have a button "Find", when the button is Pressed, I've to query the records and modify the records. I have to modify only the "Reading" Column in only one row.
It is querying all the records successfully (here retrieves 10 records) but when I modify the Reading value in one Row, all the 10 records are inserting as new row. Am not able to update.
Please suggest me with the solution.
Regards,
MiniHi Mini
Sounds Strange and i think the problem resides in ur design of code in Find Button So i suggest to Share us the Code pls.
Well ,for now u can try to use ...
IF :system.current_record THEN
END IF;Hope this helps...
Regards,
Abdetu... -
ISync Error Message "you can't modify a record that doesn't exist...."
"[ISyncConcreteSession pushChange:]: you can't modify a record that doesn't exist: <ISyncChange 0x3215870>{ modify record id 'BE86E203-EC1F-4F3E-A2F2-180EC5FA5210'
set com.apple.ical.type = local
set title = Unfiled }"
I have 2 macs connected to the .mac sync and until recently the flow of info between them (mostly iCal) has been smooth. Now it appears to not be working.
thoughts? thanks.
--Kevinwrong forum, sorry.
-
To read a calculated field of an MDM record
Hi All,
We have a main table in MDM repository with a calculated field and other fields.
On entering the values of other fields in the table an ID gets generated for the calculated field of that main table.
Now we want to retrieve that calculated field Id.Can anyone provide pointers for the same?
Regards,
RichaHi Richa,
To retreive calculated field you can use RefreshCalculatedFieldsCommand
ResultDefinition resDef = new ResultDefinition(schema.getTableId("TableId"));
resDef.addSelectField((FieldId)fieldId.get("fieldId"));
RetrieveRecordsByIdCommand varCmd = new RetrieveRecordsByIdCommand(wdContext.currentContextElement().getVa_ConnectionStr());
varCmd.addId(VarRecord.getId());
varCmd.setSession(wdContext.currentContextElement().getVa_SessionId());
varCmd.setResultDefinition(resDef);
varCmd.execute();
RecordResultSet recResSet = varCmd.getRecords();
Record resRecord = recResSet.getRecord(0);
wdControllerAPI.getMessageManager().reportWarning("functionsave:SaveVarietyData( )*********07"+resRecord.toString());
MdmValue varCreated = resRecord.getFieldValue((FieldId)fieldId.get("Variety_Material_Number_Inter"));
String varCreatedVal = varCreated.toString();
Integer varNumCreated = new Integer(varCreatedVal);
int varietyValue = varNumCreated.intValue();
wdContext.currentContextElement().setVa_GeneratedVarietyId(varietyValue); -
Modify control record and send out to external (TAMA) system using ALE
Hi All,
I have a scenario to send idoc from ECC 5.0 to 3.1R/3 and then to TAMA system (external system-through TRFC)
In the inbound process code of 3.1R/3, I have to write a custom FM to modify the control record and point to TAMA system and then send it out to TAMA system.
Has anybody got idea about this and what function module need to use for modifying the control record and send it out. Any help is really appreciated
Thanks
RickyHi Ricky,
To access IDoc data and modify it in your custom FM, you could investigate the following FM's:
EDI_DOCUMENT_OPEN_FOR_PROCESS
EDI_SEGMENTS_GET_ALL
They should allow you to access the EDIDD, EDIDC tables.
The IDoc related functions are contained in the function group EDI1, it may be helpful to start from there. -
Modify control record and send out to external (TAMA) system
Hi All,
I have a scenario to send idoc from ECC 5.0 to 3.1R/3 and then to TAMA system (external system-through TRFC)
In the inbound process code of 3.1R/3, I have to write a custom FM to modify the control record and point to TAMA system and then send it out to TAMA system.
Has anybody got idea about this and what function module need to use for modifying the control record and send it out. Any help is really appreciated
Thanks
RickyHi Ricky,
To access IDoc data and modify it in your custom FM, you could investigate the following FM's:
EDI_DOCUMENT_OPEN_FOR_PROCESS
EDI_SEGMENTS_GET_ALL
They should allow you to access the EDIDD, EDIDC tables.
The IDoc related functions are contained in the function group EDI1, it may be helpful to start from there. -
Problem in modifying control record
Hi All,
My scenario is Purchase order to Sales order. Once PO is created IDOC will be created and that idoc will be taken as source and i will be modifying the idoc in abap mapping as per requirement.
All the segements are being modified and getting updated in IDOC but when i am trying to change the control record its not getting reflected in the r/3 but when i check in moni before comming to r/3 the xml struture has changed as per my requirement even for control record also but while comming from XI control record is not getting changed.
I would like to change senderpartner and sender partner type in control records.
every configurattion steps has been done correctly.
Would request your experiences if you would have faced any this type of situation in your projects.
Thanks in Advance.Apply Control Record Values from Payload
If you set the indicator, the conversion of communication parties to the IDoc partner is only possible for systems that are not logical systems.
If you do not set the indicator, all combinations of communication parties and services are handled as services without party.
If the IDoc XML structure contains a control record during outbound processing on the Integration Server, it is rejected and created again by the IDoc adapter. If you want to include additional values in the control record, set the indicator and provide an appropriate mapping for the values.
http://help.sap.com/saphelp_nw04s/helpdata/en/96/791c42375d5033e10000000a155106/frameset.htm -
Modifying the record in the extractor.
Hi gurus,
i am a BW developer. i have one requirement, i have to enhance some fields from table MSEG to my generic extractor.
In my extractor structure, Material, Plant and Order number is the key fields. i am selecting some fields from MSEG table into internal tables and doing some calculation on that fields and finally i have to enhance those records into my extractor.
material, plant and ordernumber are the key fields. in my internal table i have 2 records and in my extractor i have only one record for particular combination of keys.
example:
in my internal table:
material plant odernumber quantity week
0980009 1800 2000125 500 200702
0980009 1800 2000125 453 200704
in my extractor:
( quantity and week are the enhanced fields)
material plant ordernumber quantity week
0980009 1800 2000125
in my code: while enhancing the fields to extractor, i have modifying the existing record. so that i am getting only the second record in my extractor.
like 0980009 1800 2000125 453 200704
and i cannot append the record into my extractor, because for example for this combination of key if have 100 records in my extractor it is adding all the 100 records instead of one record.
Can any one suggest me how can enhance these records into my extractor.
Any help is greatly appriciatable. Thanks in advance.This question has been answered
-
MDM Record Check out and Check in from the Portal
Hi everybody,
I'm trying to figure out what is the standard way to trigger the Check out and Check in from the Portal.
How do I need to configure the MDM workflows and the Portal, so the standard Item Details iView would automatically check out the record when the Edit button is pressed.
Do I need to configure Guided Procedures or UWL on the Portal or can I avoid that?
Thanks for your help in advance,
BorisHi Boris,
When we connect MDM to a front end system like Portal,the portal will replicate all teh functionalities of the backend sytem from the front end as in this case in EP.
But when we maintain Master data form the MDM Data Manager we get a lot of options in the context menu ,when we right click a record in the record pane.
All of these cannot be made available on the portal,but however the feature of Checkout can be made possible if you try to update the record through a MDM workflow.
As in MDM workflow you have to option of Checking ou the record at the beginning of the Uddate and then checking in back at the completion of the record update.
For this you can use the MDM workflows and integrate it through EP using UWL.
Kindly refer some additional docs which will guide you in the configuration of the same:
Re: MDM workflow with UWL
Re: Need to Integrate Universal Worklist in SAP Master Data Management.
Re: MDM Portal configurations.
Hope It Helped
Thanks & Regards
Simona Pinto -
How to pass MDM Record ID in Webdynpro to use in Guided Procedure
Hello Experts,
I am facing the following requirement. I Have two WebDynpro Screens calling an MDM Item Detail View.
I want to set up an easy process using Guided Procedure.
Therefore I need to pass an internal ID from Screen A (request) as an input Parameter for screen B (approve).
How can I handle this in my wrapper application? Is did not find any guides. You have some ideas?
I should throv an "saveRecord" Event containing this ID to a event listener (Screen B).
Sorry I am a beginner in WD :o)
Thanks in advance
CarstenHi,
You can try doing this way in the application
1. check if the record is checked out,
If yes, then get the original record id via the command RetrieveOriginalsByCheckoutRecordCommand.
else
You have the original record Id in hand.
Best Regards,
-Prashant.
Maybe you are looking for
-
How to send the two PDF attachments into one mail
Hi Team, I need one requirement...I have two forms ,one is cover sheet and another one is form data. These two forms are converted into two PDF documents and sent to vendor as mail attachments... Please suggest me, how to send the two attachments th
-
Hi , i am getting time_out dump when i am innerjoining MAPL and PLPO tables. SELECT mapl matnr mapl werks mapl plnty mapl plnnr mapl plnal plpo plnkn plpo zaehl plpo vgw04 FROM mapl INNER JOIN plpo ON mapl plnnr = plpo plnnr
-
When I am viewing a folder of documents in Finder, I can click on the file name and enter another name. I cannot, however, add anything to the "Comments" column. I know that I can go to "Get Info" and add a comment, but that is too labor intensive fo
-
Hi We've recently had a problem with iChat and file transfers, I took at a look at this yesterday and came to the conclusion from looking through the logs that there was a DNS issue. It looked like it was a reverse DNS issue, so I added the reverse D
-
Process to activate access control dynamiclly
Hello, I would like to make a process that activate the access control to a specific button, page..etc dynamically according to a condition, something like: " Assign access control (view,edit,admin) of (page#, button..) to user (x) when (condition)"