Process Chain: A process chain is a sequence of processes that are scheduled to wait in the background for an event. Some of these processes trigger a separate event that can, in turn, start other processes.

Data Manager Package: Data Manager is a Business Planning and Consolidation (BPC) module that helps you move data in to BPC, as well as copy or move data within and across applications. In addition to allowing you to move and copy data, Data Manager supports mapping and complex transformations of data.

Business Scenario: Sometimes we need to include or trigger Data Manager Package/ Package Link as one of the process step in process chain. Unfortunately there is no delivered process type to trigger DM package but we can use ABAP process type and UJD_TEST_PACKAGE or UJD_TEST_PACKAGE_LINK ABAP programs to trigger DM Package/ Package Link.

Business Expectation: Process chain should trigger the next step only when the triggered DM Package status is Green / Success but RUN_PACKAGE (class which runs in backend) will trigger the package but won’t wait until it finishes.

For Example: We are triggering DM Package to copy ‘Actual’ Category to ‘Forecast’ Category in one step and then Copy Actuals from BW to BPC which means the First step should complete successfully, only then we can execute next step.

Solution: Unfortunately there is no delivered Process types or Programs to control the process chain flow by Data Manager Package status but following ABAP classes/ Function modules will help us to overcome this issue. Below are the steps to check the status of the DM Package link and trigger the next step by its status.

Process_chain

Steps:

  1. Create ABAP program and Execute DM Package using UJD_TEST_PACKAGE or we can use RUN_PACKAGE method directly.
  2. Use GET_JOB_RUNTIME_INFO Function module to get current Job Count.
  3. Use RS_VARIANT_CONTENTS Function module to get Variant Contents by exporting Program name and its Variants.
  4. Select UJD_LINK_LOG table by filtering Link ID, Job ID and Job name whereas Job name is BI_PROCESS_ABAP and Job ID is current job count and Link ID is which we got from RS_VARIANT_CONTENTS.
  5. Use PROCESS_RESULT field to check the status whereas 0 = Running, 1 = Success, 2 or more = Error.
  6. You can raise error message according to the PROCESS_RESULT value to stop or continue the process chain.

 

Below is the ABAP code to check DM Package link status.

abap_source_codesource_code