From the reporting requirement to the reporting solution based on SAP BW/BO
How to get data based on calmonth on the input of Fiscal year period(Real time Scenario)
Real time Scenario:
In one of our Major KPI project where we were integrating the KPI's from different modules like SD,MM,FI,QM,PP and of course inventory as well into WebI.
In our final WebI report the input was based on Fiscal year period and at very later stage we realized that our inventory cube does not have data based on fiscal year period rather it is based on calmonth.As it was inventory cube and we did not want to mess up with it because of huge data and for the fact it was inventory cube.Options like Remodeling was ruled out for the same reason. So we thought of some workaround without disturbing the inventory cube.I would not be doing justice to this document if i do not give credit to my colleague ASHUTOSH SINGH .
Approach:
We initially thought to create a Multiprovider combining inventory cube and 0FISCPER Infoobject but as 0FISCPER is not an infoprovider so multiprovder did not allow us to add that.Eventually we came up with an idea to create a dummy DSO and in it add the 0FISCPER Infoobject and some keyfigure to complete its definition.We did the characteristic assignment for necessary objects required to develop the report and also for 0FISCPER from dummy DSO.
Data Flow Display:
At BEx Level:
- Take any Keyfigure and drag and drop 0FISCPER--restrict with user input variable--Single value.This will act as dummy keyfigure which will facilitate the user with the input based on fiscal year period.Refer the screenshot
- Now make the copy of same KF and drag and drop 0CALMONTH--Restrict with customer exit variable.This Keyfigure will finally be used in report.
Refer the Screenshot.
CMOD Code:
******************Code for webi to get calmonth based on Fiscper input*******************
DATA: zcalyear type /BI0/OICALYEAR,
MM(2) type n,
ZMONTH type /BI0/OICALMONTH.
when 'ZVAR_MONTH_CMOD'. -----Customer Exit variable
READ TABLE i_t_var_range INTO l_t_var_range WITH KEY vnam = 'ZFPER_STEP2'. -----User input variable based on Fiscal year period
IF sy-subrc = 0.
clear l_s_range.
zcalyear = l_t_var_range-low+0(4).
MM = l_t_var_range-low+5(2).
CONCATENATE zcalyear mm into ZMONTH.
L_S_RANGE-LOW = ZMONTH.
L_S_RANGE-SIGN = 'I'.
L_S_RANGE-OPT = 'EQ'.
APPEND L_S_RANGE TO E_T_RANGE.
ENDIF.
Conclusion:
After following the above approach we got that data based on calmonth on the input of Fiscal year period that too without disturbing the existing inventory cube.
Using Selective deletion in a Process Chain with a filter from the TVARVC table
The issue below took me quite some time to figure out and we needed multiple documents and blogs as a reference. Therefor I thought it would be a good idea to add the information we figured out in a blog post and share it with you all.
Regards,
Rob
Scope:
Based on the document “Using Selective Deletion in Process Chains” by Surendra Kumar Reddy Koduru (08-03-2009) we tried to selectively delete data from an infocube. However we faced that his document described a variable that was already available and based on a date. We however needed to have a variable based on a regular info object with his attributes. The article from Shai Greenberg provides a reference to how to solve it, but doesn’t provide the full steps. So therefor, this document is a full detailed reference guide on how to build a selective deletion with dynamic variables based on a info object that is not time related.
Steps:
- Add a selection variable to the TVARVC table.
- Create a program and variant for the selective deletion of the cube with transaction DELETE_FACTS.
- Create an ABAP Program to insert the dynamic variables in the TVARVC table.
- Add the ABAP Program from step 3 and step 2 to the process chain.
Step 1: Add a selection variable to the TVARVC table
- Go to the TVARVC table with the transaction code STVARV. Click on edit. Make sure to be on the “Selection Options” tab.
- Click on create. A blank line is added.
- Fill a name for the Selection Option.
- Note: If you want to transport the changed entries from the TVARVC table, make sure to select the “Include changed entries in transport request” option.
Step 2: Create a program and variant for the selective deletion of the cube
In this step we will use the document from Surendra Kumar Reddy Koduru - Using Selective Deletion in Process Chains.
- Go to the DELETE_FACTS transaction.
- Fill in your data target from where selective deletion needs to be done (cube). Make sure to select “Generate selection program” and click on execute. A Name of report will be shown. Copy this program name in a notepad file.
- Take this program name and go to SE38 and insert program name in the Program field. Click on Variants option and click on Change.
- Fill in a name of a variant and click on Create.
- A selection screen will be shown. We want to delete data based on Company Code. Click on Company code and press F1 for info about this screen field.
- In the help menu, click the “Technical Information” button and note the Screen Field name. In our case this is Screen Field C004.
or - Go back to the Maintain Variant screen and select the Attributes button.
- If not already visible, add technical names to the table. Select C004 or Company Code and select the Selection Variable field on this row.
- Select T: Table Variable from TVARVC (only option available).
- Go to the Name of Variable (Input Only Using F4) and select the variable created in Step 1.
- Save the table.
We have now created a program with a variable on company code that will delete a selection in the cube.
Step 3: Create an ABAP Program to insert the dynamic variables in the TVARVC table
At this moment the variable will not be inserting data in the TVARVC table. We will do that with a separate ABAP Program.
- Go to SE38 and create a new program based on source code.
- For our selection, we used the following code, where ZCCACTIS is an attribute from 0compcode and indicator if the company code needs to be deleted.
REPORT ZP_VAR_COMPCODE.
TABLES: tvarvc.
Data: lv_compcode type /bic/oizcompcode,
lt_compcode type STANDARD TABLE OF /BIC/MZCOMPCODE,
it_compcode type STANDARD TABLE OF /BIC/MZCOMPCODE,
lt_tvarvc type STANDARD TABLE OF tvarvc,
lv_numb type i,
wa_compcode like LINE OF it_compcode.
FIELD-SYMBOLS: <fs_compcode> type /BIC/MZCOMPCODE,
<fs_it_ compcode > type /BIC/MZCOMPCODE.
START-OF-SELECTION.
refresh: lt_ compcode.
select * from /BIC/MZCOMPCODE
into CORRESPONDING FIELDS OF TABLE lt_compcode
WHERE OBJVERS = 'A'
AND /BIC/ZCCACTIS = 'Y'.
DATA :
gs_tvarvc TYPE tvarvc.
CONSTANTS: c_s TYPE rsscr_kind VALUE 'S'.
delete from tvarvc where name = 'ZSO_COMPCODE'.
clear wa_compcode.
lv_numb = 0.
loop at lt_compcode into wa_compcode.
gs_tvarvc-mandt = '120'.
gs_tvarvc-low = wa_compcode-/bic/oizcompcode.
gs_tvarvc-sign = 'I'.
gs_tvarvc-opti = 'EQ'.
gs_tvarvc-name = 'ZSO_COMPCODE'.
gs_tvarvc-type = c_s.
gs_tvarvc-numb = lv_numb.
lv_numb = lv_numb + 1.
append gs_tvarvc to lt_tvarvc.
endloop.
insert tvarvc FROM table lt_tvarvc ACCEPTING DUPLICATE KEYS.
FREE: gs_tvarvc. - Adjust the report to your own needs and save the report.
- If you want, you can run the program. After that go to the TVARVC table and check if the data is correctly loaded in the selection fields.
Step 4: Add the ABAP Programs from step 2 and 3 to the process chain
- 1) Add the two programs to the required process chain.
- 2) Run the process chain and check if the selective deletion is done correctl
References:
Using Selective Deletion in Process Chains
by Surendra Kumar Reddy Koduru – 08 March 2009
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/603a9558-0af1-2b10-86a3-c685c60071bc?QuickLink=index&overridelayout=true&39569533701241
ABAP: Dynamic Variant Processing with STVARV
By Anish Kosky Oommen – 24 February 2011
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f05b0f0a-db27-2e10-b4a4-a0272a80f833?QuickLink=index&overridelayout=true
Partial Full Load using Dynamic Infopackage Selection, Selective Deletion and Dynamic Variant Processing
By Shai Greenberg – 20 June 2012
http://scn.sap.com/community/data-warehousing/netweaver-bw/blog/2012/06/20/partial-full-load-using-dynamic-infopackage-selection-selective-deletion-and-dynamic-variant-processing
Step by step process to clear extract & delta queues during patch/upgrade in ECC system
I am writing this blog to give you the steps to be performed during ECC system patch/upgrade:
Process: In SAP ECC system any transaction posted into data base tables it will post entries in BW related extract Queues (LBWQ or SMQ1) related to LO cockpit. These queues need to be cleared before applying any Patches or upgrade into ECC to minimize data loss if any changes in extract structures.
This document show step by step method to clear LO queues before applying the patches/upgrade into SAP ECC system.
Note: Below given JOBS/INFOPACKAGES names may vary in your scenario.
Procedure for V3 jobs of R/3 and Info packages scheduling before taking the down time:
1) Schedule the below mentioned V3 jobs 4- 5 hrs before taking the down time continuously on hourly basis in SAP ECC system.
Ex. Jobs,
- a. LIS-BW-VB_APPLICATION_02_500
- b. LIS-BW-VB_APPLICATION_03_500
- c. LIS-BW-VB_APPLICATION_11_500
- d. LIS-BW-VB_APPLICATION_12_500
- e. LIS-BW-VB-APPLICATION_17_500
- f. PSD:DLY2330:LIS-BW-VB_APPLICATIO
2) 2) Schedule the below mentioned info packages 4-5 hrs before taking the downtime in SAP BW/BI system.
BW client XXX.
Ex. Info Package Name:
a. MM_2LIS_03_BF_RegularDelta_1
b. MM_2LIS_03_UM_Regulardelta_1
c. 2LIS_13_VDKON(DELTA)1
d. Billing Document Item Data:2LIS_13_VDITM:Delta1
e. 2LIS_12_VCHDR(Delta)1
f. 2LIS_12_VCITM(delta)1
g. Sales Document Header Data:2LIS_11_VAHDR:
h. Order Item Delta update: 2LIS_11_VAITM:
i. Order Alloctn Item Delta1 updat :2LIS_11_V_ITM :
3) 3) Ensure that there should be minimum data in Queues (i.e. in SMQ1or LBWQ and RSA7) if data is very high then again schedule the V3 Jobs in R/3 & info packages.
Steps 1 to 3 are to be followed before taking down time to minimize data extraction time during down time for patch application.
4) 4) After taking the Down time SAP Basis team will inform BW team for clearing the Queues in ECC system.
5) 5) Follow the following procedure to clear Extract Queues (SMQ1 or LBWQ) and delta Queues (RSA7) (i.e. Before Application of Patches or upgrade)
a) Request SAP basis team to Lock all users in SAP ECC system (except persons who clearing the queues) and take down time of 45 minutes or depending
upon your data volume or plan.
b) Make sure that all jobs are terminated nothing should be in Active status except V3 & BW extraction Jobs in SAP ECC system.
c) Take screen shot of Tr. Code: SMQ1 or LBWQ before scheduling the V3 Jobs
d) Screen shot of Tr Code: RSA7 before extracting the data to BW
e) Screen shot of LBWE extraction structure
6) 6) Copy following V3 Jobs in SAP ECC system - and schedule it immediately in down time for every five minutes to move data from Extract Queues (SMQ1 or LBWQ) to Delta queues(RSA7).
Ex.V3 Jobs,
- LIS-BW-VB_APPLICATION_02_500
- LIS-BW-VB_APPLICATION_03_500
- LIS-BW-VB_APPLICATION_11_500
- LIS-BW-VB_APPLICATION_12_500
- LIS-BW-VB-APPLICATION_17_500
- PSD:DLY2330:LIS-BW-VB_APPLICATIO
6.1 To Delete unwanted Queues in SAP ECC system.
These queues Ex. MCEX04, MCEX17 & MCEX17_1 are not being used in your project hence you need to delete these queues in ECC system.
Deleting procedure: Enter the Tr. Code SMQ1 and select the MCEX04 then press the delete button, it will take few minutes to delete the entries.
Follow the same procedure to delete other not required queues in your project.
7) Then schedule the info packages in SAP BW (XXX client) until the RSA7 entries become ‘0’.
BW client XXX.
Ex. Info Package Name:
- MM_2LIS_03_BF_RegularDelta_1
- MM_2LIS_03_UM_Regulardelta_1
- 2LIS_13_VDKON(DELTA)1
- Billing Document Item Data:2LIS_13_VDITM:Delta1
- 2LIS_12_VCHDR(Delta)1
- 2LIS_12_VCITM(delta)1
- Sales Document Header Data:2LIS_11_VAHDR:
- Order Item Delta update: 2LIS_11_VAITM:
- Order Alloctn Item Delta1 updat :2LIS_11_V_ITM :
8) If still Extraction queue (SMQ1 or LBWQ) has entries, repeat the step 6 to 7 until both the extract Queues and delta Queues read ZERO records.
9) After zero records repeat the step 6 to 7 for double confirmation to avoid any possible data entries.
10) Screen shot of Tr Code: SMQ1 after become ZERO.
11) Screen shot of Tr. Code: RSA7 after become ZERO.
12) After ensuring that SMQ1 or LBWQ and RSA7 read ZERO entries, release the system for Basis for any upgrade or patch application.
13) After patch or upgrade is over SAP Basis team will inform SAP BW team to check the extract Queues and delta Queues are getting populated or not.
14) Request SAP Basis team Restore the all V3 jobs in ECC system to Original position and unlock all the users or system/communication users.
15) Check the Tr. Code: SMQ1 and RSA7 whether the entries are getting posted or not after restoring the V3 jobs in ECC system.
See the screen shot
RSA7
16) Check the Tr, code LBWE whether all the Extract structure or active or not see the screen shot after patch application.
17) Schedule the any of the info package in SAP BW ( from above list)
See the screen shot
This ends the Queues clearing activity.
Thanks & Regards
Puja Yerunkar.
Handling of Conversion Lock for Master data InfoObject
Hi All,
In this blog, I am trying to explain how to handle Conversion Lock for master data object.
Below is the screenshot for Master data Object 0COSTCENTER:
1) We are making 0RESP_PERS as Navigational attribute of Cost center
2) Activate 0COSTCENTER, but activation fails because of Hexadecimal values in 0RESP_PERS.
3) When you try to undo the changes, it won’t allow changing the object giving error as conversion lock.
4) Go to RSD1 -> 0COSTCENTER -> goto EXTRA -> Click on (Remove conversion Lock),
This will remove the lock
5) Go and undo the changes & activate the Info Object
The activation error usually comes if the display attribute have some Junk values, like in our case Hexa values
Now, change the 0Costcenter transformation first to rectify the error, in our case it is because of Lower case values.
Write below code in the transformation
RESULT = SOURCE_FIELDS-VERAK.
TRANSLATE RESULT TO UPPER CASE .
6) Activate transformation, load master data for 0Costcenter
7) Make the Display attribute to Navigational attribute, it will allow you to activate the object with new changes.
Thanks & Regards,
Puja Yerunkar
How to find if the psa table is included in psa deletion process chain
1. Go to SE16 - Table RSPCVARIANT:
Specify TYPE as "PSADELETE", FNAM as "PSATABLE", LOW as your PSA name (/BIC/B***), Get VARIANTE field value.
2. Go to SE16 - Table RSPCCHAIN:
Specify TYPE as "PSADELETE" and VARIANTE as the value you got at the previous step.
CHAIN_ID field will give you the process chain in which PSA is marked for deletion (if there exists one).
Thanks,
Shankar
Many ways to use F1 help in SAP
Hi all knowledge distributers,
We knew help.sap will help us a lot, like the way sap help F1 will help in from many perspectives. We can use it as basic help, meta data repository, web offline search engine, information explorer etc.. Let’s try some ways
As an initial start of any sap window, press F1 at our t-code entry part, we will see all the options /n, /o, /*etc and their usage as well
If we want to see all our development part at a glance in web, press F1 by selecting info object catalog. Here you need to select origin properly, we will see search enabled menu and links for all the objects
We can use this as a meta data repository that too in explorer
If we need help regarding routine part with example, we will find with examples using direct button 'Routines Info' on functional menu bar.
Sometimes we may need special help for columns ex: what is the need of selecting field-only when we are customizing or performing enhancements
We will see many greyed out cells separately in many t-codes, but we need summary regarding separations; always same one that is F1– press it, it will give documentation.
We can maintain customized documentation also using documentation tab in RSA1. We will have many help items in all the levels and it will give us clarifications as well. Even you knew the concept; F1 will provide clarification on that concept.
If we continue to explore, we will have many other ways and features….proceed towards ∞.
So I suggest all to reach sap help before reaching for others help.
Thank you to SCN for gave me chance to blog and to people took time to read.
Extraction Process for IS-U Sales Statistics 0UC_SALES_STATS_02 DataSource.
In my project, after activating the 0UC_SALES_STATS_02 in R/3 system; I tried checking in RSA3. But it showed zero records extracted. Later I tried replicating datasource and created infopackage in BW and ran it, still zero records in PSA.
I found solution for this:
I did some settings in R/3, those are as below:
In t-code SBIW, Settings for application-Specific DataSources (PI) >>Utilities Industries>>Sales Statistics>> Define Performance settings for sales statistics extractor >> Tick the Initial update group is allowed (as shown below)
Later checked in RSA3 in R/3 system by giving some print document, I found data extracted.
Then the task was to pull the data in BW till PSA.
Follow the below steps:
- In BW, create an infopackage with full load and you will extract no records and it will remain with a yellow status; which is fine.
- Again in BW, run the infopackage with Initial Load (it should extract 1 record and be in status of green).
- Now loin to R/3 system and go to t-code EBW_DQ_SS, follow below steps:
a. Under the “Environment” tab in menu strip, click “Unlock mass activity type”.
b. Under “Program run” tab in menu strip, click “deactivate old run” by giving Date ID and Identification.
c. Now run the mass activity EBW_DQ_SS by clicking “Schedule Program Run”.
4. In BW system, run the Delta load for 0UC_SALES_STATS_02. Now you will see data extracted in PSA.
This is how you can pull the data from IS-U Sales statistics 0UC_SALES_STATS_02 DataSource to BW system till PSA.
Text Variable Issue with Time Caharacteristics after BW upgrade to 7.3 version
In this blog I have attempted to explain the text variable issue with Time Characteristics in Bex Query after the BW system upgraded to 7.3 version
Issue
After the BW system gets upgraded to BW7.3 version, then during the execution of the BW query the Time Characteristics with text variable does not dynamicaly display its text instead it would display its technical name as depicted in below screen shot.
Rootcause
In Bw7.3 version, for time characteristics like 0CALDAY textxs will not be maintained in RSD1 and also for time characteristics "TEXTS" option would be unchecked in the Master Data/Text tab of characteristics. While in lower versions 3.x/7.0 for time characteristics texts would be internally maintained in RSD1 hence the text variable works fine in 3.5/7.0 versions.
In general before the BW upgradation to BW7.3 version, variable setting maintained in Bex Query Designer is depicted below, setting maintained for Replace Variable with is "Name Text"
Solution
Change the setting for "Replace Variable with" in text variable from Name to "External Characteristics Value(Key)", then the BW report would display correct texts for the text variable used in the Time Characteristics.
Secondary Index on InfoObject master data tables in RSD1


- In the Data type, type in value : RSDATRINDXFL
3. Modify 1 transparent table in transaction SE11
a) SE11 -> Tables -> RSDBCHATR
- In the Database table, type in value : RSDBCHATR
- Click on the Change button
- Using the Insert Row button, between Field ATRTIMFL and Field F4ORDER, insert a new field.
- In the Field column, type in value : ATRINDXFL
- Check the Initial Values checkbox
- In the Data element column, type in value : RSDATRINDXFL
- Activate
- Go to Transaction SE38
- Run report SAP_RSADMIN_MAINTAIN
- Enter 'RS_ENABLE_MD_SECONDARY_INDEXES' for Object and 'X' for Value
- Select the 'INSERT' radio button
- Execute the report to create the new entry in table RSADMIN
b. Remove key from Secondary Index (for BW 7.30, 7.31 AND 7.40 ONLY)
By default, the technical key (DATETO/DATEFROM/Current InfoObject/OBJVERS) will be included as part
of secondary index. To remove the technical key, you must maintain a RSADMIN parameter.
- Go to Transaction SE38
- Run report SAP_RSADMIN_MAINTAIN
- Enter 'RS_NO_TECH_FIELDS_SEC_INDEXES' for Object and 'X' for Value
- Select the 'INSERT' radio button
- Execute the report to create the new entry in table RSADMIN
Still there?
We almost got it - now download note 1898395 via transaction SNOTE and implement the note.
Since we did all we were asked of - we are good to go.
Sooo now how does it look like?
And if we check the tables of the characteristic?
How does it look like?
Now we are able to create secondary indices on Characteristics and all will be done automatically.
I am not sure when, how, if - this note will be implemented officially but I kinda like this.
One note at the end:
If you want to remove the index and add another one, make sure to remove the
index first and activate, then add the new index and activate.
So long,
Andreas
Populate Yesterday's Date in BEx Broadcaster - Mail body or Subject
Requirement:Communicate to the user about Report is generated on 02.12.2013 i.e. yesterday
In Mail User want to send
Hi
Kindly find attached herewith Sales report as on 02.12.2013.
Regards,Ganesh Bothe
When you are creating broadcast setting you can find only following text variable.
Using above text variable it is not possible to calculate yesterday’s date and we do not want to send mail like
Hi,Kindly find attached herewith Sales report as on Yesterday.
Regards,Ganesh Bothe.
One thing that where this text variable are stored that also I think not possible to find out.
For same requirement I have published blog on 26.11.2013.In my broadcast setting I am sending report in MHTML format and it will come in Mail body as per requirement using customer exit variable.
One of SCN member followed using my blog but he is sending report title in subject line and he faced problem regarding dynamic date. After his comment on my blog I analyze the issue and then come to know For my case it is executing BI report means it will execute customer exit code also but in the case of SCn member it just showing name of report means ‘Daily Sales report &xyz&” That means not fulfill the requirement.
So yesterday I have deleted my blog and tried for correct workaround. I searched on Scn, so many people having the same requirement there is no proper solution present. I tried following things and it works hope it will help you who were having similar requirement.
Here are the Steps to achieve this
- There is the standard table where our body and subject are stored
Table name: RSRD_SETT_NODE_T
Provide technical name of setting to this table
2.In your BI system we need to create one ABAP program
Tcode SE38 create program ZBROADCAST_SETTING
Copy following code
REPORT ZBROADCAST_SETTING.
data : zdate_temp type sy-datum,
zdate type char10.
data: wa_RSRD_SETT_NODE_T type RSRD_SETT_NODE_T.
zdate_temp = sy-datum - 1.
write zdate_temp to zdate DD/MM/YYYY .
wa_RSRD_SETT_NODE_T-SETTING_ID = 'ZDAILY_SALES'.
wa_RSRD_SETT_NODE_T-Id ='DI_BODY'.
wa_RSRD_SETT_NODE_T-Id ='DI_SUBJECT'.
*wa_RSRD_SETT_NODE_T-OBJVERS = 'A'.
*wa_RSRD_SETT_NODE_T-LANGU = 'E'.
concatenate 'Hi,Kindly find attached herewith Daily sales Report as on'
zdate
'Regards,Ganesh Bothe' into wa_RSRD_SETT_NODE_T-VALUE SEPARATED BY space.
update RSRD_SETT_NODE_T set VALUE = wa_RSRD_SETT_NODE_T-VALUE
where SETTING_ID = 'ZDAILY_SALES'
and Id = 'DI_BODY'.
Concatenate 'Daily sales Report As on'
Zdate into wa_RSRD_SETT_NODE_T-VALUE SEPARATED BY space.
update RSRD_SETT_NODE_T set VALUE = wa_RSRD_SETT_NODE_T-VALUE
where SETTING_ID = 'ZDAILY_SALES'
and Id = 'DI_SUBJECT'.
Then you can schedule this program and your broadcast setting with
following two methods.
- Schedule this program before your broadcast setting and then your broad cast setting
- Create process chain add two abap program steps one is for above program and second is for your
broadcast setting(RSRD_BROADCAST_STARTER)create variant for this program with tech name of your broadcast setting.
Sometimes Second option will not work for some user means they will not got any mail after successful execution of process chain also. If that is the case please check SOST tcode.
Select your document and click on send request->start send process for selection. It will send the mail.
Newly created program will modify the body and subject for particular setting as per our requirement.
After this when you are broadcast setting will executed you will receive mail like following screen.
In this way you can achieve yesterday’s date or similar kind of requirement.
Hopes it will help.
Quick BW Tip: How to copy and paste from an external hierarchy in BW?
Just a quick BW tip which can make your life with BW easier.
How to copy and paste from an external hierarchy in BW?
Direct in the hierarchy view the copy context menu does not work useful. To copy you need to…
Step 1: Open all nodes you want to see.
Step 2: Click on the Print Button
Step 3: Select nodes using Crtl + Y, Crtl + C
Smoke testing in SAP BW
Smoke test proves that "the pipes will not leak, the keys seal properly, the circuit will not burn, or the software will not crash outright” the system is ready for more robust testing.
Smoke testing is preliminary testing to reveal simple failures severe enough to reject a prospective software release. In this case, the smoke is metaphorical. A subset of test cases that cover the most important functionality of a component or system are selected and run, to ascertain if the most crucial functions of a program work correctly.
Below are the flowcharts depecting few important smoke tests covered in an SAP BW testing projects before starting with actual system test:
Below are the tests covered on ECC side:
Loading data to info provider without PSA #SAP BW 7.31.
DTP settings to load data directly to targets without PSA:
Recently I came across this situation to load data directly to target without psa.
Before that we need to consider the below steps.
- Always full load
- Data volume is less
- No wrong data, if not sure then need taken care thru error stack concept.
Advantages: No PSA maintenance/Info pack load.
BW 7.3 DTP screen shot where we don't have setting to bypass psa.
Below one is Bw7.31 SP5. we can see the new settings as shown below.
Once we select above options we will get default adapter settings to access directly from source.
Save and activate your dtp. while saving we will get pop up messages
As said above, if needed then we need introduce symantic groups to filter the erroneous records.
Once we set above setting at dtp, without creation of info pack, we can load data directly into targets.
Simple steps:
1. Replicate your data source from source to bw system
2. Activate your data source
3. Create your target
4. Create transformations(between data source and target)
5. Create dtp , do settings as said above.
6. Trigger the dtp and check the logs.
At process chains without info pack step, we can add dtp step directly after the start varaint.
Thanks for reading.
Raman
Accelerate Authorization Enabeling by usage of Virtual Authorizations in BW 7.30
Do you know this scenario?
During the curse of each BW / BI implementation project, the main focus is lying on the new, fancy features and Reporting possibilities which came in with BW 7.30. Everyone is happy with development Authorizations; everything looks fine during the first INT Testing.
Shortly before roll-out, the focus comes to the topics around the key feature. Documentation is a topic which usually comes very late in the project cycle - just the very same applies to End-user authorizations - just too often. :-)
Under time pressure the colleagues dealing with the unloved Authorization topics are involved and the question comes up: Can we have a flexible and granular Authorization concept within a quite short left-over timeframe which is stable and scalable with low maintenance costs?
NOW, we can say - YES WE CAN - by using the new Virtual Analysis Authorization concept which is based on the Virtual Authorization BAdi RSEC_VIRTUAL_AUTH_BADI.
During the build- up of one of the internal BW 7.30 System, the Implementation has been established and is fully leveraging a Viewcluster which keep all the needed information for a full blown emulation of the well-known Analysis Authorizations.
This whole Framework of the Virtual Authorization implementation has found great acceptance and is the heart piece for granular Analysis Authorizations, enabling several Usergroups across different Line of Businesses with their distinct Authorization needs.
Together with a fast transport connection of the customizing tables for the Framework, new authorization concepts and changes can be applied up to Production system below one working day - helping as well the late projects to get the Q-Gate sign-off for the Access Management.
Trigger Process Chain by User
Hello BW folks,
Purpose:
The purpose of this document is to trigger a job by user through portal and open the SAP BW system and to show message to user in a pop-up window for the confirmation of job executed.
Pre-requisite:
Create a button in the Portal where user can access by using Javascript.
Requirement:
The requirement is the end user needs to execute the job through Portal which will trigger a process chain whenever they needs.
When the user click on the button through Portal, the SAP system will open automatically which shows the message on the bottom of the screen which doesn’t seems good to the user as shown below.
So we plan to show a pop-up message and send a mail to the user who triggers the process chain.
1.
- Create a program Z_PC_RUN needs to be created which calls the Function Module ‘RSPC_CHAIN_START’ to trigger the process chain, show the pop-up message and send email notification to the user who triggers.
See the program in APPENDIX A.
Now the user is getting a pop-message as shown below.
Email notification to the user Inbox.
2. 2. Create another program attached to the end of the Process chain which sends an email notification of the successful completion of the Process Chain.
See the program in APPENDIX B.
APPENDIX A
REPORT z_pc_run.
DATA: objcont LIKE solisti1 OCCURS 5 WITH HEADER LINE.
DATA: it_receivers TYPE TABLE OF somlreci1.
DATA: ls_receivers TYPE somlreci1.
DATA: doc_chng LIKE sodocchgi1.
DATA: entries LIKE sy-tabix.
DATA: name(15).
DATA: l_pc TYPE rspc_chain.
l_pc = 'XXXX'. – Process Chain Name
CALL FUNCTION 'RSPC_CHAIN_START'
EXPORTING
i_chain = l_pc
* I_T_VARIABLES =
* I_SYNCHRONOUS =
* I_SIMULATE =
i_noplan = 'X'
* I_DONT_WAIT =
* I_POLL =
* IMPORTING
* E_LOGID =
.
IF sy-subrc = 0.
Fill the document
doc_chng-obj_name = 'Process Chain XXXX has been triggered. On Successful Completion, Email Notification will be sent to you'.
doc_chng-obj_descr = 'Process Chain XXXX has been triggered. On Successful Completion, Email Notification will be sent to you'.
doc_chng-sensitivty = 'P'.
objcont = 'Hi Receiver,'.
APPEND objcont.
objcont = 'Process Chain XXXX has been triggered. On Successful Completion, Email Notification will be sent to you'.
APPEND objcont.
- ELSE.
* Fill the document
doc_chng-obj_name = 'Process Chain XXXX has been triggered. On Successful Completion, Email Notification will be sent to you'.
doc_chng-obj_descr = 'Process Chain XXXX has been triggered. On Successful Completion, Email Notification will be sent to you'.
doc_chng-sensitivty = 'P'.
objcont = 'Hi Receiver,'.
APPEND objcont.
objcont = 'Process Chain XXXX has been triggered. On Successful Completion, Email Notification will be sent to you'.
APPEND objcont.
- ENDIF.
DESCRIBE TABLE objcont LINES entries.
READ TABLE objcont INDEX entries.
doc_chng-doc_size = ( entries - 1 ) * 255 + STRLEN( objcont ).
Retrieve mail address
DATA: l_per TYPE ad_persnum.
DATA: l_add TYPE ad_addrnum.
DATA: l_mail TYPE adr6-smtp_addr.
SELECT SINGLE persnumber addrnumber FROM usr21 INTO (l_per , l_add) WHERE bname = sy-uname.
SELECT SINGLE smtp_addr FROM adr6 INTO l_mail WHERE persnumber = l_per AND addrnumber = l_add.
ls_receivers-receiver = l_mail.
ls_receivers-rec_type = 'U'.
APPEND ls_receivers TO it_receivers.
WRITE:/05 'Process Chain has been Triggered.'.
WRITE:/05 'On Completion You will get Email Notification.'.
WRITE:/05 'Please Close Now this Window.'.
APPENDIX B
REPORT z_pc_run_success.
DATA: objcont LIKE solisti1 OCCURS 5 WITH HEADER LINE.
DATA: it_receivers TYPE TABLE OF somlreci1.
DATA: ls_receivers TYPE somlreci1.
DATA: doc_chng LIKE sodocchgi1.
DATA: entries LIKE sy-tabix.
DATA: e_state TYPE rspc_state.
DATA: name(15),
l_logid TYPE rspc_logid.
DATA: l_pc TYPE rspc_chain.
l_pc = 'XXXX'.
sy-batch = 'X'.
DATA: l_t_logs TYPE TABLE OF rspclogchain,
l_s_logs TYPE rspclogchain.
SELECT * FROM rspclogchain
APPENDING TABLE l_t_logs
WHERE chain_id = l_pc.
SORT l_t_logs BY datum zeit DESCENDING.
READ TABLE l_t_logs INTO l_s_logs INDEX 1.
IF l_s_logs-analyzed_status = 'G' AND sy-subrc = 0. " Successfully completed
Fill the document
doc_chng-obj_name = 'XXX to YYY data load information'.
doc_chng-obj_descr = 'XXX to YYY data load information'.
doc_chng-sensitivty = 'P'.
objcont = 'Dear User,'.
APPEND objcont.
objcont = 'XXX to YYY data load has been completed successfully.'.
APPEND objcont.
objcont = ''.
APPEND objcont.
objcont = 'Regards'.
APPEND objcont.
- ENDIF.
DESCRIBE TABLE objcont LINES entries.
READ TABLE objcont INDEX entries.
doc_chng-doc_size = ( entries - 1 ) * 255 + STRLEN( objcont ).
*Retrieve mail address
DATA: l_per TYPE ad_persnum.
DATA: l_add TYPE ad_addrnum.
DATA: l_mail TYPE adr6-smtp_addr.
SELECT SINGLE persnumber addrnumber FROM usr21 INTO (l_per , l_add) WHERE bname = sy-uname.
SELECT SINGLE smtp_addr FROM adr6 INTO l_mail WHERE persnumber = l_per AND addrnumber = l_add.
ls_receivers-receiver = l_mail.
ls_receivers-rec_type = 'U'.
APPEND ls_receivers TO it_receivers.
* Send the document
CALL FUNCTION 'SO_NEW_DOCUMENT_SEND_API1'
EXPORTING
document_type = 'RAW'
document_data = doc_chng
put_in_outbox = 'X'
TABLES
object_content = objcont
receivers = it_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
COMMIT WORK.
SUBMIT rsconn01 WITH mode = 'INT' AND RETURN.
Thank you All....
Finding the variables - Using Bex Query Techical Names
Another way to find the variables used in a query using query name without using any abap program.
Tip to find the queries which has external data access settings enabled in the Bex Query Designer.
Transaction - SE 16,
Tables Used
RSRREPDIR
RSZCOMPDIR
RSZELTDIR
RSZELTTXT
RSZELTXREF
RSZELTPROP
- In RSRREPDIR - Input the query name in COMPID , can use info cube input too.
- Input 1.COMPUID in RSZCOMPDIR.COMPUID to check the query Tech Name.
- Input 2.COMPUID in RSZELTDIR.ELTUID
- Input 3.ELTUID in RSZELTTXT.ELTUID to get the TXTLG - Query Description
- Input 4.ELTUID in RSZELTXREF.SELTUID to get the TELTUID (Variable UID) and Info Cube Technical Name.LAYTP says if its Variable or Sheet or SOB.
- Input 5.TELTUID in RSZELTTXT.ELTUID to get the Variable Description - TXTLG
Output of 5 which has SOB/SHT is ignored in this output.
7. To find the type of variable input the output got from 6.ELTUID into RSZCOMPDIR.COMPUID , COMPID will give the Variable Type if Naming Conventions are followed.
Note : If the naming convention is followed for the variable types it can be easily identified.
eg : ZV_SV_O_FISCYR_CV - Characteristic Variable with selections and its Optional.
Finding queries has external data access settings
- Get COMPUID from RSRREPDIR
2. Input 1.COMPUID = RSZELTPROP.ELTU ID with RFCSUPPORT = X and get the Query Tech Name.
3. Input 2.ELTUID = RSZELTTXT.ELTUID get the Query Description
Thanks for reading, hope this helps a bit ...
Generating Reporting InfoObjects based on Business Content - Part 1: Introduction
In an Enterprise Data Warehousing context, InfoObjects often play an arbitrary double role: they are used for modeling the Data Warehouse Layer and multi-dimensional modeling the Reporting Layer. In my blog Introducing Data Warehouse InfoObjects - Part 1: Conceptual Overview I advised segregation of duties by introducing a dedicated, independent set of InfoObjects: Data Warehouse InfoObjects.
But how about those Reporting InfoObjects? Should we simply activate all the Business Content InfoObjects we need? Or do we have to introduce our own set of InfoObjects, customized and fit to the Business Users’ requirements? Or a combination of both? In this blog I would to like to present an alternative approach.
I created an ABAP program to generate Reporting InfoObjects based on Business Content. This blog series explains how to use the program. In Part 1 we will have a look at the rationale, the program, the application log, the generated InfoObjects and Template InfoProvider.
I am going to publish documents with detailed technical instructions how to create the ABAP program and all related objects.
Rationale
Since the earliest SAP NetWeaver BW releases SAP delivers so-called Business Content (a.k.a. BI Content). It’s a multitude of BW data modeling objects, amongst others InfoObjects. Strong advantages can be materialized in pure SAP implementations. The Business Content is developed in synch with the SAP source system and perfectly complements standard business processes with analytical scenarios.
However, there are in my opinion some drawbacks to take into account. Activation of Business Content can lead to a massive number of new InfoObjects. All dependencies are considered and can go many levels deep. This can lead to an extensive data model which might also include unused SAP modules, business processes and even Industry solutions. Such a data model will become increasingly difficult to understand and won’t make any sense from a Business User’s perspective.
The installation of Business Content in a productive system can even be dangerous. There are many cases where previously activated Business Content is enhanced. These enhancements can be overwritten by an inappropriate activation. No matter how experienced you are, one day it can happen to all of us.
I would like to propose an alternative approach: generating Reporting InfoObjects in the customer namespace based on Business Content InfoObjects using a program. All mandatory dependencies will be respected (i.e. compounding InfoObjects and reference InfoObjects). For Characteristics however, generation of attributes will be restricted to the highest level. This will prevent an uncontrolled expansion of the data model as we can observe with the Business Content activation.
Starting the Program
You can start the program by using t/code YRIOBJ.
Figure 1: Selection Screen
There are 3 ways to run the program:
- For one or more single Business Content InfoObjects;
- For one single Business Content InfoCube;
- For one single Business Content DSO.
Make the appropriate selection on the selection screen. You can use the F4 search help functionality. The program will check the input afterwards and gives an error message in case of any incorrect input. Press the Execute push button to start processing.
Note that the program will check on authorization object YBWREPIOBJ. Please make sure that an appropriate authorization role is assigned to your user-id. This will be explained in Part 2 of the blog series.
Analyzing the Application Log
As the last processing step the program will display an application log.
...
Figure 2: Application Log
The program collects all messages issued during processing and adds them to the application log. Here you can obtain an overview of all InfoObjects that have been generated as well as the Template InfoProvider. If applicable any error messages can be found here. The various processing blocks can be identified by the “Start of processing” and “End of processing” messages.
Note that you can always review previous application logs retrospectively via t/code SLG1.
Make sure to fill in appropriate selection criteria such as Object YBW , Sub Object YBWREPIOBJ, date/time and user-id to narrow down the search results.
Figure 3: Analyze Application Log
Generated InfoObjects
The program checks the Metadata Repository if an InfoObject already exists for the respective Business Content InfoObject. If yes, then it will proceed by skipping this InfoObject. Otherwise it will generate a new InfoObject that will be appended to the central Metadata Repository table and adds it to the appropriate InfoObject Catalog.
Figure 4: InfoObject Catalogs for Generated InfoObjects
Please note that there is a restricted set of “special” InfoObjects which is excluded from the generation process. It concerns InfoObjects in table RSDIOBJFIX which have a special purpose in the system. One can think of Time Characteristics but also Characteristics like 0LANGU, 0UNIT and 0CURRENCY.
Generated Template InfoProvider
After the processing of the InfoObjects the program generates a so-called Template InfoProvider depending on the processing mode. In my example the processing mode was InfoCube and the program generated a Template InfoCube.
Figure 5: Generated Template InfoProviders
Such a Template InfoProvider acts as a container for all InfoObjects and can be used as a starting point for creating your own DataMart.
Conclusion
In this blog we discussed the rationale of generating Reporting InfoObjects based on Business Content, the program, the application log, the generated Reporting InfoObjects and the Template InfoProvider. The next parts will follow soon.
Generating Reporting InfoObjects based on Business Content - Part 2: Metadata Repository & Customizing
In an Enterprise Data Warehousing context, InfoObjects often play an arbitrary double role: they are used for modeling the Data Warehouse Layer and multi-dimensional modeling the Reporting Layer. In my blog Introducing Data Warehouse InfoObjects - Part 1: Conceptual Overview I advised segregation of duties by introducing a dedicated, independent set of InfoObjects: Data Warehouse InfoObjects.
But how about those Reporting InfoObjects? Should we simply activate all the Business Content InfoObjects we need? Or do we have to introduce our own set of InfoObjects, customized and fit to the Business Users’ requirements? Or a combination of both? In this blog I would to like to present an alternative approach.
I created an ABAP program to generate Reporting InfoObjects based on Business Content. This blog series explains how to use the program. In Part 2 we will have a look at the Metadata Repository and Customizing. There are various administration settings which can be customized according to your needs. Finally, the authorization aspects are addressed.
The blog series consists of the following blogs in addition to this blog:
I am going to publish documents with detailed technical instructions how to create the ABAP program and all related objects.
Metadata Repository
The Metadata Repository in the context of Reporting InfoObjects consists of a central table where the metadata related to the newly generated InfoObjects is registered during processing. The name of this table is YBWREPIOBJ.
Figure 1: Central Metadata Repository table
The program checks the Metadata Repository if an InfoObject already exists for the Business Content InfoObject. If yes, then it will proceed by skipping this InfoObject. Otherwise it will generate a new InfoObject that will be appended to the central Metadata Repository table and inserts the new InfoObjects into the appropriate InfoObject Catalog.
Administration Settings
Similar to the RSADMIN table I created table YBWADMIN to be able to parameterize particular functionality. There are five parameters related to Reporting InfoObjects.
Figure 2: Administration settings
Parameter REPIOBJ_NAMESPACE allows you to define your own namespace in which all Reporting InfoObjects will be generated. The program is able to work with a “standard” customer namespace (i.e. A, B, …, Z) or a registered customer namespace (i.e. in the format /<ABC>/). In my example namespace R is used which means that all generated Reporting InfoObjects will start with the R.
You are able to define your own InfoObject Catalogs for the various Reporting InfoObjects. There are three parameters to specify those InfoObject Catalogs:
- REPIOBJ_CAT_CHA - InfoObject Catalog for Characteristics;
- REPIOBJ_CAT_UNI - InfoObject Catalog for Units;
- REPIOBJ_CAT_KYF - InfoObject Catalog for Key Figures.
Parameter REPIOBJ_INFOAREA enables you to specify an InfoArea in which the generated Template InfoProviders will be stored.
Please note that the InfoObject Catalogs and InfoArea must exist before the program can use them. This is normally a one-time action.
Authorization
To be able to execute the program you need an authorization role which contains authorization object YBWREPIOBJ. Within the role you can restrict processing to particular Business Content InfoAreas.
I created two example roles. The first one grants the user maximum authorization, i.e. the user is able to execute the program for every Business Content InfoArea.
Figure 3: Authorization role with maximum authorization
The second example will limit the user’s authorization to only one InfoArea.
Figure 4: Authorization role with limited authorization
Conclusion
In this blog I discussed the Metadata Repository. It consists of a central table where all metadata is registered during generation of the Reporting InfoObjects. Furthermore I discussed the Customizing. We had a look at the various administration settings and the authorization aspects.
Retail BW Implementation
Things to consider in BW implementation for a Retail Industry.
1. Use 0ARTICLE instead of 0MATERIAL (Will get delta issue for 0MATERIAL_ATTR and 0MATERIAL_TEXT, so use Article datasources)
2. Select the Industry sector Retail in ECC before filling setup table for Inventory and Purchase data.
3. Select a small amount of data in report level , specially at the time of Inventory report. ( If possible schedule the report before use for big data).
4. Have to use carefully , Article Pricing grade in Inventory report.