GRC
HR
SCM
CRM
BI


Blog

 

How to get selection criteria in Transformations routines?

by Shlomi Weiss

November 23, 2010

There are several information fields that are available during run time.

Description

Technical name

Data type

Request ID (INT4)

R_REQUID

RSBKREQUID

Technical name of the DTP / DTP ID:

R_DTP

RSBKDTPNM

Text/Description of the DTP

R_DTPTEXT

RSBKDTPTEXT

Lines read from the source

R_LINES_READ

SYTABIX

Lines transferred from the source

R_LINES_TRANSFERRED

SYTABIX

Request ID (length 30)

R_REQUID30

RSREQUID

DTP Selections for Source

R_TH_RANGE

RSBK_TH_RANGE

DTP State 0   New
1    Executable
2    Processed Successfully
3    Processed with Errors
4    Deleted
5    Active
6    Processed, with Warnings
7    Further Processing Started
8    Processed Further
9    Deletion Started
A    Further Processing Terminated

R_TSTATE

RSBKTSTATE

Time Stamp END of the DTP / is usually empty

R_TSTMP_FINISH

RSTIMESTMP

Time Stamp Start of the DTP /
UTC Time Stamp in Short Form
(YYYYMMDDhhmmss)

R_TSTMP_START

RSTIMESTMP

User name executed the DTP

R_UNAME

SYUNAME

Update mode

(F)   Full
(D)   Delta
(I)   Initial Non-Cumulative
      for Non-Cumulative Values

R_UPDMODE

SBKUPDMODE

User-Defined Processing Status for a DTP Request

See "State" / RTSTATE for state types

I_USTATE

RSBKUSTATE

Source object (eg. Data Source name)

R_SRC

RSBKSRCNM

Source type (eg. DTASRC for DataSource)

R_SRCTP

RSBKSRCTP

Target type (eg. cube for InfoCube)

R_TGTTP

RSBKTGTTP

Logical Source System name

R_LOGSYS

RSSLOGSYS

Data Source from the Source System

R_DATASOURCE

RSOLTPSOURCER

DataSource segments

R_T_PSA

RSDS_T_RSDSSEG

New or old DataSource is used

I_USE_NEW_DS

RS_BOOL

* copied from Michael Hoerisch very useful blog

www.sdn.sap.com/irj/scn/weblogs?blog=/pu...

 

In our scenario we will use GET_TH_RANGE( ), in order to get the filter value of the DTP.

 

The next demonstration is being used on an expert routine and it assumes that you have created a filter of type range in your DTP for info Object 0calday.

 

data: t_filter_values type RSBK_TH_RANGE,
      i_filter_values like LINE OF t_filter_values.

* The filters are being inserted into a hashed table.
t_filter_values = p_r_request->GET_TH_RANGE( ).

loop at SOURCE_PACKAGE ASSIGNING .

  READ TABLE t_filter_values with KEY
  FIELDNM = 'CALDAY' into i_filter_values.
*   from date
  RESULT_FIELDS-CALDAY = i_filter_values-LOW.
*   to date
  RESULT_FIELDS-RT_DATEU = i_filter_values-HIGH.
  append RESULT_FIELDS to RESULT_PACKAGE.
ENDLOOP.

 

Here is a list of all methods available during runtime

GET_ONLY_CHECK_SIDS

GET_DTP

GET_DTPTEXT

GET_LINES_READ

GET_LINES_TRANSFERRED

GET_REQUID

GET_REQUID30

GET_TH_RANGE

GET_TSTATE

GET_TSTMP_FINISH

GET_TSTMP_START

GET_UNAME

GET_UPDMODE

GET_USTATE

GET_SRC

GET_SRCTP

GET_TGT

GET_TGTTP

GET_LOGSYS

GET_DATASOURCE

GET_T_PSA

GET_USE_NEW_DS

GET_T_ISOURCE

GET_PREVIOUS_RECORDS

You can find them under the interface IF_RSBK_REQUEST_ADMINTAB_VIEW of p_r_request.

 

* Be aware! The information is not available during simulation!

During simulation the system creates a DTP_SIMULATION that does not hold that information.

Did you find this blog helpful? Get access to the latest updates and resources from SAPinsider with a free subscription.

Get the SAPinsider subscription now »»

An email has been sent to:






More from SAPinsider



COMMENTS

Please log in to post a comment.

No comments have been submitted on this article. Be the first to comment!


SAPinsider
FAQ