cancel
Showing results for 
Search instead for 
Did you mean: 

Workflow sysid in container does not contain the system id

former_member185537
Participant
0 Kudos

Hello Experts,

I have a problem in the workflow where the sysid in the container contains a wrong value instead of the System ID.&SYSID& is giving the wrong value in the workitem text

former_member185537
Participant
0 Kudos

Thanks Matthew. Pardon me. 🙂

Accepted Solutions (1)

Accepted Solutions (1)

Sandra_Rossi
Active Contributor
0 Kudos

Sorry that your workflow doesn't work any more, and OK about the standard code, but I don't know if something has changed between release X-1 and release X. Why don't you try %SYSID% ? If you want to analyze the current situation, please tell us how you initialize the element SYSID in your workflow container ?

former_member185537
Participant
0 Kudos

There has been a change in the release yes. Thanks for information Sandra

Answers (1)

Answers (1)

Sandra_Rossi
Active Contributor
0 Kudos

&SYSID& is not a special value, it just refers to a custom element of the workflow container, i.e. you need to initialize it with the value you want.

Instead, you probably want to use the expression %SYSID%.

former_member185537
Participant
0 Kudos

Hello Sandra,

I have the right ID getting displayed in the lower environments and the wrong one in the higher environments. this is my workitem text. The value is as desired in the lower environments and in the higher environments it is not right

&DOCUMENT.DOCUMENTTYPE& &DOCUMENT.DOCUMENT_NR& WF stopped: DIR status set to IW (&SYSID&)

The method for this task is using the below code

SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #FFFFFF; } .L0S31 { font-style: italic; color: #808080; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; }

FORM get_witext USING im_language TYPE sylangu
im_wi_handle TYPE REF TO if_swf_run_wim_internal
CHANGING ex_witext TYPE string.
DATA: ls_swwwihead TYPE swwwihead.
DATA: lv_cnt TYPE REF TO if_swf_cnt_container.
DATA: l_witext TYPE string.
DATA: lh_properties TYPE REF TO cl_wapi_system_properties.
DATA: l_long_title TYPE xfeld.

lh_properties = cl_wapi_system_properties=>get_instance( ).
l_long_title = lh_properties->get_property( cl_wapi_system_properties=>c_long_mail_title ).
IF l_long_title EQ 'X'.

TRY.
lv_cnt = im_wi_handle->get_wi_container( ).
MOVE-CORRESPONDING im_wi_handle->m_sww_wihead TO ls_swwwihead.
*- we have to ensure that the text will ne regenerated. Therefore the requested language
*- must be not equal to the current workitem language
IF ls_swwwihead-wi_lang EQ im_language.
ls_swwwihead-wi_lang = space.
ENDIF.
CALL METHOD cl_swf_utl_workitem_text=>translate
EXPORTING
im_langu = im_language
im_cnt_handle = lv_cnt
IMPORTING
ex_witext = l_witext
CHANGING
ch_workitem = ls_swwwihead.
IF l_witext IS NOT INITIAL.
ex_witext = l_witext.
ELSE.
ex_witext = ls_swwwihead-wi_text.
ENDIF.
CATCH cx_swf_run_wim.
ex_witext = im_wi_handle->m_sww_wihead-wi_text.
ENDTRY.
ELSE.
CALL METHOD im_wi_handle->get_witext
EXPORTING
im_language = im_language
RECEIVING
re_witext = ex_witext.
ENDIF.

ENDFORM. "get_witext

-----------------------------------------------------------

Also there has been a container operation to set the same in the step above.