![]() ![]() ![]() Result Before enhancing and After Enhancing the component. Once the value of STATUS and REFERENCE DATE gets now check for the condition and pop-up a message using the message class cl_bsp_wd_message_service ( ) Lv_msg = cl_bsp_wd_message_service=>get_instance( ). Lv_msg TYPE REF TO cl_bsp_wd_message_service.ĬALL METHOD lo_entity2->get_property_as_valueĬheck the conditions and display a message. Lo_entity2 TYPE REF TO if_bol_bo_property_access, Lo_entity1 TYPE REF TO if_bol_bo_property_access, Lr_ent2 TYPE REF TO cl_crm_bol_entity, ” Status. Here the value gets stored in the variable lv_ref which is of type Data Element of that particular attribute. since STATUS field comes under BTStatus call the same method again but now the result will store under another variable lo_entity which refer to class If_bol_bo_property_access ( ) since now we’ll use this variable as reference to access method get_property_as_value ( ) which is an interface method as mentioned earlier using which we can find the value present in the attribute we just identified.ĬALL METHOD lo_entity1->get_property_as_value ![]() Here BTOrderHeader is the relation name through which we can identify the child entity and store in variable lr_ent1 which also belong to cl_crm_bol_entity ( ). So to solve the problem we use the method Get_Related_entity ( ) of class CL_CRM_BOL_ENTITY to find the child entity with the help of the export parameter iv_relation_name where we will give the relation name which actually relate prent entity with child entity. Since the field status comes under entity BTStatus which is under BTAdminH entity. Lets assume in lr_ent vriable we have the value BTOrder. The Hierarchy goes by this way for BT related Components Entities. In our example STATUS comes under BTSTATUS entity and REFERENCE DATE comes under BTSALESET entity. Since in our example of BT all the entities comes under BTOrder –> BTAdminH from there all the other related entities. Check the field 1 and field 2 entities and which is the parent entity of the both entity. First enhance the component, View then this following Event.(Copy the code in event before enhancing it)ĭebug to check for the variables ex: lr_ent which refer to CL_CRM_BOL_ENTITY as like which entity falls under this variable. Solution : Check for the SAVE event hander in overview page of corresponding BT Component. Note : The message should pop-up only if the Status field is set to ” Completed ” status. I f the Reference Date field have value in it than it should be successfully saved ,but if the field is empty then it should pop-up a message saying “ Reference Date is Initial “. Think about a scenario where in we have to pop-up some custom messages based on the certain fields value in relation with Status of the Status field.Įxample : We’ll take the SERVICEPRO business role, here we have two field 1) STATUS 2) REFERENCE DATE.Ĭondition : When the Status field is set to ” Completed ” status, while saving the system should check whether the Reference Date Field have value or not. I would like do some Knowledge Transfer on how can we actually pop-up some custom message based on some conditions in Web-UI level.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |