Skip to Content
0
Former Member
Dec 22, 2012 at 09:11 AM

SUP 2.1.3 iOS : Only one Data record being returned

58 Views

Hi All,

I am trying to fetch some data from the SUP server from my iOS device.

I set my personalization parameters and call the Synchronize function but i am only getting one data row for my MBO . whereas i have more than 10 rows present in Table. has any one encountered this issue?

I think there is some small configuration issue on the server which only retuens on record.

Please can any one guide me on what this could be.

I would really appreciate your help here.

Below is the code.

Azeem

<MBO>PersonalizationParameters *pp =  [<MBO>DB getPersonalizationParameters];    pp.CUST_NO_PK = @"0000000011";    pp.SALESORG_PK = @"1000";    pp.username = @"XXXXX";    [pp save];     while ([<MBO>DB hasPendingOperations])        [NSThread sleepForTimeInterval:0.2];    NSLog(@"Start PersonalizationParameters Synchronize");    @try {       [<MBO>DB synchronize];    }    @catch (NSException *exception) {        MBOLogError(@"<MBO>DB synchronize Exception%@: %@", [exception name], [exception reason]);    }    NSLog(@"End  PersonalizationParameters Synchronize");    <MBO>MBO_PURCHASEORDER_GETLISTSynchronizationParameters *sp = [<MBO>MBO_PURCHASEORDER_GETLIST getSynchronizationParameters];    [sp delete];    //Supply New params Here. i am leaving them as blank for now.If i don't save empty params here i don't even get one row    [sp save];     while ([<MBO>DB hasPendingOperations])     [NSThread sleepForTimeInterval:0.2];    NSLog(@"Start SynchronizationParameters Synchronize");    @try {        [<MBO>DB synchronize];    }    @catch (NSException *exception) {        MBOLogError(@"<MBO>DB synchronize Exception%@: %@", [exception name], [exception reason]);    }    NSLog(@"End SynchronizationParameters Synchronize");    NSMutableArray * array = [[NSMutableArray alloc] init];    <MBO>MBO_PURCHASEORDER_GETLISTList * PO = [<MBO>MBO_PURCHASEORDER_GETLIST findAll];    if ([PO length] > 0)    {        for (<MBO>MBO_PURCHASEORDER_GETLIST * oneRec in PO)        {            NSLog(@"Details %@",[oneRec toString]);            [array addObject:oneRec];        }    }    NSLog(@"Array Count %d",[array count]);