user triggered adhoc loading scenario for fast end-closing...user triggered adhoc loading scenario...

18
User Triggered Adhoc Loading Scenario for Fast End-Closing Applies to: SAP NetWeaver 2004 and SAP NetWeaver 2004s. BW 3.5 & BI 7.0. For more information, visit the Business Intelligence homepage . Summary This Document describes how to set up a user controlled adhoc loading scenario from an ECC system to a BI system. To be able to fast close on month ends or view currently loaded data a user has to rely on process chain updates. This document explains how to set up an environment where multiple users can execute the process chains to get current data. Author: Gokul Muthuswamy Company: Smart Modular Technologies Created on: 14 March 2009 Author Bio Gokul Muthuswamy is a Senior BI Analyst at Smart Modular Technologies, a leading provider of memory products and LCD solutions for top-tier OEM’s. He manages SMART’s worldwide BI/BCS implementations and support projects. His current NetWeaver interests include Performance Management, BI interoperability, Extended Analytics, BPM, Data Warehousing optimizations. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1

Upload: others

Post on 06-Apr-2020

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Applies to: SAP NetWeaver 2004 and SAP NetWeaver 2004s. BW 3.5 & BI 7.0.

For more information, visit the Business Intelligence homepage.

Summary This Document describes how to set up a user controlled adhoc loading scenario from an ECC system to a BI system. To be able to fast close on month ends or view currently loaded data a user has to rely on process chain updates.

This document explains how to set up an environment where multiple users can execute the process chains to get current data.

Author: Gokul Muthuswamy

Company: Smart Modular Technologies

Created on: 14 March 2009

Author Bio Gokul Muthuswamy is a Senior BI Analyst at Smart Modular Technologies, a leading provider of memory products and LCD solutions for top-tier OEM’s. He manages SMART’s worldwide BI/BCS implementations and support projects. His current NetWeaver interests include Performance Management, BI interoperability, Extended Analytics, BPM, Data Warehousing optimizations.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 1

Page 2: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Table of Contents Business Scenario ..............................................................................................................................................3

Solution ...........................................................................................................................................................3 Overview and Procedure to Setup the Model .................................................................................................3 Step 1: Creation of process chain to pull the data from source system .........................................................4 Step 2: Creation of event for the process .......................................................................................................5 Step 3: Creating a table to log entries of this process ....................................................................................6 Step 4: ABAP program to trigger and read logs for the process chains .........................................................6 Step 5: ABAP programs to trigger email completion or error in the process chain ......................................10 Step 6: Linking the programs to the process chain.......................................................................................14 Step 7: Creating a transaction code for users to run the process chain.......................................................15 Step 8: Creating a distribution list for the users to use this chain.................................................................16 Step 9: Creation of a job to trigger the process chain on regular time intervals ...........................................16

Conclusion ........................................................................................................................................................17 Related Content................................................................................................................................................17 Disclaimer and Liability Notice..........................................................................................................................18

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 2

Page 3: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Business Scenario For month end or quarter end closing, there will be last minute entries in the transaction (ECC or R/3) systems. If the postings are to be done worldwide then the manager has to rely on the users to post entries before a time frame for the process chain to pull those data entries e.g. a profit center process chain to pull 0EC_PCA_3 datasource entries. If not someone has to manually run the process chain to bring in those entries.

Solution To provide a transaction code in BI system for users to trigger the process chain as soon as they are done with their postings. Flash the status if busy when they execute the transaction and notify the user as well as the production support team upon completion or in case of errors. The screen for the user is as shown:

In case the process is already triggered it should show a message

Upon completion the user will receive a completion email and the transaction is available for others to trigger.

Overview and Procedure to Setup the Model

Overview of Steps

1. Creation of process chain to pull the data from source system.

2. Creating event for the process.

3. Creating a table to log entries of this process.

4. Writing an ABAP program to trigger and read logs for the process chains.

5. Writing ABAP programs to trigger email completion or error emails in the process chain.

6. Linking the programs to the process chain.

7. Creating a transaction code for users to run the process chain.

8. Creating a distribution list for the users to use this chain.

9. Creation of a job to trigger the process chain on regular time intervals.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 3

Page 4: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Step 1: Creation of process chain to pull the data from source system

Create a Local Chain to pull data from source system in this case ECC6.0.

Each step is associated with email alerts in case of errors.

Next step is the creation of Master Chain to trigger this local chain. This model helps us to trigger alert in case of errors in any step of the local process chain.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 4

Page 5: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

The variant of the start is set to trigger after event.

Step 2: Creation of event for the process

In transaction SM62, an event is created for background processing event with the same name as the event used in the variant in step 1.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 5

Page 6: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Step 3: Creating a table to log entries of this process

The table ZRSPCLOG1 is created with the following fields to log the process chain data and to prevent overlap of triggering process which will be explained in step 4.

Step 4: ABAP program to trigger and read logs for the process chains

The program has three parts, first part is to provide a screen for executing the transaction, the second part is to trigger the process chain and to update the log table, and the third part is to post a message to SAPMAIL.

First Part:

* Selection screen SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-t01. SELECTION-SCREEN BEGIN OF LINE. PARAMETERS: p_pcrun TYPE c AS CHECKBOX DEFAULT 'X'. SELECTION-SCREEN: COMMENT 4(60) text-001, END OF LINE. SELECTION-SCREEN : END OF BLOCK b1. The text elements for the screen are also maintained.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 6

Page 7: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Second Part:

The program now triggers the chain. If the chain is still running the program sends a message saying the trigger is already activated by someone else and to try later. If not then it will trigger the process chain and write the log details to table ZRSPCLOG1.

** data declaration. CONSTANTS: c_check TYPE as4flag VALUE 'X'. DATA: id LIKE tbtcstrt-eventid, param LIKE tbtcstrt-eventparm. DATA: it_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE, it_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE, it_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE, it_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE, objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE, gd_cnt TYPE i, gd_sent_all(1) TYPE c, gd_doc_data LIKE sodocchgi1, gd_error TYPE sy-subrc. DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0 WITH HEADER LINE. DATA: tab_lines LIKE sy-tabix. DATA: wa_rspclog TYPE zrspclog1. DATA: wa_rspctrigger TYPE rspctrigger. START-OF-SELECTION. * trigger process chain. IF p_pcrun = c_check. * check if its been already running. SELECT SINGLE * INTO wa_rspclog FROM zrspclog1 WHERE rspc_name = 'ECPCA'. IF NOT sy-subrc EQ 0. PERFORM raise_event. ELSE. WRITE: /2 'EC-PCA refresh is already activated by user: ', wa_rspclog-uname. WRITE: /2 'Started date:', wa_rspclog-start_date. WRITE: /2 'Started time:', wa_rspclog-start_time. WRITE: /2 'Please re-schedule later.' . ENDIF. ENDIF. *&---------------------------------------------------------------------* *& Form RAISE_EVENT *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM raise_event . id = 'ECPCA_3'. param = 'BCS'. DATA: wa_rspclog TYPE zrspclog1. CALL FUNCTION 'RSSM_EVENT_RAISE' EXPORTING i_eventid = id i_eventparm = param EXCEPTIONS bad_eventid = 1

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 7

Page 8: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

eventid_does_not_exist = 2 eventid_missing = 3 raise_failed = 4 OTHERS = 5. IF sy-subrc <> 0. * MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno * WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSE. * Here find out process chain name and remember user. wa_rspclog-mandt = sy-mandt. * Track process chain wa_rspclog-rspc_name = 'ECPCA'. wa_rspclog-uname = sy-uname. wa_rspclog-start_date = sy-datum. wa_rspclog-start_time = sy-uzeit. MODIFY zrspclog1 FROM wa_rspclog. IF sy-subrc EQ 0. COMMIT WORK. PERFORM send_mail. ENDIF. ENDIF. ENDFORM. " RAISE_EVENT

Third Part:

The program now sends an email to the user who triggers the process chain, so the user list who will receive the email must be maintained in a distribution list.

*&---------------------------------------------------------------------* *& Form send_mail *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * --> p1 text * <-- p2 text *----------------------------------------------------------------------* FORM send_mail . DATA : v_msgtext(100). * fill the document data. gd_doc_data-doc_size = 1. * Populate the subject/generic message attributes gd_doc_data-obj_langu = sy-langu. gd_doc_data-obj_name = 'PC_STATUS'. gd_doc_data-sensitivty = 'F'. * Modified receipient list. REFRESH it_receivers. * Pre-requisite is to maintain distribution list with name of user-id. IF NOT sy-batch EQ 'X'. it_receivers-receiver = sy-uname. "'PCA_BCS_UPD'. it_receivers-rec_type = 'C'. it_receivers-com_type = 'INT'. APPEND it_receivers. CONCATENATE 'ECPCA-BCS refresh started by:' sy-uname 'on' sy-datum sy-uzeit INTO it_message SEPARATED BY space. APPEND it_message. ELSE.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 8

Page 9: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

it_receivers-receiver = 'BW_IT’. it_receivers-rec_type = 'C'. it_receivers-com_type = 'INT'. APPEND it_receivers. CONCATENATE 'ECPCA-BCS refresh scheduled in background by:' sy-uname * 'on' sy-datum sy-uzeit INTO it_message SEPARATED BY space. APPEND it_message. ENDIF. *subject CONCATENATE 'ECPCA-BCS refresh is triggered by user:' sy-uname INTO gd_doc_data-obj_descr SEPARATED BY space. * Describe the body of the message CONCATENATE 'Start date:' sy-datum INTO it_message SEPARATED BY space . APPEND it_message. CONCATENATE 'Start time:' sy-uzeit INTO it_message SEPARATED BY space . APPEND it_message. DESCRIBE TABLE it_message LINES tab_lines. READ TABLE it_message INDEX tab_lines. * Information about structure of data tables CLEAR it_packing_list. REFRESH it_packing_list. it_packing_list-transf_bin = space. it_packing_list-head_start = 1. it_packing_list-head_num = 0. it_packing_list-body_start = 1. DESCRIBE TABLE it_message LINES it_packing_list-body_num. it_packing_list-doc_type = 'INT'. APPEND it_packing_list. * Call the FM to post the message to SAPMAIL CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = gd_doc_data put_in_outbox = 'X' commit_work = 'X' IMPORTING sent_to_all = gd_sent_all TABLES contents_txt = it_message receivers = it_receivers packing_list = it_packing_list EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 document_type_not_exist = 3 operation_no_authorization = 4 parameter_error = 5 x_error = 6 enqueue_error = 7 OTHERS = 8. IF sy-subrc EQ 0. SUBMIT rsconn01 WITH mode = 'INT' * WITH output = 'X' AND RETURN. ENDIF. ENDFORM. " send_mail

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 9

Page 10: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Step 5: ABAP programs to trigger email completion or error in the process chain

Error Program:

In case of errors in the process chain, both user who triggered the process chain and the production support team must be notifies via alert emails, the following program is for send error alert emails. DATA: l_unique_id TYPE sysuuid_25, e_instance TYPE sysuuid_25, e_state TYPE char255, wa_message TYPE char255. * ... Get Instance CALL FUNCTION 'RSSM_UNIQUE_ID' IMPORTING e_uni_idc25 = l_unique_id. e_instance = l_unique_id. DATA: gd_doc_data TYPE sodocchgi1, psubject(50) TYPE c, wit_packing_list TYPE sopcklsti1 , wit_receivers TYPE somlreci1 , t_mailid TYPE TABLE OF zsunmail. DATA: it_packing_list TYPE TABLE OF sopcklsti1 , it_receivers TYPE TABLE OF somlreci1 , t_message TYPE STANDARD TABLE OF solisti1. DATA: w_rec TYPE sy-uname. DATA: w_uname TYPE sy-uname. DATA: wa_rspclog TYPE zrspclog. e_state = 'G'. SELECT * INTO wa_rspclog FROM zrspclog1 WHERE rspc_name = 'ECPCA'. ENDSELECT. CHECK sy-subrc EQ 0. psubject = 'ECPCA-BCS refresh is failed '. * Fill the document data. gd_doc_data-doc_size = 1. * Populate the subject/generic message attributes gd_doc_data-obj_langu = sy-langu. gd_doc_data-obj_name = 'PC_STATUS'. gd_doc_data-obj_descr = psubject. * gd_doc_data-priority = '1'. gd_doc_data-sensitivty = 'F'. "Confidential. * wa_message = psubject. * APPEND wa_message TO t_message. IF NOT wa_rspclog-uname IS INITIAL. w_rec = wa_rspclog-uname. ELSE. w_rec = 'BW_IT_SUPPORT'. ENDIF. CONCATENATE 'ECPCA-BCS refresh executed by: ' w_rec 'is failed.' INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 10

Page 11: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

CONCATENATE 'Refresh start date: ' wa_rspclog-start_date INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message. CONCATENATE 'Start time: ' wa_rspclog-start_time INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message. * Describe the body of the message CLEAR it_packing_list. DESCRIBE TABLE t_message LINES wit_packing_list-body_num. REFRESH it_packing_list. wit_packing_list-transf_bin = space. wit_packing_list-head_start = 1. wit_packing_list-head_num = 0. wit_packing_list-body_start = 1. DESCRIBE TABLE t_message LINES wit_packing_list-body_num. * it_packing_list-body_num = 100. wit_packing_list-doc_type = 'INT'. APPEND wit_packing_list TO it_packing_list. * Add the recipients email address CLEAR wit_receivers. REFRESH it_receivers. wit_receivers-com_type = 'INT'. wit_receivers-rec_type = 'C'. wit_receivers-receiver = w_rec. APPEND wit_receivers TO it_receivers. * Call the FM to post the message to SAPMAIL CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = gd_doc_data put_in_outbox = 'X' commit_work = 'X' * IMPORTING * sent_to_all = gd_sent_all TABLES packing_list = it_packing_list contents_txt = t_message receivers = it_receivers EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 document_type_not_exist = 3 operation_no_authorization = 4 parameter_error = 5 x_error = 6 enqueue_error = 7 OTHERS = 8. IF sy-subrc EQ 0. * SUBMIT rsconn01 WITH mode = 'INT' ** WITH output = 'X' * AND RETURN. ENDIF.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 11

Page 12: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Completion Program:

Upon completion of a successful process chain run, the user who triggered should be notified of completion and the table ZRSPCLOG1 should be deleted for the next scheduled run or triggered run. DATA: e_instance type sysuuid_25, e_state type char255, l_unique_id TYPE sysuuid_25, wa_message TYPE char255. * ... Get Instance CALL FUNCTION 'RSSM_UNIQUE_ID' IMPORTING e_uni_idc25 = l_unique_id. e_instance = l_unique_id. DATA: gd_doc_data TYPE sodocchgi1, psubject(50) TYPE c, wit_packing_list TYPE sopcklsti1 , wit_receivers TYPE somlreci1 , t_mailid TYPE TABLE OF zsunmail. DATA: it_packing_list TYPE TABLE OF sopcklsti1 , it_receivers TYPE TABLE OF somlreci1 , t_message TYPE STANDARD TABLE OF solisti1. DATA: w_rec TYPE sy-uname. DATA: w_uname TYPE sy-uname. DATA: wa_rspclog TYPE zrspclog1. SELECT * INTO wa_rspclog FROM zrspclog1 WHERE rspc_name = 'ECPCA'. ENDSELECT. CHECK sy-subrc EQ 0. e_state = 'G'. DELETE zrspclog1 FROM wa_rspclog. psubject = 'ECPCA-BCS refresh is completed successfully.'. * Fill the document data. gd_doc_data-doc_size = 1. * Populate the subject/generic message attributes gd_doc_data-obj_langu = sy-langu. gd_doc_data-obj_name = 'PC_STATUS'. gd_doc_data-obj_descr = psubject. * gd_doc_data-priority = '1'. gd_doc_data-sensitivty = 'F'. "Confidential. * wa_message = psubject. * APPEND wa_message TO t_message. IF NOT wa_rspclog-uname IS INITIAL. w_rec = wa_rspclog-uname. ELSE. w_rec = 'BW_IT_FIGL'. ENDIF.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 12

Page 13: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

CONCATENATE 'ECPCA-BCS refresh executed by:' w_rec 'is now completed.' INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message. CONCATENATE 'Refresh start date: ' wa_rspclog-start_date INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message. CONCATENATE 'Refresh start time: ' wa_rspclog-start_time INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message. CONCATENATE 'End date: ' sy-datum INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message. CONCATENATE 'End time: ' sy-uzeit INTO wa_message SEPARATED BY space. APPEND wa_message TO t_message. * Describe the body of the message CLEAR it_packing_list. DESCRIBE TABLE t_message LINES wit_packing_list-body_num. REFRESH it_packing_list. wit_packing_list-transf_bin = space. wit_packing_list-head_start = 1. wit_packing_list-head_num = 0. wit_packing_list-body_start = 1. DESCRIBE TABLE t_message LINES wit_packing_list-body_num. * it_packing_list-body_num = 100. wit_packing_list-doc_type = 'INT'. APPEND wit_packing_list TO it_packing_list. * Add the recipients email address CLEAR wit_receivers. REFRESH it_receivers. wit_receivers-com_type = 'INT'. wit_receivers-rec_type = 'C'. wit_receivers-receiver = w_rec. APPEND wit_receivers TO it_receivers. * Call the FM to post the message to SAPMAIL CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' EXPORTING document_data = gd_doc_data put_in_outbox = 'X' commit_work = 'X' * IMPORTING * sent_to_all = gd_sent_all TABLES packing_list = it_packing_list contents_txt = t_message receivers = it_receivers EXCEPTIONS too_many_receivers = 1 document_not_sent = 2 document_type_not_exist = 3 operation_no_authorization = 4 parameter_error = 5 x_error = 6 enqueue_error = 7 OTHERS = 8.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 13

Page 14: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

IF sy-subrc EQ 0. * SUBMIT rsconn01 WITH mode = 'INT' ** WITH output = 'X' * AND RETURN. ENDIF.

Step 6: Linking the programs to the process chain

The Completion and Error Emails process types will be responsible for the email alerts to the user and the IT support in case of errors.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 14

Page 15: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Step 7: Creating a transaction code for users to run the process chain

Now the users must be given a transaction code for triggering the program to run the process chain. This is done in transaction se93. Creating a tcode “ZECPCAUPD” with the program to trigger process created in Step 4.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 15

Page 16: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Step 8: Creating a distribution list for the users to use this chain

The distribution list must be created as exact to the one used in the ABAP code, for this example 'PCA_BCS_UPD' being the IT group receiver and individual user name for individual triggers. This is done in transaction so15. Maintain the list of users for email alerts in the distribution list.

Step 9: Creation of a job to trigger the process chain on regular time intervals

In addition to the trigger by users, the chain needs to do its normal scheduled run which is taken care in sm36 to run a background job to schedule the event to trigger the process chain. The Program to trigger the chain is maintained in the step and the required job frequency is setup.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 16

Page 17: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

Conclusion The provided example is for a specific extraction, but the same procedure can be applied to any extraction where a user required control over the extraction process by controlling any of the process chains.

Related Content https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.highlightedcontent?DocumentUri=%2Flibrary%2Fbusiness-intelligence%2Fs-u%2FTo+Check+the+Files_Reports+in+Application+Server+and+trigger+mail+alerts.pdf

https://wiki.sdn.sap.com/wiki/x/xAY https://wiki.sdn.sap.com/wiki/x/ZoHaB

For more information, visit the Business Intelligence homepage.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 17

Page 18: User Triggered Adhoc Loading Scenario for Fast End-Closing...User Triggered Adhoc Loading Scenario for Fast End-Closing Step 1: Creation of process chain to pull the data from source

User Triggered Adhoc Loading Scenario for Fast End-Closing

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG 18

Disclaimer and Liability Notice This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document, and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or code sample, including any liability resulting from incompatibility between the content within this document and the materials and services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of this document.