Application Development Blog Posts
Learn and share on deeper, cross technology development topics such as integration and connectivity, automation, cloud extensibility, developing at scale, and security.
cancel
Showing results for 
Search instead for 
Did you mean: 
Berk
Explorer
In this blog, I will show you how to to adding Maintenance View Custom Fields and Converting a dropdown field to an input field.

 

Step 1: Create table and our status data element is create.


Step 2: The domain is create and fixed values are given.


Step 3: Table Maintenance Generator is create.


Step 3.1: We fill it like this.


 

Step 3.2: Click Overview screen.


Step 3.3: Click Layout.


Step 4: Input/Output field is dragged to the empty area.


Step 4.1: Then a name is given, scrollable is select, Def.length and Vis.length are give and Output only is select.


Step 4.2: Text Field is drag and the title is given.



Step 5: Double click on this field and select the option with a blank in Dropdown.



Step 5.1: This is how we get F4 help and we activate and exit.


Step 6: Double-click the Field create in the layout and it is defined as global data.



Step 6.1: In the screen that opens,give the type of our field as char 25.


Step 6.2: Go to the Flow logic tab and define it as a field.


Step 6.3: Then the module is create and relevant coding is written into the module.




 
  SELECT SINGLE ddtext
FROM dd07v
WHERE domname EQ 'ZBD_DO_STATUS'
AND domvalue_l EQ @zbd_test-status
INTO @DATA(lv_status).

IF zbd_test-status IS NOT INITIAL.
zstatusdesc = lv_status.
ENDIF.

Step 7: Let's test it!

When we come to the Status field, type the number of the status we want to give and press enter, the Status Description field is filled automatically. Or can select it from the search help tab and enter.



 

 
2 Comments
Jelena
Active Contributor
Please, for the love of God, don't do this.

An obvious reason is if someone defined a field to have specific fixed value, they don't want this field to have any other values. You're breaking the table and data design.

A less obvious reason is when someone regenerates table maintenance, all these changes will be gone.
shais
Participant
0 Kudos
If I understood it correctly, I don't think he has mapped the field to other values.

He just wants to replace the dropdown field into a standard input field and to add a corresponding text column (where the text is retrieved from the domain values). I guess it was done to enable a faster input and/or copy-paste functionality.

A better approach might be adding a (dummy) field to the maintenance view and implementing the relevant table maintenance events.