ā2012 Jun 08 6:43 PM
Hi,
I am developing HCM form for one of our MSS process using Adobe interactive forms.I have a filed called 'Comments' in the form which is a text field allows multiple lines and it is bind to ISR generated attribute HRASR_CURRENT_NOTE. I need to read comments in my back end service which are entered in the form when user clicks on check and save.How can i read string table in my back end service in one of the methods IF_HRASR00GEN_SERVICE~INITIALIZE or IF_HRASR00GEN_SERVICE~DO_OPERATIONS.
Generally we write following logic to read interface attributes in the back end service.
READ TABLE service_field_values ASSIGNING <lfs_service_field_values> WITH KEY fieldname = gc_form_scenario.
IF <lfs_service_field_values> IS ASSIGNED.
l_form_scenario = <lfs_service_field_values>-fieldvalue.
UNASSIGN <lfs_service_field_values>.
ENDIF.
The code above will only work for single value variable. BUt i want to read string table. Please let me know your inputs.
Thanks,
Suman
ā2012 Jun 26 2:35 AM
Hi Suman,
Tables are stored as different fieldindex. you can read table contents using loop.
LOOP AT service_field_values ASSIGNING <lfs_service_field_values> WHERE fieldname = 'COMMENT_FIELD'
APPEND <lfs_service_field_values> to string_field.
ENDLOOP.
However, you can not access HCM P & F comments using service_fields_values or service_dataset. They are not part of the field configuration or special fields from framework.
You can access comments using process_runtime instance (class CL_HRASR00_PROCESS_RUNTIME) .
Sample Code: This method instantiates process runtime using POBJ_GUID. You might not get POBJ_GUID in initiate step, either you have to do this in second stage or in the workflow task.
Cheers,
Bhagya