cancel
Showing results for 
Search instead for 
Did you mean: 

RFC Issue - Cardinality and Selection problem

Former Member
0 Kudos

Hi Experts,

I am using RFC called Cats_Read_Catsdb_Input. In this RFC, the input parameter is Personal No. For one personal number, there will be lot of records. I have done the programming correctly. However the output is not getting displayed. I suspect that there is some issue with Cardinality and Selection. Can you please let me know what will be the setting of Cardinality and Selection if one input parameter returns many output records.

Regards,

SG

Accepted Solutions (1)

Accepted Solutions (1)

former_member751941
Active Contributor
0 Kudos

Hi SG,

According to the context structure

Bapi_Employee_Getdata_Input

|--- Output

| -


Personal_Data(under Output node )

|--- Employee_Id

Here is the code.

1>Take a method say “GetEmployeeDetailsByNo” inside component controller with parameter “empid” of type string.

Use this implementation.

public void GetEmployeeDetailsByNo( java.lang.String empid )

{

//@@begin GetEmployeeDetailsByNo()

IWDMessageManager msg = wdComponentAPI.getMessageManager();

try {

Bapi_Employee_Getdata_Input input = new Bapi_Employee_Getdata_Input();

input.setEmployee_Id(empid);

wdContext.nodeBapi_Employee_Getdata_Input().bind(input);

wdContext.currentBapi_Employee_Getdata_InputElement().modelObject().execute();

wdContext.nodePersonal_Data().invalidate();

} catch (Exception e) {

// TODO Auto-generated catch block

msg.reportSuccess(e.getMessage());

e.printStackTrace();

}

//@@end

}

2> Now go to the view and bind the Model node (Bapi_Employee_Getdata_Input

) in the view layout.

And inside “on action” event of “Search”button uses this code.

public void onActionGoEmpSearch(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionGoEmpSearch(ServerEvent)

wdThis.wdGetEmployeeCompController().GetEmployeeDetailsByNo(wdContext.currentBapi_Employee_Getdata_InputElement().getEmployee_Id());

//@@end

}

public void wdDoInit()

{

//@@begin wdDoInit()

Bapi_Employee_Getdata_Input bapiInput = new Bapi_Employee_Getdata_Input();

wdContext.nodeBapi_Employee_Getdata_Input().bind(bapiInput);

//@@end

}

Check the code you may get some hints.If you get any specific error post it.

Regards,

Mithu

Answers (2)

Answers (2)

Former Member
0 Kudos

Hello SG

No need to set Cardinality and Selection for RFC output nodes.

Is it giving any error? Can you more details.

<b>One more Just make sure that you are checjing RFC output node</b>.

Just print LogMessage with Table UI element you come to know what is the exact error.

Rgds

-SS

Sharadha1
Active Contributor
0 Kudos

Hi,

the node which gets the output must be of the cardinality 0..n. Input node 1..1

Regards,

Sharadha

Former Member
0 Kudos

Thanks Shardha,

Regards,

SG