cancel
Showing results for 
Search instead for 
Did you mean: 

Displaying Data in Table

Former Member
0 Kudos

Hi

How can we display the information in the table from backend system using BAPI's.

Regards

Chandra

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Chandra,

You can do that. Please follow steps

1) Create model for BAPI in your project

2) Map context from model to Component Controller(CC)

3) Map context of CC to view

4) Right click on Transparent container of view and select 'Apply Template'

5) Select Table UI element,a nd on next select cotext variables to be displayed

6) Now table is created

7) Create model object, populate import parameters and execute BAPI

Answers (2)

Answers (2)

Former Member
0 Kudos
former_member751941
Active Contributor
0 Kudos

Hi chandra,

Try this

1> Take a ValueNode cardinality 0..n.

2> Bind this value node in the View datasource of table .

3> Take a button called Display in view layout.

4> Inside the acion write this code according to your node name.

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();

for(int i=0;i<wdContext.nodenodePersonal_Data().size();i++)

{

IPrivate<Put View Name>.IValueNodeElement valueElm = wdContext.createValueNodeElement();

valueElm.setAttr1(wdContext.nodePersonal_Data().getPersonal_DataElementAt(i).getAttr1());

valueElm.setAttr2(wdContext.nodePersonal_Data().getPersonal_DataElementAt(i).getAttr2());

valueElm.setAttr3(wdContext.nodePersonal_Data().getPersonal_DataElementAt(i).getAttr3());

wdContext.nodeValueNode().addElement(valueElm);

}

} catch (Exception e) {

// TODO Auto-generated catch block

msg.reportSuccess(e.getMessage());

}

Regards,

Mithu