0% found this document useful (0 votes)
21 views25 pages

RSPDN1884740

The document describes changes required for Fiori workflow start in Process Director. It involves creating a structure and table type for detailed workflow steps and flow. It also involves modifying the /COCKPIT/WC_START function to add new importing parameters and tables for preset workflow steps and receivers before start.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views25 pages

RSPDN1884740

The document describes changes required for Fiori workflow start in Process Director. It involves creating a structure and table type for detailed workflow steps and flow. It also involves modifying the /COCKPIT/WC_START function to add new importing parameters and tables for preset workflow steps and receivers before start.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

PROCESS DIRECTOR Note

Number 1884740

Subject Fiori workflow start

Component Fiori AP, PDAP

Available with version PDAP: 7.12, 7.11 SP1, 7.10 SP3, 7.9 SP5

Requires version all PDAP versions

Required for Fiori One 1.4.2

Description
Required changes for Fiori One.
PROCESS DIRECTOR Note

Pre-correction

1. Create structure /COCKPIT/SWC_FLOW_DETAILED using the se11 transaction as


follows:
Description: WORK CYCLE process flow
Package: /COCKPIT/WEBCYCLE
Fields with corresponding types

WC_ID /COCKPIT/DWC_ID
WC_STEP_ID /COCKPIT/DWC_STEP_ID
WC_SUBPOS /COCKPIT/DWC_SUBPOS
WC_POS /COCKPIT/DWC_POS
NOTE /COCKPIT/LWC_NOTE
NOTE_LANG SPRAS
DEF /COCKPIT/SWC_STEP

2. Create table type /COCKPIT/LWC_FLOW_DETAILED using the se11 transaction as


follows:
Description: List of /COCKPIT/SWC_FLOW_DETAILED
Package: /COCKPIT/WEBCYCLE
Line type: /COCKPIT/SWC_FLOW_DETAILED

2
PROCESS DIRECTOR Note

3. (version PD 7.10 and higher) Modify the /COCKPIT/WC_START function using the se37
transaction as follows:
a. Interface

3
PROCESS DIRECTOR Note

IB_USER_ASSIGNMENT_ONLY LIKE BOOLE-BOOLE


IB_OVERWRITE_RECEIVERS_SET LIKE BOOLE-BOOLE
IT_STEP_PRESET TYPE /COCKPIT/LWC_FLOW_DETAILED

ET_FLOW_BEFORE_START TYPE /COCKPIT/LWC_FLOW_DETAILED

ET_RECEIVERS_BEFORE_START LIKE /COCKPIT/SWC_WCRECEIVER


ET_WC_BEFORE_START LIKE /COCKPIT/SWC_WEBCYCLE

b. Source code

FUNCTION /cockpit/wc_start.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IB_ONLINE) LIKE BOOLE-BOOLE DEFAULT 'X'
*" VALUE(IC_WEBCYCLE_ID) LIKE /COCKPIT/SWC_WEBCYCLE-WC_ID OPTIONAL
*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE
*" /COCKPIT/TWC OPTIONAL

4
PROCESS DIRECTOR Note

*" VALUE(IC_USER) LIKE /COCKPIT/TWCS-WC_USER OPTIONAL


*" VALUE(IC_USERTYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE OPTIONAL
*" REFERENCE(IB_MULTI) LIKE BOOLE-BOOLE OPTIONAL
*>>> INSERT
*" REFERENCE(IB_USER_ASSIGNMENT_ONLY) LIKE BOOLE-BOOLE OPTIONAL
*" REFERENCE(IB_OVERWRITE_RECEIVERS_SET) LIKE BOOLE-BOOLE OPTIONAL
*" REFERENCE(IT_STEP_PRESET) TYPE /COCKPIT/LWC_FLOW_DETAILED
*" OPTIONAL
*<<< INSERT
*" EXPORTING
*" REFERENCE(EC_PROC_WC) LIKE /COCKPIT/THIST-PROCESS
*" REFERENCE(ES_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE
*" /COCKPIT/TWC
*>>> INSERT
*" REFERENCE(ET_FLOW_BEFORE_START) TYPE /COCKPIT/LWC_FLOW_DETAILED
*<<< INSERT
*" TABLES
*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF
*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF
*" IT_TAX STRUCTURE /COCKPIT/STAX_IF
*" ET_MESSAGE STRUCTURE BAPIRET2
*" CT_RECEIVERS STRUCTURE /COCKPIT/SWC_WCRECEIVER OPTIONAL
*" CT_WCS_GUI_DUEDATE STRUCTURE /COCKPIT/TWCS OPTIONAL
*" CT_ITEM_RECEIVER STRUCTURE /COCKPIT/TWCLASS OPTIONAL
*" ET_REMOVED STRUCTURE /COCKPIT/SWC_RECEIVER OPTIONAL
*>>> INSERT
*" ET_RECEIVERS_BEFORE_START STRUCTURE /COCKPIT/SWC_WCRECEIVER
*" OPTIONAL
*" ET_WC_BEFORE_START STRUCTURE /COCKPIT/SWC_WEBCYCLE OPTIONAL
*<<< INSERT
*" CHANGING
*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE
*" /COCKPIT/SHDR_IF
*" REFERENCE(CT_WC_ASSIGN_NOTE) TYPE /COCKPIT/LNOTE OPTIONAL
*" EXCEPTIONS
*" CANCELED
*" ERROR_OCCURED
*"----------------------------------------------------------------------

ls_wc_receiver LIKE LINE OF gt_wc_receiver,
*>>> INSERT
ld_preset_due_date TYPE datum,
*<<< INSERT
lc_sender LIKE soxda-address,
lc_sender_type LIKE soextreci1-adr_typ,

*>>> INSERT
FIELD-SYMBOLS: <step_preset> LIKE LINE OF it_step_preset.
*<<< INSERT
* Initialize global data ************************************************
CLEAR: gt_webcycle, gt_webcycle[],
gt_wc_flow, gt_wc_flow[],
gt_wc_receiver, gt_wc_receiver[],
gt_steps, gt_steps[],
gt_receiver, gt_receiver[],
gt_wc_pre_rec, gt_wc_pre_rec[],
gt_wc_assign_note, gt_wc_assign_note[],
gi_step,
gc_wc_id,
gc_wc_duedate,
gs_steps,
gb_changed,
gb_cancel,
gb_continue,
gt_wc_removed,
*>>> DELETE

5
PROCESS DIRECTOR Note

gs_wc_step.
*<<< DELETE
*>>> INSERT
gs_wc_step,
gt_msg_pbo.

REFRESH gt_msg_pbo[].
*<<< INSERT

* Clearing the cached value
IF ib_online EQ con_true.
CLEAR gb_overwrite_receivers.
ENDIF.

*>>> INSERT
IF ib_overwrite_receivers_set = abap_true.
gb_overwrite_receivers = abap_true.
ENDIF.
*<<< INSERT

* Check status
IF es_header-status EQ con_status_deleted OR
es_header-status EQ con_status_refused OR
es_header-status EQ con_status_sent_to_pd OR
es_header-status EQ con_status_changed_processed OR
( es_header-status EQ con_status_webcycle AND
ib_online EQ con_false AND
*>>> INSERT
ib_user_assignment_only EQ con_false AND
*<<< INSERT
ct_receivers[] IS INITIAL AND
ct_item_receiver[] IS INITIAL ).
PERFORM wc_e_msg
TABLES et_message USING '000' space space space space.
IF 1 EQ 2. MESSAGE e000. ENDIF.
RAISE error_occured.
ENDIF.

* Set flow and receivers
LOOP AT lt_new_step INTO ls_new_step.
CLEAR gt_wc_flow.
READ TABLE lt_wc_step INTO gt_wc_flow-def
WITH KEY wc_step_id = ls_new_step-wc_step_id.
CHECK gt_wc_flow-def-wc_user_assign
NE con_wc_user_assign_webcycle.
MOVE-CORRESPONDING: ls_new_step TO gt_wc_flow,
gt_webcycle TO gt_wc_flow.

IF gb_continue = abap_true AND


ib_online = abap_false AND
ct_receivers[] IS NOT INITIAL.
* Offline call with receivers
LOOP AT ct_receivers
WHERE wc_step_id EQ ls_new_step-wc_step_id
AND wc_subpos EQ ls_new_step-wc_subpos
AND wc_pos EQ ls_new_step-wc_pos.
APPEND ct_receivers TO gt_wc_receiver.
ENDLOOP.
ELSE.
LOOP AT lt_db_wc_flow
WHERE wc_step_id EQ ls_new_step-wc_step_id
AND wc_subpos EQ ls_new_step-wc_subpos

6
PROCESS DIRECTOR Note

AND wc_pos EQ ls_new_step-wc_pos.


CLEAR gt_wc_receiver.
MOVE-CORRESPONDING lt_db_wc_flow TO gt_wc_receiver.
APPEND gt_wc_receiver.
ENDLOOP.
ENDIF.

MOVE-CORRESPONDING ls_new_step TO lt_wc_flow.


lt_wc_flow-wc_id = gt_webcycle-wc_id.
CALL FUNCTION '/COCKPIT/WC_RECEIVERS_GET'
EXPORTING
ib_continue = gb_continue
is_header = es_header
is_webcycle = gt_webcycle
is_wc_flow = lt_wc_flow
is_wc_step = gt_wc_flow-def
TABLES
it_item = it_item
it_account = it_account
it_tax = it_tax
et_itm_rcvr = lt_item_rcvr_ue
et_message = lt_messages
it_removed = et_removed
EXCEPTIONS
OTHERS = 1.
li_subrc = sy-subrc.
APPEND LINES OF lt_item_rcvr_ue TO lt_item_rcvr_ueall.
* Mark all messages with WC ID
LOOP AT lt_messages WHERE field IS INITIAL.
lt_messages-field = gt_webcycle-wc_id.
MODIFY lt_messages TRANSPORTING field.
ENDLOOP.
IF NOT lt_messages[] IS INITIAL.
APPEND LINES OF lt_messages TO et_message.
CLEAR lt_messages. REFRESH lt_messages.
ENDIF.
* Check return code of /COCKPIT/WC_RECEIVERS_GET
IF li_subrc NE 0.
RAISE error_occured.
ENDIF.

* Check receivers and add them to the flow


READ TABLE gt_wc_receiver TRANSPORTING NO FIELDS
WITH KEY wc_id = gt_webcycle-wc_id
wc_step_id = ls_new_step-wc_step_id
wc_subpos = ls_new_step-wc_subpos
wc_pos = ls_new_step-wc_pos.
IF sy-subrc EQ 0.
gt_wc_flow-status = con_icon_led_green.
ELSEIF gt_wc_flow-def-wc_optional EQ con_wc_step_optional.
gt_wc_flow-status = con_icon_led_inactive.
ELSE.
gt_wc_flow-status = con_icon_led_red.
ENDIF.

*>>> INSERT
* Get language for text
PERFORM get_available_note_languages
TABLES gt_note_languages
USING gt_wc_flow-def-wc_text_id.
IF gt_wc_receiver-language IS INITIAL.
PERFORM set_lang_for_note TABLES gt_note_languages
USING gt_wc_receiver-wc_user
gt_wc_receiver-wc_usertype
gt_wc_flow-def-wc_no_mail
CHANGING gt_wc_flow-note_lang.

7
PROCESS DIRECTOR Note

ELSE.
gt_wc_flow-note_lang = gt_wc_receiver-language.
ENDIF.

CALL FUNCTION '/COCKPIT/WC_CUST_TEXT_GET_I18N'


EXPORTING
is_header = es_header
is_webcycle = gt_webcycle
is_wc_step = gt_wc_flow-def
ic_text_lang = gt_wc_flow-note_lang
ic_action = lc_action_type
TABLES
et_note = gt_wc_flow-note.
*<<< INSERT
*>>> DELETE
CALL FUNCTION '/COCKPIT/WC_CUST_TEXT_GET'
EXPORTING
is_header = es_header
is_webcycle = gt_webcycle
is_wc_step = gt_wc_flow-def
ic_action = lc_action_type
TABLES
et_note = gt_wc_flow-note.
*<<< DELETE

CALL FUNCTION '/COCKPIT/WC_GET_DUE_DATE'


EXPORTING
in_due_days = gt_wc_flow-def-wc_due_days
is_webcycle = gt_webcycle
is_webcycle_step = gt_wc_flow-def
is_flow = lt_db_wc_flow
is_header = gs_header
ib_continue = gb_continue
IMPORTING
ed_due_date = gt_wc_flow-wc_duedate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0. RAISE error_occured. ENDIF.

APPEND gt_wc_flow.
ENDLOOP.

CALL SCREEN 100 STARTING AT li_popup_xpos 1.
IF NOT lc_kill_note_funct IS INITIAL.
CALL FUNCTION lc_kill_note_funct.
ENDIF.

IF gb_cancel EQ con_true.
* Webcycle sent/continue canceled - delete all userexit messages
DELETE et_message WHERE NOT field IS INITIAL.
IF gb_continue EQ con_true.
PERFORM wc_s_msg TABLES et_message
USING '020' space space space space.
MESSAGE s020 RAISING canceled.
ELSE.
PERFORM wc_s_msg TABLES et_message
USING '006' space space space space.
MESSAGE s006 RAISING canceled.
ENDIF.
ELSE.
* If there were any notes added, these have to
* be reused in case of bulk action
ct_wc_assign_note[] = gt_wc_assign_note[].
CLEAR gt_wc_assign_note[].

8
PROCESS DIRECTOR Note

ENDIF.
ENDIF.
*>>> INSERT
IF ib_user_assignment_only = abap_true.
PERFORM get_due_dates_and_receivers TABLES ct_wcs_gui_duedate[] et_receivers_before_start[]
.
/cockpit/cl_tools=>tls->move_corresponding_table( EXPORTING it_src = gt_wc_flow[]
IMPORTING et_dest = et_flow_before_st
art[] ).
/cockpit/cl_tools=>tls->move_corresponding_table( EXPORTING it_src = gt_webcycle[]
IMPORTING et_dest = et_wc_before_star
t[] ).
APPEND LINES OF gt_msg_pbo TO et_message.
EXIT.
ENDIF.
*<<< INSERT

* Set flow and send eMail **********************************************
REFRESH ct_receivers.
IF gb_continue EQ con_true.
SORT gt_wc_flow BY wc_id wc_step_id wc_pos.
ENDIF.
lc_sap_user = sy-uname.

LOOP AT gt_wc_flow WHERE wc_id EQ gc_wc_id.


CLEAR: lt_db_wc_flow, lt_db_wc_flow_note.

IF ib_multi IS NOT INITIAL.


gt_wc_flow-note[] = gt_note_buff[].
ELSEIF ib_online IS NOT INITIAL AND gt_wc_flow-wc_pos EQ '001'.
gt_note_buff[] = gt_wc_flow-note[].
ENDIF.

*>>> INSERT
IF it_step_preset IS NOT INITIAL.
READ TABLE it_step_preset ASSIGNING <step_preset>
WITH KEY wc_id = gt_wc_flow-wc_id
wc_step_id = gt_wc_flow-wc_step_id
wc_pos = gt_wc_flow-wc_pos
wc_subpos = gt_wc_flow-wc_subpos.
IF sy-subrc = 0.
gt_wc_flow-note[] = <step_preset>-note.
gt_wc_flow-note_lang = <step_preset>-note_lang.
MODIFY gt_wc_flow.
ENDIF.
ENDIF.
*<<< INSERT

* Add internal note languge info


CALL FUNCTION '/COCKPIT/WC_NOTE_ADD_LANG2'
EXPORTING
ic_lang = gt_wc_flow-note_lang
TABLES
ct_note = gt_wc_flow-note[].

IF gb_continue EQ con_true AND


( lc_old_step_id NE gt_wc_flow-wc_step_id OR
lc_old_pos NE gt_wc_flow-wc_pos ).
lc_old_step_id = gt_wc_flow-wc_step_id.
lc_old_pos = gt_wc_flow-wc_pos.
DELETE lt_db_wc_flow
WHERE wc_step_id EQ gt_wc_flow-wc_step_id
AND wc_pos EQ gt_wc_flow-wc_pos.
DELETE lt_db_wc_flow_note
WHERE wc_step_id EQ gt_wc_flow-wc_step_id
AND wc_pos EQ gt_wc_flow-wc_pos.

9
PROCESS DIRECTOR Note

ENDIF.
MOVE-CORRESPONDING gt_wc_flow-def TO lt_db_wc_flow.
MOVE-CORRESPONDING gt_wc_flow TO: lt_db_wc_flow, lt_db_wc_flow_note.

* evaluate due dates in flow depending on what user inserted in


* web cycle start window (those values are in
* ct_wcs_gui_duedate-wc_duedate
READ TABLE ct_wcs_gui_duedate WITH KEY
wc_step_id = gt_wc_flow-wc_step_id
wc_id = gt_wc_flow-wc_id
wc_pos = gt_wc_flow-wc_pos
wc_subpos = gt_wc_flow-wc_subpos.

*>>> INSERT
ld_preset_due_date = ct_wcs_gui_duedate-wc_duedate.
*<<< INSERT

* if somebody put values in WCStart window


*>>> DELETE
* IF sy-subrc EQ 0.
*<<< DELETE
*>>> INSERT
IF ld_preset_due_date IS NOT INITIAL.
*<<< INSERT

PERFORM get_duedays4email USING ls_db_webcycle-wc_duedate


*>>> DELETE
* ct_wcs_gui_duedate-wc_duedate
*<<< DELETE
*>>> INSERT
ld_preset_due_date
*<<< INSERT
CHANGING ln_email_duedays.

* Create DB entries ****************************************************
IF gb_continue EQ con_false.

* Create DB entries
ls_db_webcycle-doc_status = es_header-status.

* Those values are set only in /COCKPIT/RFC_WB_DATA_CREATE


* When we create a new Invoice.
IF ic_user IS NOT INITIAL AND ic_usertype IS NOT INITIAL.
ls_db_webcycle-wc_initiator = ic_user.
ls_db_webcycle-wc_initiator_typ = ic_usertype.
ENDIF.

*>>> INSERT
CLEAR: sy-msgid, sy-msgty.
*<<< INSERT
CALL FUNCTION '/COCKPIT/WC_DB_WEBCYCLE_CREATE'
EXPORTING
ic_invoice_guid = es_header-invoice_guid
id_wc_gui_duedate = ls_db_webcycle-wc_duedate
TABLES
ct_wc_flow = lt_db_wc_flow
ct_wc_flow_note = lt_db_wc_flow_note
it_wc_step_def = lt_wc_step
it_wcs_gui_duedate = ct_wcs_gui_duedate
ct_wc_item_approvers = ct_item_receiver
CHANGING
cs_webcycle = ls_db_webcycle
EXCEPTIONS
error_occured = 1

10
PROCESS DIRECTOR Note

OTHERS = 2.
IF sy-subrc NE 0.
*>>> INSERT
CALL FUNCTION '/COCKPIT/OBJ_SYSMESSAGE_APPEND'
TABLES
ct_messages = et_message
EXCEPTIONS
OTHERS = 0.
*<<< INSERT

PERFORM wc_e_msg
TABLES et_message USING '004' space space space space.
ROLLBACK WORK.
MESSAGE e004 RAISING error_occured.
ENDIF.

* read duedate for step set by user in web cycle start window
READ TABLE ct_wcs_gui_duedate WITH KEY
wc_step_id = lt_db_wc_step-wc_step_id
wc_id = lt_db_wc_step-wc_id
wc_pos = lt_db_wc_step-wc_pos
wc_subpos = lt_db_wc_step-wc_subpos.

*>>> INSERT
ld_preset_due_date = ct_wcs_gui_duedate-wc_duedate.
*<<< INSERT

* call due date calculation function


CALL FUNCTION '/COCKPIT/WC_GET_DUE_DATE'
EXPORTING
id_date = sy-datlo
in_due_days = lt_db_wc_flow-wc_due_days
is_webcycle = gt_webcycle
is_webcycle_step = lt_wc_step
is_flow = lt_db_wc_flow
is_header = gs_header
ib_continue = gb_continue
*>>> DELETE
* id_proposal = ct_wcs_gui_duedate-wc_duedate
*<<< DELETE
*>>> INSERT
id_proposal = ld_preset_due_date
*<<< INSERT
IMPORTING
ed_due_date = lt_db_wc_step-wc_duedate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0. RAISE error_occured. ENDIF.

4. (version PD 7.9 and lower) Modify the /COCKPIT/WC_START function using the se37
transaction as follows:
a. Interface

11
PROCESS DIRECTOR Note

IB_USER_ASSIGNMENT_ONLY LIKE BOOLE-BOOLE


IB_OVERWRITE_RECEIVERS_SET LIKE BOOLE-BOOLE
IT_STEP_PRESET TYPE /COCKPIT/LWC_FLOW_DETAILED

ET_FLOW_BEFORE_START TYPE /COCKPIT/LWC_FLOW_DETAILED

12
PROCESS DIRECTOR Note

ET_RECEIVERS_BEFORE_START LIKE /COCKPIT/SWC_WCRECEIVER


ET_WC_BEFORE_START LIKE /COCKPIT/SWC_WEBCYCLE

b. Source code

FUNCTION /cockpit/wc_start.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" IMPORTING
*" VALUE(IB_ONLINE) LIKE BOOLE-BOOLE DEFAULT 'X'
*" VALUE(IC_WEBCYCLE_ID) LIKE /COCKPIT/SWC_WEBCYCLE-WC_ID OPTIONAL
*" REFERENCE(IS_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE
*" /COCKPIT/TWC OPTIONAL
*" VALUE(IC_USER) LIKE /COCKPIT/TWCS-WC_USER OPTIONAL
*" VALUE(IC_USERTYPE) LIKE /COCKPIT/TWCS-WC_USERTYPE OPTIONAL
*" REFERENCE(IB_MULTI) LIKE BOOLE-BOOLE OPTIONAL
*>>> INSERT
*" REFERENCE(IB_USER_ASSIGNMENT_ONLY) LIKE BOOLE-BOOLE OPTIONAL
*" REFERENCE(IB_OVERWRITE_RECEIVERS_SET) LIKE BOOLE-BOOLE OPTIONAL
*" REFERENCE(IT_STEP_PRESET) TYPE /COCKPIT/LWC_FLOW_DETAILED
*" OPTIONAL
*<<< INSERT
*" EXPORTING
*" REFERENCE(EC_PROC_WC) LIKE /COCKPIT/THIST-PROCESS
*" REFERENCE(ES_WEBCYCLE) LIKE /COCKPIT/TWC STRUCTURE
*" /COCKPIT/TWC
*>>> INSERT
*" REFERENCE(ET_FLOW_BEFORE_START) TYPE /COCKPIT/LWC_FLOW_DETAILED
*<<< INSERT
*" TABLES
*" IT_ITEM STRUCTURE /COCKPIT/SITEM_IF
*" IT_ACCOUNT STRUCTURE /COCKPIT/SACCT_IF
*" IT_TAX STRUCTURE /COCKPIT/STAX_IF
*" ET_MESSAGE STRUCTURE BAPIRET2
*" CT_RECEIVERS STRUCTURE /COCKPIT/SWC_WCRECEIVER OPTIONAL

13
PROCESS DIRECTOR Note

*" CT_WCS_GUI_DUEDATE STRUCTURE /COCKPIT/TWCS OPTIONAL


*" CT_ITEM_RECEIVER STRUCTURE /COCKPIT/TWCLASS OPTIONAL
*" ET_REMOVED STRUCTURE /COCKPIT/SWC_RECEIVER OPTIONAL
*>>> INSERT
*" ET_RECEIVERS_BEFORE_START STRUCTURE /COCKPIT/SWC_WCRECEIVER
*" OPTIONAL
*" ET_WC_BEFORE_START STRUCTURE /COCKPIT/SWC_WEBCYCLE OPTIONAL
*<<< INSERT
*" CHANGING
*" REFERENCE(ES_HEADER) LIKE /COCKPIT/SHDR_IF STRUCTURE
*" /COCKPIT/SHDR_IF
*" REFERENCE(CT_WC_ASSIGN_NOTE) TYPE /COCKPIT/LNOTE OPTIONAL
*" EXCEPTIONS
*" CANCELED
*" ERROR_OCCURED
*"----------------------------------------------------------------------

ls_wc_receiver LIKE LINE OF gt_wc_receiver,
*>>> INSERT
ld_preset_due_date TYPE datum,
*<<< INSERT
lc_sender LIKE soxda-address,
lc_sender_type LIKE soextreci1-adr_typ,

*>>> INSERT
FIELD-SYMBOLS: <step_preset> LIKE LINE OF it_step_preset.
*<<< INSERT
* Initialize global data ************************************************
CLEAR: gt_webcycle, gt_webcycle[],
gt_wc_flow, gt_wc_flow[],
gt_wc_receiver, gt_wc_receiver[],
gt_steps, gt_steps[],
gt_receiver, gt_receiver[],
gt_wc_pre_rec, gt_wc_pre_rec[],
gt_wc_assign_note, gt_wc_assign_note[],
gi_step,
gc_wc_id,
gc_wc_duedate,
gs_steps,
gb_changed,
gb_cancel,
gb_continue,
gt_wc_removed,
*>>> DELETE
gs_wc_step.
*<<< DELETE
*>>> INSERT
gs_wc_step,
gt_msg_pbo.

REFRESH gt_msg_pbo[].
*<<< INSERT

* Clearing the cached value
IF ib_online EQ con_true.
CLEAR gb_overwrite_receivers.
ENDIF.

*>>> INSERT
IF ib_overwrite_receivers_set = abap_true.
gb_overwrite_receivers = abap_true.
ENDIF.
*<<< INSERT

14
PROCESS DIRECTOR Note


* Check status
IF es_header-status EQ con_status_deleted OR
es_header-status EQ con_status_refused OR
es_header-status EQ con_status_sent_to_pd OR
es_header-status EQ con_status_changed_processed OR
( es_header-status EQ con_status_webcycle AND
*>>> INSERT
ib_user_assignment_only EQ con_false AND
*<<< INSERT
ib_online EQ con_false ).
PERFORM wc_e_msg
TABLES et_message USING '000' space space space space.
IF 1 EQ 2. MESSAGE e000. ENDIF.
RAISE error_occured.
ENDIF.

* Set flow and receivers
LOOP AT lt_new_step INTO ls_new_step.
CLEAR gt_wc_flow.
READ TABLE lt_wc_step INTO gt_wc_flow-def
WITH KEY wc_step_id = ls_new_step-wc_step_id.
CHECK gt_wc_flow-def-wc_user_assign
NE con_wc_user_assign_webcycle.
MOVE-CORRESPONDING: ls_new_step TO gt_wc_flow,
gt_webcycle TO gt_wc_flow.
LOOP AT lt_db_wc_flow
WHERE wc_step_id EQ ls_new_step-wc_step_id
AND wc_subpos EQ ls_new_step-wc_subpos
AND wc_pos EQ ls_new_step-wc_pos.
CLEAR gt_wc_receiver.
MOVE-CORRESPONDING lt_db_wc_flow TO gt_wc_receiver.
APPEND gt_wc_receiver.
ENDLOOP.
MOVE-CORRESPONDING ls_new_step TO lt_wc_flow.
lt_wc_flow-wc_id = gt_webcycle-wc_id.
CALL FUNCTION '/COCKPIT/WC_RECEIVERS_GET'
EXPORTING
ib_continue = gb_continue
is_header = es_header
is_webcycle = gt_webcycle
is_wc_flow = lt_wc_flow
is_wc_step = gt_wc_flow-def
TABLES
it_item = it_item
it_account = it_account
it_tax = it_tax
et_itm_rcvr = lt_item_rcvr_ue
et_message = lt_messages
it_removed = et_removed
EXCEPTIONS
OTHERS = 1.
li_subrc = sy-subrc.
APPEND LINES OF lt_item_rcvr_ue TO lt_item_rcvr_ueall.
* Mark all messages with WC ID
LOOP AT lt_messages WHERE field IS INITIAL.
lt_messages-field = gt_webcycle-wc_id.
MODIFY lt_messages TRANSPORTING field.
ENDLOOP.
IF NOT lt_messages[] IS INITIAL.
APPEND LINES OF lt_messages TO et_message.
CLEAR lt_messages. REFRESH lt_messages.
ENDIF.
* Check return code of /COCKPIT/WC_RECEIVERS_GET
IF li_subrc NE 0.
RAISE error_occured.

15
PROCESS DIRECTOR Note

ENDIF.

* Check receivers and add them to the flow


READ TABLE gt_wc_receiver TRANSPORTING NO FIELDS
WITH KEY wc_id = gt_webcycle-wc_id
wc_step_id = ls_new_step-wc_step_id
wc_subpos = ls_new_step-wc_subpos
wc_pos = ls_new_step-wc_pos.
IF sy-subrc EQ 0.
gt_wc_flow-status = con_icon_led_green.
ELSEIF gt_wc_flow-def-wc_optional EQ con_wc_step_optional.
gt_wc_flow-status = con_icon_led_inactive.
ELSE.
gt_wc_flow-status = con_icon_led_red.
ENDIF.
*>>> INSERT
* Get language for text
PERFORM get_available_note_languages
TABLES gt_note_languages
USING gt_wc_flow-def-wc_text_id.
IF gt_wc_receiver-language IS INITIAL.
PERFORM set_lang_for_note TABLES gt_note_languages
USING gt_wc_receiver-wc_user
gt_wc_receiver-wc_usertype
gt_wc_flow-def-wc_no_mail
CHANGING gt_wc_flow-note_lang.
ELSE.
gt_wc_flow-note_lang = gt_wc_receiver-language.
ENDIF.

CALL FUNCTION '/COCKPIT/WC_CUST_TEXT_GET_I18N'


EXPORTING
is_header = es_header
is_webcycle = gt_webcycle
is_wc_step = gt_wc_flow-def
ic_text_lang = gt_wc_flow-note_lang
ic_action = lc_action_type
TABLES
et_note = gt_wc_flow-note.
*<<< INSERT
*>>> DELETE
CALL FUNCTION '/COCKPIT/WC_CUST_TEXT_GET'
EXPORTING
is_header = es_header
is_webcycle = gt_webcycle
is_wc_step = gt_wc_flow-def
ic_action = lc_action_type
TABLES
et_note = gt_wc_flow-note.
*<<< DELETE
CALL FUNCTION '/COCKPIT/WC_GET_DUE_DATE'
EXPORTING
in_due_days = gt_wc_flow-def-wc_due_days
is_webcycle = gt_webcycle
is_webcycle_step = gt_wc_flow-def
is_flow = lt_db_wc_flow
is_header = gs_header
ib_continue = gb_continue
IMPORTING
ed_due_date = gt_wc_flow-wc_duedate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0. RAISE error_occured. ENDIF.

APPEND gt_wc_flow.
ENDLOOP.

16
PROCESS DIRECTOR Note


CALL SCREEN 100 STARTING AT li_popup_xpos 1.
IF NOT lc_kill_note_funct IS INITIAL.
CALL FUNCTION lc_kill_note_funct.
ENDIF.

IF gb_cancel EQ con_true.
* Webcycle sent/continue canceled - delete all userexit messages
DELETE et_message WHERE NOT field IS INITIAL.
IF gb_continue EQ con_true.
PERFORM wc_s_msg TABLES et_message
USING '020' space space space space.
MESSAGE s020 RAISING canceled.
ELSE.
PERFORM wc_s_msg TABLES et_message
USING '006' space space space space.
MESSAGE s006 RAISING canceled.
ENDIF.
ELSE.
* If there were any notes added, these have to
* be reused in case of bulk action
ct_wc_assign_note[] = gt_wc_assign_note[].
CLEAR gt_wc_assign_note[].
ENDIF.
ENDIF.
*>>> INSERT
IF ib_user_assignment_only = abap_true.
PERFORM get_due_dates_and_receivers TABLES ct_wcs_gui_duedate[] et_receivers_before_start[]
.
/cockpit/cl_tools=>tls->move_corresponding_table( EXPORTING it_src = gt_wc_flow[]
IMPORTING et_dest = et_flow_before_st
art[] ).
/cockpit/cl_tools=>tls->move_corresponding_table( EXPORTING it_src = gt_webcycle[]
IMPORTING et_dest = et_wc_before_star
t[] ).
APPEND LINES OF gt_msg_pbo TO et_message.
EXIT.
ENDIF.
*<<< INSERT


* Set flow and send eMail **********************************************
REFRESH ct_receivers.
IF gb_continue EQ con_true.
SORT gt_wc_flow BY wc_id wc_step_id wc_pos.
ENDIF.
lc_sap_user = sy-uname.

LOOP AT gt_wc_flow WHERE wc_id EQ gc_wc_id.


CLEAR: lt_db_wc_flow, lt_db_wc_flow_note.

IF ib_multi IS NOT INITIAL.


gt_wc_flow-note[] = gt_note_buff[].
ELSEIF ib_online IS NOT INITIAL AND gt_wc_flow-wc_pos EQ '001'.
gt_note_buff[] = gt_wc_flow-note[].
ENDIF.

*>>> INSERT
IF it_step_preset IS NOT INITIAL.
READ TABLE it_step_preset ASSIGNING <step_preset>
WITH KEY wc_id = gt_wc_flow-wc_id
wc_step_id = gt_wc_flow-wc_step_id
wc_pos = gt_wc_flow-wc_pos
wc_subpos = gt_wc_flow-wc_subpos.
IF sy-subrc = 0.

17
PROCESS DIRECTOR Note

gt_wc_flow-note[] = <step_preset>-note.
gt_wc_flow-note_lang = <step_preset>-note_lang.
MODIFY gt_wc_flow.
ENDIF.
ENDIF.
*<<< INSERT

* Add internal note languge info


CALL FUNCTION '/COCKPIT/WC_NOTE_ADD_LANG2'
EXPORTING
ic_lang = gt_wc_flow-note_lang
TABLES
ct_note = gt_wc_flow-note[].

IF gb_continue EQ con_true AND


( lc_old_step_id NE gt_wc_flow-wc_step_id OR
lc_old_pos NE gt_wc_flow-wc_pos ).
lc_old_step_id = gt_wc_flow-wc_step_id.
lc_old_pos = gt_wc_flow-wc_pos.
DELETE lt_db_wc_flow
WHERE wc_step_id EQ gt_wc_flow-wc_step_id
AND wc_pos EQ gt_wc_flow-wc_pos.
DELETE lt_db_wc_flow_note
WHERE wc_step_id EQ gt_wc_flow-wc_step_id
AND wc_pos EQ gt_wc_flow-wc_pos.
ENDIF.
MOVE-CORRESPONDING gt_wc_flow-def TO lt_db_wc_flow.
MOVE-CORRESPONDING gt_wc_flow TO: lt_db_wc_flow, lt_db_wc_flow_note.

* evaluate due dates in flow depending on what user inserted in


* web cycle start window (those values are in
* ct_wcs_gui_duedate-wc_duedate
READ TABLE ct_wcs_gui_duedate WITH KEY
wc_step_id = gt_wc_flow-wc_step_id
wc_id = gt_wc_flow-wc_id
wc_pos = gt_wc_flow-wc_pos
wc_subpos = gt_wc_flow-wc_subpos.

*>>> INSERT
ld_preset_due_date = ct_wcs_gui_duedate-wc_duedate.
*<<< INSERT

* if somebody put values in WCStart window


*>>> DELETE
* IF sy-subrc EQ 0.
*<<< DELETE
*>>> INSERT
IF ld_preset_due_date IS NOT INITIAL.
*<<< INSERT

PERFORM get_duedays4email USING ls_db_webcycle-wc_duedate


*>>> DELETE
* ct_wcs_gui_duedate-wc_duedate
*<<< DELETE
*>>> INSERT
ld_preset_due_date
*<<< INSERT
CHANGING ln_email_duedays.

* Create DB entries ****************************************************
IF gb_continue EQ con_false.

* Create DB entries
ls_db_webcycle-doc_status = es_header-status.

* Those values are set only in /COCKPIT/RFC_WB_DATA_CREATE

18
PROCESS DIRECTOR Note

* When we create a new Invoice.


IF ic_user IS NOT INITIAL AND ic_usertype IS NOT INITIAL.
ls_db_webcycle-wc_initiator = ic_user.
ls_db_webcycle-wc_initiator_typ = ic_usertype.
ENDIF.

*>>> INSERT
CLEAR: sy-msgid, sy-msgty.
*<<< INSERT
CALL FUNCTION '/COCKPIT/WC_DB_WEBCYCLE_CREATE'
EXPORTING
ic_invoice_guid = es_header-invoice_guid
id_wc_gui_duedate = ls_db_webcycle-wc_duedate
TABLES
ct_wc_flow = lt_db_wc_flow
ct_wc_flow_note = lt_db_wc_flow_note
it_wc_step_def = lt_wc_step
it_wcs_gui_duedate = ct_wcs_gui_duedate
ct_wc_item_approvers = ct_item_receiver
CHANGING
cs_webcycle = ls_db_webcycle
EXCEPTIONS
error_occured = 1
OTHERS = 2.
IF sy-subrc NE 0.
*>>> INSERT
CALL FUNCTION '/COCKPIT/OBJ_SYSMESSAGE_APPEND'
TABLES
ct_messages = et_message
EXCEPTIONS
OTHERS = 0.
*<<< INSERT

PERFORM wc_e_msg
TABLES et_message USING '004' space space space space.
ROLLBACK WORK.
MESSAGE e004 RAISING error_occured.
ENDIF.

* read duedate for step set by user in web cycle start window
READ TABLE ct_wcs_gui_duedate WITH KEY
wc_step_id = lt_db_wc_step-wc_step_id
wc_id = lt_db_wc_step-wc_id
wc_pos = lt_db_wc_step-wc_pos
wc_subpos = lt_db_wc_step-wc_subpos.

*>>> INSERT
ld_preset_due_date = ct_wcs_gui_duedate-wc_duedate.
*<<< INSERT

* call due date calculation function


CALL FUNCTION '/COCKPIT/WC_GET_DUE_DATE'
EXPORTING
id_date = sy-datlo
in_due_days = lt_db_wc_flow-wc_due_days
is_webcycle = gt_webcycle
is_webcycle_step = lt_wc_step
is_flow = lt_db_wc_flow
is_header = gs_header
ib_continue = gb_continue
*>>> DELETE
* id_proposal = ct_wcs_gui_duedate-wc_duedate
*<<< DELETE
*>>> INSERT

19
PROCESS DIRECTOR Note

id_proposal = ld_preset_due_date
*<<< INSERT
IMPORTING
ed_due_date = lt_db_wc_step-wc_duedate
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0. RAISE error_occured. ENDIF.

5. Open class /COCKPIT/CL_WC_START in SE24


6. Add the following attribute

Attribute Level Visibility Typing Associated type Initial value

MD_DATLO Instance Public Type SYSTDATLO


Attribute

7. Create a constructor without parameters with the following code

METHOD constructor.
md_datlo = sy-datlo.
ENDMETHOD.

8. Create an instance public method CHECK_STEP_DUEDATE and do the following


changes:
a. Add the following parameters

Parameter Type Optional Typing Associated type Default


method value

ID_WC_DUEDATE Importing No Type /COCKPIT/DWC_DUEDATE

ID_STEP_DUEDATE Importing No Type /COCKPIT/DWC_DUEDATE

CC_STEP_DUEDAYS_CORRECTED Changing Yes Type /COCKPIT/DWC_DUE_DAYS

b. Add exception INCORRECT_DUE_DATE


c. Add the following code

METHOD check_step_duedate.
* Due date of step (valid to) can not be in the past
IF id_step_duedate LT md_datlo.
MESSAGE e168(/cockpit/wc) RAISING incorrect_due_date.
ENDIF.
* Due date of step should be lower then due date of workflow
IF id_wc_duedate LT id_step_duedate.
cc_step_duedays_corrected = id_wc_duedate.
MESSAGE e167(/cockpit/wc) RAISING incorrect_due_date.
ENDIF.
ENDMETHOD.

20
PROCESS DIRECTOR Note

9. Create an instance public method CHECK_WF_DUEDATE and do the following:


a. Add the following parameters

Parameter Type Optional Typing Associated type Default


method value

ID_WC_DUEDATE Importing No Type /COCKPIT/DWC_DUEDATE

ID_STEP_DUEDATE Importing No Type /COCKPIT/DWC_DUEDATE

CC_STEP_DUEDAYS_CORRECTED Changing Yes Type /COCKPIT/DWC_DUE_DAYS

b. Add exception INCORRECT_DUE_DATE


c. Add the following code

METHOD check_wf_duedate.
IF id_wc_duedate LT md_datlo.
MESSAGE e089(/cockpit/wc) RAISING incorrect_due_date.
ENDIF.
* Due date of step should be lower then due date of workflow
IF id_wc_duedate LT id_step_duedate.
cc_step_duedays_corrected = id_wc_duedate.
MESSAGE e167(/cockpit/wc) RAISING incorrect_due_date.
ENDIF.
ENDMETHOD.

10. Create an instance public method CHECK_DUEDATES and do the following:


a. Add the following parameters:

Parameter Type Optional Typing Associated type Default


method value

ID_WC_DUEDATE Importing No Type /COCKPIT/DWC_DUEDATE

ID_STEP_DUEDATE Importing No Type /COCKPIT/DWC_DUEDATE

b. Add exception INCORRECT_DUE_DATE


c. Add the following code

METHOD check_duedates.
me->check_wf_duedate( EXPORTING id_wc_duedate = id_wc_duedate
id_step_duedate = id_step_duedate
EXCEPTIONS incorrect_due_date = 1 ).

IF sy-subrc = 0.
me->check_step_duedate( EXPORTING id_wc_duedate = id_wc_duedate
id_step_duedate = id_step_duedate
EXCEPTIONS incorrect_due_date = 1 ).
ENDIF.

IF sy-subrc <> 0.
RAISE incorrect_due_date.

21
PROCESS DIRECTOR Note

ENDIF.
ENDMETHOD.

11. Go to Se80 and open function group /COCKPIT/WC_PROC


12. Open the include /COCKPIT/LWC_PROCTOP and make the following changes to code


gt_note_languages LIKE TABLE OF /cockpit/swc_lang_id,
gb_auth_user_removed LIKE boole-boole,
gb_take_over_as_sub LIKE boole-boole,
gb_overwrite_receivers LIKE boole-boole,
*>>> DELETE
gi_pd_quantity_selected_docs TYPE int4.
*<<< DELETE
*>>> INSERT
gi_pd_quantity_selected_docs TYPE int4,
gr_wf_start_api TYPE REF TO /cockpit/cl_wc_start.
*<<< INSERT

controls:
go_tc_steps TYPE tableview using screen 0100,
go_tc_receiver TYPE tableview using screen 0100,
go_tc_recall TYPE tableview using screen 0200.

13. Create a new include in this function group with the name /COCKPIT/LWC_PROCF27,
then add the following code into it:

*----------------------------------------------------------------------*
***INCLUDE /COCKPIT/LWC_PROCF27.
*----------------------------------------------------------------------*
*&---------------------------------------------------------------------*
*& Form GET_DEFAULT_STEP_DUE_DATES
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM get_due_dates_and_receivers TABLES ct_wcs_gui_duedate STRUCTURE /cockpit/twcs
ct_receivers STRUCTURE /cockpit/swc_wcreceiver.

DATA: lt_steps TYPE TABLE OF /cockpit/twcs.

REFRESH: ct_wcs_gui_duedate[], ct_receivers[].

LOOP AT gt_webcycle.
gc_wc_id = gt_webcycle-wc_id.
PERFORM web_cycle_changed_0100.
REFRESH lt_steps.
/cockpit/cl_tools=>tls->move_corresponding_table( EXPORTING it_src = gt_steps[]
IMPORTING et_dest = lt_steps ).
APPEND LINES OF lt_steps TO ct_wcs_gui_duedate.

22
PROCESS DIRECTOR Note

PERFORM add_receivers TABLES ct_receivers.


PERFORM add_step_to_msg.

LOOP AT gt_steps INTO gs_steps


FROM 2.

PERFORM wc_step_changed_0100.
PERFORM add_receivers TABLES ct_receivers.
PERFORM add_step_to_msg.
ENDLOOP.
ENDLOOP.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form add_receivers
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM add_receivers TABLES ct_receivers STRUCTURE /cockpit/swc_wcreceiver.
LOOP AT gt_receiver.
CLEAR ct_receivers.
MOVE-CORRESPONDING gs_steps TO ct_receivers.
MOVE-CORRESPONDING gt_receiver TO ct_receivers.
APPEND ct_receivers.
ENDLOOP.
ENDFORM.
*&---------------------------------------------------------------------*
*& Form ADD_STEP_TO_MSG
*&---------------------------------------------------------------------*
* This helps to differentiate messages related to different
* steps
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM add_step_to_msg .
FIELD-SYMBOLS: <ls_msg_pbo> LIKE LINE OF gt_msg_pbo.

LOOP AT gt_msg_pbo ASSIGNING <ls_msg_pbo>


WHERE parameter IS INITIAL.

CONCATENATE gs_steps-wc_step_id gs_steps-wc_pos INTO <ls_msg_pbo>-parameter.


ENDLOOP.
ENDFORM.

14. Open the include /COCKPIT/LWC_PROCI01 and perform the following changes to code:


*>>> DELETE
*---------------------------------------------------------------------*
* Module check_duedate_0100 INPUT
*---------------------------------------------------------------------*
MODULE check_duedate_0100 INPUT.

IF gc_wc_duedate LT sy-datlo.
MESSAGE e089.
ENDIF.
* Due date of step should be lower then due date of workflow

23
PROCESS DIRECTOR Note

IF gc_wc_duedate LT gs_steps-wc_duedate.
gs_steps-def-wc_due_days = gc_wc_duedate.
MESSAGE e167.
ENDIF.

ENDMODULE. " check_duedate_0100 INPUT


*<<< DELETE
*>>> INSERT
*---------------------------------------------------------------------*
* Module check_duedate_0100 INPUT
*---------------------------------------------------------------------*
MODULE check_duedate_0100 INPUT.

IF gr_wf_start_api IS NOT BOUND.


CREATE OBJECT gr_wf_start_api.
ENDIF.

gr_wf_start_api->check_wf_duedate(
EXPORTING id_wc_duedate = gc_wc_duedate
id_step_duedate = gs_steps-wc_duedate
CHANGING cc_step_duedays_corrected = gs_steps-def-wc_due_days
EXCEPTIONS OTHERS = 1 ).

IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.

ENDMODULE. " check_duedate_0100 INPUT


*<<< INSERT

*>>> DELETE
*&---------------------------------------------------------------------*
*& Module check_step_duedate_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE check_step_duedate_0100 INPUT.
* Due date of step (valid to) can not be in the past
IF gs_steps-wc_duedate LT sy-datlo.
MESSAGE e168.
ENDIF.
* Due date of step should be lower then due date of workflow
IF gc_wc_duedate LT gs_steps-wc_duedate.
gs_steps-def-wc_due_days = gc_wc_duedate.
MESSAGE e167.
ENDIF.
ENDMODULE. " check_step_duedate_0100 INPUT
*<<< DELETE
*>>> INSERT
*&---------------------------------------------------------------------*
*& Module check_step_duedate_0100 INPUT
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
MODULE check_step_duedate_0100 INPUT.

IF gr_wf_start_api IS NOT BOUND.


CREATE OBJECT gr_wf_start_api.

24
PROCESS DIRECTOR Note

ENDIF.

gr_wf_start_api->check_step_duedate(
EXPORTING id_wc_duedate = gc_wc_duedate
id_step_duedate = gs_steps-wc_duedate
CHANGING cc_step_duedays_corrected = gs_steps-def-wc_due_days
EXCEPTIONS OTHERS = 1 ).

IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDMODULE. " check_step_duedate_0100 INPUT
*<<< INSERT

15. Save and activate all the changes

25

You might also like