BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction...

17
BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article Summary With the help of Open Hub, you can extract data from BW and save it to the application serv local drive. Currently, BW 3.1 standard functionality does not allow you to specify the f path when you save. This article provides a step-by-step solution that enhances current BW Hub functionality and enables you to use custom filenames and paths. By: Catherine Fan Title: Technical Consultant Date: 08 Mar 2005 Table of Content Open Hub Extraction Enhancement: Using Literal Filename & Path............................ Applies To: ............................................................................... Article Summary............................................................................ Table of Content........................................................................... Overview: How It Works..................................................................... Step By Step Instruction .................................................................. Task 1: Steps for Creating a File Management Custom Class ............................... Task 2: Steps for Modifying Methods of a Standard Class to Use the Newly Created File Management Class ........................................................................ (a) Method: CHANGE_PARMS .............................................................. (b) Method: GET_OBJECT_REF_INT ........................................................ Task 3: Steps for Enhancing the User Interface Properties................................ (a) Modifying a Method from a Standard Class to Control the User Interface ............ (b) Modifying Screen Attributes ....................................................... Disclaimer & Liability Notice..............................................................

Transcript of BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction...

Page 1: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

BW 3.1 Open Hub ExtractionEnhancement: Using Literal Filename &Path

Applies To:

SAP BW Open Hub Extraction

Article Summary

With the help of Open Hub, you can extract data from BW and save it to the application server or alocal drive. Currently, BW 3.1 standard functionality does not allow you to specify the filename orpath when you save. This article provides a step-by-step solution that enhances current BW OpenHub functionality and enables you to use custom filenames and paths.

By: Catherine FanTitle: Technical ConsultantDate: 08 Mar 2005

Table of Content

Open Hub Extraction Enhancement: Using Literal Filename & Path........................................... 1Applies To: ................................................................................................................................. 1Article Summary......................................................................................................................... 1Table of Content......................................................................................................................... 1Overview: How It Works.............................................................................................................. 2Step By Step Instruction ............................................................................................................. 2

Task 1: Steps for Creating a File Management Custom Class ................................................. 2Task 2: Steps for Modifying Methods of a Standard Class to Use the Newly Created FileManagement Class ................................................................................................................. 5

(a) Method: CHANGE_PARMS ....................................................................................... 5(b) Method: GET_OBJECT_REF_INT ............................................................................. 7

Task 3: Steps for Enhancing the User Interface Properties...................................................... 9(a) Modifying a Method from a Standard Class to Control the User Interface ................... 9(b) Modifying Screen Attributes ......................................................................................11

Disclaimer & Liability Notice.......................................................................................................17

Page 2: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

Overview: How It Works

When a user initiates open hub extraction by creating an InfoSpoke, behind-the-scenes activityinvolves OO ABAP which is calling classes to determine each of the different components involved inmaking the open hub extraction possible. In particular, this enhancement will focus on two standardclasses: one used to determine file destination name and path and the other to control the userinterface of the InfoSpoke which will ultimately allow the user to enter his/her own filename and path.

To make this enhancement, we will perform three tasks:

Task 1: Create a custom class to handle the file management: naming and location(all code supplied; please download and unzip “zcl_rsb_file_literal_methods.zip” and store forupload). You can download the zip file here.

Task 2: Modify the methods of a standard class to point to our newly created class, which willmanage the files as we’ve specified.

Task 3: Enhance the user interface to allow for user customization.

Step by Step Instruction

Task 1: Steps for Creating a File Management Custom Class

1. Go to transaction “SE24”2. Create Object Type: “ZCL_RSB_FILE_LITERAL”3. Click the “Create” Button:

4. Enter a description & accept the creation screen defaults5. Click “Save”

Page 3: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

6. Enter Package & Transport information7. Click the “Superclass” Button

8. Enter “CL_RSB_FILE_GENERAL”9. Enter the following properties:

Message Class: “RSBO” Type group/Object type: “RS”

“RSBO” “RSUDT”

10. Accept the remaining defaults11. Click the “Methods” tab

12. Place the cursor on Method: “IF_RSB_OPEN_HUB_TARGET~RECEIVE_DATA”13. Click the “Redefine” button

14. Highlight the existing commented code & follow the menu path:Utilities More Utilities Upload/Download Upload

Page 4: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

15. Navigate to the previously unzipped folder and select the corresponding file name with thesame Method name.

16. Save and Activate the method.

17. Return to the “Methods” tab by using the green arrow back button and repeat steps 12through 16 for the remaining methods

IF_RSB_OPEN_HUB_TARGET~RECEIVE_DATA

IF_RSB_OPEN_HUB_TARGET~BEFORE_EXTRACTIONIF_RSB_OPEN_HUB_TARGET~AFTER_EXTRACTIONIF_RSB_OPEN_HUB_TARGET~REQUEST_ROLLBACKCHANGE_PARMSCONVERT_INT_TO_EXTGET_INFOSAVECHECKGENERATE_CONTROL_FILE_CSVGENERATE_CONTROL_FILE_ASCDETERMINE_FILENAME

18. Return to the “Methods” tab to customize the last method in your custom class19. Click the create “Constructor” button

20. Save the changes and click the “Code” button21. Repeat steps 14 through 16

Page 5: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

Task 2: Steps for Modifying Methods of a Standard Class to Use the Newly Created FileManagement Class

(a) Method: CHANGE_PARMS

1. Go to transaction “SE24”2. Display Object Type: “CL_RSB_DEST”3. Click the “Display” button

4. Double click on the method: “CHANGE_PARMS”

5. Click the “Change” Button and provide an access key to make the change.

Access key required to make changes

6. Click the Insert button and insert the following language statements (for location,see the illustration):

* clear filepath when change between server vs. local file

clear l_s_vdest-path.

7. Place the cursor on line 27 and Click the “Replace” button

8. Click the Replace button to insert the following code (for location, see theillustration):

* replaced for open hub extraction literal filename/path

Page 6: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

data: l_r_file_applsrv type ref to zcl_rsb_file_literal.

9. Save and activate the changes

Sample Code: CL_RSB_DEST

Page 7: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

Method: GET_OBJECT_REF_INT1. Double click on the method: “GET_OBJECT_REF_INT”

2. Click the “Change” Button.3. Insert the following code in place indicated in the GET_OBJECT_REF_INT code sample:

* replaced for open hub extraction logical filename/path

data: l_r_file_applsrv type ref to zcl_rsb_file_literal.

4. Save and activate the changes.

Page 8: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

Sample Code: GET_OBJECT_REF_INT

Page 9: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

Task 3: Steps for Enhancing the User Interface Properties

(a) Modifying a Method from a Standard Class to Control the User Interface

1. Go to transaction “SE24”2. Display Object Type: “CL_RSB_SPOK_VIEW”

3. Double click on the method “SET_SCREEN_2001”

4. Click the “Change” button5. Click the “Delete” button and remove the following lines:

6. Follow the same steps to delete the corresponding “endif” statement

7. Place the cursor at the following example and click the “Replace” button

Page 10: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

8. Insert the following code in the allocated space:

* replaced for open hub extraction literal filename/path

e_input = rsboh_c_on.

9. Save and activate the changes

Sample code: SET_SCREEN_2001

Page 11: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

(b) Modifying Screen Attributes1 Create a Domain

1.1 Go to Transaction “SE11”1.2 Select the “Domain” radio button1.3 Enter “RSPATH”1.4 Click the copy button

1.5 Enter the Copy To field

1.6 Select the “Definition” tab1.7 Set the Lowercase option by clicking

the Lowercase checkbox1.8 Save and activate

Page 12: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

2 Create a Data type2.1 Go to Transaction “SE11”2.2 Select the “Data type” radio button2.3 Enter “RSBPATH”2.4 Click the copy button2.5 Enter the Copy To field

2.6 Select the “Data Type” tab2.7 Enter the newly created domain2.8 Save and activate

Page 13: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

3 Assign the custom Component type3.1 Go to Transaction “SE11”3.2 Select the “Data type” radio button3.3 Enter “RSBODYN2001”3.4 Click the change button

Access key required to make changes

3.5 Enter the newly created data element in the “component type” for component: “PATH”3.6 Save and activate

3.7 Confirm screen properties changes3.7.1 Go to transaction “SE80”3.7.2 Enter “RSBO_GUI” under function group

Page 14: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

3.7.3 Expand screens and double click on screen 20013.7.4 Click the “Element list” tab3.7.5 Click the “Special attr.” Tab3.7.6 Scroll down to “RSBODYN2001-PATH” type “I/O”3.7.7 Confirm that “Upper/Lower case entry” is checked (If setting not applied, screen

properties may need to be re-activated - access key would be needed for “R3TRFUGR RSBO_GUI”)

Page 15: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

3.8 Turn off upper case formatting on file path when using search help3.8.1 While still in screen 2001, Go to the “Flow Logic” tab

3.8.2 Double click on module f4_path_2001

3.8.3 Double click on method f4_path

3.8.4 Double click on method dynp_values_read_2001

Page 16: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

3.8.5 Use the replace button to replace the exporting parameter “rs_c_true” with“rs_c_false” in the call function “DYNP_VALUES_READ” in order to turn off the uppercase option

Page 17: BW 3.1 Open Hub Extraction Enhancement: Using Literal ...€¦ · BW 3.1 Open Hub Extraction Enhancement: Using Literal Filename & Path Applies To: SAP BW Open Hub Extraction Article

Disclaimer & Liability Notice

This document may discuss sample coding, which does not include official interfaces and therefore isnot supported. Changes made based on this information are not supported and can be overwrittenduring an upgrade.

SAP will not be held liable for any damages caused by using or misusing of the code and methodssuggested here, and anyone using these methods, is doing it under his/her own responsibility.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to thecontent of the technical article, including any liability resulting from incompatibility between thecontent of the technical article and the materials and services offered by SAP. You agree that you willnot hold SAP responsible or liable with respect to the content of the Technical Article or seek to doso.

Copyright © 2004 SAP AG, Inc. All Rights Reserved. SAP, mySAP, mySAP.com, xApps,xApp, and other SAP products and services mentioned herein as well as their respectivelogos are trademarks or registered trademarks of SAP AG in Germany and in several othercountries all over the world. All other product, service names, trademarks and registeredtrademarks mentioned are the trademarks of their respective owners.