cancel
Showing results for 
Search instead for 
Did you mean: 

BAPI RFC does not return rows

Former Member
0 Kudos

I´m making a customer BAPI call using the xMII JCO connector . I can see that there is request and response documents . I run this bapi by supplying the date ( 20100101 ) . I use a repeater linked to the item row in the response xml output . Anyway, I get no results. no rows .

I tested this bapi by using the se37 transaction and it returns results by suplying the date ( 01.01.2010 ) . This bapi has the remote enabled module activated and according to our ABAP coleages it has all the authorizations to be run by xmii . They tell me that the date conversion from 20100101 to 01.01.2010 is taking place correctly .

In the other hand, I have tested a call to the BAPI_USER_GETLIST and the BAPI_SERVICE_GET_LIST from xMII and I get rows. No problem.

So , please indicate me or guide me on diagnose this problem . Thanks in advance,

Best regards,

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Antonio,

from what you tell us I guess that basically the JCo connection is working.

Are there other selection criteria than the date? If yes, try to remove them from the BAPI structure, using the link mode "Remove XML". I experienced problems in certain RFC calls when sending empty nodes.

Michael

Former Member
0 Kudos

Hi, Michael , Thanks for your answer ...

No , I do not have any other selection criteria than the date.

I did what you suggested and I still get no rows at xMII. We have just changed the BAPI in order to run it without prompting any date . Now , it does not have any input parameter as selection criteria . It still output some rows using the SE37 transaction .

Furthermore, in xMII I can still see the input parameter ( the date parameter ) in the xml structure of the Request document . ¿?. I closed my xmii session and opened again , and I can still see it .

Thanks, Antonio

Former Member
0 Kudos

Antonio,

after changing the RFC settings, please execute the following link to clear the JCo cache on MII:

http://<server>:<port>/XMII/JCOProxy?Mode=Reset

Michael

Former Member
0 Kudos

I restarted the server . Now, there is no input parameter required , which is ok . The succes flag of the JCO action block returns 1 ( success ) . I use a repeater linked to the item row in the response xml output . Anyway, I get no results. no rows . Please, help me out .

I appreciate your help Michael

0 Kudos

Don't read too much into the success flag for the action block. It simply means that contact was made to the SAP Server (ERP instance). I doesn't mean anything about the success or failure of the BAPI execution. That would come from the Return message in the ResponseXML.

Do you have the Execute Function box checked? And you might as well check the Commit Function block also (shouldn't need it, but since it is a custom BAPI, it might be necessary). Also map the ResponseXML segment directly to the Message property of a Tracer immediately following the JCo Action Block. Double click on the tracer line in the expression box and paste it into notepad to see if there is any response at all. If there is an error, you should see some indication of it in the Tracer message. If the ResponseXML is empty, but showing the correct structure, it would appear that errors are not being handled properly or soemthing else is causing the function module to stop executing before populating the ResponseXML (within the BAPI). Or in other words, there is something wrong with the BAPI/RFC.

Since standard BAPIs are working correctly, there is nothing wrong with the connector or unlikely anything wrong with how the BAPIs are being handled within MII.

What version and build of MII are you using? Also which version of NW (if 12.0 or later)?

Regards,

Mike

Edited by: Michael Appleby on Nov 11, 2010 8:13 PM

Former Member
0 Kudos

We are close to the solution . Now I can see expected data from the custom BAPI RFC in xMII from the tracer line . It seems that the xml structure is OK and filled with data . No errors found . I pasted this xml to and xml editor and looks fine . I can notice that It is not a sap xmii xml document . This should not be a problem because the returning xml from the standard BAPIS in xMII are not SAP xmii xml document .

For some reason, the REPEATER action is not able to read the ResponseXML .

I appreciatte very much your help. I still need help on this.

Best regards, Antonio

Note . We run a SAP xMII 11.5 installation

Former Member
0 Kudos

Antonio,

what have you filled in the configuration of the repeater? To get the data, assign the repeating item. For example, this is how a call to RFC_READ_TABLE items would look like in the Repeater configuration:

RFC_READ_TABLE.Response{/RFC_READ_TABLE/TABLES/DATA/item}

Michael

Former Member
0 Kudos

Hi, Michael

The repeater configuration is ok :

SAPJCOInterface_0.Response{/_PGPB_OIL_VENTAS_XPROD/OUTPUT/ET_VENTAS_XPROD/item}

I do not know what else could be wrong . Please help me out . Thanks in advance

Antonio

Former Member
0 Kudos

Hi Antonio,

how many rows do you expect the repeater to process? Have you checked if the repeater is executed this often (e.g., trace the Repeater.ItemCount)? Maybe the repeater runs correctly, but you cannot see the data because they are not extracted correctly?

Michael

Former Member
0 Kudos

Hi Michael,

The Repeater.ItemCount is 0 .

Thanks, Antonio

Former Member
0 Kudos

Hi Michael,

About your first question . I expect about 70 rows and I do can see them if I trace the ResponseXML segment .

Thanks, Antonio

Former Member
0 Kudos

Antonio,

can you try to set the Repeater.break to false? Just a thought.

Michael

Former Member
0 Kudos

Hi Michael,

I turned the repeater action break to false . I still don get the repeater to cicle through the data . I am sending you only one item from the custom BAPI RFC in xMII from the tracer line .

Thanks, I appreciatte your help .

Antonio

-


<?xml version="1.0" encoding="UTF-8"?>

<_-PGPB_-OIL_VENTAS_XPROD>

<OUTPUT>

<ET_VENTAS_XPROD>

<item>

<CENTRO>0960</CENTRO>

<MATERIAL>000000000000010001</MATERIAL>

<UM>BB2</UM>

<RECIBO_RUE>0</RECIBO_RUE>

<RECIBO_DUC>20182.357</RECIBO_DUC>

<RECIBO_BAR>0</RECIBO_BAR>

<PROVEEDOR>LPGD</PROVEEDOR>

<NAME1>LPG Pipeline</NAME1>

<EXIST_INI>611.045</EXIST_INI>

<EXIST_FIN>628.216</EXIST_FIN>

<VENTAS_NAC_RUE>19821.108</VENTAS_NAC_RUE>

<VENTAS_NAC_DUC>0</VENTAS_NAC_DUC>

<VENTAS_NAC_BAR>0</VENTAS_NAC_BAR>

<VENTAS_EXP_RUE>0</VENTAS_EXP_RUE>

<VENTAS_EXP_DUC>0</VENTAS_EXP_DUC>

<VENTAS_EXP_BAR>0</VENTAS_EXP_BAR>

<VENTAS_INT_RUE>0</VENTAS_INT_RUE>

<VENTAS_INT_DUC>0</VENTAS_INT_DUC>

<VENTAS_INT_BAR>0</VENTAS_INT_BAR>

</item>

</ET_VENTAS_XPROD>

</OUTPUT>

</_-PGPB_-OIL_VENTAS_XPROD>

Former Member
0 Kudos

Antonio,

you providing this in your Repeater Configuration:

SAPJCOInterface_0.Response{/_PGPB_OIL_VENTAS_XPROD/OUTPUT/ET_VENTAS_XPROD/item}

In your XML sample I can see that the node have a DASH. Try this piece in the Repeater configuration:

SAPJCOInterface_0.Response{/_-PGPB_-OIL_VENTAS_XPROD/OUTPUT/ET_VENTAS_XPROD/item}

BR

Pedro

Former Member
0 Kudos

Perfect . You got it right . Thanks a lot !!!!!!!!!

Best regards,

Antonio

0 Kudos

Antonio,

Just curious, but why do you have the top xml tag beginning with an underscore?

<_-PGPB_-OIL_VENTAS_XPROD>

Regards,

Mike

Edited by: Michael Appleby on Nov 12, 2010 11:43 PM

Former Member
0 Kudos

I do not put it . xMII put it instead of me , When I select the path . I do not know why .

Best regards,

Former Member
0 Kudos

This is what SAP does when you have a forward slash (/) in your RFC name and you are using Jco or web services to call the RFC. e.g. /BDL/READ_RFC_LIST becomes -BDL-READ_RFC_LIST etc.

0 Kudos

Hi Christian,

I was hoping someone else would provide that response.

I believe it also happens when there is a special character or a number in the first position of the tag name.

Thanks,

Mike

Former Member
0 Kudos

Hih guys,

I want to thank all of you on helping me out in this problem . I learned not only on knowing the reason why this problem arise, but on how to diagnose and other specific technical details . This forum is great , and I feel confidence and peace of mind with all of you as a support on our xMII proyects . Congratulations .

Thanks again, Best Regards

Antonio Rodriguez Rubalcaba

Answers (0)