Jörg Böke
How To: DTP-Information in Transformationen
Haben Sie die Anforderung in Transformationsroutinen, auf Filter in DTP’s zu reagieren um bestimmte Abhängigkeiten zu berücksichtigen?
Dann können Sie dies einfach im Code der Routinen abfragen.
Die nächsten Schritte zeigen auf wie das zu implementieren ist
Hier erst einmal die Felder der SAP Funktionalität, die angeboten wird:
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 |
In unserem gedachten Szenario werden wir den Filter für 0CALDAY aus dem DTP mittels der Methode GET_TH_RANGE( ) auslesen, um dann eventuell den Wert in die neuen Daten einzufügen
Das folgende Beispiel zeigt auf wie Sie auf den Von Wert (low) des Filters reagieren können. Alternativ ist aber auch der Bis Wert (high) verfügbar.
Probieren Sie es einfach aus ?
data: lt_filter_values type RSBK_TH_RANGE,
lv_calday type sy-datum.
” Lesen der Filter in interne Tabelle
lt_filter_values = p_r_request->get_th_range( ).
READ TABLE lt_filter_values ASSIGNING FIELD-SYMBOL()
WITH KEY fieldnm = ‘CALDAY’.
IF sy–subrc = 0.
lv_calday = –low.
ELSE.
lv_calday = sy–datum.
ENDIF.
” Nun Zuweisung in Ihrem coding z.B.
* -CALDAY = lv_calday
Es gibt noch eine Vielzahl von weiteren Abfragen: Sie alle zu beschreiben, wäre etwas lang für diesen Blog.
Schauen Sie sich einfach das SAP Interface ( Transaktion: SE80 ) IF_RSBK_REQUEST_ADMINTAB_VIEW an.
Eine kleine Auswahl der Funktionen ist der Zugriff auf:
- GET_SRC ( Quellobjekt)
- GET_SRCTP( Quell Objekttyp)
- GET_TGT /Zielobjekt)
- GET_TGTTP (Zielobjekttyp)
Viel Spaß beim ausprobieren!