You are on page 1of 15

Business Requirement : Populate the data from custom table into table UI element.

Provide the buttons ADD, EDIT , DELETE ,SAVE . ADD: As per the business when ever user selected ADD , add a single row in the beginning of the table where all fields and non primary fields of the custom table should be editable. EDIT : When ever user selects any row in table , and clicks EDIT button , then apart from primary key fields all other fields should be input enabled. SAVE: Save the data to custom table (Use Modal ) DELETE : Delete the selected index record Instead of custom table using a standard table PTRV_HEAD which has primary keys PETNR & REINR.

1. First create a context by referring structure PTRV_HEAD with cardinality 0:N

2. Add two additional attribute in the context node PTRV_HEAD,

ENABLE TYPE WDY_BOOLEAN : This attribute will control the non primary key enable property DISABLE_KEY TYPE WDY_BOOLEAN : This attribute will control primary key Enable property

3. Create a table UI element by using wizard .

By default the cell editor for each column is TEXTVIEW . Change the cell editor as input field for required fields

4. BIND THE ENABLE PROPERTY OF ALL NON PRIMARY KEYS WITH ENABLE BIND THE ENABLE PROPERTY OF ALL PRIMARY KEYS WITH DISABLE_KEY

5. Add two Button and maintain onaction event for both

Data is auto populated in WDDOINIT method For testing purpose

TESTING:

As per the business when click ADD , it will add the row at FIRST Index

EDIT:

When user selects EDIT Button , as per the business , the primary keys should be in disable state and non primary key enable only for the selected index of the table . User can only select one record . If multiple records should be changed means change the selection cardinality to 0:N

If user selects another record and wanted to delete then as per the business ,handle the coding. In current scenario if index 4 is selected , then previous record still stays in EDITABLE state. If wanted to do further modifications as per business use ONSELECT or ON LEADSELECT events of Table

You might also like