cancel
Showing results for 
Search instead for 
Did you mean: 

SUP 2.1.3 Problem with Table as personalization parameter in native iOS application

Former Member
0 Kudos

Hello experts,

I created MBO from SAP BAPI and tested it in my native iOS application - all work like a charm.

Now I need to use input parameter for select data, loaded to mobile device.

I select object as input when creating MBO and assign Personalization Parameter for it in tab Load Arguments in Unwired Workspace - all like I doing in previous projects. But the data type for this Personalization Parameter is TABLE.

The problem is:

When I adding generated code to project in XCode I see warnings "Class method '+delegate' not found(return type defaults to 'id')" in PersonalizationParameters class rows:

return [[SUPObjectList delegate] toJsonObject:(SUPAbstractStructure*)self.IP_Plant];

self.IP_Plant = (SUPObjectList*)[[SUPObjectList delegate] fromJsonObject:(SUPJsonObject*)value];

self.IP_Plant = (SUPObjectList*)[[SUPObjectList delegate] fromJsonArray:(SUPJsonArray*)[SUPJsonReader read:@"[{\"SIGN\":\"X\",\"OPTION\":\"Y\",\"LOW\":\"0001\",\"HIGH\":\"0001\"}]"]];

And when I trying to subscribe to db or synchronize data I get the error "[SUPObjectList writeJson]: unrecognized selector send to instance...".

It seems that in the generated code TABLE is a List of elements-structures, and the problem is in the transformation of the List to / from json.

Can anyone help me to solve this issue?

Or maybe someone know another way to use table as input parameter?

Anoter information:

Deploying MBO on server, Generation code - without any problems.

Using this MBO without input parameters - work fine.

iOS application succefully registered on SUP server, problem occured only when I trying to subscribe to db or synchronize data.

XCode version 4.3.3

Regards

Accepted Solutions (0)

Answers (3)

Answers (3)

brenton_ocallaghan
Active Participant
0 Kudos

Hi Uladzimir,

Just to confirm, having a table as a personalisation parameter and then using that as your importing parameter for an RFC is not supported. But I would also ask why you would want to do that, for RFCs going through SUP/SMP it would be better practice to have individual parameters.

If you are doing a range then maybe you might want to look at sync parameters. So for example if you are pulling a list of all fruit products but only want specific ones returned to the device then setup your sync parameters to pull Oranges, Apples and Bananas.

Hope that makes sense and you can get it working.

Cheers,

Brenton.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

SUP doesn't support following things for SAP table (internal tables) when using in RFC function call, that's what we found during our project implementation.

1) nested table OR table within table structure

2) table without fields (usually when there in only one fields available, SAP does support table without any field, but SUP doesn't ).

Hope this helps.