cancel
Showing results for 
Search instead for 
Did you mean: 

CustomDataServiceInterface ME6

Former Member
0 Kudos

hello,

has anybody used this CustomDataServiceInterface within SDK 2.1?

May be it is an error, I never will get a result record.

Imho the sevice should searcn the CUSTOM_FIELDS table with the handle as parameter. sql-trace looks like that:

select ATTRIBUTE, VALUE from CUSTOM_FIELDS where HANDLE='WorkstationBO:1000,O,MYPOD'

but inside the database the handle looks like that:

PODConfigBO:WorkstationBO:1000,O,MYPOD. But what type of BOHandle this is?

regards,

Karsten

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello Mikhail,

thanks fpor the answer.

that means I have to take the crud-interface and to write my own sql-statements?

regards,

Karsten

Former Member
0 Kudos

Hello Karsten,

Not really.

Assuming that you have a handle to pod configuration you need to create the following request for the CustomDataService (assuming COLOR and WEIGHT are registered custom fields for pod configuration):


        List<CustomValue> customData = new ArrayList();
        customData.add(new CustomValue("COLOR", "VALUE"));
        customData.add(new CustomValue("WEIGHT", "VALUE1"));
        
        SaveCustomDataRequest request = new SaveCustomDataRequest();
        request.setCustomData(customData);
        
        request.setRef(podConfigRef);
        request.setObjectAlias("POD_CONFIG");
        customDataService.saveCustomData(request);

Hope that helps. Otherwise please explain your use case.

Regards,

Mikhail

Former Member
0 Kudos

Hello,

The service accepts the ref (handle) of the object that holds the fields. You identify the object by the alias which is in most cases the name of the table. You can look up the name for most common in the com.sap.me.common.ObjectAliasEnum.

In this case it appears that you need to use POD_CONFIG which is unfortunately not part of the common enum.

Regards,

Mikhail