Hello Charan,
my idea for your solution are there. In my opinion, if you have only one uibb, you have to replace this uibb feeder class with your own. So you will create a new Feeder Class and redefine Methods like get_data(), proce_event(). If you have more than one uibb on your screen than you will create for both uibb a new feeder class and replace both.
1. For Approve:
In this case, i would redefine get_data() method, and checked withinn this method, if the importing attribute is event for approval than check the currently importing data in cs_data/ct_data. If the fields there you want to setmandatory are initial than fill the message.
If you want to know which events will trigerred during the application, you can check/debug
cl_fpm->run_event_loop().
2. Reject:
- replace feeder class
- redefine method get_data()
- check event and chack cs_data/ct_data content
( you can modify all fields in get_data(), you will not need the BAdi for preallacocation) If you want to allocate the fields in get_data() than you have to use attribute mo_entity!
Implement you logic in get_data().
3. Withdraw
- replace feeder class
- redefine get_data()
- check event and check mo_entity
- set fields with mo_entity ( check method set_propety & set_properities of mo_entity object)
- If you use a rule based workflow, so you should modify your decision table at brf+