cancel
Showing results for 
Search instead for 
Did you mean: 

adding a blank row to binded table

Former Member
0 Kudos

Hi,

I have a table UI on view. The table binded to a BAPI output table parameter. I want to add a blank row to table after BAPI executed. If BAPI Output table parameter has a 4 rows, table UI element must has a 5 rows. The 5. row dont have data.

How can i do it?

Best regards,

Altug Bayram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Please make sure that you have mapped the view context with controller context.

Regards, VIP

Former Member
0 Kudos

Hi,

Context is ok. When i run my app table UI take to me BAPI output data.

Best regards,

Altug Bayram

Former Member
0 Kudos

Hi,

Additional info: I modified the code addign to my app. The code is following

Bapiitemex itemex = new Bapiitemex();

IPublicBBSComponent.IOrder_Items_OutElement element = wdContext.createOrder_Items_OutElement(itemex);

//wdContext.nodeOrder_Items_Out().addElement(element);

wdContext.nodeOutput().nodeOrder_Items_Out().addElement(element);

Best regards

Altug Bayram

Former Member
0 Kudos

Hi Altuo

Have you bound the Model Node directly to the Table UI element. What is the structure of the Model.

If your Model looks like the following in your context :

Bapi_Model_Input
     |_Output
         |_Bapi_Items_Node
              |_Bapi_Attr1
              |_Bapi_Attr2

If you have bound "Bapi_Items_Node" to the table UI Element then After executing the model move to the Last record.

Then write code like

wdContext.nodeBapi_Items_Node().moveLast();

IPublicBBSComponent.IBapi_Items_NodeElement ele = wdContext.nodeBapi_Items_Node().createBapi_Items_NodeElement();

wdContext.nodeBapi_Items_Node.addElement(ele);

That should add a empty row. As Anil had suggested the code would work but i guess your leadselection should have been in the last row.

Let me know if that helped you.

regards

Ravi

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

Do one thing.

Go in your controller in which your node resides.

select the output node from which u need to display data in table.

Then change its property "cardinality" to "0..n" and "selection" to "0..1".

It should work.

Regards,

Bhavik

Former Member
0 Kudos

Hi,

I find answer. The code must be in wdDoModifyView method. Because invalidate method clear context.

Best regards,

Altug Bayram

Former Member
0 Kudos

Hi,

Create an element of the ModelRoot node type and add the sme element to the node again.

Ex : If the Node name is "Customer" and ModelClass name is "Customer"

Customer cust=new Customer();

Iprovate<ViewName>>.ICustomerElement ele=wdContext.createCustomerElement(cust);

wdContext.NodeCustomer().addElement(cust);

Regards, VIP

Former Member
0 Kudos

Hi,

I added code my app. But it not worked. I added the code in Controller. After bapi exceute line.

Best regards,

Altug Bayram