Você está na página 1de 6

Extracting Data to a Third-Party Tool

PDF download from SAP Help Portal:


http://help.sap.com/saphelp_nw73ehp1/helpdata/en/4d/7d91f189ad4f95affc5cd52c860b98/content.htm
Created on October 20, 2016

The documentation may have changed since you downloaded the PDF. You can always find the latest information on SAP Help
Portal.

Note
This PDF document contains the selected topic and its subtopics (max. 150) in the selected structure. Subtopics from other structures are not included.

2016 SAP SE or an SAP affiliate company. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose
without the express permission of SAP SE. The information contained herein may be changed without prior notice. Some software products marketed by SAP
SE and its distributors contain proprietary software components of other software vendors. National product specifications may vary. These materials are
provided by SAP SE and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP
Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set
forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional
warranty. SAP and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP SE in
Germany and other countries. Please see www.sap.com/corporate-en/legal/copyright/index.epx#trademark for additional trademark information and notices.

Table of content

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 1 of 6

Table of content
1 Extracting Data to a Third-Party Tool
1.1 APIs for Third-Party Tools as Destinations
1.1.1 API: RSB_API_OHS_DEST_SETPARAMS
1.1.2 API: RSB_API_OHS_3RDPARTY_NOTIFY
1.1.3 API: RSB_API_OHS_REQUEST_SETSTATUS
1.1.4 API: RSB_API_OHS_DEST_GETLIST
1.1.5 API: RSB_API_OHS_DEST_GETDETAIL
1.1.6 API: RSB_API_OHS_DEST_READ_DATA_RAW
1.1.7 API: RSB_API_OHS_DEST_READ_DATA

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 2 of 6

1 Extracting Data to a Third-Party Tool


Procedure
You can extract data to a third-party tool as follows:
1.
2.
3.
4.

Define an open hub destination with Third-Party Tool as the destination type.
Create an RFC destination for your third-party tool and enter it in the definition of the open hub destination.
Use API RSB_API_OHS_DEST_SETPARAMS to define the parameters for the third-party tool that are required for the extraction.
Start extraction immediately or include it in a process chain. You can also start this process chain from the third-party tool using process chain API
RSPC_API_CHAIN_START. The extraction process writes the data to a database table in the BW system.
5. When the extraction process is finished, the system sends a notification to the third-party tool using API RSB_API_OHS_3RDPARTY_NOTIFY.
6. The extracted data is read by API RSB_API_OHS_DEST_READ_DATA or RSB_API_OHS_DEST_READ_DATA.
7. The status of the extraction is transferred to the monitor by API RSB_API_OHS_REQUEST_SETSTATUS.

1.1 APIs for Third-Party Tools as Destinations


1.1.1 API: RSB_API_OHS_DEST_SETPARAMS
You use this API to transfer the parameters of the third-party tool that are required to extract data to the BW system. These parameters are saved in a
parameter table in the BW system in the metadata for the open hub destination.
Parameters

Type

Description

Import

OHDEST

RSOHDEST

Name of the open hub destination

3RDPARTYSYSTEM

LOGSYS

Third-party system (logical system)

EXTEND

RS_BOOL

Extending the parameter

Export

RETURN

BAPIRET2

Tables

PARAMETERS

BAPI6107PA

Parameter table

EXTEND: If the value is true, new parameters are added to the existing parameters. If the value is false, the existing parameters are deleted and the new
parameters are inserted. The default setting is false.
The PARAMETERS table contains all the parameters required by the third-party system and saves these parameters in the metadata of the open hub
destination. When extraction is finished, these parameters are sent to the third-party system (3RDPARTYSYSTEM) using API
RSB_API_OHS_DEST_SEND_NOTIFICATION.

1.1.2 API: RSB_API_OHS_3RDPARTY_NOTIFY


This API sends a message to the third-party tool after extraction. It transfers the open hub destination, the request ID, the name of the database table, the
number of extracted data records and the time stamp. You can also add another parameter table containing parameters that are only relevant for the third-party
tool.
Parameters

Type

Description

Import

OHDEST

RSOHDEST

Name of the open hub destination

REQUESTID

RSBREQUIDOUT

Request ID

NUMB_OF_PACKETS

Number of packages extracted

DBTABNAME

RSBTABNAME

Name of DB table

DBRECORDS

SYTABIX

Number of records extracted

TIMESTAMP

BAPIBP_TIMESTAMP

Time stamp of extraction (request)

Export

RETURN

BAPIRET2

Tables

PARAMETERS

BAPI6107PA

Exceptions

COMMUNICATION_FAILURE

Parameter table

SYSTEM_FAILURE

1.1.3 API: RSB_API_OHS_REQUEST_SETSTATUS


This API sets the status of extraction to the third-party tool in the monitor. If the status is green, the request is processed further. Red means that the existing
table is not overwritten. The third-party tool sets the status to red when there is a processing error in the third-party system. This ensures that the existing data
is not overwritten until the error has been corrected.
The status is written to table RSBREQUID3RD.
The following diagram shows how the status entry is processed:

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 3 of 6

The OHD state is the status of extraction to the BI system; it is dependent on the status of the third-party tool. This status is set by the third-party tool.
STOP means that the request has not been started. The BI system waits until the status of the third-party tool is set to green. Only then does it start
extraction.

Import

Export

Parameter

Type

Description

REQUESTID

RSBREQUIDOUT

Request ID

STATUS

RSBSTAT3RD

Status of processes in third-party tool; G


= Green, R = Red

MESSAGE

BAPI_MSG

Message for the monitor. This text can


contain 220 characters, however only
200 characters are displayed in the
monitor.

RETURN

BAPIRET2

1.1.4 API: RSB_API_OHS_DEST_GETLIST


This API delivers a list of all open hub destinations.
Parameters

Type

Description

Import

OHDEST

RSOHDEST

Name of the open hub destination

DESTTYPE

RSDESTTYPE

Type of destination:
TAB = DB table
TAB3 = third-party tool
FILE = flat file

Export

RETURN

BAPIRET2

Tables

DEST_TAB

RSBOHDESTS

List of open hub destinations

Table DEST_TAB contains all the destinations that the import parameter accesses.

1.1.5 API: RSB_API_OHS_DEST_GETDETAIL


This API finds the details of an open hub destination.
The target system gets the structure and the table with the metadata of the open hub destination.
This API is used at design time and at runtime.

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 4 of 6

Import

Export

Parameters

Type

Description

OHDEST

RSOHDEST

Name of the open hub destination

SKIP_TECKEY

RS_BOOL

Skip technical key (X)

RFCINFOSPOKE

RSINFOSPOKE

Name of InfoSpoke (not relevant for new


open hub destination, and remains

RFCUPDATEMETHOD

RSBUPDMODE

initial)
Extraction mode of InfoSpoke (not
relevant for new open hub destination,
and remains initial)
RFCDATABASETABLENAME

RSBTABNAME

Name of DB table

RFCPROCESSCHAIN

RSPC_CHAIN

Process chain; if more than one process


chain is available, this parameter

RFCDESTYPE

RSDESTTYPE

Type of open hub destination

RFCTLOGOSRC

RSTLOGOSRC

TLOGO type of data source

RETURN

BAPIRET2

DBTAB_STRUCTURE

BAPI6118DALO

Structure of the DB table of the open hub


destination

PARAMETERS

BAPI6107PA

Parameter table of third-party tool

T_MESSAGES

BAPIRETTAB

Messages

remains empty.

Tables

RFCDTPT

Data transfer process ID (for new open


hub destination)

RFCPROCESSCHAINT

Table of process chains (for new open


hub destination)

1.1.6 API: RSB_API_OHS_DEST_READ_DATA_RAW


This API reads data from the database table in the BW system. Unlike API RSB_API_OHS_DEST_READ_DATA, you do not need to make sure that the
same code pages are used. You can specify the code page using the ENCODING parameter. The data transfer is binary (in raw format).

Recommendation
We recommend using the new API instead of RSB_API_OHS_DEST_READ_DATA, as the new API can be used with different code pages.
Parameters:

Import

Parameter

Type

Description

OHDEST

RSOHDEST

Name of the open hub destination

REQUESTID

RSBREQUIDOUT

Request ID

PACKETID

Data package to be read. Is the value is


empty or null, all packages are read.

SKIP_TECKEY

RS_BOOL

Skips technical keys in the target


structure (layout structure)

ENQUEUE_LOOP_COUNT

Counter for lock loop. A loop waits five

ENCODING

ABAP_ENCOD

seconds before the next loop starts.


Identifier for the character format (UTF-8,
UCS-2 etc.) For more information, see
SAP Note 73606.
Export

Tables

NUMROWS

BAPI6116XX-NUMROWS

Number of rows

LINES_PER_RECORD

BAPI6116XX-NUMROWS

Number

NUMB_OF_PACKETS

Number of packages for this request in


the DB table

RETURN

BAPIRET2

DATALAYOUT

BAPI6118DALO

Layout of the data structure

RESULTDATA

BAPI6100DARAW

Data record (binary) with continuation


indicator

1.1.7 API: RSB_API_OHS_DEST_READ_DATA


This API reads data from the database table in the BW system.
In Unicode systems, you have to use the same code pages if you use this API.

Recommendation

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 5 of 6

Try to avoid using API RSB_API_OHS_DEST_READ_DATA if possible. We recommend using the new API RSB_API_OHS_DEST_READ_DATA_RAW
instead, as this can be used with different code pages.

Import

Parameter

Type

Description

OHDEST

RSOHDEST

Name of the open hub destination

REQUESTID

RSBREQUIDOUT

Request ID

PACKETID

Data package to be read. Is the value is


empty or null, all packages are read.

SKIP_TECKEY

RS_BOOL

Skips technical keys in the target


structure (layout structure)

I_ENQUEUE_LOOP_COUNT

Counter for lock loop. A loop waits five

NUMROWS

BAPI6116XX-NUMROWS

Number of rows

LINES_PER_RECORD

BAPI6116XX-NUMROWS

Number

NUMB_OF_PACKETS

Number of packages for this request in

RETURN

BAPIRET2

DATALAYOUT

BAPI6118DALO

Layout of records

RESULTDATA

BAPI6116DA

Data records with FOLLOW flag

seconds before the next loop starts.


Export

the DB table

Tables

PUBLIC
2014 SAP SE or an SAP affiliate company. All rights reserved.

Page 6 of 6

Você também pode gostar