on 11-07-2007 11:28 AM
Hi,
I'm trying the following scenario using Java API in MDM.
I query a MDM MAIN table called "Vendors". I get a result set.
Now, i try to pick a particular record to modify one of the fields called "Vendor Number". My objective is to Update a field called Vendor Number in that table with a text.
Can you provide the code snippet to Capture a record and Update a particular field alone?
Thanks in advance,
regards,
Ak.
PS: Points assured for good responses...
Hi Ak,
Please have a look at my <a href="/people/community.user/blog/2007/11/06/sap-netweaver-mdm--using-the-mdm-java-api">blog</a>. It contains all kinds of code samples one of which is to create and update records.
Cheers,
Richard
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Namrata,
I'm using Java API 2.
hi Richard,
i saw your code samples. They helped me. But the problem is that i'm still not able to achieve the task.
my exact task at hand is as follows.
-> query vendor master table and get all records.
-> select a particular record by recordID and update the Vendor Number field in that record with a number.
besides that, your code CRUDMainTable.java calls a method called updateRecord which i was not able to locate. Can you pl. give me specific pointers to achieve my objective?
//get metadata
TableSchema productsTableSchema = repository.getSchema().getTableSchema(MDMAPISamples.Products.TABLE);
//get the field value pairs to create the record
FieldValuePair[] fieldValuePairs = getFieldValuePairs(productsTableSchema);
//Create a product record and get the record id
RecordId productRecordID = createRecord(productsTableSchema, fieldValuePairs);
//Read
Record productRecord = getRecordByID(productsTableSchema, productRecordID);
//get the updated field value pair array
FieldValuePair[] updatedFieldValuePairs = getUpdatedFieldValuePairs(productsTableSchema);
//Update
updateRecord(productRecord, updatedFieldValuePairs);
Thanks in advance,
Regards
Ak.
Hi Arun,
Are you intending you use JAVA API 1 or JAVA API 2??
Thanks
Namrata
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.