cancel
Showing results for 
Search instead for 
Did you mean: 

How to create SUP native application

Former Member
0 Kudos

Hi Experts,

We have one HWC application with an MBO (Created using RFC) and it is in online
cache group. From the application we will pass some value to RFC do some operation
as online request upon successful completion of the request we will get the
status of the operation as output. This application is working fine.


Now my question is that how can I create a iOS native application for the same, using
this MBO without NW gateway.

I highly appreciate if someone can provide some tips or steps to do so.

  

Thanks & Regards,

Fibeesh

Accepted Solutions (1)

Accepted Solutions (1)

midhun_vp
Active Contributor
0 Kudos

The Online cache policy is only used with HWC application.

In the case of native application you can use On Demand, Scheduled or DCN.

You can use the same MBO package for Native application development also. But you need to change the Cache policies as I mentioned.

The steps to develop a native application is given below:

  1. Develop and Deploy the MBO.
  2. Generate the Object API (IOS) from the MBO project by right clicking in the MBO project.
  3. Import the generated code to the Xcode project ( Mac machine is a  must in the case of IOS ). And design the UI and use the APIs generated to connect ot SUP and consume data.
  4. From the given below link you can download the sample project.Where you can easily understand the APIs used. http://scn.sap.com/docs/DOC-27520

- Midhun VP

Former Member
0 Kudos

Hi Midhun,

Thank you for your valuable information,

I already created the application using on Demand without success, then I add “other” operation to the MBO using the same RFC. But
here I have following concerns.

  1. When I synchronize DB, data will update the back end with two entries one with blank data and second entry is with actual data.
  2. How can I take the output result of the “other” operation?

     

Thanks & regards,

midhun_vp
Active Contributor
0 Kudos

1. If you give more information means we can i will get an idea on what all you are doing so I can give a solution for it. Are you updating two fields in SAP?

2. The right way to get the result of an operation is to implement Result Checker. The other way is to create an MBO for the operation.

- Midhun VP

Former Member
0 Kudos

We have an RFC which will insert some data in SAP with import parameter User ID, Date, Time and Action and export parameter Status and Message. With the export parameter we will get the transaction status.

I had done the following steps to develop

·         Created MBO using this RFC

·         Deploy the MBO

·         Generate the code for iOS.

·         Register application connection in SCC

·         Create iOS application using generated code & Libraries

In the submit action I write the following code.

TestAppTestAppAction  *updateSatus = [TestAppTestAppAction   getInstance];

     updateSatus.I_User =@ “xxxxx”;

     updateSatus.I_Date =@ “20130513”;

     updateSatus.I_Time =@ “121212”;

     updateSatus.I_Action =@ “XX”;

     [updateSatus create];

     [updateSatus submitPending];

     [TestAppTestAppDB synchronize];

Nothing happened in the back end

So I created “other” operation in the same MBO with the same RFC and change the code of submit action as follows

TestAppTestAppActionOtheroperation*updateSatus = [TestAppTestAppActionOtheroperation

getInstance];

          updateSatus.I_User =@ “xxxxx”;

          updateSatus.I_Date =@ “20130513”;

          updateSatus.I_Time =@ “121212”;

          updateSatus.I_Action =@ “XX”;

     [updateSatus save];

     [updateSatus submitPending];

     [TestAppTestAppDB synchronize];

This time for each submit action it will update the SAP backend twice one with actual data and next time with the blank data.

Now how can I get the output result?

Please let me know if you require further information.

Thank s,

Fibeesh

brenton_ocallaghan
Active Participant
0 Kudos

Hi Fibeesh,

The reason you are not seeing any call to the back-end correctly here is because you seem to be using the standard "create" and "save" methods. When you create a custom operation on your MBO you generally give it a name (not to be confused with the type). So if I called my function "achieveMyOperation" then in my iOS code I would then have a method I could call named "achieveMyOperation" which would also probably take a few parameters based on what you need to pass into your RFC.

You should be looking to debug through the methods "onReplaySuccess" and "onReplayFailure" which will show you exactly what is happening when/if you manage to send your data.

Please shout if you need more info/guidance,

Thanks,

Brenton.

Former Member
0 Kudos

Hi Brenton,

Thank you for your reply,

Can you please explain bit more, I am new to the SUP native application development.

With the following code it’s updating in the backend, but for each triggers it updating
twice one with actual data and with a blank data.

  

TestAppTestAppActionOtheroperation*updateSatus =
[TestAppTestAppActionOtheroperation
getInstance];

        updateSatus.I_User =@ “xxxxx”;

         updateSatus.I_Date =@ “20130513”;

         updateSatus.I_Time =@ “121212”;

         updateSatus.I_Action =@ “XX”;

[updateSatus save];

[updateSatus submitPending];

[TestAppTestAppDB synchronize]

   As per my knowledge when we call synchronize it will update on the
SAP backend. And here I  am synchronize the DB once.  In the attached screen shot
SUCERR & REMARKS are operation output. But still don’t know how to retrieve
this operation output.

  

Thanks & Regards,

Fibeesh

midhun_vp
Active Contributor
0 Kudos

The first approach you made is wrong since you are performing an operation.

I don't know why you the operation call happens two times.

Can you try without calling the submittingPending API as given below.

TestAppTestAppActionOtheroperation*updateSatus = [TestAppTestAppActionOtheroperation

getInstance];

          updateSatus.I_User =@ “xxxxx”;

          updateSatus.I_Date =@ “20130513”;

          updateSatus.I_Time =@ “121212”;

          updateSatus.I_Action =@ “XX”;

     [updateSatus save];

   

     [TestAppTestAppDB synchronize];


As I mentioned before you have to use Result Checker to get the output of the result.

- Midhun VP

brenton_ocallaghan
Active Participant
0 Kudos

Hmm I think the submitPending would still be required to queue the operation to be sent to SAP though - what version of SUP are you using? the call to Synchronise may not be required in older versions.

If you call save, save calls the standard create function - it is possible that the standard create function is then calling your custom create twice - I would try the following

[updateStatus myCustomCreateFunction];

[updateStatus submitPending];

and then possibly depending on the SUP API version call

[TestAppTestAppDB synchronize];

And then as said - use the result checker output (getLogRecords) to see the result.

Former Member
0 Kudos

Hi Brenton,

  I am using SUP 2.2SP02 version

  You are right Brenton, when I remove [updateSatus
submitPending] it updates the SAP backend with blank data
. I am following “
Developer Guide: iOS Object API Applications” in this document it mention as follows.

  1.Suppose you have an MBO that has an operator that generates a customized sum. Begin by creating an object instance and assigning values to its attributes, specifying the "Add"operation:

  

SUP101CustomerOtherOperation *other =[[SUP101CustomerOtherOperation
alloc] init];

     other.P1= @"somevalue";

     other.P2= 2;

     other.P3= [NSDate date];

   [other save];

   2. Call the MBO instance's submitPending method and synchronize with the generated database:

  [other submitPending];

  [SUP101SUP101DB synchronize];

Now I will try to follow your method and I will let you know, and also if possible can you please let me know how we can use the result checker.

  

Fibeesh

brenton_ocallaghan
Active Participant
0 Kudos

Hi Fibeesh,

Sounds like you are heading in the right direction. For the results checker I'd have a look at the Sybase documentation here which has a pretty good piece of sample code showing how to access the logs you need after an operation.

Best of luck,

Brenton.

Former Member
0 Kudos

Hi Brenton,

As per you instruction I created a standard “create” operation and use the following code to update.

[updateStatus submitdata:@”20130524” withIVType:@”P10” withIVUser:@”xxxxx” withIVTime:@”121212”];

[updateStatus submitPending];

[TestAppTestAppDB synchronize];

  

But still it update the backend twice.

With getLogRecord, I can see some blank data as output.

  

Fibeesh

brenton_ocallaghan
Active Participant
0 Kudos

Hi Fibeesh,

Just reading through some of the documentation and it looks like there is a non-blocking version of your synchronize call that you could use:

  1. Use non-blocking synchronize call to upload the pending changes to the Unwired Server. The previous replay results and new changes are downloaded to the client device in the download phase of the synchronization session.[SUP101SUP101DB beginSynchronize];

I found this extract here.

Hope that helps,

Brenton.

Former Member
0 Kudos

Hi brenton,

I appreciate for your effort and support.

  

I tried non-blocking synchronize call to upload the pending changes to the Unwired Server. It’s not updating to the backend and when we call synchronize it will update all together. Please find the following debug log for the 3 stages.

Please let me know if you can figure out something with this log.

 

  [updateObj UpdateStatus:[df stringFromDate:currentTime]
withIVType:@"XX" withIVUser:txtUser.text withIVTime:resultString];

  

2013-05-25 09:04:46.618 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddba0f0}: --- 1 row executed

 

2013-05-25 09:04:46.624 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddba0f0}:insert is completed

2013-05-25 09:04:46.632 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddba0f0}: --- 0 rows selected

  2013-05-25 09:04:46.640 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddba0f0}: --- 1 row executed

 

2013-05-25 09:04:46.646 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddba0f0}:insert is completed

 

2013-05-25 09:04:46.653 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddba0f0}:commit transaction

 

2013-05-25 09:04:46.702 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:result row

2013-05-25 09:04:46.710 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

 

2013-05-25 09:04:46.720 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:result row

 

2013-05-25 09:04:46.775 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

 

2013-05-25 09:04:46.786 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb39d0}:result row

 

2013-05-25 09:04:46.794 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb39d0}: --- 0 rows selected

 

2013-05-25 09:04:46.802 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb2720}: --- 1 row executed

 

2013-05-25 09:04:46.850 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb2720}:update is completed

 

(lldb)

[updateObj submitPending];

2013-05-25 09:06:32.522 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.530 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.540 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.548 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.557 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.565 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.574 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.580 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

2013-05-25 09:06:32.588 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

2013-05-25 09:06:32.595 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.603 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.609 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.617 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.624 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.633 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.643 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.651 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.660 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.668 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.677 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.687 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 1 row executed

 

2013-05-25 09:06:32.694 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:insert is completed

2013-05-25 09:06:32.702 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

2013-05-25 09:06:32.709 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.717 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.728 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.733 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.741 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.749 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.759 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.767 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.776 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.784 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.794 PUNCHIN[745:907] [SQL TRACE][DEBUG] {thread:0x1dd47810,dbConn:0x1ddb7cd0}:result
row

2013-05-25 09:06:32.802 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

2013-05-25 09:06:32.811 PUNCHIN[745:907] [SQL TRACE][DEBUG] {thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.821 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

 

2013-05-25 09:06:32.827 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.835 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:result row

2013-05-25 09:06:32.841 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.848 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.909 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 0 rows selected

 

2013-05-25 09:06:32.919 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 1 row executed

 

2013-05-25 09:06:32.927 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:update is completed

 

2013-05-25 09:06:32.936 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}: --- 1 row executed

 

2013-05-25 09:06:32.943 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb7cd0}:update is completed

 

2013-05-25 09:06:32.949 PUNCHIN[745:907] [SQL TRACE][DEBUG] {thread:0x1dd47810,dbConn:0x1ddb7cd0}:commit
transaction

 

(lldb)

[ActionActionDB synchronize];

2013-05-25 09:07:38.795 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb5460}:result row

2013-05-25 09:07:38.803 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb5460}:result row

 

2013-05-25 09:07:38.811 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb5460}: --- 0 rows selected

 

2013-05-25 09:07:38.821 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddba0f0}: --- 0 rows selected

 

2013-05-25 09:07:38.832 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb5460}:result row

 

2013-05-25 09:07:38.839 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb5460}:result row

 

2013-05-25 09:07:38.846 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1ddb5460}: --- 0 rows selected

 

2013-05-25 09:07:38.857 PUNCHIN[745:907] [SQL TRACE][DEBUG]
synchronize default

 

2013-05-25 09:07:39.828 PUNCHIN[745:907] [SQL TRACE][DEBUG] the
sync result: Sync was successful.

 

2013-05-25 09:07:39.837 PUNCHIN[745:907] [SQL TRACE][DEBUG]
Synchronizing... ULRemoteId<cbb0c1b0-c53a-11e2-8000-3451c95d5967>
SynchronizationGroup<default> UserContext<>

  2013-05-25 09:07:39.846 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:result row

2013-05-25 09:07:39.854 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

2013-05-25 09:07:39.863 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:result row

2013-05-25 09:07:39.872 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

2013-05-25 09:07:39.883 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:result row

2013-05-25 09:07:39.889 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

2013-05-25 09:07:39.897 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

2013-05-25 09:07:39.904 PUNCHIN[745:907] [INFO]

[CallbackHandler.m:59] ================================================

2013-05-25 09:07:39.906 PUNCHIN[745:907] [INFO]
[CallbackHandler.m:60] Replay Successful

2013-05-25 09:07:39.907 PUNCHIN[745:907] [INFO]
[CallbackHandler.m:61] =================================================

2013-05-25 09:07:39.909 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 1 row executed

2013-05-25 09:07:39.914 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:delete is completed

2013-05-25 09:07:39.922 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:result row

2013-05-25 09:07:39.929 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

 

2013-05-25 09:07:39.936 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 1 row executed

 

2013-05-25 09:07:39.943 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:delete is completed

2013-05-25 09:07:39.952 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 0 rows selected

2013-05-25 09:07:39.961 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}: --- 1 row executed

  2013-05-25 09:07:39.969 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:delete is completed

 

2013-05-25 09:07:39.978 PUNCHIN[745:907] [SQL TRACE][DEBUG]
{thread:0x1dd47810,dbConn:0x1dd96f40}:commit transaction

 

(lldb)

Regards

Fibeesh

Former Member
0 Kudos

Hi Brenton,

I solved the first issue (updating the SAP backend twice) by creating a blank MBO with “other” operation.

  Now I need your help to retrieve the output of “other” operation. When I check the getLogRecords , I am able to get all the input values but I didn’t find any output values.

 

For “other” operation there is no output mapping option, So is it possible
to get the output values of “other” operation?

 

Regards,

Fibeesh

Former Member
0 Kudos

Brenden,

I was able to login and get data from SUP/SAP, but what went wrong i dont know, now i am not able to get data and app is crashing at [DB Subscribe]; point.

and the error i am getting is

x00002925 start + 53

2013-05-29 22:06:16.297 FI[75555:c07] [SQL TRACE][DEBUG] {thread:0x96924f0,dbConn:0x96ab930}:rollback transaction

2013-05-29 22:06:16.319 FI[75555:c07] *** Terminating app due to uncaught exception 'SUPPersistenceException', reason: 'exception is in createCore: Illegal key generator status: the key generator must be populated first.'

*** First throw call stack:

(0x22e2022 0x2473cd6 0x10eee1 0xd73df 0xd6acd 0xd29de 0xa52b5 0x111e16 0x1124d8 0x15069 0xba6a29 0x22ad855 0x22ad778 0xaeb234 0x10e86 0x22e3e42 0xb0a9df 0x22b694f 0x2219c09 0x2219424 0x2218d84 0x2218c9b 0x2cb37d8 0x2cb388a 0xe42626 0x18bd2 0x2925)

terminate called throwing an exception

Please help as, this is getting frustrating. code is attached.

- (void)initializeSUP

{

    // Set log level (optional -- this will generate a lot of output in the debug console)

    [MBOLogger setLogLevel:LOG_INFO];

   

    AppDelegate *fiAppDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

    //   [fiAppDelegate showActivityIndicatorWithLabel:@"Getting Complaints"];

    //   [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];

    [MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES];

   

   

   

    SUPDataVault *supVault = nil;

    SUPDataVault *messagingvault = nil;

    self.pin = self.CRMUserName;

    //    NSLog(@" setting pin to %@",self.CRMUserName);

   

    if(self.firstrun)

    {

        //        NSLog(@"Running the app for the first time.");

       

        // If the application is being run for the first time, we do the following:

        //      1. Remove the messaging data vault created by earlier versions of the application, if it exists.

        //      2. Remove the SUP101 data vault created by earlier versions of the application, if it exists.

        //      3. Create the messaging vault using the PIN as the password, leaving it unlocked for use by the messaging layer.

        //      4. Create the SUP101 data vault using the PIN as the password, and store the SUP username/password credentials

        //                  and a database encryption key in the vault.

        //

        @try

        {

            //            NSLog(@"Delete preexisting messaging vault");

            [SUPDataVault deleteVault:kMessagingDataVaultID];

        }

        @catch(NSException *e)

        {

            // Ignore any exception

        }

        @try {

            //            NSLog(@"Delete preexisting data vault");

            [SUPDataVault deleteVault:kSUP101DataVaultID];

        }

        @catch(NSException *e)

        {

            // Ignore any exception

        }

       

        @try {

            //            NSLog(@"Create new FI data vault and store credentials and a generated encryption key");

            //            NSLog(@"creating valut  with %@",self.pin);

           

            supVault = [SUPDataVault createVault:kSUP101DataVaultID withPassword:self.pin withSalt:kSUP101DataVaultSalt]; // creates the vault

            [supVault setString:@"password" withValue:self.SUPPassword];

            //            NSLog(@"setting password to %@",self.SUPPassword);

            [supVault lock];

        }

        @catch (NSException *exception) {

            //            NSLog(@"Exception in creating new data vault: %@: %@",[exception name], [exception reason]);

            self.noTransportAlert = [[UIAlertView alloc] initWithTitle:@"Exception in creating data vault" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

            [self.noTransportAlert performSelectorOnMainThread:@selector(show) withObject:self waitUntilDone:YES];

            self.noTransportAlert = nil;

           

           

        }

        @try {

            //            NSLog(@"Create new messaging vault and leave it unlocked");

            messagingvault = [SUPDataVault createVault:kMessagingDataVaultID withPassword:self.pin withSalt:kDVStandardSalt];

            //            NSLog(@" creating message vault with %@", self.pin);

        }

        @catch (NSException *exception) {

            self.noTransportAlert = [[UIAlertView alloc] initWithTitle:@"Exception in creating messaging vault" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

            [self.noTransportAlert performSelectorOnMainThread:@selector(show) withObject:self waitUntilDone:YES];

            self.noTransportAlert = nil;

            //            NSLog(@"Exception in creating new messaging data vault: %@: %@",[exception name], [exception reason]);

        }

       

    }

    else

    {

        //

        // If the application has been run before, we get the PIN from the user, and use it to unlock the existing messaging data vault

        // (otherwise the messaging layer cannot start).

        //

       

        //       NSLog(@"App has been run before.");

        @try {

            NSLog(@"Unlock messaging vault");

            messagingvault = [SUPDataVault getVault:kMessagingDataVaultID];

            [messagingvault unlock:self.pin withSalt:kDVStandardSalt];

            NSLog(@"unlocking mv with %@",self.pin);

        }

        @catch (NSException *exception) {

            //            NSLog(@"Exception unlocking messaging data vault: %@: %@",[exception name],[exception reason]);

            [self showNoTransportAlert:kSUPErrorBadPin];

        }

       

    }

   

    //

    // Start up the messaging client. This will attempt to connect to the server. If a connection was

    // established we can proceed with login. See onConnectFailure: for more information about handling connection failure.

    //

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onConnectSuccess:) name:ON_CONNECT_SUCCESS object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onConnectFailure:) name:ON_CONNECT_FAILURE object:nil];

   

    self.connectStartTime = [NSDate date];

   

    SUPApplication* app = [SUPApplication getInstance];

   

    @try {

        supVault = [SUPDataVault getVault:kSUP101DataVaultID];

        [supVault unlock:self.pin withSalt:kSUP101DataVaultSalt];

   

   

       

        // make sure to have the applicationIdentifer same as the project name. This is case sensetive.

        app.applicationIdentifier = @"FI";

       

        CallbackHandler *ch = [CallbackHandler getInstance];

        [self setCallbackHandler:ch];

       

        [app setApplicationCallback:[self callbackHandler]];

       

        // Register a callback handler. This should be done before any other SUP code is called.

        // self.callbackHandler = [[CallbackHandler new] autorelease];

       

        [FIFIDB registerCallbackHandler:self.callbackHandler]; // jrm

       

       

        SUPConnectionProperties* props = app.connectionProperties;

       

        [props setServerName:self.SUPServerName];

        [props setPortNumber:[self.SUPServerPort intValue]];

        [props setUrlSuffix:@"/ias_relay_server/client/rs_client.dll"];

        [props setFarmId:self.SUPFarmID];

        [props setSecurityConfiguration:@"admin"];

        [props setNetworkProtocol:@"https"];

       

       

        SUPLoginCredentials* login = [SUPLoginCredentials getInstance];

        if(self.SUPManualRegistration)

        {

            login.username = self.SUPConnectionName;

            login.password = nil;

            props.activationCode = self.SUPActivationCode;

        }

        else

        {

            login.username = self.SUPUserName;

            login.password = [supVault getString:@"password"];

            props.activationCode = @"123";

        }

        props.loginCredentials = login;

       

        SUPConnectionProfile *cp = [FIFIDB getConnectionProfile];

       

        if(![FIFIDB databaseExists]){

           

            //[FIFIDB deleteDatabase];

                         [FIFIDB createDatabase]; // throws checkuser-os error

            // Generate an encryption key for the database.

            [FIFIDB generateEncryptionKey];

            // Store the encryption key in the data vault for future use.

                  [supVault setString:@"encryptionkey" withValue:[cp getEncryptionKey]];

            [FIFIDB closeConnection];

            // Since we are creating the database from scratch, we set the encryption key for the new database

        }

        else{

            // If we were using the database from a previous run of the app and not creating it each time, an application should run the code below instead.

            // To successfully access a previously encrypted database, we set the key used by the connection profile.

            NSString *key = [supVault getString:@"encryptionkey"];

            NSLog(@"Got the encryption key: %@",key);

            [cp setEncryptionKey:key];

        } //end of ..[FIFIDB databaseExists];..

       

        [FIFIDB closeConnection];

        [cp.syncProfile setDomainName:@"default"];

        [cp enableTrace:YES withPayload:YES];

        [cp.syncProfile enableTrace:YES withPayload:YES];

       

       

        app.connectionProperties.farmId = @"sap-sup.msg";

       

       

        //        NSLog(@"====== START: on InitializeSUP() method ======");

        //        NSLog(@"app.serverName = %@",app.connectionProperties.serverName);

        //        NSLog(@"app.serverPortNumber = %d",app.connectionProperties.portNumber);

        //        NSLog(@"app.URLSuffix = %@",app.connectionProperties.urlSuffix);

        //        NSLog(@"app.FarmID = %@",app.connectionProperties.farmId);

        //        NSLog(@"app.activationCode = %@",app.connectionProperties.activationCode);

        //        NSLog(@"app.Status = %@",(app.connectionStatus == YES ? @"YES" : @"NO"));

        //        NSLog(@"app = %@",app);

        //

        //        NSLog(@"====== END: on InitializeSUP() method ========");

       

        [FIFIDB setApplication:app];

       

        [app registerApplication:0]; // in SUPApplication.h

       

       

        while([app registrationStatus] != SUPRegistrationStatus_REGISTERED)

        {

           

            //           NSLog(@"waiting for registration...");

            [NSThread sleepForTimeInterval:1.0];

        }

       

        while(([app connectionStatus] != SUPConnectionStatus_CONNECTED))

        {

           

            //            NSLog(@"waiting for connection...");

            [NSThread sleepForTimeInterval:1.0];

        }

       

    }

    @catch (SUPPersistenceException * pe) {

        //       NSLog(@"%@: %@", [pe name],[pe message]);

        [self showNoTransportAlert:kSUP101ErrorFailure];

    }

    @finally

    {

        [supVault lock];

    }

   

}

-(void)onConnectSuccess:(NSNotification *)obj

{

    // Connection to the server was made, so log in.

    // See [CallbackHandler onLoginSuccess] and [CallbackHandler onLoginFailure]. One of those

    // callbacks will be called at some point in the future.

    [[NSNotificationCenter defaultCenter] removeObserver:self name:ON_CONNECT_SUCCESS object:nil];

    [[NSNotificationCenter defaultCenter] removeObserver:self name:ON_CONNECT_FAILURE object:nil];

   

    //    NSLog(@"Connection has been established.");

   

    NSString *supuser = nil;

    NSString *suppass = nil;

    SUPDataVault *sup101vault = nil;

    @try {

        NSLog(@"Unlock SUP101 vault to get username/password credentials");

        sup101vault = [SUPDataVault getVault:kSUP101DataVaultID];

        [sup101vault unlock:self.pin withSalt:kSUP101DataVaultSalt];

        supuser = self.SUPUserName;

        suppass = [sup101vault getString:@"password"];

        //        NSLog(@"Login View Controller onConnectSuccess supuser: %@ suppass: %@", supuser, suppass);

    }

    @catch (NSException *exception) {

        //        NSLog(@"Exception unlocking messaging data vault: %@: %@",[exception name],[exception reason]);

        [self showNoTransportAlert:kSUP101ErrorKeyNotAvailable];

    }

    @finally {

        [sup101vault lock];

    }

   

    //    NSLog(@"Creating a sync profile.");

    SUPConnectionProfile *sp = [FIFIDB getSynchronizationProfile];

   

   

    [sp enableTrace:YES withPayload:YES];

    [sp.syncProfile enableTrace:YES withPayload:YES];

   

   

    // by default the AsyncReplay is enabled. We will turn it off.

    //This will make the next syncrhonization a blocking call.

   

    [sp setAsyncReplay:NO];

    [sp setPortNumber:443];

    [sp setNetworkProtocol:@"https"];

   

    [sp setNetworkStreamParams:@"trusted_certificates=ebslabCertifRoot.cer;url_suffix=/ias_relay_server/client/rs_client.dll/sap-sup.rep"];

   

    [sp setUser:SUPUserName];

    [sp setPassword:SUPPassword];

    [sp setServerName:SUPServerName];

   

   

    NSLog(@"======== RESULTS: From SynchronizationProfile =======");

    NSLog(@"sp AsyncReplay = %@",(sp.getAsyncReplay ? @"YES" : @"NO"));

    NSLog(@"sp Server Name = %@",sp.getServerName);

    NSLog(@"sp Server Port = %d",sp.getPortNumber);

    NSLog(@"sp Network Protocol = %@",sp.getNetworkProtocol);

    NSLog(@"sp Network Stream Parameters = %@",sp.getNetworkStreamParams);

    NSLog(@"sp User = %@",sp.getUser);

    NSLog(@"sp Password = %@",sp.getPassword);

    NSLog(@"======== END RESULTS: From SynchronizationProfile =======");

   

    @try {

        if (!self.subscribed) {

            //            NSLog(@"Trying to suscribe");

            [FIFIDB subscribe];

            //            NSLog(@"End of suscribe");

            self.subscribed =1;

        }

        else {

            //            NSLog(@"Trying to sync");

            [FIFIDB synchronize];

            //            NSLog(@"End of sync");

        }

       

    }

    @catch (NSException *exception) {

        MBOLogError(@"%@: %@", [exception name], [exception reason]);

    }

   

    //    NSLog(@"getting sync parameters");

   

    FICheckUserSynchronizationParameters *sp1 = [FICheckUser getSynchronizationParameters];

   

    sp1.username = self.CRMUserName;

    sp1.password = self.CRMPassword;

    [sp1 save];

   

    @try {

        [FIFIDB synchronize];

    }

    @catch (NSException *exception) {

        //            NSLog(@"Exception in creating new data vault: %@: %@",[exception name], [exception reason]);

        self.noTransportAlert = [[UIAlertView alloc] initWithTitle:@"Server Connection Weak" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

        [self.noTransportAlert performSelectorOnMainThread:@selector(show) withObject:self waitUntilDone:YES];

        self.noTransportAlert = nil;

        [MBProgressHUD hideHUDForView:self.navigationController.view animated:YES];

       

    }

   

   

    //Terminating app due to uncaught exception 'SUPPersistenceException', reason: 'SUPPersistenceException from synchronize: -- SUPSynchronizeException: Sync failed: -857 (ERROR) %1:[-10225] Message: Failure occurred while executing user supplie'

    //    NSLog(@"completed [FIFIDB synchronize system ];");

   

    FIPersonalizationParameters *pp = [FIFIDB getPersonalizationParameters];

   

    FICheckUserList *userReturnLines = [FICheckUser findAll];

    if ([userReturnLines length] > 0)

    {

        for (FICheckUser * oneRec in userReturnLines)

        {

           

            if(![oneRec.USER_ID isEqualToString:(sp1.username )])

            {

                pp.username = self.CRMUserName;

                pp.password = self.CRMPassword;

                [pp save]; // user record

               

                //               NSLog(@"data %@",oneRec);

            }

        }

    }

    else

    {

        //        NSLog(@"SAP User Authentication failure");

        self.noTransportAlert = [[UIAlertView alloc] initWithTitle:@"SAP User Authentication failure" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

        [self.noTransportAlert performSelectorOnMainThread:@selector(show) withObject:self waitUntilDone:YES];

        self.noTransportAlert = nil;

       

    }

   

    //send the notification , so that the UI enables the Subscribe button

    NSNotification *n = [NSNotification notificationWithName:ON_LOGIN_SUCCESS object:nil];

    [[NSNotificationCenter defaultCenter] postNotification:n];

   

    /////

    // Now get complaints

    /////

   

    AppDelegate *fiAppDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];

   

    //   [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveTestNotification:) name:@"TestNotification" object:nil]; // example

   

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(gotComplaintList) name:NOTIFICATION_UPDATE_COMPLETE object:nil];

   

    @try {

        [FIFIDB synchronize : @"GetComplaintList"]; //: @"GetComplaintList"

    }

    @catch (NSException *exception) {

        //            NSLog(@"Exception in creating new data vault: %@: %@",[exception name], [exception reason]);

        self.noTransportAlert = [[UIAlertView alloc] initWithTitle:@"Server Connection Weak" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

        [self.noTransportAlert performSelectorOnMainThread:@selector(show) withObject:self waitUntilDone:YES];

        self.noTransportAlert = nil;

        [MBProgressHUD hideHUDForView:self.navigationController.view animated:YES];

       

    }

   

   

   

    FIGetComplaintListList *userReturnLinesComplaint = [FIGetComplaintList findAll];

   

    NSMutableArray *complaints = [[NSMutableArray alloc]init];

   

    if ([userReturnLinesComplaint length] > 0)

    {

        for (FIGetComplaintList *oneRec in userReturnLinesComplaint)

        {

            NSLog(@"oneRec %@",oneRec);

            NSLog(@"userReturnLinesComplaint %@",userReturnLinesComplaint);

           

            FIComplaint *complaint ;

           

            complaint = [[FIComplaint alloc]init];

           

            NSString *dataString= [NSString stringWithFormat:@"%@", [oneRec SOLD_TO_NAME]];

            complaint.complaintName = dataString;

           

            dataString= [NSString stringWithFormat:@"%@", [oneRec SOLD_TO_ADDRESS]];

            complaint.complaintAddress = dataString;

           

            dataString = [NSString stringWithFormat:@"%@", [oneRec SOLD_TO_TELE]];

            complaint.complaintPhone = dataString;

           

            dataString = [NSString stringWithFormat:@"%@", [oneRec OBJECT_ID]];

            complaint.complaintNumber = dataString;

           

            dataString = [NSString stringWithFormat:@"%@", [oneRec DESCRIPTION]];

            complaint.complaintShortDesc = dataString;

           

            dataString= [NSString stringWithFormat:@"%@", [oneRec DESCRIPTION]];

            complaint.complaintFullDesc = dataString;

           

            dataString = [NSString stringWithFormat:@"%@", [oneRec PRIORITY]];

            complaint.complaintPriority = dataString;

           

            dataString = [NSString stringWithFormat:@"%@", [oneRec CONCATSTATUSER]];

            complaint.complaintStatus = dataString;

           

            dataString = [NSString stringWithFormat:@"%@", [oneRec CREATED_AT_DATE]];

            complaint.complaintDate = dataString;

           

            [complaints addObject:complaint];

            [complaintArray addObject:complaint];

           

           

        }

       

       

    }

    else

    {

        //        NSLog (@"Complaint List has NO RECORDS");

        self.noTransportAlert = [[UIAlertView alloc] initWithTitle:@"No Complaints" message:message delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];

        [self.noTransportAlert performSelectorOnMainThread:@selector(show) withObject:self waitUntilDone:YES];

        self.noTransportAlert = nil;

    }

    //[[NSNotificationCenter defaultCenter] postNotificationName:@"TestNotification" object:self]; //example

    [[NSNotificationCenter defaultCenter] postNotificationName:NOTIFICATION_UPDATE_COMPLETE object:self];

    submitButton.titleLabel.text = [NSString stringWithFormat:@"%i New Complaints",complaints.count];

   

    [fiAppDelegate getComplaint:complaints];

   

    //    [MBProgressHUD hideHUDForView:self.navigationController.view animated:YES];

    //    submitButton.enabled = YES;

    //    submitButton.alpha = 1;

    //    submitButton.titleLabel.text = [NSString stringWithFormat:@"%i New Complaints",complaints.count];

   

   

    //    NSLog(@"loaded Complaints");

}

midhun_vp
Active Contributor
0 Kudos

Keeping the operation to " Other " is not the right solution for this problem.

This issue comes only during the development of IOS application. In the case of Android even the operation is "delete", "update" etc it will work perfectly.

Someone from SAP has to give the right solution.

- Midhun VP

Former Member
0 Kudos

Hi Midhun,

Actually for our application its only require the “other” operation because we don’t want to save the operation result in CDB and For a blank MBO we can’t create
operation like create, update, delete.

Regards,

Fibeesh

Former Member
0 Kudos

Hi Saket,

I think this is this is because of the problem with relay server configuration
parameters.

[sp setNetworkStreamParams:@"trusted_certificates=certificateName;com

  pression=zlib;url_suffix=urlsuffixProvidedByTheRelayServer"];

NetworkProtocol – http or https.

PortNumber – the correct port number for the selected NetworkProtocol.

NetworkStreamParams – certificateName: the name of the certificate you added in the Resource folder.

 

urlsuffixProvidedByTheRelayServer:the RBS URL suffix provided by the Relay

Server

Regards,

Fibeesh

brenton_ocallaghan
Active Participant
0 Kudos

Hi Fibeesh,

When you say you are not getting any output values - are you able to see the status code returned for the operation in question? So normally I would expect to see a 200 returned to the device if the operation returned successfully.

If the operation was unsuccessful then I would expect that the error returned in your BAPIRET2 table from your RFC would be contained in the log record of your entity.

I am assuming that you have an exporting parameter in your RFC called RETURN of the type BAPIRET2 ? if not then you would need one in order to successfully report any errors back to SUP.

Cheers,

Brenton.

Former Member
0 Kudos

Hi Brenton,

Yes, I am able to see the status code 200 ( Always reach to onReplaySuccess method). We don’t have any export parameter called RETURN of the type BAPIRET2 instead of that we added two fields SUCERR and Remark, Which will give the status of transaction.

Now we added the RETURN Export parameter and if the validation failed it will pass the value “E” and some remarks to the RETURN parameter.

Now even the backend update without any issue it will reach to onReplayFailure. And in the trace file it shows the status 200.

And I am using the following code to get the log record and still not able to retrieve the logs.

TestAppTestAppActionOtheroperation *failedobject =( TestAppTestAppActionOtheroperation *) [notification object];

 

SUPObjectList  *ErrMSG = failedobject.getLogRecords;

  

Thanks & Regards,

brenton_ocallaghan
Active Participant
0 Kudos

Hi Fibeesh,

Sounds like we are making progress. OK so just to confirm that the RETURN parameter is a table correct? SAP will throw a nice warning around RFCs returning tables if it is setup correctly (you can safely ignore that in my experience). I think the table type is BAPIRETTAB which is a table type for the line BAPIRET2.

If possible could you post a screen shot from SAP showing the type of data returned in your RFC errors? Along with the 'E' indicating the error I would normally populate the ID as the package name the RFC is contained in, the NUM field indicating a unique message number and then the contents of the error in the MESSAGE field.

So in summary, if my RFC was throwing an error, I would have a single line in my RETURN table. The table is of the type BAPIRETTAB and the line would always have entries in the TYPE, ID, NUMBER and MESSAGE fields.

If that is the case then not only should onReplayFailure be called but you should also be able to see why it was called.

If you are still struggling try putting a breakpoint in the onImport method. This method is called for each message received from the server. So for each operation you at least get 2 messages back - 1 is the result of the line update and 2 is the log record itself in which you can always see the SAP message from the BAPIRETTAB.

Hope that helps,

Brenton.

Former Member
0 Kudos

Hi Brenton,

Thank you for your support,

We create the return parameter as table type, please finds the attached screen shot
for more information.

I add onImport method in callbackHandler.m to receive message from the server. But unfortunately it is not triggering onImport method.. Whenever I trigger the RFC data is updating the SAP backend without any issue.

Regards,

Fibeesh

brenton_ocallaghan
Active Participant
0 Kudos

Aha I think I see the problem - your RETURN parameter is defined under the TABLES section of the RFC - to work correctly it needs to be under the EXPORTING - as I mentioned this will trigger a warning but should be safely ignorable.

Hope that helps,

Brenton.

Former Member
0 Kudos

I did set this settings properly...

Now i am getting Mobilink Error -857: -1024 error.

I make sure that i have the updated Generated Code and everything in Build Phase.

Former Member
0 Kudos

Hi Brenton,

We change the return parameter under exporting as per your suggestion, but the
result was same.

Please find the attached screen shot for more information.

Thanks & Regards,

Fibeesh

brenton_ocallaghan
Active Participant
0 Kudos

Hi Fibeesh,

Hmm you should be able to see something now - can I just check that the "results checker" option is enabled for that operation on your MBO?

If that was not switched on then you might not get your logs - although because you are getting a replay failure I'm going to assume that this is not the case.

The only other thing I can think to check might be a possible race condition. So let the replay failure occur and then after everything has settled down and completed try looking at the log records of the entity in question again (manually or via a temporary function for the moment). What I am thinking is that perhaps the onReplayFailure is being thrown before the log records have been successfully processed by the Sybase Libraries. So if you see a replay failure - let the operations complete and then check for an error? Long shot but might work.

Cheers,

Brenton.

Former Member
0 Kudos

Hi  Brenton,

We had tried all your suggestion but still we are not able to find any log record for “other” operation.

Now we are planning to change the logic. For that I need to know how to fetch the data from SAP backend by passing some parameter using RFC?

Eg : get all the  work items assigned to a particular employee by passing the Employee ID
to RFC.

Thanks & Regards,

Fibeesh

brenton_ocallaghan
Active Participant
0 Kudos

Hi Fibeesh,

Its weird that it has still not worked for you. But moving on - from what you have described above it sounds like you want to do two things:

a) Create a personalisation parameter in your model probably for the employeeID.

b) On the load function for your MBO your importing parameter should be provided by the personalisation parameter.

There are other ways however this is the most practical and is a method I have used before. Just make sure that you have set the personalisation parameter on the DB in your app code before synchronising the group that contains the MBO that requires this personalisation parameter as a load parameter.

It is very important to make sure your employee details and this other MBO are in different cache and sync groups so they can be synchronised separately.

Hope that answers your question,

Brenton.

Former Member
0 Kudos

Hi Brenton,

 

Thank you very much for your great support.

 

Using this method I can achieve my task without “other” operation.

I create some personalization parameter for the RFC input and initially add some dummy value to the Personalization parameter.

While submitting we passed the actual data to the personalization parameter and synchronize the DB. After synchronization the RFC output will load to the  MBO and from MBO we can query the required information.

I don’t know whether it is a correct way, but I am getting the result.

Regards,

Fibeesh

Former Member
0 Kudos

Hi Fibessh,

I am also facing same problem at the time to create operation its saving twice in both CDB or in SAP can you plz explain me how did you resolve this issue using other operation ??

Regards

Anupam

Answers (0)