cancel
Showing results for 
Search instead for 
Did you mean: 

Nested input tables

Former Member
0 Kudos

Hi,

We´re having problems to call an RFM from Web Dynpro (version 2.0.15). Our input structure looks as follows:

Zaf_Afa_Ws_Sok_Input

L Filter - Structure

L Filter Item - Table

L Filter Key - Table

This is the code:

wdContext.nodeZaf_Afa_Ws_Sok_Input().bind( new Zaf_Afa_Ws_Sok_Input() );

Zafa_Wsrequest_Filter filter = new Zafa_Wsrequest_Filter();

Zafa_Wsrequest_Filteritem FNRFilterItem = new Zafa_Wsrequest_Filteritem();

Zafa_Wsrequest_Filterkey FNRFilterKey =new Zafa_Wsrequest_Filterkey();

FNRFilterKey.setValue( wdContext.nodeSearchAttributes().currentSearchAttributesElement().getFnr());

FNRFilterItem.setType("FNR");

FNRFilterItem.addFilterkey(FNRFilterKey);

// add item to filter

filter.addFilteritem( FNRFilterItem );

// bind filter to RFC

wdContext.nodeZaf_Afa_Ws_Sok_Input().nodeIs_Filter().bind( filter) ;

wdContext.nodeZaf_Afa_Ws_Sok_Input().currentZaf_Afa_Ws_Sok_InputElement().modelObject().execute();

---

When debugging the java code the model gets all the data, but when looking at the ABAP code all tables are "initial".

An idea anyone how to solve this?

Thanks,

Regards Sophie

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Sophie,

Sadly, I cannot find anywhere document regarding Adaptive RFC Model "do-es" and "don't-s" but there was a strong point that nested tables must not be used.

Moreover, in our own project we found and reported a bug with tables as input parameter (instead of table parameter), that cause tables to break output structure handling (they were erroneously duplicated in output). I'm not sure whether or not this bug was fixed since last autumn '05.

So, in brief: don't use table parameters as import/export and do not use nested tables. Re-write your RFM or expose it via other RFM with simple structure.

Valery Silaev

EPAM System

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Valery Silaev,

Thank you very much for your time and help.

Regards,

Sophie

Former Member
0 Kudos

Sophie,

Thanks for points, here is a document I mentioned:

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de">Effective Web Dynpro - Adaptive RFC Models</a> by Bertram Ganz.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Answers (1)

Answers (1)

achim_hauck2
Active Contributor
0 Kudos

Sophie,

you have to maintain your nested tables at the <b>modelObject</b> like this:


Zaf_Afa_Ws_Sok_Input myInput = wdContext.currentZaf_Afa_Ws_Sok_InputElement().modelObject();

//maybe you want to empty it, if existing
if (myInput.getFilterItem() != null) {
  myInput.getFilterItem().clear();
}

myInput.addFilterItem(FNRFilterItem);

kr, achim

Former Member
0 Kudos

Achim,

Thank you for your quick answer. However, I think I was a bit unclear in my description. The input structure should contain three levels:

Zaf_Afa_Ws_Sok_Input
  |_
     Filter (=structure)
     |_ 
        Filter Item (=table)
        |_ 
          Filter Key (=table)

Suggestions...?

Thanx,

Sophie