cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with generic synchronisation

Former Member
0 Kudos

Hi all,

im facing a problem with generic synchronisation.

i created a wrapper using me_wizard. that worked fine. then i tested the created wrapper by putting values into the inbound_container using the test funtion.

that worked fine too.

the i created my java mobile application. the inbound container contains all values except one. this value gets creating by looping through a table. it works absolutly fine in the test view, but never arrives in my application.

Weird but true.

Can anybody helb me?

Philipp

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

this is all how i got it.

what else can i do?

Philipp

Former Member
0 Kudos

ok so your function module is also a remote enabled function module --- which by default is not when you create it via the mi wizard.

Also you can remote login via your RFC connection.

Now do you get the "Communications error ...." by using these settings and with TDE as your RFC dest.

Communications errors are a result of the foll reasons:-

1. Your function module is not remote enabled.

2. The mappings in the tables BWAFMAPP and MEMAPPDEST are not correct.

3. RFC connection is not working properly.

If all these are fine you should not get this error.

If you dont get this error then there could be some problem with your client side java coding.

Cheers

Answers (16)

Answers (16)

Former Member
0 Kudos

No i dont get an error at all.

But i think that i found the error. Even if i have client 011 configured in my mobile client, synchronisation uses user 001. client 001 does not have any authorisation to see questionnaires. i will have to find out, why this client is taken and not the one i configured.

Thank you very much for your help.

Philipp

Former Member
0 Kudos

Hi Philipp

There was a bug in the MI Client wherein the client wasnt synchronizing to the client value specified in the client settings, instead it was synchronizing to the default client specified in the server. In your case, 001 may be the default client specified in the middleware. This issue has already been resolved. Depending on whether you are using MI 2.5 or MI 7.0 and according to the SP level on the client kindly upgrade to any of the patch mentioned in the following notes.

1026186

1026187

1025906

1007111

Hope this helps

Best Regards

Sivakumar

Former Member
0 Kudos

Hi

>>I still dont know whether your MI middleware system is TDE or not.

My middleware is TDE

both test for the rfc connection called TDE ran successfully.

what kind of connections does it has to be? maybe i mad an error there?

mine is type 3: ABAP connection

Former Member
0 Kudos

Hello,

>> You can find it through the path " System-> Status " here under the "SAP System data" tab there is "Component version".

the component version is SAP ECC 6.0

>> Click on it and tell me what is the RELEASE for the software component "SAP_BASIS".

the release is 700

>>does it mean that this function module of yours resides in this system TDE.

Is this system your MI middleware.

If it is not then you have to create an RFC desrnation that points to this system.

i am sure that this works fine. it all runs on tde, so no problem on this side.

man, you are patient, thank you very much.

Philipp

Former Member
0 Kudos

Fine i am assuming that your Function Module is on the system TDE.

I still dont know whether your MI middleware system is TDE or not.

"<b>You have not answered this yet. And it is very important to know this.</b>"

Have you created an RFC destination pointing towards system TDE. If not create one. And then test it. Test it via the following path.

Got transaction SM59. Select(double click) the RFC dest you have created from the list of available destinations under the tab "R/3 connections".

The perform the foll two tests.

1. Test-> Connection

2. Test-> Authorization.

Both these tests must be successful. Though i feel that you wil fail in the 2nd test.

Tell me about it.

Then you can use this RFC destination for your mapping in the table MEMAPPDEST.

Cheers.

Former Member
0 Kudos

Type 3 is correct.

So it means that your middleware is TDE, the system where your function module resides is also TDE and the name of the RFC connection that points to the destination system TDE is also named TDE.

I hope all this is correct.

Also plz check if you can remote login through this connection.

Also make sure that your function module is a "Remote Enabled Function Module"

Your MEMAPPDEST table then shud have this entry.

MANDT: 11

METHOD: Z_MI_SQUEST_GETLIST

RFCDEST: TDE.

SYSRELEASE: 700

I hope this is also properly done.

Cheers.

Former Member
0 Kudos

When i change my RFCDEST from TDE to sma82, i get an error. TDE is the system everything runs on. I mixed something up with tde and sma82 in an earlier post.

my System is a erp2005. thats why i entered 700. is that wrong?

when i change the rfc destination i get this error:

EWAF 016Due to a communications error method Z_MI_SQUEST_GETLIST could not be executed.

Philipp

Former Member
0 Kudos

wait a minute... plz carefully let me know abt these things.

1. <b>TDE is the system everything runs on</b>

does it mean that this function module of yours resides in this system TDE.

Is this system your MI middleware.

If it is not then you have to create an RFC desrnation that points to this system.

2. Next lets be sure of the release (release of the system where your Function module resides and not that of your MI middleware) because it is very imp and many things depend on it. You can find it through the path " System-> Status " here under the "SAP System data" tab there is "Component version". Tell me which component is this.

there is also a button below it. Click on it and tell me what is the RELEASE for the software component "SAP_BASIS".

Cheers.

Former Member
0 Kudos

When i change the rfcdestination it wont work anymore. the i get a communication error.

btw the mdk example for genericsync works fine

Philipp

Former Member
0 Kudos

Hey

Table BWAFMAPP

Method: Z_MI_SQUEST_GETLIST mapped to

Function ME_/TDAG/I_RF10_SQUEST_GETLIST

Table MEMAPPDEST

MANDT: 11

METHOD: Z_MI_SQUEST_GETLIST

RFCDEST: sma82

SYSRELEASE: 700

Cheers

Former Member
0 Kudos

ok plz tell me the foll :-

1. Is the RFCDEST <b>sma82</b> is the system where this Function module <b>ME_/TDAG/I_RF10_SQUEST_GETLIST</b> resides ??

2. Tell me system name of your MI middleware and the dest where your FM resides?

3. You have mentioned SYSRELEASE: 700. Is this system ECC 6.0 ??

4. You said that when you change the destination you get a communications error. Can tell me the exact error ?? also tell me which is this RFC dest/system that gives you this error?

Cheers.

Former Member
0 Kudos

Hi

in my Java client i dont get anything at all, when using the code displayes above.

in transaction se80 i see the list of questionnaires. it looks like this.

OUTBOUND_CONTAINER:

fieldname | linenumber | fieldvalue

-


E_SQUEST_TAB | 0 | WAH61...................

E_SQUEST_TAB | 1 | WAH62...................

and so on.

this data just doesnt get transfered to my client

Former Member
0 Kudos

Hi Phillip,

Can you tell me the entries for this particular appln in the table BWAFMAPP and MEMAPPDEST.

Probably the mapping might not be proper.

Cheers.

Former Member
0 Kudos

i am sorry, i messed something up while pasting the code in here. it looks like this.

FUNCTION ME_/TDAG/I_RF10_SQUEST_GETLIST.

*"----


""Lokale Schnittstelle:

*" EXPORTING

*" VALUE(STATUS) LIKE BWAFSYHEAD-STATUS

*" TABLES

*" INBOUND_CONTAINER STRUCTURE BWAFCONT

*" OUTBOUND_CONTAINER STRUCTURE BWAFCONT

*"----


DATA I_RELTYPE TYPE EHS00_RELTYPE .

DATA I_OBJECTID TYPE CHAR20 .

DATA I_OBJECTSUBID TYPE /TDAG/IE_QOBJ_SUBKEY .

DATA I_LANGU TYPE SY-LANGU .

DATA I_VALDAT TYPE RCGADDINF-VALDAT .

DATA: E_SQUEST_TAB like TABLE OF /TDAG/IS_SQIOT WITH HEADER LINE,

E_RETURN_TAB LIKE /TDAG/IS_RFC_RETURN OCCURS 0 WITH HEADER LINE.

DATA COUNTER LIKE SY-TABIX.

  • transfer inbound containers to functionmodule import parameters

loop at inbound_container where fieldname = 'I_RELTYPE' .

I_RELTYPE = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_OBJECTID' .

I_OBJECTID = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_OBJECTSUBID' .

I_OBJECTSUBID = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_LANGU' .

I_LANGU = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_VALDAT' .

I_VALDAT = inbound_container-fieldvalue.

endloop.

  • call application function

call function '/TDAG/I_RF10_SQUEST_GETLIST'

EXPORTING

I_RELTYPE = I_RELTYPE

I_OBJECTID = I_OBJECTID

I_OBJECTSUBID = I_OBJECTSUBID

I_LANGU = I_LANGU

I_VALDAT = I_VALDAT

TABLES

E_SQUEST_TAB = E_SQUEST_TAB

E_RETURN_TAB = E_RETURN_TAB

EXCEPTIONS

others = 1.

counter = 0.

loop at E_SQUEST_TAB.

outbound_container-fieldname = 'E_SQUEST_TAB' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = E_SQUEST_TAB .

append outbound_container.

counter = counter + 1.

ENDLOOP.

loop at E_RETURN_TAB .

outbound_container-fieldname = 'E_RETURN_TAB' .

outbound_container-linenumber = counter.

outbound_container-fieldvalue = E_RETURN_TAB .

append outbound_container.

counter = counter + 1.

endloop.

ENDFUNCTION.

Former Member
0 Kudos

Can you tell me what are you getting at the client as o/p?

You said that you get the list of questionaires but do not see the field E_SQUEST_TAB.

Can you explain this properly.

Former Member
0 Kudos

yes, thats what makes it so weird.

Former Member
0 Kudos

this is my code

it all looks fine to me, but somehow the S_EQUEST_TAB does not get filled when calling from the mobile application

FUNCTION ME_/TDAG/I_RF10_SQUEST_GETLIST.

*"----


""Lokale Schnittstelle:

*" EXPORTING

*" VALUE(STATUS) LIKE BWAFSYHEAD-STATUS

*" TABLES

*" INBOUND_CONTAINER STRUCTURE BWAFCONT

*" OUTBOUND_CONTAINER STRUCTURE BWAFCONT

*"----


DATA I_RELTYPE TYPE EHS00_RELTYPE .

DATA I_OBJECTID TYPE CHAR20 .

DATA I_OBJECTSUBID TYPE /TDAG/IE_QOBJ_SUBKEY .

DATA I_LANGU TYPE SY-LANGU .

DATA I_VALDAT TYPE RCGADDINF-VALDAT .

DATA: E_SQUEST_TAB like TABLE OF /TDAG/IS_SQIOT WITH HEADER LINE,

E_RETURN_TAB LIKE /TDAG/IS_RFC_RETURN OCCURS 0 WITH HEADER LINE.

DATA COUNTER LIKE SY-TABIX.

  • transfer inbound containers to functionmodule import parameters

loop at inbound_container where fieldname = 'I_RELTYPE' .

I_RELTYPE = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_OBJECTID' .

I_OBJECTID = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_OBJECTSUBID' .

I_OBJECTSUBID = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_LANGU' .

I_LANGU = inbound_container-fieldvalue.

endloop.

loop at inbound_container where fieldname = 'I_VALDAT' .

I_VALDAT = inbound_container-fieldvalue.

endloop.

  • transfer inbound containers to functionmodule changing parameters

  • transfer inbound containers to functionmodule table parameters

loop at inbound_container where fieldname = 'E_SQUEST_TAB' .

E_SQUEST_TAB = inbound_container.

append E_SQUEST_TAB .

endloop.

*

loop at inbound_container where fieldname = 'E_RETURN_TAB' .

E_RETURN_TAB = inbound_container-fieldvalue.

append E_RETURN_TAB .

endloop.

  • call application function

call function '/TDAG/I_RF10_SQUEST_GETLIST'

EXPORTING

I_RELTYPE = I_RELTYPE

I_OBJECTID = I_OBJECTID

I_OBJECTSUBID = I_OBJECTSUBID

I_LANGU = I_LANGU

I_VALDAT = I_VALDAT

TABLES

E_SQUEST_TAB = E_SQUEST_TAB

E_RETURN_TAB = E_RETURN_TAB

EXCEPTIONS

others = 1.

counter = 0 .

outbound_container-fieldname = 'I_RELTYPE' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_RELTYPE .

append outbound_container.

outbound_container-fieldname = 'I_OBJECTID' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_OBJECTID .

append outbound_container.

outbound_container-fieldname = 'I_LANGU' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_LANGU .

append outbound_container.

outbound_container-fieldname = 'I_VALDAT' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_VALDAT .

append outbound_container.

loop at E_SQUEST_TAB.

outbound_container-fieldname = 'E_SQUEST_TAB' .

outbound_container-linenumber = E_SQUEST_TAB .

outbound_container-fieldvalue = temp .

append outbound_container.

counter = counter + 1.

ENDLOOP.

loop at E_RETURN_TAB .

outbound_container-fieldname = 'E_RETURN_TAB' .

outbound_container-linenumber = counter.

outbound_container-fieldvalue = E_RETURN_TAB .

append outbound_container.

counter = counter + 1.

endloop.

ENDFUNCTION.

Former Member
0 Kudos

These are the following changes you must make.

-


  • transfer inbound containers to functionmodule table parameters

loop at inbound_container where fieldname = 'E_SQUEST_TAB' .

E_SQUEST_TAB = inbound_container.

append E_SQUEST_TAB .

endloop.

*

loop at inbound_container where fieldname = 'E_RETURN_TAB' .

E_RETURN_TAB = inbound_container-fieldvalue.

append E_RETURN_TAB .

endloop.

<b>All the above lines should be commented/removed as i think that you wish to send these values to the client rather than getting them from the client.</b>

-


outbound_container-fieldname = 'I_RELTYPE' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_RELTYPE .

append outbound_container.

outbound_container-fieldname = 'I_OBJECTID' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_OBJECTID .

append outbound_container.

outbound_container-fieldname = 'I_LANGU' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_LANGU .

append outbound_container.

outbound_container-fieldname = 'I_VALDAT' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = I_VALDAT .

append outbound_container.

<b>All the above lines are not needed as i think these values you are sending from the client to the b/e rather than sending them from from the b/e to the client.</b>

-


<b>Can you explain me the below code.</b>

<b>what is temp. where is it.

how can line number be equal to E_SQUEST_TAB</b>

loop at E_SQUEST_TAB.

outbound_container-fieldname = 'E_SQUEST_TAB' .

outbound_container-linenumber = E_SQUEST_TAB .

outbound_container-fieldvalue = temp .

append outbound_container.

counter = counter + 1.

ENDLOOP.

Former Member
0 Kudos

Hi Saurabh,

E_SQUEST_TAB is initialized like this

E_SQUEST_TAB like TABLE OF /TDAG/IS_SQIOT WITH HEADER LINE,

does the table have to be of the type BWAFCONT? that wouldnt make any sense.

THX

Philipp

Former Member
0 Kudos

Hi Philipp,

E_SQUEST_TAB need not be of type BWAFCONT, but your outbound_container has to be of type BWAFCONT, and this has to be a TABLES parameter in the function module. Please confirm this.

Regards,

Nameeta

Former Member
0 Kudos

Hi Philipp,

Does the function module in the b/e run properly and you do get the list of questionaires in the outbound container on execution.

cheers.

Former Member
0 Kudos

it is a table of the type BWAFCONT

Former Member
0 Kudos

Hi Philipp,

BWAFCONT is the type of the inbound and outbound container.

Isnt <b>E_SQUEST_TAB</b> a table which contains the list of questionaires?

And if it is then it should most definitely have a type different from that of BWAFCONT. kindly check this.

Also plz check if get this function module in the b/e runs properly and you do get the list of questionaires in the outbound container on execution.

Cheers,

Saurabh.

Former Member
0 Kudos

Hello Saurabh,

this is my exact problem.

I am creating an OutboundContainer calling this function Z_MI_SQUEST_GETLIST. i am adding this values. I_RELTYPE, I_OBJECTID, I_LANGU, I_VALDAT. as a return i should get a list of questionnaires.

with this piece of abap code

loop at E_SQUEST_TAB.

outbound_container-fieldname = 'E_SQUEST_TAB' .

outbound_container-linenumber = COUNTER .

outbound_container-fieldvalue = E_SQUEST_TAB.

append outbound_container.

counter = counter + 1.

ENDLOOP.

i add the rows to my outbound container.

But, whenever i try to access the inbound container in my java code, the field E_SQUEST_TAB does not exist. i find a list of all assigned questionnaires when i run a test on the function.

thanks, Philipp

Former Member
0 Kudos

Hi Philipp,

What type of parameter is this outbound_container? Is it a TABLES parameter?

Regards,

Nameeta

Former Member
0 Kudos

Hi Philipp,

Is it that when you run the application, your application does not return any error from the backend.. rather it returns values as expected and from those values there is one value which it does not return?

Tell me if my interpretation of your problem is correct.

Cheers,

Saurabh.

Former Member
0 Kudos

hi Nameeta,

i checked the table entries. the BWAFMAPP got generated automatically, while using me_wizard. i added the other one.

still it wont work. so i copied all the code from the <b>MDK_SUSR_USER_ADDRESS_READ_ARY</b> function to my wrapper function and this one works fine. so i dont think that it has to do anything with my configuration, but the abap code i wrote. so where could the problem be. is there a way to debug the rfc call?

the test still returns exactly the output i want, but it never arrives in my java application.

thx philipp

Former Member
0 Kudos

Hi Philipp,

Probably there is some problem with the code. You can debug your RFC function module. SAP systems provide something known as External Debugging option.

For this you need to be logged into the middleware system with the same username for whom you are syncing or the external debugging has to be activated for the user who is syncing. This can be done via Utilities->Settings->Debugging.

Another point to be kept in mind is you should be logged into the same application server on the middleware what you have provided in the client on the Settings page. This should be matching, otherwise the debug points dont get active.

Just check this, I think you should be able to debug and find out why data does not come into the client.

Regards,

Nameeta

Former Member
0 Kudos

Hi Philipp,

Can u please check if you have made the entries in the mapping table <b>BWAFMAPP</b>? This table holds the mappings between the alias name of the RFC function to be called with the actual name of the RFC in the backend. This is referred to at the time of synchronization. Also another table to be checked is <b>MEMAPPDEST</b>, which contains the RFC destinations of these function modules residing in the backend.

Regards,

Nameeta