Embed
Email

vkf

Document Sample

SAP BW - Virtual Characteristic

Exit (RSR00002)









Applies to:

Applies to SAP BI 7.0 Consultants who are accustomed with SAP ABAP Skills. For more information, visit

the EDW Homepage .



Summary

Document explains to use the Virtual Characteristic Enhancement (RSR00002) - Virtual Characteristics and

Key Figures in Reporting.

Author: Suraj Tigga

Company: Capgemini Consulting India Pvt. Ltd.

Created on: 30 July 2010



Author Bio



Suraj Tigga is a Senior SAP BI / ABAP consultant at Capgemini Consulting, India. Suraj

joined Capgemini Consulting in 2008 and has worked on multiple SAP BI implementation

and support projects.









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 1

SAP BW - Virtual Characteristic Exit (RSR00002)









Table of Contents

Scenario ....................................................................................................................................................... 3

Step-by-Step Solution ................................................................................................................................ 3

Project-CMOD.............................................................................................................................................................. 3

Enhancement (RSR00002) .......................................................................................................................................... 3

Execution ..................................................................................................................................................................... 7

Related Content ............................................................................................................................................ 8

Disclaimer and Liability Notice ....................................................................................................................... 9









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 2

SAP BW - Virtual Characteristic Exit (RSR00002)





Scenario

Calculate the 0EXCHG_RATE (Exchange rate of pricing) for each material whose values are not loaded in

BW and their values are based on different values of 0KNART (Condition type).



Step-by-Step Solution

Above requirement would be implemented using the concept of Virtual Characteristic. Complete scenario is

explained in three steps:

 Project-CMOD – Create a project for enhancement RSR00002

 Enhancement (RSR00002) – Details about the function modules involved.

 Execution – Execute the BEx report.



Project-CMOD

Query Design:

Query is built on DSO (0SD_O05): Order: Condition Data

Virtual Key Figure: 0EXCHG_RATE









Assign the Enhancement RSR00002 to Project TABW2001









Enhancement (RSR00002)

Query is built on DSO (0SD_O05): Order: Condition Data

Enhancement includes three Includes (Under Function Group: XRSR):









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 3

SAP BW - Virtual Characteristic Exit (RSR00002)









 ZXRSRTOP (Declaration of Variables)

 ZXRSRU02 (Populate the internal tables for Characteristic and Key Figures)

 ZXRSRZZZ(Logic to populate the value for Virtual Characteristic or Key Figure)

Include (ZXRSRTOP)









Variable declaration should always prefixed with ‘G_POS_(Infoprovider Name)_(Infoobject)’.

For the above scenario, variables are declared for the following:

0MATERIAL (Material)

0DOC_NUMBER (Sales document)

0S_ORD_ITEM (Sales document item)

0KNART (Condition type)

0KNCOUNTER (Condition Counter)

0KPRICE (Condition Rate)

0EXCHG_RATE (Exchange rate for pricing)

Include (ZXRSRU02)









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 4

SAP BW - Virtual Characteristic Exit (RSR00002)









a) Populate the internal table e_t_kyfnm for Key Figures.

b) Populate the internal table e_t_chanm for Characteristic.

Include (ZXRSRZZZ)









FORM USER_0SD_O05 USING I_S_RKB1D TYPE RSR_S_RKB1D

CHANGING C_S_DATA TYPE ANY.



FIELD-SYMBOLS .

FIELD-SYMBOLS .







SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 5

SAP BW - Virtual Characteristic Exit (RSR00002)





FIELD-SYMBOLS .

FIELD-SYMBOLS .

FIELD-SYMBOLS .

FIELD-SYMBOLS .

FIELD-SYMBOLS .

FIELD-SYMBOLS .







ASSIGN COMPONENT G_POS_0SD_O05_0CALMONTH of STRUCTURE C_S_DATA

TO .



ASSIGN COMPONENT G_POS_0SD_O05_0DOC_NUMBER of STRUCTURE C_S_DATA

TO .



ASSIGN COMPONENT G_POS_0SD_O05_0S_ORD_ITEM of STRUCTURE C_S_DATA

TO .



ASSIGN COMPONENT G_POS_0SD_O05_0MATERIAL of STRUCTURE C_S_DATA

TO .



ASSIGN COMPONENT G_POS_0SD_O05_0KNCOUNTER of STRUCTURE C_S_DATA

TO .



ASSIGN COMPONENT G_POS_0SD_O05_0KNART of STRUCTURE C_S_DATA

TO .



ASSIGN COMPONENT G_POS_0SD_O05_0KPRICE of STRUCTURE C_S_DATA

TO .



ASSIGN COMPONENT G_POS_0SD_O05_0EXCHG_RATE of STRUCTURE C_S_DATA

TO .



CASE .

* IF condition Type EQ 'MWST' , then exch rate EQ 10.

WHEN 'MWST'.

= '10' .

WHEN 'PR00'.

* IF condition Type EQ 'PR00' , then exch rate EQ 20.

= '20' .

WHEN 'SKTO'.

* IF condition Type EQ 'SKTO' , then exch rate EQ 20.

= '30'.

WHEN 'VPRS'.

* IF condition Type EQ 'SKTO' , then exch rate EQ 20.

= '40' .

WHEN OTHERS .

= '50' .

ENDCASE.



ENDFORM.









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 6

SAP BW - Virtual Characteristic Exit (RSR00002)





Execution

Query Design:

Go to transaction RSRT and execute the query ‘ZSD_O05_QUERY’.

As per our Code Logic, ‘Exchange Rate’ values would be dependent on ‘Condition Type’ Values:

IF Condition Type EQ ‘MSWT’, Then Exchange Rate EQ ‘10’.

IF Condition Type EQ ‘PR00’, Then Exchange Rate EQ ‘20’.

IF Condition Type EQ ‘SKTO’, Then Exchange Rate EQ ‘30’.

IF Condition Type EQ ‘VPRS’, Then Exchange Rate EQ ‘40’.

For Other Condition Type, Then Exchange Rate EQ ‘30’.

Transaction RSRT

Selection Screen









Execute the report (DEBUG)

Check the values of Exchange Rate:









Report Output









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 7

SAP BW - Virtual Characteristic Exit (RSR00002)









Related Content

For More information, visit the EDW Homepage .









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 8

SAP BW - Virtual Characteristic Exit (RSR00002)









Disclaimer and Liability Notice

This document may discuss sample coding or other information that does not include SAP official interfaces and therefore is not

supported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this do cument,

and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article or

code sample, including any liability resulting from incompatibility between the content within this document and the materials and

services offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the conte nt of this

document.









SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com | UAC - uac.sap.com

© 2010 SAP AG 9



Related docs
Other docs by deca50081
How to... Calculate with Attributes
Views: 21  |  Downloads: 0
delete change log BW 35 and BW 7
Views: 20  |  Downloads: 1
HowtoImplementcustomprocesstypes
Views: 0  |  Downloads: 0
wad update
Views: 44  |  Downloads: 1
Track2_session4
Views: 13  |  Downloads: 1
sapnote_0001369294
Views: 394  |  Downloads: 0
Nearline storage SAP BI Netweaver
Views: 35  |  Downloads: 2
DART
Views: 134  |  Downloads: 7