I am using this function module. After a lot of tests i have been able (more or less) to make it work. I have one question, at the beguining of the function module it has this control:
CALL FUNCTION 'PSSFAW_CHECK_SWITCH_ACTIVE_EXT'
i_switch_name = 'PS_EXTN_SFWS_UI_1'
e_active = variable1
method_not_found = 1
OTHERS = 2.
IF variable1 <> 'X' .
MESSAGE a001(prgr_ntw_wbs) INTO lv_message_text .
CALL FUNCTION 'ECP_ADD_MESSAGES'
message = lv_message_text
messages = messages.