SAP BW .....all info @ one place
SAP BW relevant Information
Loading
Showing posts with label infopak. Show all posts
Showing posts with label infopak. Show all posts

Some times our requirement comes like we can not use any of standard scheduling functions available to start a process chain or an infopackage or a Job.

Ex: Process chain has to start at 3 different Odd times in a day(like: 7, 12, 20 hours).
Or some chains has to be started based on some other loads success or failure...
Or we have to use same process chain multiple times instead of including more infopacakges...etc

For above requirements, to control process chain effectively it better to start Process chain or Job or infopackage through an Event.

T Code : SM62 --> To Create an Event.
T Code : SE38 --> To Create an ABAP Program
Use Function Module : BP_EVENT_RAISE to raise an event.

Scenario: First day of week weekly load has to start first. Remaining days in weeks daily load has to run 2 different times in a day(ex: 6 and 20 hours)

Steps:

1. Create a Process Chain1 and Schedule it based on event and check periodic check box.

2. Create a Process Chain2 and include below ABAP program and schedule it for every one hour(24 X7) periodically. So this chain will trigger Process Chain1, based on conditions specified in ABAP Program.

3. See below doc : How to ... Integrate ABAP Program in Process Chain

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7

Sample Coding:
SELECTION-SCREEN BEGIN OF BLOCK Daily_Loads WITH FRAME TITLE TEXT-001.
SELECTION-SCREEN COMMENT /1(50) COMM0001.
Parameters : Dly_Ld1(2) type c.
Parameters : Dly_Ld2(2) type c.
SELECTION-SCREEN END OF BLOCK Daily_Loads.


SELECTION-SCREEN BEGIN OF BLOCK Weekly_Load WITH FRAME TITLE TEXT-002.
SELECTION-SCREEN COMMENT /1(50) COMM0002.
Parameters : Wkly_Ld1(2) type c.
SELECTION-SCREEN END OF BLOCK Weekly_Load.


Data : hour(2) type c.
Data: l_cweek type /BI0/OICALWEEK.
Data: l_fdate type /BIC/OISSS_DATE.
Data: l_date type /bic/OISSS_DATE.


INITIALIZATION.
MOVE 'Input Daily Load Timings in 24Hour Format' TO COMM0001.
MOVE 'Input Weekly Load Timings in 24Hour Format' TO COMM0002.
clear hour.
hour = sy-timlo(2).


****Code to get First day of Fiscal Week
CALL FUNCTION 'ZBW_DATE_GET_FISCAL_WEEK'
EXPORTING
DATE = sy-datum
IMPORTING
WEEK = l_cweek.


CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
WEEK = l_cweek
IMPORTING
DATE = l_fdate .
move sy-datum to l_date.


START-OF-SELECTION.
if l_fdate = l_date and hour = Wkly_Ld1.

CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = 'SSS_OBSS_WEEKLY_LOAD'
* EVENTPARM = ' '
* TARGET_INSTANCE = ' '
* EXCEPTIONS
* BAD_EVENTID = 1
* EVENTID_DOES_NOT_EXIST = 2
* EVENTID_MISSING = 3
* RAISE_FAILED = 4
* OTHERS = 5.

elseif hour = Dly_Ld1 or hour = Dly_Ld2.

CALL FUNCTION 'BP_EVENT_RAISE'
EXPORTING
EVENTID = 'SSS_OB_SALES_DATA_LOAD'
* EVENTPARM = ' '
* TARGET_INSTANCE = ' '
* EXCEPTIONS
* BAD_EVENTID = 1
* 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.
ENDIF.


While execution we can specify Daily load and weekly load times in selection screen(as below). We can create variant and assign in process chain to automate.
Provide values in selection screen and save a variant.

 

1.Create an Infopackage 2. Go to selections tab and choose Type: 6 – ABAP Routine.You can see following available options(F4 Help).

3. Give disruption, and hit enter, now you will move to following screen. 4. Write Code between begin of Routine and End of Routine.

5. See below sample code to select date range from Previous 6 days to Current date.

6. L_T_Range table is of Type structure RSSDLRANGE.
a. RSSDLRANGE contains SIGN, OPTION, LOW, HIGH
We need to populate these fields to pass range dynamically.
Sample Code:
****$*$ begin of routine - insert your code only below this line *-*
Data: l_idx like sy-tabix.
Data: date_low like sy-datum.
Date_low = sy-datum – 6.”(To get 6 days back).
read table l_t_range with key
fieldname = 'CRDAT'.
l_idx = sy-tabix.
*** Pass Range values to L_T_Range Table.
Move date_low to L_T_Range -Low.
Move sy-datum to L_T_Range -High.
L_T_Range -Sign = ‘I’. *****(Here: I – Include, E – Exclude)
L_T_Range -Option = ‘BT’.****( Here: BT – Between )
modify l_t_range index l_idx.
p_subrc = 0.

***$*$ end of routine - insert your code only before this line *-*

7. Syntax check and Save.

 

BW Useful Tables

Posted In: , , , , , , , , , , , , , , , , , , , . By Srinivas Neelam


Custome Infoobjects
Tabels:
/BIC/M --
View of Master data Tables
/BIC/P -- Master data Table, Time Independent attributes
/BIC/Q -- Master data Table, Time Dependent attributes
/BIC/X -- SID Table, Time Independent
/BIC/Y -- SID Tabel, Time Dependent
/BIC/T -- Text Table
/BIC/H -- Heirarchy Table
/BIC/K -- Heirarchy SID Table

Standard Infoobjects Tabels(Buss. Content):
Replace "C" with "0" in above tables.
Ex:
/BI0/M -- View of Master data Tables


Standard InfoCUBE Tables :
/BI0/F --
Fact Table(Before Compression)
/BI0/E -- Fact Table(After Compression)
/BI0/P -- Dimension Table - Data Package
/BI0/T -- Dimension Table - Time
/BI0/U -- Dimension Table - Unit
/BI0/1, 2, 3, .......A,B,C,D : -- Dimension Tables

BW Tables:
BTCEVTJOB -- To check List of jobs waiting for events
ROOSOURCE -- Control parameters for Datasource
ROOSFIELD -- Control parameters for Datasource
ROOSPRMSC -- Control parameters for Datasource
ROOSPRMSF -- Control parameters for Datasource
-- More info @
ROOSOURCE weblog
RSOLTPSOURCE -- Replicate Table for OLTP source in BW
RSDMDELTA -- Datamart Delta Management
RSSDLINITSEL, RSSDLINITDEL
--
Last valid Initialization to an OLTP Source
RSUPDINFO -- Infocube to Infosource correlation
RSUPDDAT -- Update rules key figures
RSUPDENQ -- Removal of locks in the update rules
RSUPDFORM -- BW: Update Rules - Formulas - Checking Table
RSUPDINFO -- Update info (status and program)
RSUPDKEY -- Update rule: Key per key figure
RSUPDROUT -- Update rules - ABAP routine - check table
RSUPDSIMULD -- Table for saving simulation data update
RSUPDSIMULH -- Table for saving simulation data header information
RSDCUBEIOBJ -- Infoobjects per Infocube
RSIS -- Infosouce Info
RSUPDINFO -- Update Rules Info
RSTS -- Transfer Rules Info
RSKSFIELD -- Communication Structure fields
RSALLOWEDCHAR -- Special Characters Table(T Code : RSKC, To maintain)
RSDLPSEL -- Selection Table for fields scheduler(Infpak's)
RSDLPIO -- Log data packet no
RSMONICTAB -- Monitor, Data Targets(Infocube/ODS) Table, request related info
RSTSODS -- Operational data store for Transfer structure
RSZELTDIR -- Query Elements
RSZGLOBV -- BEx Variables
RXSELTXREF, RSCOMPDIR -- Reports/query relavent tables
RSCUSTV -- Query settings
RSDIOBJ -- Infoobjects

RSLDPSEL -- Selection table for fields scheduler(Info pak list)
RSMONIPTAB -- InfoPackage for the monitor
RSRWORKBOOK -- Workbooks & related query genunid's
RSRREPDIR -- Contains Genuin id, Rep Name, author, etc...
RSRINDEXT -- Workbook ID & Name
RSREQDONE -- Monitor: Saving of the QM entries
RSSELDONE -- Monitor : Selection for exected requests
RSLDTDONE -- Texts on the requeasted infopacks & groups
RSUICDONE -- BIW: Selection table for user-selection update Infocubes's
RSSDBATCH -- Table for Batch run scheduler
RSLDPDEL -- Selection table for deleting with full update scheduler
RSADMINSV -- RS Administration

RSSDLINIT -- Last Valid Initializations to an OLTP Source
BTCEVTJOB --To check event status(scheduled or not)
VARI -- ABAP Variant related Table
VARIDESC -- Selection Variants: Description

SMQ1 -- QRFC Monitor(Out Bound)
SM13 -- Update Records status

T Code : LBWQ --> QRFC related Tables
TRFCQOUT,
QREFTID,
ARFCSDATA

More info @
Note 728687 - Delta queued: No data in RSA7






 

How to Papers, related to BW direct download

Google
 

Recent Posts

SAP Jobs