cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with Generic Sync after upgrade

former_member207329
Participant
0 Kudos

Hi guru,

I have this problem:

I have done a upgrade ME2.1 -> MI2.5 SP18.

I have a simple Generic sync application that using a simple Function Module:

<b>

function Z_ME_TEST_CONNECTION.

*"----


""Interfaccia locale:

*" EXPORTING

*" VALUE(STATUS) LIKE BWAFSYHEAD-STATUS

*" TABLES

*" INBOUND_CONTAINER STRUCTURE BWAFCONT

*" OUTBOUND_CONTAINER STRUCTURE BWAFCONT

*"----


perform CALL_OFFLINE_ME_METHOD using 'TEST_CONNECTION'

INBOUND_CONTAINER[]

OUTBOUND_CONTAINER[].

OUTBOUND_CONTAINER-FIELDNAME = 'RESULT_CONNECTION' .

OUTBOUND_CONTAINER-LINENUMBER = 0 .

OUTBOUND_CONTAINER-FIELDVALUE = 'OK'.

append OUTBOUND_CONTAINER.

endfunction.</b>

When i synchronize my mobile client it returns back

<b>"EWAF 001Could not execute method Z_ME_TEST_CONNECTION"</b>

Can anybody help me in resolving this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Can you please check the following

1. Your Function Module Z_ME_TEST_CONNECTION is RFC Enabled.

2. You have added corresponding entries in BWAFMAPP and MEMAPPDEST tables in the middleware.

Best Regards

Sivakumar

former_member207329
Participant
0 Kudos

Hi Sivakumar, thank for you help.

<i>1. Your Function Module Z_ME_TEST_CONNECTION is RFC Enabled.</i>

Yes

<i>2. You have added corresponding entries in BWAFMAPP and MEMAPPDEST tables in the middleware.</i>

In BWAFMAPP there is not the Z_ME_TEST_CONNECTION and MEMAPPDEST is empty table.

What the values that should have are?

Best Regards.

Former Member
0 Kudos

Hi

Typically in a Generic Sync application whatever Function Module you are invoking from the client, the corresponding entries should be made in both the tables mentioned. Here is a simple example

Since you FM name Z_ME_TEST_CONNECTION, let me assume that you are calling Z_ME_TEST_CONN from the client. So the BWAFMAPP table will have an entry Z_ME_TEST_CONN which is mapped to Z_ME_TEST_CONNECTION.

Next the MEMAPPDEST table, you need to specify the RFC destination for FM Z_ME_TEST_CONNECTION.

Please refer to the following link for details.

http://help.sap.com/saphelp_nw04/helpdata/en/66/d4603de6c3910fe10000000a114084/frameset.htm

Since you have mentioned that you have upgraded from 2.1 to 2.5, this link might be useful as well. http://help.sap.com/saphelp_nw04/helpdata/en/45/1a15a3b3ca29efe10000000a114a6b/frameset.htm

Hope this helps

Best Regards

Sivakumar

former_member207329
Participant
0 Kudos

Hi Sivakumar, I have write the my FM in the BWAFMAPP and the RFC destination in MEMAPPDEST but i have tha same error.

This is my simple method in my application:

<b>public String testSync(String userName) {

String errormessage = null;

try {

// get user out of the SyncSettings

String user = Configuration.getInstance().getProperty(PropertyKeys.SYNCSETTINGS_USER, userName);

OutboundContainerFactory outfactory = OutboundContainerFactory.getInstance();

if (outfactory == null) {

errormessage = "testSync->OutboundContainerFactory.getInstance failed";

} else {

OutboundContainer out = outfactory.createOutboundContainer(

VisibilityType.SEPARATED,

R3_METHOD_TEST_SYNC,

OutboundContainer.TYPE_REQUEST);

// add the name that has been typed into the JSP

out.addItem(DC_I_USER_NAME, user.toUpperCase());

out.addItem(DC_I_NUMBER_OF_LINES,"0");

out.close();

// Start Sync

SyncManager.getInstance().synchronizeWithBackend(VisibilityType.SEPARATED);

}

}

catch (SyncException ex) {

errormessage = ex.getMessage();

}

catch (IllegalArgumentException ex) {

errormessage = ex.getMessage();

}

catch (Exception ex) {

errormessage = ex.getMessage();

}

finally {

System.out.println("testSync: errormessage="+errormessage);

}

return errormessage;

}</b>

You have anathor idea?

Thanks

Former Member
0 Kudos

Hi Rocco,

what entry have you maintained in BWAFMAPP?

From the error message(<i>001Could not execute method Z_ME_TEST_CONNECTION</i>) i guess the method name in BWAFMAPP is wrong.Are you sure you have entered the value of your constant R3_METHOD_TEST_SYNC as method name in BWAFMAPP?

From your error messsage i think the entry should be

Method=Z_ME_TEST_CONNECTION

Function=Z_ME_TEST_CONNECTION

Regards

Frank

former_member207329
Participant
0 Kudos

Hi Frank,

I have resolved the problem thanks to your help.

Best Regards!

Answers (0)