cancel
Showing results for 
Search instead for 
Did you mean: 

How to bind

Former Member
0 Kudos

I have Y_Ep_Demo_Get_Material this function module in that function module <Tables> tab i have T_Matnr (Parameter Name) LIKE(Type Spe.) YEPDEMOMATNR (Associated Type)

follwoing source code

FUNCTION y_ep_demo_get_material.

*"----


""Local interface:

*" TABLES

*" T_MATNR STRUCTURE YEPDEMOMATNR

*"----


DATA: it_yepdemomm LIKE yepdemomm OCCURS 0 WITH HEADER LINE.

SELECT * FROM yepdemomm INTO TABLE it_yepdemomm.

LOOP AT it_yepdemomm.

t_matnr-matnr = it_yepdemomm-matnr.

APPEND t_matnr.

ENDLOOP.

ENDFUNCTION.

and i have binded in custom contoller like the following....

Y_Ep_Demo_Get_Material_Output out = new Y_Ep_Demo_Get_Material_Output();

wdContext.nodeMaterial_Output().bind(out);

out.addT_Matnr(new Yepdemomatnr());

Y_Ep_Demo_Get_Material_Input in = new Y_Ep_Demo_Get_Material_Input();

wdContext.nodeMaterial_Input().bind(in);

in.addT_Matnr(new Yepdemomatnr());

please tell me if there is any wrong in my binding

Thanks & Regards

Ravi shankar b

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Ravi,

Do not bind Output explicitly. Instead, when mapping context to model accept default mapping, and let Output be the child node of Input (this way supplyingRelationRole for node Output will be set correctly).

Next, as suggested, just bind Input, and invalidate Output node after Input model object execution.

VS

Former Member
0 Kudos

Hi

I think this FM is used get the list of MATNRs.

In this case you just bind the Y_Ep_Demo_Get_Material_Input model instance to the Y_Ep_Demo_Get_Material_Input Node and just execute the model and invalidate the Output node.You will get the list of MATNRs in the node Y_Ep_Demo_Get_Material_Input>Output>T_Matnr.

Regards,

Ajay