If you have configured a custom date type, you may be want to put a date field on the Header Assignment Block that ties to the date type so users do not have to go to the Dates Assignment Block to access the data.
The standard way, of course, is to use the wizard to create a Context Note with the BTDate BO on the Header Assignment Block view. Then, take the date field from the Context Note and put it on screen.
But, there isn’t actually a date field in the BTDate BO. The closest are the TIMESTAMP_FROM / TIMESTAMP_TO fields, which are a combination of date and time and are not a very intuitive field for user; first there is no date picker and user has to manually type on both date and time, then time and time zone usually are not important to most users other than create more confusion.
Another way is to create a value node but that involves tedious programing to pass data to/from BOL and manipulation the date with time stamp.
Below is a simple and quick way to implement a date on a tranaction screen that ties to a date type.
1. Start the Context node wizard. Enter the node name and “BTDate” as the BOL Entity.
2. Follow the wizard till the screen where you need to enter the Dependencies. Just select any High Level Note and choose the BOL Relation “BTDatesAll”. These information arenot important as we will see later. However, make sure the “Always Create Instance” checkbox is marked.
3. After the Wizard is completed, the Context Node should look like below
4. Double click on the implementation class to go to the class builder and switch to change mode. Go to the Properties tab. Click the Change inheritance button.
5. Replace the Superclass to “CL_CRM_UIU_BT_DATE_CN”.
6. Go to the Attributes tab and remove the extra “BASE_ENTITY_NAME” attribute by the wizard.
7. Double click into the ON_NEW_FOCUS method and replace all the source code with below. Make sure the date type is replaced with the one you desired.
8. Once all the steps above is done, the Context Node will look like below. You may need to log back in the see the changes.
And now the Date field automatically appears in the Context Node. You can use this in your screen configuration.