SAP BW .....all info @ one place
SAP BW relevant Information
Loading

Scenario : Create and Populate User Exit Variable with default date as current date.

Step1: Create a variable(ex: cur_date) on requrired characteristic with Processing type "Customer Eixt" and check the check box for ready for input(if this variable need in selection screen).

Step 2: Goto T Code : CMOD and provide appropriate Project and choose components and click on display.

Step3: Double click on exit "EXIT_SAPLRRS0_001" you can see include "ZXRSRU01", double click on include.

Step4: Sample code to populate.

WHEN 'CUR_DATE'.
Data : l_p_range_SSS TYPE rrrangesid.

IF I_STEP = 1.
l_p_range_SSS-Low = sy-datum.
l_p_range_SSS-Sign = 'I'.
l_p_range_SSS-Opt = 'EQ'.
APPEND l_p_range_SSS TO e_t_range.
Endif.


The following values are valid for I_STEP:
· I_STEP = 1
Call up takes place directly before variable entry
· I_STEP = 2
Call up takes place directly after variable entry. This step is only started up when the same variable could not be filled at I_STEP=1.
· I_STEP = 3
In this call up, you can check the values of the variables. Triggering an exception (RAISE) causes the variable screen to appear once more. Afterwards, I_STEP=2 is also called up again.
· I_STEP = 0
The enhancement is not called from the variable screen. The call up can come from the authorization check or from the Monitor.


More info @ http://help.sap.com/saphelp_bw320/helpdata/en/1d/ca10d858c2e949ba4a152c44f8128a/content.htm

 

Some times requirement comes like, we need to create multiple records from single record...

Scenario : We are getting data at month level and want to distribute to week or day level

If we are loading to cube then we can use time distribution option to split the records,
but if we are loading into an ODS time distribution option not available, and also distribution other than time char we need to write code to split the records.

Sample Code: This code is to generate multiple records based on number in keyfigure NONCNFRMTY.

*** Data Declaration
*** Declare one more internal table - Lt_data_package same as data_package.
Data : Lt_data_package like data_package occurs 0 with header line,
l_NONCNFRMTY type data_package-NONCNFRMTY or take reference.

Loop at data_package.l_NONCNFRMTY = data_package-NONCNFRMTY.
Do l_NONCNFRMTY times.
data_package-NONCNFRMTY = 1.
Append data_package to lt_data_package.
enddo.

Endloop.
*** Clear data_package contents using refresh statement
Refresh data_package.
*** Pust contents of lt_data_package contents to data_package
Insert lines of lt_data_package from 1 into data_package.

More info @ https://www.sdn.sap.com/irj/sdn/thread?threadID=610540&tstart=0

 

How to Papers, related to BW direct download

Google
 

Recent Posts

SAP Jobs