Hi Gaurav,
1. You can read the mode from task container using the below code..
DATA lo_task TYPE REF TO /sapsrm/cl_ch_wd_taskcontainer.
DATA lv_pdo_mode TYPE /sapsrm/pdo_inst_mode.
lo_task ?= wd_comp_controller->mo_task_container.
CALL METHOD lo_task->/sapsrm/if_cll_task_container~get_transaction_mode
IMPORTING
ev_pdo_trans_mode = lv_pdo_mode.
lv_pdo_mode will be 'EDIT' or 'DISPLAY'. Based on this you can toggle attributes of your custom tab.
2. To save the data use BBP_DOC_SAVE_BADI..
Thanks,
Anubhav