on 10-29-2008 4:57 PM
Hi,
do we have any command in SAP MDM API for the following
To fetch all the records which are 'In progress' (MDM status)?
or
To fetch all record ids?
I am looking for the above information for initial correction for the products.
Regards
Shiva
Hi Yogesh,
Please follow these steps to retrieve records with status 'In progress'.
Step1 : Create ResultDefinition and set the fields which are to be displayed as given below
(a) ResultDefinition resdef = new ResultDefinition(TableId tableId);
(b) resdef.setSelectFields(FieldId[] fieldIds);
Step2 : Create Search and set the search criteria
(c) Search search = new Search(tableId);
(d) FieldSearchDimension fieldSearchDimension = new FieldSearchDimension(fieldId);// Specify the fieldId of the field to be searched
(e) TextSearchConstraint textSearchConstraint = new TextSearchConstraint("In progress", TextSearchConstraint.EQUALS);
(f) search.addSearchItem(fieldSearchDimension,textSearchConstraint);
Step3 : Create RetrieveLimitedRecordsCommand and set the parameters
(g) RetrieveLimitedRecordsCommand retrieveLimitedRecordsCommand = new RetrieveLimitedRecordsCommand(repository.getConnection());
(h) retrieveLimitedRecordsCommand.setResultDefinition(resdef);
retrieveLimitedRecordsCommand.setSearch(search);
Step4 : Execute the command and retrieve Records
(j) retrieveLimitedRecordsCommand.execute();
(h) retrieveLimitedRecordsCommand.getRecords();
Hope it helps.
Regards,
Neeharika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi shiva,
since you have 8000 + records;
you are left with two options here ;
if you are passing pagesize from your request object , use that page size number as follows;
cmd.setPageSize(pageSize); // pageSize is integer number which is pased from Request
else if you want to get all the records from repository , use the following approach;
cmd.setPageSize(Integer.MAX_VALUE);
hard coding pageSize is not right approach;
if you any furthur help on this , let me know;
Regards
Rajasekhar K
Hi,
Use the below class
DATA: LT_RESULT TYPE MDM_SEARCH_RESULT_TABLE.
CALL METHOD LR_API->MO_CORE_SERVICE->QUERY
EXPORTING
IV_OBJECT_TYPE_CODE = 'PRODUCTS'
IMPORTING
ET_RESULT_SET = LT_RESULT.
IV_OBJECT_TYPE_CODE = 'PRODUCTS' here you can use CODE
of products.
Thanks,
Anil.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anil,
I did not understand the below code, Can you give me more pointers on how to use the below in java program?
Use the below class
DATA: LT_RESULT TYPE MDM_SEARCH_RESULT_TABLE.
CALL METHOD LR_API->MO_CORE_SERVICE->QUERY
EXPORTING
IV_OBJECT_TYPE_CODE = 'PRODUCTS'
IMPORTING
ET_RESULT_SET = LT_RESULT.
IV_OBJECT_TYPE_CODE = 'PRODUCTS' here you can use CODE
of products.
Thanks,
Shiva
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.