Skip to Content

Bug in "adaptive RFC model"?

hi,

i'm wondering if there's a bug in the execution of an "adaptive rfc model" or am I doing something wrong?

I'm using a selfmade RFC (but this problem occured with SAP RFC's, too) that has got some tables as input/output.

2 of them are used for input&output, 4 of them as output only.

the only way to get the results in the output tables is, that i'm initially add an (empty) object in the corresponding input tables and remove them immediatley afterwards in wdInit()in the controller, because most of them will never be used as input tables.

when i'm trying to fill one of the input tables at a later stage (for exmaple in a view, that context is mapped to the controller context), the mapping is done (i'm checking this with another view, that refers to the controller context, too) but obviously the binding to the model never takes place, so that the RFC never gets these tables as input.

my controller wdInit() looks like this:

MyRFC_Input input = new MyRFC_Input();
wdContext.nodeMyRFC_Input().bind(input);

Table1 mytab1 = new Table1();
input.addT_Table1(mytab1);
// I'm using Table1 as input table in my first view

// Start: Workaround to get results in the other tables
Table2 mytab2 = new Table2();
input.addT_Table2(mytab2);
input.removeT_Table2(mytab2);

Table3 mytab3 = new Table3();
input.addT_Table3(mytab3);
input.removeT_Table3(mytab3);

...
//End: Workaround

I could live with this workaround, but actually (after reimporting the model) I don't get any results in one special table even with this workaround...

this table wasn't touched by the abap code and used to work.

i'm also excluding mistakes in the abap code, because this table wasn't touched and I have to do this workaround with SAP RFCs, too (for example: when I use the RFC_READ_TABLE and I don't use this workaronud with the Data-Table, it'll never gets any results from the abap)

what is going on there?

kr, achim

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Posted on Jan 17, 2005 at 04:24 AM

    Hi Achim,

    To get the results in the tables that are being used as output in my opinion you dont need to fill the tables with initial object.

    You just need to map the nodes under OUTPUT node in the controller context and the nodes will be filled after the RFC execution.

    Regards

    Sidharth

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Achim Hauck

      Hi Achim,

      to have a clear separation according to MVC you could of course put the model update into a method contained in the custom controller defining the origin context to which the view context's model nodes are mapped. And then call this method of the custom controller from the view controller's action event handler.

      Regards,

      Patric.

  • author's profile photo
    Former Member
    Posted on Jan 16, 2005 at 10:50 AM

    Hi,

    I am tryng to understand what is the difereence between what you are doing and the examples in the tutorial like BAPI_FLIGHT_GET_LIST? There you are using tables for output only an this works fine. Did you invalidate you nodes after call to the RFC/BAPI?

    Regards,

    Victor.

    Add comment
    10|10000 characters needed characters exceeded