Quantcast
Channel: SCN : Document List - SAP Business Warehouse
Viewing all 1574 articles
Browse latest View live

SAP BW Workspaces

$
0
0

A BW Workspace is a dedicated area in a BW system where new models can be created based on central BW and local data (e.g. flat files). Workspaces can be maintained and controlled by IT and used by local departments to react quickly to new and changing requirements. Workspaces can bridge the gap between central governance requirements and local flexibility needs.

 

SAP BW Workspaces are available with SAP BW 7.3 SP 5 and higher:

 

  • With SAP HANA 1.0 running as a database for SAP BW 7.3 SP 5 (and higher)

 

  • With SAP BW Accelerator 7.2

SAP BW Workspaces are available with BW Accelerator as well, however they should only be used with BW Accelerator in limited scenarios where the scope has been tested thoroughly and where functional and performance expectations are met.

Since the BW Accelerator is in maintenance mode, no significant improvements concerning functions, performance and scalability can be expected.

 

With SAP powered by SAP HANA the BW Workspace functionality has been significantly improved to support further and more complex scenarios.

Therefore it is clearly recommended to consider the migration to SAP HANA to make full use of the flexibility and agility offered by the BW Workspaces.

 

 

The following article series appeals to different user types. This will be mentioned in the summary of each article.

As a first introduction please watch the video BW Workspaces Demo Video(approx.11 minutes).

For real life customer scenarios please read the article BW Workspaces - Use Cases.

 

1. Introduction and Standard Practices

 

 

 

2. Tips and Tricks for the Advanced Scenario

 

 

3. Best Practices and Recommendations

 

 

Online Documentation

 


Conditional Broadcasting

$
0
0

Hi Guys, recently I came across a requirement which I am not able to handle via standard way of broadcasting options present in SAP BW and developed a custom solution . Since the ask is very genuine so hereby sharing the development If this brings any value to all of you guys .

 

Requirement : User wants to do the broadcasting which is scheduled monthly but only when the for given selections reports contains any data . If the for the fiscal year period(one of Report selection), report do not have any data, broadcasting mails must not get triggered . Also they want the report attachment in the form of Excel so that they can simple download the attachment from the report and do there analysis.

 

SAP Broadcasting Ways : SAP has given the options like 'Broadcasting Via Mail' wherein we can send the mail thorough a customized body in the form of attachment(spreadsheet, Zipped Attachment, PDF, HTML) etc. But the this not fit to my case since in this system will send the scheduled broadcast email even if report do not contains any data i.e. a blank email (Mail without any report data)   .

 

Also another way of thinking of the solution is to use SAP Broadcast option 'Broadcasting Via Exception' . For this option to use , you must have exceptions set in your Bex Report .Also using option we can send any attachment instead SAP do a summary/detail of the exceptions caught in the report & send it in the mail body itself. So this solution will also not suffice for stated requirement.

 

Solution proposed : To tackle the problem statement following approach & development is requirement  .

  • First we need to figure out If query for the given selections have any data or not. So we use the standard FM 'RRW3_GET_QUERY_VIEW_DATA' to check the report Output . This FM need input parameter as I_INFOPROVIDER = 'your Info Provider which could  be  Infocube, Multiproviders etc' , I_QUERY= 'Your Query Technical Name' & 'I_T_PARAMETER' which contains the query Input variables & its  values . In the Export parameters if the table 'E_CELL_DATA' contains records means report has data , if this table output is 0 , means report is not getting any data for passed selection .

Capture1.PNG

Note the I_T_PARAMETER has to be filled as displayed below for every prompts which you want to be passed as selection(in the example query has a mandate prompt of 0FISCPER so we have passed the same using the variable created over 0FISCPER.

Capture8.PNG

  • Now since the broadcasting is based on the output of the of table 'E_CELL_DATA' i.e. call the broadcaster only when if No of records in E_CELL_DATA is greater than 0.So a decision step using ABAP is required in your broadcasting Process chain . If the decision is true , then we have to pass the PC step to broadcast step else either error the processor any step, say a mail step stating to stakeholders that No broad since the report has not any data.
  • Now to call the FM in the decision step , we have to implement a BADI 'RASR_CONNECTOR' as say ZBW_BROADCAST' . In the class results in the implementation of BADI, we have to create a custom method( say as 'ZGET_REPORT_RECORDS_COUNT), which took input as 'Info Provider' and 'Query Name' & output the parameter 'Record set' which is count of records in E_CELL_DATA of mentioned function .
  • Also the method 'GET' of the BADI implementation class need to enhanced , so that we can segregate the above method under a separate section as shown in the formula  builder screen of the decision step

BADI Implementation

Capture2.PNG

Custom method' ZGET_REPORT_RECORDS_COUNT' created in BADI Class via editing the class in SE24.

Capture3.PNG

Import & Export parameters of above Highlighted method

Capture4.PNG

 

Code put in the method as display below

Capture5.PNG

Overriding the method 'GET' to have above method displayed under a different section in formula screen of the decision step

Capture6.PNG

 

When we use the decision step we can find the new section 'C_BW_CUSTOM' in the formula builder screen & within we find out method to be used as below

Capture7.PNG

  • Now if the decision step is true , we can call the Bex Broadcaster Program 'RSRD_BROADCAST_STARTER' using the Broadcast setting that you have created for Your Bex Reports .Broadcast Process chain using the decision step will look like as displayed below

Capture9.PNG

 

 

Thanks everyone for having patience reading the document . Feel free to suggest any value add  .

SAP BW 7.31 ABAP Support Packages

$
0
0

274712_l_srgb_s_gl_banner.jpgSAP BWNews Notes

Check out the listed SAP BWNews notes to see what is delivered with the accordingSupport  Package.

 

 

Release Notes for the SAP NetWeaver 7.31 Support Package Stacks

Check out the release notes for detailed information on SAP NW 7.31 SPS. (Logon to SAP Help Library is required)

 

SAP NetWeaver 7.31
Stack Number

SAP BWNews
Note

Comment

192300807
182206236released
172139356released
162100893released
152070453released
142030844released
131989585released
121951409released
111914639released
101882717released
091847231released
081813987released
071782744released
061753103released
051708177released
041680998released
031652580released
021630954released
011593298released

 

 

News


For detailed information on all the Support Packages for the SAP BW 7.31 please see the release notes

 

  • The release dates for the  Support Package Stacks can be found in the Support Package Stack Schedule (SMP login required).
  • Please see the SAP NetWeaver 7.31 Support Package Stack page (SMP login required) This page is the central point of information for planning the implementation of Support Package Stacks (SP Stacks) for SAP NetWeaver 7.31.
  • For regular updates please subscribe to the notes above as follows: You need to display the note on the service marketplace page. Use the direct links above or use SAP notes search and enter the note number directly. To subscribe to this special note activate the "subscribe" button (left hand above the title line of the note page). Also make sure that your E-Mail notification is activated (for activation see note 487366).
  • Importing Support Packages: Please note that after implementing a Support Package, you are usually required to perform additional maintenance in transaction SNOTE. SAP Notes that are already installed may become inconsistent. This can lead to function errors or syntax errors. Go to transaction SNOTE and reimplement the SAP Notes that are no longer consistent. Your BW system is only operable and consistent after you have reimplemented these SAP Notes.

SAP NetWeaver 7.4 BW ABAP Support Packages

$
0
0

Picture5.jpg

Check out the listed SAP BWNews notes to see what is delivered with the according Support Package.

 

SAP BWNews Notes


SAP NetWeaver
7.4 SP #

SAP BW News Note
Comments

02

1804758

released

03

1818593

released

04

1853730

released

05

1888375

released

06

1920525

released

07

1955499

released

08

2000326

released

09

2030800

released

10

2070452

released

11

2100895

released

12

2143705

released

13

2176288

released

14

2207824

released

152252375released
162298815planned release dates

 

1949273 - Important SAP Notes for SAP BW 7.40 powered by SAP HANA

 

 

What comes with the Support Packages?

 

Simplified: SAP BW 7.4 Release NotesRead this blog from Marc Bernard to find out about the  changes with a new SAP BW release or what features were introduced with certain support packages

 

Releasenotes

SP 10 .
SP 09

SP 08

SP 07
SP 06


Support Package 05

 

Further Information:

 

  • Documentation/Release note information will be provived short before release of the according Support Package
  • The release dates for the  Support Package Stacks can be found in the Support Package Stack Schedule (SMP login required)
  • For generell Information about SAP NetWeaver BW 7.4 please visit SAP NetWeaver Business Warehouse 7.4
  • For regular updates please subscribe to the notes above as follows: You need to display the note on the service marketplace page. Use the direct links above or use SAP notes search and enter the note number directly. To subscribe to this special note activate the "subscribe" button (left hand above the title line of the note page). Also make sure that your E-Mail notification is activated (for activation see note 487366).
  • Importing Support Packages: Please note that after implementing a Support Package, you are usually required to perform additional maintenance in transaction SNOTE. SAP Notes that are already installed may become inconsistent. This can lead to function errors or syntax errors. Go to transaction SNOTE and reimplement the SAP Notes that are no longer consistent. Your BW system is only operable and consistent after you have reimplemented these SAP Notes.

BW Upgrade to 7.4 - Steps from BW perspective

$
0
0

Most of the Upgrade show is run by Basis team, but BW team needs to suffice them with required information and there are lot of activities that needs to be carried out by BW team even before the start of the upgrade, without which upgrade will not be smooth.

 

In this document I have tried to cover the steps or activities that need to be carried out from BW perspective.

Even before the start of the Upgrade we can/should run the RSUPGRCHECK program to check the consistency of generated DDIC objects for BW metadata such as InfoObjects, InfoCubes and transfer rules. It determines whether the DDIC tables required for a BW metaobject actively exist.


This report is not only for upgrade check, can also run at regular intervals to check the consistency of the objects to keep the BW system consistent. This report is called automatically during the Prepare phase of upgrade.


If the objects are inconsistent, there is a risk that we may not be able to carry out the upgrade.


Inconsistency of the objects can be handled as below:

  • InfoObjects:
    • Transaction RSD1 -> Extras -> Repair InfoObjects (F8).
    • Choose 'Execute repair'
    • Choose 'Expert mode -> Object selection'
    • In the window that now appears, activate the following checkboxes, too: "Check Generated Objects", "Activate incon. Infoobjects", "Check DDIC Objects", "Check Generated THJ Characts", and "Deletion of DDIC/DB Objects".
    • Execute the program.
  • InfoCubes:
    • Activate the InfoCubes alternatively in transaction RSA1 or RSDCUBE.
    • Alternatively, you can perform the activation using the RSDG_CUBE_ACTIVATE program.
  • Transfer structures/transfer rules
    • Activate the transfer rules in the AWB or activate them using the RS_TRANSTRU_ACTIVATE_ALL report.
    • If the transfer rules follow the naming convention 8<NAME>, you actually have to activate the corresponding DataStore object. You can do so with the program RSDG_ODSO_ACTIVATE.


BW House keeping:


House keeping activities must be an integral part of the operational concept of a complex enterprise data warehouse. Planning the house keeping activities regularly in the system will ensure optimum utilization of system resources and thereby increasing the overall system performance.

  • Compression of InfoCube data
  • Deletion of data from the Persistent Staging Area (PSA) Data
  • Deletion of data from DataStore Object Change Logs
  • Deletion of not used dimension entries
  • Usage and filling of OLAP Cache and aggregates
  • Deletion of temporary database objects
  • Deletion of DTP Temporary Storage
  • Database Volume Statistics
  • Archiving / Deletion of BW Request Monitoring and Administration Tables
  • Filling and Clean up of BW Statistics tables
  • Deletion of DTP error logs
  • Deletion of BW Background Management (RSBATCH) information
  • BW and Database Statistics
  • Deletion of tRFC Queues
  • Archiving of IDocs
  • Deletion of logs on the Application Server
  • Deletion of empty partitions
  • Table and Index fragmentation
  • Compression on database level
  • Deletion of (unused) Aggregates
  • Deletion of (unused) queries / workbooks / bookmarks



Carrying out these activities on regular intervals ensure a healthy BW system.  There are few housekeeping activities that need to be carried out to ensure smooth upgrade/migration. Several common tasks associated with housekeeping a BW system are included in the BW housekeeping task list.


Note 1829728 - BW housekeeping task list


The Housekeeping task list can assist you with the following tasks:


  • Repairs indices on InfoCube fact table(s) at the Data Dictionary level
  • Re-assign requests written into the incorrect PSA partition
  • Ensure request consistencies throughout the PSA landscape
  • Ensure partitioned tables are correctly indexed for the PSA
  • Verify DataSource segments assignment to PSA
  • Checks BW metadata with regard to the DDIC
  • Deletes the entries that are no longer required in table RSIXW
  • Reorganize and delete bookmark IDs and view IDs
  • This program deletes RSTT traces
  • This program deletes BW statistical data
  • Delete Aggregate data via deactivation
  • Clear all OLAP Cache parameters

Untitled.jpg

Apply the Note and run the tasks in advance to ensure smooth implementation of the BW Housekeeping Task List.


There are few tasks that have not yet been added to the Task List, but as well essential reducing the size of the DB:

  • Delete Error Log: RSB_ANALYZE_ERRORLOG (check) and RSBM_ERRORLOG_DELETE (delete)
  • Delete Application Log: SLG1 (check) and SLG2 (delete)
  • Delete old Job Logs: Report RSBTCDEL2
  • Delete old Bookmarks: Report RSRD_BOOKMARK_REORGANISATION
  • Clean existing Roles: Report RSWB_ROLES_REORG
  • Clean Inconsistencies in RSZ* tables: Report ANALYZE_RSZ_TABLES
  • Synch entries in the nametab tables: Report RS_NAMT_CLEAR
  • Clean single runtime objects in nametab: FuBa DD_SHOW_NAMETAB/DD_NAMETAB_DELETE
  • Clean database entries and entries which are not in nametab: FuBa DDIF_OBJECT_DELETE
  • Repair secondary InfoCube Indexes: Report SAP_INFOCUBE_INDEXES_REPAIR
  • Check inconsistencies with shadow indexes from table partitions: Report RSDU_REPART_UI
  • On MSSQL check with Report RSDD_MSSQL_CUBEANALYZE any InfoCube Inconsistencies
  • Reorganize Table OCSCMPLOBJ (activate with delete data in SE14)
  • Note 889596 - UNICODE conversion: Deleting contents of OCSCMPLOBJ
  • Check Tables DWINACTIV_A and DWINACTIV for inactive customer objects
  • Transaction RSRT and RSTT -> delete old ABAPs and Traces
  • Transaction RSSGPCLA -> delete program class for Template = RSRDUMMY, RSTMPLIR, RSTMPLDTPERR, RSTMPL81, RSTMPLDS
  • Transaction RSDDSTAT -> delete old statistical data
  • Transaction RSECADMIN -> delete old authorization logs
  • Note 1682783 - Generated programs are not deleted
  • Note 706478 - Preventing Basis tables from increasing considerably


If you are on SAP NW BW 7.31 SPS8 you can go straight to t.code STC01.


Select the steps you want to execute. Most of them only run in background mode due to their long run time. You can schedule the housekeeping items on periodic basis.


Most of the task can also be run in a check mode only. Each step is explained when you click on the document icon at the end. A couple steps are Repair related while others are for Cleanup purposes.


For detailed implementations steps refer:http://scn.sap.com/docs/DOC-46240


All the above steps (RSUPGRCHECK and BW Housekeeping task list) can be run at regularly and is not necessary to run only if there is upgrade or migration.An upgrade project can be of 2 categories:

  1. Technical Upgrade
  2. Functional Upgrade


Technical Upgrade is only a version upgrade without any functionality changes.

Untitled1.png

Mentioned above are the different phases of Upgrade. BW activities start in Checks phase, and most of these activities would had been covered in the House keeping task list which was performed well before the upgrade. This reduces the time during the upgrade phases.


Untitled2.png


Just run through each and every step. BI activities in this phase are:


  1. Stop RDA Deamon -  this is taken care automatically no manual intervention is required.
  2. Check activate of ODS objects - this is also an automated process but need to ensure that this doesn’t result in error during the upgrade. (Run program RSAODSACTIVATE to check the inconsistent DSO objects)
  3. Check/Repair Status of Info Objects - To avoid a data loss, upgrade shutdown, and long runtimes, check the status of the InfoObjects before the upgrade.
  4. Call transaction RSD1 -> All InfoObjects -> Update.Check inconsistencies with RSZ* Tables - Report ANALYZE_RSZ_TABLES is designed as a check-tool for detecting and solving different types of inconsistencies in the main query definition database tables
    1. Activate all information objects that are not assigned with a green light.
    2. Then choose Extras -> Reorganize InfoObject tables to reorganize the InfoObject tables.
  5. Check inconsistencies with RSZ* Tables - Report ANALYZE_RSZ_TABLES is designed as a check-tool for detecting and solving different types of inconsistencies in the main query definition database tables
  6. Activate Info Objects - Run report RSDG_IOBJ_ACTIVATE to activate inactive info objects
  7. Clean/delete the messages for error -  Run report RSB_ANALYZE_ERRORLOG to analyse which DTPs have created how many single record error messages, and to how many requests these messages are distributed. Use the report RSBM_ERRORLOG_DELETE for single DTPs to delete the messages for requests up to a specified date
  8. Check Master Data consistency - Check the consistency of master data by executing report RSDMD_CHECKPRG_ALL. Execute in background ('Execute in Background') in order to avoid timeout.  If the report returns errors run the report again with the 'Repair' option flagged.


Time required for all these activities during the upgrade phase can be reduced by performing these well before the upgrade, regular housekeeping, run report RSUPGRCHECK, run SAP BW housekeeping task list.


Obsolete objects as of BW 7.4:

Obsolete ObjectSubstitute in BW 7.4
InfospokeOpen Hub Destination
Update Rules*Transformation
Transfer Rule*Transformation
3.x DataSource*7.x DataSource
3.x data archiving7.x data archiving
Composite Provider in Workbench (RSA1)**Composite Provider in HANA Stuido
Virtual Provider on 3.x InfosourceComposite Provider
3.x Queries*7.x Queries
3.x Workbooks7.x Workbooks
3.x Web templates7.x Web templates
3.x flows*7.x flows
ABAPs using select statements **  (select * or select single *)Change using list of fields required.
Function Module RSDRC_INFOPROV_READ **Replace with CL_RSDRC_INFOPROV
Use of RSCHAVL data element  in ABAP statements **Use 'TYPE' instead of 'LIKE'


( * not obsolete but recommended to use in BW 7.4, **  only in case of BW on HANA)


This may not be an exhaustive list of obsolete objects with respect to BW on HANA and tries to cover few things, as my project was on non HANA environment.The enforcement of restriction is not because of the BW 7.4 powered by HANA; this is because of the decommissioning of support to the objects by SAP. It is recommended to use new objects as they provide more functions and better usability.By default, all these obsolete function are hidden. That means mostly 3.x functions in the context menu on the object trees in RSA1 and in other transaction are not available.


However, you can change this setting using tcode RSCUSTV32



List of tests to be performed:

  • Check basic t.codes
  • Check the source system connection
  • Check the consistency of the objects ( Multiprovider, Info cubes, DSO, Info set, Info objects, Transformations, Info source, Data source, DTP, Info package)
  • Check the Application server file path exist and test the data loads for the same
  • Execute and validate the reports before and after upgrade
  • Check the delta extraction
  • Check the data mart load
  • Run process chains
  • Run APD and validate the results before and after upgrade
  • Run the reports which has variable exits and check for its consistency before and after upgrade
  • Run the DTP loads which involves look ups to other DSO’s
  • Check RSKC before and after upgrade
  • Check the portal connection and run the reports and check for its consistency
  • Check currency conversion
  • Check UOM conversion
  • Create, save, use and delete Query variants
  • Create, save, use and delete ABAP program variants
  • Check display data functionality for each info providers types.
  • Create query, delete query.
  • Copy query and save in different roles, use and delete by assigning to different roles as per authorization
  • Check filters, exceptions, conditions, text variables, formula variables, totals on/off in queries.
  • Create workbook, save in different roles, use and delete by assigning to different roles as per authorization.
  • Check key user profiles for security and authorizations are working fine before and after upgrade

References:

 

http://scn.sap.com/docs/DOC-46240

http://scn.sap.com/docs/DOC-58813

http://scn.sap.com/docs/DOC-59138

http://scn.sap.com/docs/DOC-7856

http://scn.sap.com/community/bw-hana/blog/2014/02/19/bw-pre-and-post-upgrade-and-migration-tasks

http://scn.sap.com/docs/DOC-47617

http://scn.sap.com/community/bw-hana/blog/2015/12/27/bw-obsolete-object-types-and-substitue-sap-bw-74

 

Notes Referred:

449160 - RSUPGRCHECK report

458363 - Prepare in upgrade: Inconsistent InfoObjects and InfoCubes

1829728 - BW Housekeeping Task List

1150724 Consolidated note on the check & repair reports for PSA

706478 - Preventing Basis tables from increasing considerably

1370848 - New Master Data Deletion - Information

706478 - Preventing Basis tables from increasing considerably

1634681 - Database migration: Report to find large row store tables (not available for 7.0x)

706478 - Preventing Basis tables from increasing considerably

1879618 - Pre-upgrade measures for upgrade/update to 7.4

458363 - Prepare in upgrade: Inconsistent InfoObjects + InfoCubes

997263 - Error 'READ_FIELD_NAME_OF_DOC_STRUC' during upgrade

1880465 - SAP_BW_HOUSEKEEPING not terminating

1845061 - Background user has no authorization for scheduling

1935301 - SNOTE tries to download SAP note 0000000000

Upgrade to SAP Business Warehouse 7.40

$
0
0

SAP Business Warehouse (not only on SAP HANA) continues to be the cornerstone of SAP's strategic vision for enterprise data warehousing providing organizations a solid data foundation to capture, store, transform and manage data in a scalable, enterprise-ready data warehouse. See this presentation to understand the mayor steps for a successful upgrade to SAP Business Warehouse 7.40 SP08 (SR2) and higher. Customers focusing on the planning capabilities will benefit from the enhanced Planning application Kit and FOX usability.

View this Presentation

Embedded Business Warehouse

One generic extractor with multiple cursors

$
0
0

One generic extractor with multiple cursors         

     

Applies to:

SAP BW 7.x system, for more information, visit the Business Intelligence homepagehttps://help.sap.com/saphelp_nw73ehp1/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm

 

Summary

This Document describes how to use multiple cursors in a single generic extractor.

 

Author Bio

Lakshminarasimhan Narasimhamurthy is BW certified and ABAP certified consultant and worked on multiple implementation, development and support project's within India and outside of India. He has worked for fortune 500 clients like Nestle, Warner Bros, GCC, General Electric etc. He is strong in BW, BW related ABAP, HANA modeling, BW-HANA modeling, BODS and BO/BI tools like WEBI, Design Studio, IDT and Lumira.

 

Details

There might be requirement from Business to combine data from 2 or more table. The tables might have no relationship with each other but contain business related data. In this case we cannot do a “inner join”. The easy way is to create 2 separate DataSource’s over these tables. But here in this document I am explaining how to have 2 cursors and fetch data from both of these tables and combine them in a single generic extractor.

 

I am giving an example say there is 15 steps to complete a task. 

Step 1 to 11 is maintained in one table ZA_TASK1TO11.

Step 12 to 15 is maintained in second table ZA_TASK12TO15.

The steps are sequential, only if 1 is completed the step 2 will begin and only when step 2 is completed step 3 will begin.

You can assume this as a workflow. Now Business wants to know upto what step the task is complete. Unfortunately there is no task id relationship,

the primary key of both the table  is the concatenation of (taskno_stepnumber) and the primary key is non-character.

 

So if the generic extractor based on FM RSAX_BIW_GET_DATA_SIMPLE.

I have created 2 cursors.

 

STATICS: S_CURSOR            TYPE CURSOR,

        C_CURSOR            TYPE CURSOR.

 

      OPEN CURSOR WITH HOLD S_CURSOR FOR

Select task_num comp_indicator from ZA_TASK1TO11.

 

      OPEN CURSOR WITH HOLD C_CURSOR FOR

Select task_num comp_indicator from ZB_TASK12TO15.

 

 

Initially the cursors will be zero and once the “open cursor” statement is executed, the S_CURSOR will have the value 1 and C_CURSOR will have the value 2 etc.

Suppose if at all, you have another cursor and you open the cursor then it will have value 3 and so on.

 

Now the trick lies in waiting for the both of these cursors to close before raising the exception

RAISE NO_MORE_DATA.

 

Usually we will have only one cursor and when the fetch fails, then the cursor is closed and the exception "RAISE NO_MORE_DATA" is raised, to close the data extraction. 

In our case we have 2 cursors, so if the data fetch for cursor one fails, then it need to halt for the second cursor and wait until the fetch fails for the second cursor too.

After both the data fetch fails then the exception RAISE NO_MORE_DATA needs to be raised. This is vice versa too, if the data fetch for cursor two fails, then it need to halt for the first cursor and wait until the fetch fails for the first cursor too. After both the data fetch fails then the exception RAISE NO_MORE_DATA needs to be raised.


When the cursor is closed then it will have the value 0 in it.As the extractor will be called multiple times during the data fetch, consider the following example, during the first call the cursors are opened and during the second call the data is fetched from both of the cursors and appended to the table E_T_DATA & in the third call the cursor one fails and hence we close the cursor to make it zero and we check for the second cursor if it is closed, but still second cursor has data and hence it has the value 2, in such case the extractor is called for the fourth time. In the fourth call, the first cursor is checked, only if it is not 0(not closed) then we try to fetch the data, as in our case the first cursor is already closed and hence we go to the next block.

The second cursor(C_CURSOR) is checked if it is 0, the condition will fail as it is having value 2 we go inside the if block, now  inside the if condition the fetch fails and we close cursor(C_CURSOR), so that we make it zero. Now we check to see if the first cursor is already closed, in our case it is closed already.

So the exception RAISE NO_MORE_DATA is triggered.


IF S_CURSOR NE 0. “ To check if the cursor is already closed
FETCH NEXT CURSOR S_CURSOR APPENDING CORRESPONDING FIELDS OF TABLE E_T_DATA
PACKAGE
SIZE S_S_IF-MAXSIZE.

  
IF SY-SUBRC <> 0.
    
CLOSE CURSOR S_CURSOR.
    

       IF C_CURSOR = 0.”Checks the second cursor if it is closed

         RAISE NO_MORE_DATA.
       
ENDIF.

   ENDIF.

ENDIF.

 

IF C_CURSOR NE 0.

FETCH NEXT CURSOR C_CURSOR APPENDING CORRESPONDING FIELDS OF TABLE E_T_DATA
PACKAGE
SIZE S_S_IF-MAXSIZE.

IF SY-SUBRC <> 0.
  
CLOSE CURSOR C_CURSOR. ”Checks for first cursor if it is closed
I

            IF  S_CURSOR = 0.
       
RAISE NO_MORE_DATA.
     
ENDIF.
ENDIF.

ENDIF.

 

This way the extraction will stop only when both of cursor fail to fetch data and we will have combined data from both of the tables.


Alternative Usage of RSDG_TRFN_ACTIVATE

$
0
0

Introduction

The ABAP report RSDG_TRFN_ACTIVATE is well known to activate transformations (and the corresponding DTPs) mainly in in productive and quality environments. However, the report can also be handy during the development phase and potentially save a lot of time. This is what I would like to focus on here.

The Scenario

Let’s have a look at the following data model having one data target with several inbound transformations. 

 

If you change now the data target, it will result in a deactivation of all Transformations and Data Transfer Processes:

 

Typically, you would now make the required changes to the transformations, activate and add them to a transport. This can be a pretty time consuming task, especially if only an activation is required in most cases. 

Usage of RSDG_TRFN_ACTIVATION

Here the ABAP RSDG_TRFN_ACTIVATE can be very handy. If you run the ABAP for the given InfoProvider as shown in the screenshot, you will have activated and assigned all inactive objects to a transport in a fraction of time doing it manually one-by-one in RSA1:

 

The tickbox “Transport recording …” ensures that you get a transport pop-up for every transformation and DTP:

 

 

The only disadvantage is that you have to confirm each object by pressing enter (but you also have the flexibility to assign the objects to different transports). Finally you will have all DTPs and Transformations activated and assigned to a transport.

Other Usage Scenarios

  • It can make sense to create a variant in case you are working regularly on the same model:

    For example, I take care of one data model with one central DSO and about 20 source providers and 5 data targets. Changing the central DSO inactivates around 30 transformations and 70 DTPs. For this purpose I’ve created a variant which contains the necessary transformations. It takes then only a few minutes to activate and assign all these objects to a transport.
  • The program can also be used to collect transformations and DTPs easily. By changing the field Object Status to ACT it will activate and assign the objects to transports even if they are not inactive.
  • Sometime it makes sense not transporting the activations. For instance if overtakers are to beexpected due to parallel developments. Then you can use the report to activate the inactive transformations in the target system (even if these objects are protected against changes by system settings). The transport log tells you which transformations have to activated:

    The downside from my perspective is that this has to be done in all target system. Having the objects on a transport is therefore the preferred way for me. 

Tickbox for Transport missing?

Just in case you are missing the Transport tick box in your system. It was introduced with the correction from the note 2080574 - Mass activation programs unintentionally load generated programs into main memory, termination due to memory overflow. This correction is only available as of BW 7.3. Actually the flag was always there but it was hidden. The following screenshot is taken from a BW 7.0 system:

 

 

If you run the program in debugging mode you can change the value of with_cto to “X” and then you can also assign the objects to a transport in the same way as with newer releases.

SAP BW 7.3 ABAP Support Packages - News

$
0
0

274712_l_srgb_s_gl_banner.jpg

SAP BWNews Notes

Check out the listed SAP BWNews notes to see which notes are delivered with the according Support Package.

 

 

 

SAP NetWeaver 7.3
SP Stack Number
SAP BW News Note
Comments
021506833released
031538941released
041583516released
051606526released
071652579released
081680997released
091750249released
101810084released
111878293released
121950117released
132021667released
142132939released
152199121released
162292375
172342209

 

1846493 - Important SAP Notes for SAP BW 7.3x powered by HANA

 

What comes with the Support Packages?

 

Support Package 11
  • Investigate the release notes for the Support Package 11  and find there the desriptions of the deliverered enhancements:  (Logon to SAP Help Library is required)
  • In summary SP 11 is providing:
    • IMPLEMENTING CHARACTERISTIC RELATIONSHIPS AND DATA SLICES ON THE SAP HANA DATABASE 
      In the context of BW-integrated planning, you can define the permitted combinations of characteristic values (in the form of characteristic relationships) and create data slices for the selected data that you want to protect. If the generic types of characteristic relationships (attribute, hierarchy, DataStore) and data slices (selection) do not meet specific customer requirements, you can implement characteristic relationships and data slices of type Exit.
      • ABAP Exit Implementation
        The typical ABAP exit implementation of these examples is direct, with the external data being read from the database using SQL commands from the ABAP runtime and - taking into account further information such as user name (sy-uname) - checking, deriving or creating records in the corresponding structure.
      • Implementation on the SAP HANA Database
        In BW, you can perform planning using internal database routines. In the SAP HANA database, you can perform SAP HANA-optimized planning. If you are using the Planning Applications Kit, we recommend also implementing the customer-specific exist functionality for characteristic relationships directly in the SAP HANA database using SQLScript.

 

    • Enhancements in area: REPLICATION OF DATASOURCES
      You can make a number of settings that affect how replication is performed. These allow you to define which DataSources are replicated, thus speeding up the replication process. For the replication of DataSources at the source system level or in an application component, you can make the following settings:
      • You can define the extent of the replication (active and/or delivery version).
      • You can define whether DataSources that are not known yet in the BW system should be created there and, which object type they should be created in.
      • You can define whether DataSources that do not exist any more in the source system should be created in the BW system.
      • You can define when and how DataSources that had already been activated prior to replication should be reactivated.
    • Enhancements in area: TRANSFERRING DATA USING OPERATIONAL DATA PROVISIONING
      Using the operational data provisioning (ODP) framework, you can transfer InfoProviders from BW systems (source BW systems in release SAP NetWeaver 7.4 SPS05 and higher) to your BW system. When creating the ODP source system, you can use the ODP context “BW - SAP NetWeaver Business Warehouse”.

 

Support Package 10

 

 

Support Package 9
Support Package 8

 

For detailed information read the release notes for the Support Package 8.
In summary the SP 8 is providing:

  • SAP HANA specific features:
    • Performance boost for data loading, query  response time and In-memory planning
    • SAP HANA-optimized InfoCubes and Data Store Objects
    • Simplified and faster data modeling/remodeling
    • “Not active” data concept
    • SAP BW and SAP HANA Mixed Scenarios (BO Explorer, BW Virtual Master Data, etc.)
    • Support of Semantic Partitioned Objects and enhanced partitioning for write optimized DSOs
    • Simplified system landscape
  • Platform independent highlights
    • Graphical data flow modeling and enhanced support of 3.x-> 7.x data flow migration
    • Semantic Partitioned Objects (SPO)
    • Rapid prototyping of Ad Hoc scenarios via BW Workspaces
    • File download of BW meta data
    • DSO planning
    • Tighter integration with SAP Data Services

 

For details read the presentation Support Package 8 for SAP BW on SAP HANA-Overview

 

 

For the SAP recommendation of notes on top of SAP Netweaver SP08 when your system is running on HANA DB see note 1769670 - Important Notes for SAP BW powered by HANA on SP8.

 

The presentation SAP NetWeaver 7.30 SPS8 - Planning on DSO shows the new planning on DataStore objects comming with SPS 8 for SAPNetWeaver 7.3

 

Support Package 7

Investigate the release notes for Support Package 7 and find there the desriptions of the deliverered fixes and enhancements:

  • Find out about the enhancements for SAP HANA optimization and the Data Warehouse Management. Further more you can read about the enhancements of the Analytic Engine in the OLAP Cache Monitor and for creation of CompositeProviders. For the BW Workspaces some handy improvements have been developed as well.

 

Check out all release notes for detailed information on SAP 7.3 SPS. (Logon to SAP Help Library is required)

 

 

Generell Information

  • SAP always recommends to apply the latest Support Package
  • For all SAP BW 7.3 powered by SAP HANA Ramp up customers it is strongly recommended to implement SP06. For detailed information please have a look at note 1657994. SAP also recommends to apply the latest available SAP HANA revision.
  • The release dates for the Support Package Stacks can be found in the Support Package Stack Schedule (SMP login required).
  • Please see the SAP NetWeaver 7.3 Support Package Stack page (SMP login required). This page is the central point of information for planning the implementation of Support Package Stacks (SP Stacks) for SAP NetWeaver 7.0.
  • For regular updates please subscribe to the notes above as follows: You need to display the note on the service marketplace page. Use the direct links above or use SAP notes search and enter the note number directly. To subscribe to this special note activate the "subscribe" button (left hand above the title line of the note page). Also make sure that your E-Mail notification is activated (for activation see note 487366).
  • Importing Support Packages: Please note that after implementing a Support Package, you are usually required to perform additional maintenance in transaction SNOTE. SAP Notes that are already installed may become inconsistent. This can lead to function errors or syntax errors. Go to transaction SNOTE and reimplement the SAP Notes that are no longer consistent. Your BW system is only operable and consistent after you have reimplemented these SAP Notes.

Analysis Authorization Simplified (Part 1)

$
0
0

Applies to:

SAP BW 7.x system, for more information, visit the Business Intelligence, https://help.sap.com/saphelp_nw73ehp1/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm

 

Author Bio

Lakshminarasimhan Narasimhamurthy is BW certified and ABAP certified consultant and worked on multiple implementation, development and support project's within India and outside of India. He has worked for fortune 500 clients like Nestle, Warner Bros, GCC, General Electric etc. He is strong in BW, BW related ABAP, HANA modeling, BW-HANA modeling, BODS and BO/BI tools like WEBI, Design Studio, IDT and Lumira.

 

Summary:

This document shows the steps to be followed while implementing authorization is SAP BW system. The data stored in the InfoProvider and it is made visible to the end user via BEx query.  For any organization having global presence likely to have multiple company codes, plants, sale org etc. We need to authorize or restrict the user to look into the data to which they are responsible for.

Ex: When running “Purchase order quantity report” (0PUR_C01_Q0011) the user needs to see only to the plants he is confined to and not others.

 

Details:

Following are the steps that need to be followed to enable the authorization. To make the explanation simple, I will be explaining using an example.  When running “Purchase order quantity report” (0PUR_C01_Q0011) the user needs to see only to the plants he is confined to and not others.

 

As the first step, make sure that the given below InfoObject’s are “Authorization Relevant”,

* 0PLANT                Plant

* 0TCAACTVT       Activity in Analysis Authorizations

* 0TCAIPROV        Authorizations for InfoProvider

* 0TCAVALID         Validity of an Authorization is made authorization relevant

* 0TCTIFAREA      InfoArea

Untitled.png

 

If the 0Plant is not “Authorization Relevant”, just click the “Check box” and make it authorization relevant and do the same for all the InfoProvider’s 0TCAACTVT, 0TCAVALID, 0TCAIPROV, 0TCTIFAREA.

 

0TCAACTVT  – This defines the activity of authorization either Display or Change.

0TCAVALID    – This defines the validity (Time Period) of the authorization (From date and till date)

0TCAIPROV  – This defines the Authorizations for InfoProvider. We can specify the list of  InfoProvider’s  upon which the report lies.

0TCTIFAREA – This defines the Authorizations for InfoArea.

 

Then login into the “Analysis Authorization”, t-code RSECADMIN

 

pic.jpg

 

Select the “Ind. Maint.”(Individual Maintenance).

We have the “0BI_ALL” authorization delivered by SAP. As the name says, this authorization gives access to everything!!!

Now copy the 0BI_ALL to ZBI_PUR

 

pic.jpg

After copying then edit the “ZBI_PUR” to retain only the required objects.

 

pic.jpg

pic.jpg

Now click in the “Intervals” of 0PLANT InfoObject

 

pic.jpg

 

We have the following options,

  • Single value (This is what we have used in previous screen shot)
  • Between
  • Contains Pattern

pic.jpg

Now click in the “Intervals” of 0TCAACTVT InfoObject and select the display option(03)

pic.jpg

Now click in the “Intervals” of 0TCAIPROV InfoObject and select the InfoProvider 0PUR_C01.

(We are selecting the InfoProvider(s) on which the BEx query is dependent on).

pic.jpg

Now click in the “Intervals” of 0TCAVALID InfoObject and select the value *.

(* assures that the validity is valid for ever. If required the time intervals can be specified).

 

pic.jpg

 

Now click in the “Intervals” of 0TCTIFAREA and specify values of the InfoArea.

pic.jpg

 

Now that all the parameters are filled and activated

pic.jpg

 

Now create a single role in PFCG

pic.jpg

Click on “Change Authorization Data”

 

pic.jpg

pic.jpg

pic.jpg

pic.jpg

 

Select the “Edit” button and add the “Analysis Authorization” we have created before.

pic.jpg

 

Enter the value” ZBI_PUR” and Save

pic.jpg

pic.jpg

 

Now add the following authorizations too,

  • S_RS_COMP
  • S_RS_COMP1
  • S_RFC

S_RFC is required to login into the BW system from BEx.

S_RS_COMP & S_RS_COMP1 is required to add the BEx Queries.

 

pic.jpg

pic.jpg

 

Now this role is assigned to my user "TEST_MM"

 

pic.jpg

 

Now we can have created authorization then assigned it to a role and this role is assigned to the user. Let’s test the user. We can test any user authorization from RSECADMIN.

Go to RSECADMIN and then select the tab “Analysis” and select the button “Execution as”

pic.jpg

Specify the user name and test the report using the t-code RSRT

 

pic.jpg

Give the query name and execute

pic.jpg

In the BEx query, plant is the input variable

 

pic.jpg

Now I have specified value 2006, which the user is authorized. So the query executes.

pic.jpg

I again executed the query with different value 2005.

pic.jpg

Now as expected the query throws the below message,

pic.jpg

So our results are positive. We have successfully tested the authorization.

 

Please continue to read part 2 of this document...

Analysis Authorization Simplified (Part 2)

$
0
0

Applies to:

This is the continuity part the previous document Analysis Authorization Simplified (Part 1)


Summary:

The user wants to execute the query but the authorization must get populated for the plant automatically. The user is lazy to enter the values!!

To accommodate his wish, I copied the query 0PUR_C01_Q0001 to ZPUR_C01_Q0001.

 

To get the authorization filled automatically, we need to create an authorization variable for PLANT InfoObject.


pic.jpg

Now make the authorization variable as single value and remove “variable ready for input”.

In this case the authorization variable automatically filled with value 2006.

 

pic.jpg

During moving to PRD system, both the role and the analysis authorization must be transported.

In case the user needs authorization for few more plants, then add those plant values to the Analysis authorization ZBI_PUR and then make the authorization variable as multiple single values.

Hope the document helps in understanding the analysis authorization.

SAP BW Near Line Storage solution (NLS) based on SAP IQ

$
0
0

Introduction

 

Improve decision-making capabilities by bringing unprecedented performance to SAP NetWeaver Business Warehouse with SAP HANA for current data and SAP Sybase IQ for historical data— achieving the perfect balance of cost and performance. The adapter for Sybase IQ as a near-line solution is delivered with the BW system. Integration of Sybase IQ makes it possible for you to separate data that you access frequently from data that you access rarely, thus making less demands on the resources in the BW system. The near-line data is stored in compressed form. You can thus reduce the costs incurred by data that is accessed less frequently. Please Note that the SAP-NLS Solution can be used with all supported Database Versions supported by SAP NetWeaver BW 7.3x. SAP Near-line-storage for SAP BW is general available with SAP NetWeaver BW 7.3  Support Package 9 and Sybase IQ 15.4

The document https://scn.sap.com/docs/DOC-39627 will guide you through the implementation process.

 

Some Background Information regarding the new SAP Implementation of the SAP Business Warehouse (BW) Near-Line Storage (NLS) Interface for SAP IQ

 

 

The BW NLS interface was introduced already in release BW 7.0, but could only be used thus far in SAP development partner implementations. A number of partners showed interest in this niche and developed a variety of NLS solution concepts.

 

SAP_NLS_Partner.JPG

(click on the image to continue)

 

One quite remarkable development here was an initiative by the software company PBS from Bensheim in Germany, a longstanding SAP development partner whose main focus is on archiving. In its BW NLS implementation, PBS opted for the analytic database platform Sybase IQ as the storage location for its NLS data, and had very positive experiences with the column-based architecture of this database. Notably, this was prior to the acquisition of Sybase by SAP.

 

Since BW release 7.3 SP09  is available, SAP is now heavily involved in the database sector, has acquired Sybase and developed its own in-memory database, the legendary SAP HANA DB.
In future, HANA DB and SAP IQ will work hand in hand as the main cornerstone of the SAP Real-time Data Platform (RTDP)
With this in mind, the NLS strategy in Business Warehouse has also undergone a fundamental change.
To begin with, SAP will take complete control of persistence management for its Business Warehouse and will offer an SAP owned NLS implementation for SAP IQ. Instead of having to rely on partner solutions, customers will then receive all the components required for running an EDW directly from SAP, including the DWH application (SAP NW BW), the databases (SAP HANA DB and SAP SAP IQ) and an intelligent NLS management solution.
SAP is pursuing a three-step color-coded persistence management concept.
Active data that has to be accessible on a permanent basis for read and write processes is referred to as ‘hot’ data. As would be expected, this data is stored in the main memory of the HANA DB.
Warm data, which is not accessed quite so often, is best stored in the HANA DB file system. Whenever this data is loaded into the main memory for processing, it is displaced with higher priority once processing has finished.

To achieve this, the BW development team has developed a non-active data concept in order to optimize the displacement strategy for BW tables in the HANA DB. Here, tables with warm data are flagged and are prioritized for displacement from the main memory whenever they are used. These tables are normally partitioned in the default setting, and only the partitions of the table that are affected by the transaction are loaded to the main memory.
This makes it possible to make more efficient use of the priceless commodity that is main memory space.

 

Differentiations: Multi Temperature Data Approach

NLS_temperatures_2.JPG


While the non-active data concept manages the passage of warm data between the main memory and the disk, NLS management is concerned with the next data layer. This is ‘cold’ data that is rarely used and for which no more updates are anticipated in BW. This data is removed in time slices to the Sybase IQ DB. All affected time intervals of an InfoProvider are locked for load processes in BW.
Apart from this restriction, the removed NLS data remains available at any time for all other processes in BW, for read accesses quite naturally but also for ETL processes or individual look-ups.
Strategic queries, which analyze data over longer periods of time and thus inevitably also include cold data, are split and procure data both from HANA DB and from SAP IQ.
The removal process itself is highly complex and must comply with transactional requirements. All this can be easily managed in both directions using BW Data Archiving Processes (DAP) which can be combined in Process chains. Finally, the consistency of the entire data pool must be ensured at all times, even if this is split into two disjoint parts in the case of NLS.


The interface to the SAP IQ database required for this was implemented by SAP developers in Walldorf, on the basis of the existing NLS interface and its SDK.

 

Near-Line Storage (NLS) Architecture - LibDBSL based

NLS_synergy_2.JPG

 

On the basis of the ODBC connection to IQ, and separate porting in NetWeaver, this makes it possible to create a connection in ABAP from BW to IQ. With this connection, Sybase IQ Loader technology can be used for extremely high-speed writing of the BW data to be extracted to the NLS tables on the IQ.
Initial tests show that this can be done at a rate of about 200 million sets of data per hour. With these figures, SAP is way ahead of its competitors.

Find more details in the recorded Live Expert Session (LES) and  SAP NetWeaver BW Near Line Storage (NLS) Implementation for Sybase IQ

 

Best Regards

Roland Kramer, PM SAP EDW (BW/HANA/IQ)

Types of InfoCube Partitioning

$
0
0

Hi,

 

    This document contains the information about four types of info cube partitioning.

 

Thanks,

Raji

ABAP performance tuning for SAP BW system

$
0
0

ABAP performance tuning for SAP BW system

 

Applies to:

SAP BW 7.x system, for more information, visit the Business Intelligence homepage https://help.sap.com/saphelp_nw73ehp1/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm

 

Summary

This Document describes how fine tune the ABAP code that we write in the SAP BW system.

 

Author Bio

Lakshminarasimhan Narasimhamurthy is BW certified and ABAP certified consultant and worked on multiple implementation, development and support project's within India and outside of India. He has worked for fortune 500 clients like Nestle, Warner Bros, GCC, General Electric etc. He is strong in BW, BW related ABAP, HANA modeling, BODS and BO/BI tools like WEBI, Dashboard, IDT, Lumira.

 

Details

In SAP BW system, we will be using ABAP in many places and the common used places are start routine, end routine and expert routines. This document points out the ways we can fine tune the ABAP code written in the SAP BW system.

 

Rule 1– Never use “select *”.  Select * should be avoided and “select  ... end select” select must be avoided at any cost.

 

Rule 2– Always check if internal table is not empty before using “For all entries”. When you use a select statement with “for all entries”, make sure the internal table is not empty.

 

Example:


SELECT
CSM_CASE
CSM_EXID
CSM_CRDA
CSM_TYPE
CSM_CATE
CSM_CLDA
FROM
/BIC/AZCACSMDS00
INTO TABLE
LIT_ZCACSMDS
FOR ALL ENTRIES IN
RESULT_PACKAGE-----------  Must not be empty
WHERE
CSM_CASE
= RESULT_PACKAGE-CSM_CASE.

 

Hence we need to check if the internal table is not empty and only if it is not empty then proceed with the select statement.  

 

IF RESULT_PACKAGE[] IS NOT INITIAL.

    SELECT
CSM_CASE
CSM_EXID
CSM_CRDA
CSM_TYPE
CSM_CATE
CSM_CLDA
FROM
/BIC/AZCACSMDS00
INTO TABLE
LIT_ZCACSMDS
FOR ALL ENTRIES IN
RESULT_PACKAGE
WHERE
CSM_CASE
= RESULT_PACKAGE-CSM_CASE.

  1. ENDIF.

 

Rule 3– Always use “Code Inspector” and “Extended syntax check”. Double click the transformation and then from menu option you can find “Display generated program”, select it. Then the entire program is displayed, then select the “Code Inspector” and “Extended Program Check” from the below screen shot.

Correct the warning and error messages shown.

 

Rule_3.png

 

Rule 4– Always use the “types” statement to declare the local structure in the program and the same structure can be used in the select statement.

Example –

From the purchasing DSO if you want to read PO number, PO Item and Actual Quantity Delivered. Then we create a local structure using types statement.

Types : begin of lty_pur,

OI_EBELN   type                /BI0/OIOI_EBELN,

OI_EBELP   type                /BI0/OIOI_EBELP,

PDLV_QTY  type               /BI0/OIPDLV_QTY,

End of lty_pur.

Data : lt_pur type standard table of lty_pur. “ Internal table declared based on the local type

Select OI_EBELN OI_EBELP PDLV_QTY from /BI0/APUR_O0100 into table lt_pur.

 

Rule 5– Always try use the “Hashed” internal table and “Sorted” internal table in the routines, sometimes when you are unable to use them and you are using the “Standard” internal table, make  sure you “Sort” the table in ascending order based on the keys you use in “READ” statement and then use “Binary search” in the READ statement. This improves the read statement performance. When the standard table is sorted and then used make sure that the read statement, matches the sort order otherwise you will get the correct result.

 

Example –

Select OI_EBELN OI_EBELP PDLV_QTY from /BI0/APUR_O0100 into table lt_pur.

If sy-subrc = 0.

Sort lt_pur by OI_EBELN OI_EBELP.     “ Sorting the table based on the key used in read statement

Loop at result_package assigning <result_fields>.

Read table lt_pur into la_pur with key EBELN = <result_fields>- OI_EBELN  EBELP = <result_fields>- OI_EBELP Binary search.

If sy-subrc = 0.

<logic to populate the fields>.

 

Rule 6 – Never use “into corresponding fields of table”. Follow Rule 5, to declare structure via types statement and use it to create an internal table. In the select statement do not use “into corresponding fields of table”.

 

Example  --

Never use the way given below, follow the example of Rule 4

Data : lt_pur type standard table of /BI0/APUR_O0100.

Select OI_EBELN OI_EBELP PDLV_QTY from /BI0/APUR_O0100 into corresponding fields of table lt_pur.

 

Rule 7– In the select statement make sure you add the primary key’s. For the DSO’s with huge volume of data make sure you create index and then use them in the select statement.

 

Rule 8– Never use Include program in your transformations.

 

Rule 9– Try to minimize the use of 'RSDRI_INFOPROV_READ'. In case you need to use it make sure you need only the necessary characteristics and key figures.  Make sure the cube is compressed.

 

Rule 10– Make sure to clear the “work area”, “temp. variables” before they are used in the loop.

 

Rule 11– Always rely on the field symbols rather than the work areas. This way you can avoid the “modify” statement.

 

Rule 12– When the code in the transformation is huge and complicated, make sure the DTP package size is reduced for a faster data load.

 

Rule 13– Never use hard-coded “BREAK-POINT” in the transformation.

 

Rule 15– Add lot of comments in the transformation along with the Developer name, Functional owner, Technical Change, CR number etc.

 

Rule 16 – Delete duplicated before you use the “For all entries”.

 

Example –

 

You select the “status profile” from CRM DSO.

 

Select CSM_CASE CSM_EXID CSM_SPRO from  /BIC/AZCSM_AGE00 into table lt_csm_pro.

 

Let us assume that there are 1 million records and all these come to the table lt_csm_pro

Now I need to extract from another table using the “Status profile”

So,

 

Select 0CSM_TYPE 0CSM_CATE from /BIC/AZCSM_BHF00 into table lt_csm_bhf for all entries in

lt_csm_pro where CSM_SPRO = lt_csm_pro-CSM_SPRO.

 

The above select statement will take very long time to execute as there are 1 million records.

we know that status profile has duplicates and hence when we remove the duplicates then we

will have only 90 status profiles. So the best approach is to remove the duplicates and then use them in “For all entries”

Copy the table lt_csm_pro to another internal table lt_csm_pro_1.

 

lt_csm_pro_1[] = lt_csm_pro[].

 

Sort lt_csm_pro_1 by CSM_SPRO.

 

Delete adjacent duplicates from lt_csm_pro_1 comparing CSM_SPRO.

 

After the delete statement lt_csm_pro_1- CSM_SPRO will contain only 90 records. Hence the below statement will work fast.

 

Select 0CSM_TYPE 0CSM_CATE from /BIC/AZCSM_BHF00 into table lt_csm_bhf for all entries in

lt_csm_pro_1 where CSM_SPRO = lt_csm_pro_1-CSM_SPRO.

 

Rule 17 – Always use the methodnew_record__end_routine to add new records to the result_package. Manually we can sort the result_package by record number and then add the records instead it is recommended to use the method new_record__end_routine.

 

Rule 18 – Use the “global declaration” to declare the internal tables only when you want to maintain records between the start, transformation and end routines.

 

Rule 19– Make the use of “Documents” to write detailed steps related to code in the transformation, dependent loads and any other details.

 

Example –

Rule_19.png

 

Rule_19_1.png

 

 

Rule 20– Try to use the “DTP filter” and “DTP filter routines” to filter the incoming data from the source InfoProvider.

 

Rule 21– Try to use SAP provided features like Master data read, DSO read in the transformations rather than the lookup using ABAP code!!!! :-)

 

Rule 22– Before writing code check for the volume of data in PRD system and how frequently the data is increasing, this will allow you to foresee challenges and make you write a better code.

 

Rule 23– Make sure you use BADI’s instead of CMOD’s. Make sure you write methods and classes instead of Function modules and subroutines.

 

Rule 24– Always use the MONITOR_REC table to capture the exceptional records, instead of updating them into any Z table.

 

Rule 25– Use the exceptions cx_rsrout_abort and cx_rsbk_errorcount cautiously.


Rule 26 -- Within the start and end routines, for every small change don't add a new "loop at result_package..endloop". avoid multiple "Loop at result_package..endloop" and use the existing "loop at result_package...endloop". Try to add the entire logic within single "loop at..endloop". This will help in maintaining the code uniformly and clearly.

 

Rule 27 - Use "constants" which enable you to easily maintain. Also it is even more better to maintain the constant values in Infoobject master data table and use them in the ABAP lookup. Futher the paramter tables can also be used.


Rule 28 - "For all entries" will not fetch duplicate records, so there might be a data loss, but inner join would fetch all of the records and hence "for all entries" must be used cautiously. Make sure to use all Primary keys to fetch records before you use the internal table in "For all entries"

http://scn.sap.com/thread/2029157


Final  Rule - Avoid as much as ABAP code as possible !!! :-) The reason is very simple, when you go to power your BW system with HANA, if you transformations have ABAP code then the transformations will not be executed in the HANA Database. 


Issue encountered while transporting 3.x Update Rule to Production System

$
0
0

In my Project, this issue was encountered while transporting 3.x Update Rule of Cube

 

There were several Routines, Formulas and Constants in the Update Rule.

 

When the TR was moved, it ended in Error code 8 and failed. When the logs were checked there was no proper message to find out the exact error.

 

I tried to capture the Update Rule in TR from transport connection and also from RSA1 and tried to transport again but yet it ended in error.

 

The syntax check was done for each of the routines and there was no errors reported for the Routines and the formulas yet the TR failed.

 

Finally, the issue was found. Please find below the easy method to find out the issue.

 

In the Production system, I double clicked on the Update Rule, clicked on Edit and then clicked on the Syntax button highlighted below and the details of the error was clearly shown which was very helpful in resolving the Error.

 

The error was in one of the Routines which was resolved and TR ended in Success.

PICTURE 1.png

RSEC*-Tables and IO AUTH_HASH

$
0
0

Old or Pre BW 7.4 Database-Tables for Hierarchy Entries within Authorizations

RSECHIE                        Status of Authorization Hierarchies

RSECHIE_CL                  Authorization Hierarchies Changes Change Log

 

Database-Table after Upgrade to BW 7.4:

All newly created Hierarchy Authorizations will be saved within this new table.

RSECHIE_STRING         Status of Authorization Hierarchies

Rsechie_string.png


Old or Pre BW 7.4 Database-Tables for Value Entries within Authorizations

RSECVAL                        Authorization Value Status

RSECVAL_CL                  Authorization Value Change (Change Log)

 

New Database-Table after Upgrade to BW 7.4:

All newly created Value Authorizations will be saved within this new table.

RSECVAL_STRING         Authorization Value Status

rsecval_string.png

 

As seen from the screenshots there is a new Infoobject within both tables called: AUTH_HASH.

 

With BW 7.4 a hash value is created for every entry within an authorization. Depending if its a hierarchy node authorization or a value authorization the hash value is saved to the respective table. For every entry combination there is one hash value. Not to mistake with the entire authorization. An authorization contains different hash values but there is one hash value for one compination.

For example:

auth_hash.png

 

This hash value can be used for comparing entries within authorizations and furthermore for cleaning purposes within the authorization-concept.

 

The Infoobject is also used for Database-Tables:

RSECVALVIEW                      Join of USERAUTH, RSECVAL and RSECBIAU: All ACT & A-Versions

rsecvalview.png

and

RSECHIEVIEW

rsechieview.png

Creating Data Source in APO

$
0
0

HI All,

 

Process of Creating Data Source in APO: -

 

 

For loading data in BW we need to create a data source in APO system.

 

 

  1. Login to APO system and Go to SAP menu àGo to ‘Administration of Demand Planning and Supply’ as below

1.PNG

II.Then Administration screen will come as below

 

2.PNG

Here in planning area column you will find all the planning areas, double click on planning area for which you want to create data source.

 

III.  After selecting a planning area below screen will comeà Go to Extra à Data Extraction Tools tab.

 

3.PNG

 

IV. Then below screen will come

 

  5.PNG

 

Here select Generate Data Source option.

 

 

V. Then system will ask for the Data Source name and settings as below.

 

11.PNG

 

 

The Data Source generated is by default having name starting with 9A, as per standard naming convention.

 

 

VII. Settings will do as per below.

 

 

No Extraction of Data Records Without Key Fig Value:-

 

7.PNG

 

 

Select this option if you want to prevent the system from transferring data records to Info Objects in the BW if all key figures in the data record have the value zero. Depending on data it will reduce the volume of records which the system transfers, and it will improve performance.

 

 

VIII. Block Size For BW Transfer:-

 

 

In this Box you have to mention how many records are transferred in one package. While transferring large no of data, it is required that the data need to split into multiple packages to avoid memory problems. Once source system will finish reading the data packages, it will transfer to BW.  With this option it is possible to change the default for all data extraction in the system.8.PNG

 

 

IX. Parallel Processing Profile:-

12.PNG

 

 

You can ad a parallel processing profile which you have previously created in Customizing (Demand Planning -> Profiles -> Maintain Parallel Processing Profile). This determines how and if the reading and transfer of the packages is split into parallel processes. As such the block sizes that you enter in the parallel processing profile should be significantly smaller than the package sizes above.

 

 

 

X. Give the Name of Data Source and click on Execute option as highlighted below.

13.PNG

 

 

XI. When you click on execute option below window will appear

11.PNG

 

 

In this select fields which you want.

 

 

 

XII. Click on save option, then below window will appear. Click on Test Data Source

 

12.PNG

 

 

XIII. Then below window will come.

 

  1. Uncheck the Debug option; otherwise it will go to ABAP Debugger. But if you want to debug then you can check this option.
  2. Provide Planning version value.
  3. If you want to execute with above selection, click on execution.
  4. If you want to display click on display option.

 

13.PNG

 

 

 

Check above options and if you are getting desired output then click on back.

 

 

XIV. Then SNP data extraction window will appear.

 

15.PNG

 

 

In this click on Replicate Data Source option.

 

 

XV. Then below window will appear.

 

16.PNG

 

  In this select as Data Source option and click on tick. . It will replicate your this new data source with BW system.

 

 

 

XVI. Transport data source.

 

17.PNG

 

 

Click on this option then it will create a data package for your Data source.

 

 

 

XVII. Your Data source is ready as shown in below screen.

20.PNG

Regards,

Mithun

Rendering Workbooks with multiple Analysis grids in a sheet dynamic

$
0
0

Scenario:  There is a requirement to create a  workbook where multiple query outputs (analysis grids) are displayed in a single excel sheet and one below the other.

 

Issue: There is no control on the number of rows of these queries as for certain variable selections there may be just one row displayed and for other selections there may be multiple rows, so aligning the analysis grid one below another too close might lead to one query output overlapping the other and aligning the grids with lots of blank rows might lead to huge gaps between the query results.

 

Two query results overlapping:

     1.jpg

Two query results with too many blank lines in between them:

2.jpg


Solution: To get the excel behave dynamically according to the number of rows and overcome the rigidity VB approach could be adopted, but this demands a sound knowledge in VB. The workbook can also be rendered dynamic without VB coding by just using an excel formula and custom views. This paper intends to explain the same.


Step 1: Create a workbook with Analysis Grids in a single sheet one below another. Ensure to maintain a gap of 50 to 100 rows from one grid to another so that there is sufficient room for the analysis grid to stretch.


Step2:  To retain the actual blank rows which are necessary to maintain the spacing between two analysis grids or headers enter a formula in column "A" for these corresponding rows as =” ”.

3.jpg


Step 3: Key in a formula to identify the blank rows (based on the value in column A) on a different column, which will be hidden.

4.jpg


Step 4: Create a filter on the column with the formula. Filtering out the value “False” will provide all the rows which are non-blanks.

5.jpg


Step 5: Hide the column with the formula (ie., column Z in this example) and create Custom View from the View tab on the ribbon as highlighted.

6.jpg

 

Click on Add and name it as “Formatted”:

7.jpg

Step 6: Now un-hide the column with formula (column Z) and filter on “True” and hide it back again.

8.jpg

The output is formatted now with only blank rows:

9.jpg

Step 7: Hide the column with formula again and create a new custom view.

10.jpg

Step 8: Testing

Run the workbook to find the result display with the blank rows between query results post variable entry:11.jpg

 

Click on “Custom Views” under tab – “View”. Double click on “Formatted” and the workbook with the blank rows trimmed should show up:  

12.jpg

 

13.jpg

Again click on “Custom Views” and choose “Unformatted” to return back to the initial view with blank rows.

 

Buttons could be inserted to assist the users with switching of the view and small macros can be recorded and assigned to these buttons, if done so the simple macro for each button appears as below:

14.jpg

Featured Content for SAP Business Warehouse

$
0
0

Establish a Rock Solid Enterprise Data Warehouse for a Single Version of the Truth

 

 

Capture, store, and consolidate your vital information with our enterprise data warehouse platform, SAP  Business Warehouse (SAP BW). Tightly integrate your warehousing capabilities for a single version of the truth, decision-ready business intelligence, and accelerated operations. Supercharge your data warehouse environment with SAP BW powered by SAP HANA. Leverage reliable data acquisition, business modeling, and analytic capabilities. Extend your applications to reach more business users with minimal IT effort. Reduce total cost of ownership by automating design and development processes.

 

 

.

SAP Modernizes Data Warehousing with the Launch of SAP BW/4HANA

- Our latest SAP SAP HANA platform innovation will future-proof data warehousing landscapes and unleash new ways to analyze data in real time.

 

We are proud to announce SAP BW/4HANA, a next-generation data warehouse application for running a real-time digital enterprise!
In addition to traditional on-premise deployment, the new solution will soon be available on Amazon Web Services (AWS) and the SAP HANA® Enterprise Cloud service so companies can conveniently modernize their data warehousing environments and accelerate their digital journey into the cloud.

 

SAP BW/4HANA was released to customers on September 7, 2016. For more information, visit  SAP BW/4HANA on SCN, SAP BW/4HANA on www.sap.com   and the SAP News Center. Follow SAP on Twitter at@sapnews.

 

 

 


 



See the recently featured content.

Viewing all 1574 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>