enhance report

12
8/10/2019 Enhance Report http://slidepdf.com/reader/full/enhance-report 1/12 Enhance Report-Report Interface: Create Custom Report Type as Receiver by Stan Pacyna, Senior BI Consultant, Data-IQ Consulting, Inc. • November 1, 2! Share| With the proliferation of front-end reporting tools comes the challenge of achieving a seamless navigation within applications composed of multiple report types It also results in a greater need to pass comple! sets of parameters from one report to another When standard methods offered "y Report-Report Interface fail to support such re#uirements$ users often must manually e!ecute related reports and copy and paste the necessary parameters %ind out how you can achieve seamless integration "y defining custom report types Key Concept You can enhance the standard set of report types predefined in SAP NetWeaver BI 7.0 as jump targets receivers! "ith custom report types. When fu##y coded$ the system disp#ays the custom report types in the #ist of avai#a%#e choices proposed %y transaction RSBBS maintaining BW sender&receiver!. Report-Report Interface &RRI' ma(es it possi"le to )ump from one report to another It comes predefined with a num"er of report types as )ump targets &receivers' Standard )ump targets include *E! +ueries$ We" applications$ Crystal Reports$ InfoSet +ueries$ transactions$ ,*, reports$ and We" addresses &.R/s' In certain situations it may "e necessary to )ump to report types not defined in the standard RRI 0ou may also re#uire field mappings "etween the sender and receiver that are not supported "y the generic interface If the standard interface does not satisfy your re#uirements$ you can implement your own custom report types as receivers It is fairly easy to define two #ueries 1 for e!ample$ a summary level and a detail level 1 and add the a"ility to )ump from the summary level to the detail level Consider the sample data presented inTables 1 and 2 The summary level #uery in Ta"le 2 lists order #uantities per material The detail level #uery in Ta"le 3 "rea(s up the order #uantities "y material and order date .sers can select a material listed in the summary level and have it displayed in the detail level #uery$ with its total order #uantity "ro(en up "y the order dates Material Order quantity '('' )'* +A '((' )' +A '(() ,- +A '-)7 -(' +A vera## resu#t 7/- +A Table 1 Summary #eve# uery  Material

Upload: yajjala

Post on 02-Jun-2018

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 1/12

Enhance Report-Report Interface: Create CustomReport Type as Receiverby Stan Pacyna, Senior BI Consultant, Data-IQ Consulting, Inc. • November 1, 2!

Share|With the proliferation of front-end reporting tools comes the challenge of achieving a seamless navigation

within applications composed of multiple report types It also results in a greater need to pass comple! sets

of parameters from one report to another When standard methods offered "y Report-Report Interface fail to

support such re#uirements$ users often must manually e!ecute related reports and copy and paste the

necessary parameters %ind out how you can achieve seamless integration "y defining custom report types

Key Concept

You can enhance the standard set of report types predefined in SAP NetWeaver BI 7.0 as jump targets receivers! "ith custom report

types. When fu##y coded$ the system disp#ays the custom report types in the #ist of avai#a%#e choices proposed %y

transaction RSBBS maintaining BW sender&receiver!.

Report-Report Interface &RRI' ma(es it possi"le to )ump from one report to another It comes predefined

with a num"er of report types as )ump targets &receivers' Standard )ump targets include *E! +ueries$ We"

applications$ Crystal Reports$ InfoSet +ueries$ transactions$ ,*, reports$ and We" addresses &.R/s' In

certain situations it may "e necessary to )ump to report types not defined in the standard RRI 0ou may also

re#uire field mappings "etween the sender and receiver that are not supported "y the generic interface If

the standard interface does not satisfy your re#uirements$ you can implement your own custom report types

as receivers

It is fairly easy to define two #ueries 1 for e!ample$ a summary level and a detail level 1 and add the

a"ility to )ump from the summary level to the detail level Consider the sample data presented inTables

1 and 2 The summary level #uery in Ta"le 2 lists order #uantities per material The detail level #uery inTa"le 3 "rea(s up the order #uantities "y material and order date .sers can select a material listed in the

summary level and have it displayed in the detail level #uery$ with its total order #uantity "ro(en up "y the

order dates

Material

Order quantity

'('' )'* +A

'((' )' +A

'(() ,- +A

'-)7 -(' +A

vera## resu#t 7/- +A

Table 1 Summary #eve# uery

 

Material

Page 2: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 2/12

Order date Order quantity

'((' 0/10,1-00* (' +A

  -)10,1-00* '0 +A

vera## resu#t )' +A

Table 2 2etai# #eve# uery

 

Note

If you are not fami#iar "ith the concept of 33I$ refer

tohttp411he#p.sap.com1saphe#p5n"701he#pdata1+N16610*,-6%d(e)'d)'*/(0c,*)6df(0(c61frameset.htm.You can a#so find the information in I#iya 3uvinsy8s artic#e$ 9:se the 3eport&3eport

Interface to +nhance ;i#tering in Your 3eports$< "hich "as posted to the BI

 Expert no"#edge%ase at """.BI&e=pertn#ine.comin cto%er -00).

To define the )ump from the summary level to the detail level$ follow these steps:

Step 1. Enter the technical name of the query 4o to transaction RSBBS &maintain sender5receiver

assignment' In the One Query ta" enter the technical name of the summary level #uery prefi!ed with the

name of the source Inforovider &Figure 1' Clic( on the reate "utton If you don6t (now the technical

name of the #uery$ clic( on the drop-down "o! of the Sen!er field /oo( for the Inforovider that supplies

data to your #uery /ocate the #uery "eneath it and dou"le-clic( on the #uery to "ring the technical name to

the Sen!er field

Figure 1 +nter the technica# name

Step 2. "efine the !etail le#el query as the recei#er. Clic( on the Transfer "utton &Figure 2'

Page 3: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 3/12

Figure 2 2esignate the detai# #eve# uery as the receiver 

Step $. Sa#e the %ump !efinition. The system returns you to the &aintain Sen!er'Recei#er

(ssignment screen The receiver line now contains your detail level #uery Clic( on the save icon To test

the )ump$ e!ecute the summary level #uery$ right-clic( on any material num"er$ and choose 4oto78etail

/evel from the conte!t menu &Figure $'

Figure +=amp#e of jump from summary #eve# to detai# #eve# uery

Page 4: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 4/12

The filter values &in this case &aterial ) 12*+' are passed from the sender #uery to the receiver

automatically 0ou do not need to define restrictions on the material characteristic in the detail level #uery

,s long as the material characteristic is present in the lower receiver #uery &in rows$ columns or free

characteristics'$ the )ump produces the desired results

What do you do if the standard RRI interface does not list your report type as an availa"le target or if it does

not support the mapping necessary to pass the filter data from the sender to the recipient9 0ou mustenhance the S, standard with custom report types

I will now show you how to implement an enhancement that ta(es an e!ternal service order num"er and

converts it to an internal 4.I8 0ou can use the internal num"er to call a service order display transaction in

S, CR &within S, ;etWeaver ortal' Standard RRI facilitates the passing of values of characteristics

present in the sender #uery In this particular case$ the source Inforovider contains the e!ternal service

order num"ers It does not store the internal 4.I8 %or the sa(e of illustration$ assume that the receiver

transaction re#uires the 4.I8 To accomplish the tas($ you need to perform three activities:

• (cti#ity 1: Create an ,*, class with interface ,F-RS-BBS-B(",-(/"0ER

• (cti#ity 2: Create the *,dI RS-BBS-B(",

• (cti#ity $: Create the )ump target using the newly defined report type

,ll activities are performed in your S, ;etWeaver *I system ,fter you complete the activities$ a new

report type is visi"le in the drop-down "o! in the &aintain Sen!er'Recei#er (ssignment dialog "o!

,ctivity 2

4o to transaction SE2* Create a new Ob%ect type &class' <ere I created a new class

called0-,&-RS-BBS-B(",-(/"0ER-"ET &Figure *' When prompted$ enter the description and

leave all settings as they are &Figure '

Figure ! >reate the ne" Ob"ect type c#ass!

 

Page 5: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 5/12

Figure # +nter the description and c#ic on the Sa$e %utton

Within the class$ in the ,nterfaces ta"$ create interface ,F-RS-BBS-B(",-(/"0ER &Figure 3' In

the &etho!s ta"$ create a class constructor a(e sure you clic( on the lass constructor "utton$

notonstructor &Figure +'

Figure % >reate the interface &F'RS'BBS'B()&'*(N)+,R 

 

Page 6: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 6/12

Figure - >reate the Class constructor

8ou"le-clic( on the 0(SS-O/STR4TOR method in %igure = and insert the code shown in Figure 5

This code allows the .R/ targets$ "ut not a S,4.I-type target The te!t you define here appears in the

drop-down "o! as a new )ump target in transaction RSBBS

Figure .?he code determines the category of jump targets that are va#id using the customreport type

;e!t$ dou"le-clic( on the ,F-RS-BBS-B(",-(/"0ER67ET-T(R7ETS method in %igure = and insert

the code shown in Figure 8

Figure /?his code popu#ates the he#p #ist that disp#ays "hen you reuest he#p ;)! for thecustom report type "hi#e in transaction RSBBS

Figures 19 and 11 illustrate the dependencies "etween the te!ts coded in the methods and the choices

proposed in the enhanced RSBBS transaction

Page 7: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 7/12

Figure 10@enu option as the resu#t of the 8Jumps to transactions

within Portal8 code in ;igure *

Figure 112escriptions added as a resu#t of the ls_f4_list-txtlgcode in

;igure 6

8ou"le-clic( on the ,F-RS-BBS-B(",-(/"0ER6(00-4R0 method in %igure = and enter the code

shown in Figure 12 In the code$ note the logic used to read the value of the service order num"er that the

user selects This is highlighted in %igure 23 This code reads the num"er of the service order selected "y

the user and converts it to the internal 4.I8 format Then it "uilds the .R/ that is the concatenation of the

portal target transaction and the internal 4.I8 re#uired "y the transaction

Page 8: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 8/12

Figure 12 ?he circ#ed code reads the va#ue of the service order num%er that the user se#ects

;ote the name of the characteristic in "old green$ SR:-OR" The field name must correspond to the

name of the characteristic$ the value of which you want to read from the line selected &right-clic(ed' "y the

user The selected row is always in line one of the internal ta"le 0-S;-&(<<,/7 *y copying this logic and

repeating it with names of other characteristics$ you can read in values of other characteristics present in

the same row of the sender #uery %or e!ample$ you could read in two values$ concatenate them$ and then

use the com"ined value to access a receiver that re#uires the compounded (ey

Page 9: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 9/12

Tip

If you are not sure a%out the :3 string structure needed$ capture it manua##y. In this particu#arcase$ I first e=ecuted the disp#ay service order transaction direct#y in the porta#. I scraped the :3

string disp#ayed in the internet %ro"ser. I removed the service order num%er prior to pasting in the

:3 string. ?he service order num%ers are appended to the :3 string at runtime according to

user se#ections.

,ctivity 3

4o to transaction SE18 and create a classic *,dI called RS-BBS-B(", Then create the implementation of

the classic *,dI -RS-BBS-B(",-"ET ,fter you create the *,dI implementation$ clic( on

the hange "utton 4o to the ,nterface ta" and dou"le-clic( on the 7ET-T=<ES method &Figure 1$'

Figure 1 2ou%#e&c#ic on ,T'T34,S method

Insert the code shown in Figure 1* into the 7ET-T=<ES method

Figure 1! ?his code instantiates the ne" report type

,ctivity >

,ll you have to do now is to go to transaction RSBBS and use the newly defined receiver report typeFigure

1 depicts the top-level #uery that lists service orders and the "isplay Ser#ice Or!ertransaction &within

S, ;etWeaver ortal' When the user right-clic(s on the service order num"er in the #uery and

Page 10: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 10/12

chooses 7oto>"etails of Ser#ice Or!er from the conte!t menu$ the application )umps to the Ser#ice

Or!ers display transaction and presents the order the user selects

Figure 1#Service order uery sender! and disp#ay service ordertransaction receiver!

To facilitate the )ump$ I had to define new report type capa"le of converting the e!ternal service order

num"er &availa"le in the Inforovider' to the internal 4.I8 &re#uired "y the display transaction within S,

;etWeaver ortal' To define the )ump from the service order #uery to the display service order transaction$

follow these steps:

Step 1. 7o to transaction RSBBS. In the One Query ta" enter the technical name of the service order

#uery prefi!ed with the name of the source Inforovider If you don6t (now the technical name of the #uery$

clic( on the drop-down "o! of the Sen!er field /oo( for the Inforovider that supplies data to your #uery

/ocate the #uery "eneath it and dou"le-clic( on the #uery to "ring the technical name to the Sen!er field

Clic( on the reate "utton &Figure 13' y #uery is called SER:,E-OR"ER  It reads data from

InfoCu"e SR:-1+$ thus the sender6s complete name isSR:-1+'SER:,E-OR"ER 

Figure 1% +nter the technica# name of the uery

Step 2. "efine the ne? report type as the recei#er. 0ou can recogni?e it in the drop-down "o! "ecause

it has the name you assigned to it in the 0(SS-O/STR4TOR method Then clic( on the drop-down

menu to see the list of receivers availa"le for the new report type &Figure 1+'

Page 11: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 11/12

Figure 1- >#ic on the drop&do"n menu for a #ist of receivers

0ou are presented with the list of availa"le receivers &Figure 15' 8ou"le-clic( on the "etails of Ser#ice

Or!er line The choices you see here correspond to the %@ help items you coded in

the,F-RS-BBS-B(",-(/"0ER67ET-T(R7ETS method Clic( on the Transfer "utton

Figure 1.>hoose a ne" report type and c#ic on the drop&do"nmenu

Step $. Sa#e your ?or@ an! test the %ump. 0ou are returned to the RSBBS screen ;ote that the

receiver line now contains your detail level #uery Clic( on the save icon &Figure 18'

Page 12: Enhance Report

8/10/2019 Enhance Report

http://slidepdf.com/reader/full/enhance-report 12/12

Figure 1/ Save the sender1receiver assignment

Test the )ump "y e!ecuting the service order #uery Right-clic( on a service order num"er and

choose"etails of Ser#ice Or!er from the conte!t menu 0ou can use the code presented in this article to

define other custom report types and comple! mappings "etween the sender and receiver %or additional

details$ refer

tohttp:55helpsapcom5saphelpAnw=B5helpdata5E;5@5ec2De2B@=>"2e2BBBBBBBa22@DDf5framesethtm 

This lin( provides an e!ample of how you can schedule 4oogle searches directly from your #ueries

Stan <acyna is a senior S, ;etWeaver *I consultant at Toronto-"ased 8ata-I+ Consulting Fver the past

seven years he has concentrated e!clusively on the implementation of *W solutions <e participated in

multiple pro)ects at various %ortune BB companies 8ata-I+ speciali?es in S, ;etWeaver *I$ with

particular focus on the application of S, ;etWeaver *I solutions within the area of strategic$ tactical$ andoperational dash"oards It advises clients on the "est approach to introduce S, ;etWeaver *I to their

organi?ations 0ou may contact Stan "y email at stanpacynaGdata-i#com