Hi-
In your User Decision select field Rejection reason as mandatory field.
And in your Activity under Rejected -> Task -> Method -> Use below code to read rejection reason.
*--to read container elements
CALL FUNCTION 'SAP_WAPI_READ_CONTAINER'
EXPORTING
workitem_id = workitem_id
language = sy-langu
user = sy-uname
IMPORTING
return_code = return_code
ifs_xml_container = ifs_xml_container
ifs_xml_container_schema = ifs_xml_container_schema
TABLES
simple_container = simple_container
message_lines = message_lines
message_struct = message_struct
subcontainer_bor_objects = subcontainer_bor_objects
subcontainer_all_objects = it_all_objects.
IF return_code = 0 AND it_all_objects[] IS NOT INITIAL.
LOOP AT it_all_objects INTO lwa_reason
WHERE element = '_ATTACH_OBJECTS'..
document_id = lwa_reason-value.
ENDLOOP.
ENDIF.
*--to read attachments
IF document_id IS NOT INITIAL.
CALL FUNCTION 'SO_DOCUMENT_READ_API1'
EXPORTING
document_id = document_id
TABLES
object_content = object_content
EXCEPTIONS
document_id_not_exist = 1
operation_no_authorization = 2
x_error = 3
OTHERS = 4.
IF sy-subrc = 0.
LOOP AT object_content." INTO reason_text.
SHIFT object_content LEFT BY 5 PLACES.
reason_txt = object_content.
APPEND reason_txt.
* swc_set_element container 'Reason_Text' reason_txt.
* MODIFY object_content INDEX sy-tabix.
ENDLOOP.
swc_set_table container 'Reason_Text' reason_txt.
* READ TABLE object_content INTO reason_txt INDEX 1.
* IF sy-subrc = 0.
* SHIFT reason_txt LEFT BY 5 PLACES.
* swc_set_element container 'Reason_Text' reason_txt.
* ENDIF.
ENDIF.
ENDIF.
Else you can also call a pop-up to capture rejection text.
-Venkat