cancel
Showing results for 
Search instead for 
Did you mean: 

webdynpro Java - Adaptive RFC model

Former Member
0 Kudos

Hello Experts,

I am facing the below problem in Webdynpro java programming, please assist me for the same.

Adaptive RFC Model concept :

1) I have created a model in Webdynpro java (NWDS) calling a BAPI from a specific R/3 system.

2) Created a model-node in context of "component controller" and had done Model binding.

3) Done context mapping from "component controller" to "Viewcontroller".

4) Created an UI element (Input field) in the view layout and binded with a mapped value.

5) when I deployed it, I am getting the input field disabled. (could not pin point on the field input)

In the view context, the custom model-node cardinality is 1..n, where as the child model-node's(came through model binding) cardinality is 0..1 and I donot have the option to change it to 1..n. (probably that might obstruct the input field to take the value).

Please suggest me in the above scenario.

Thanks,

Surendra.

Accepted Solutions (0)

Answers (2)

Answers (2)

ravindra_bollapalli2
Active Contributor
0 Kudos

hi,

refer this video tutor

it wll give idea what is happing when u r taking the bapi(adaptive rfc ) in to the nwds

https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b017bd92-320d-2b10-81ae-ac921eff...

thanks and regrads

bvr

Former Member
0 Kudos

Hi Surendra,

In addition to create nodes in component controller and view controller (and create mapping between them), you have to initialize bapi model node in component controller (Method wdDoInit).

Although cardinality in view context node is 1..n, if the node that is mapped to in the component controller has cardinality (0..1 in your case), in runtime, your view node will have 0 elements.

The real data that views manage should be in the component/custom controller.

Example of code to initialize your BAPI model node in component controller (wdDoInit):

	

// Create data with type of model node                
Bapi_Material_Getlist_Input bapiMat = new Bapi_Material_Getlist_Input();

// Create data for parameter Selection
Bapimatram sel = new Bapimatram();
	
// Add parameters to BAPI	
bapiMat.addMatnrselection(sel);

// Bind created data with context node 
wdContext.nodeBapi_Material_Getlist_Input().bind(bapiMat);
     

I hope this help.

Best regards,

Jorge Linares