Generic Datasource with Delta and functionmodule
Hi together,
who can help me ??
Ihave created a generic datasource with function module and
delta.
the extractor runs well while i use full update and also initialization.
If i start the delta extraction, the extractor crashed with short-dump.
the message is SAPSQL_INVALID_FIELDNAME
What can i do, and what is wrong.
regards
thorsten Weiss
Hi Roberto,
here is the code from the function-module:
FUNCTION zbw_mm_get_eket.
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SBIWA_S_INTERFACE-REQUNR
*" VALUE(I_DSOURCE) TYPE SBIWA_S_INTERFACE-ISOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SBIWA_S_INTERFACE-MAXSIZE DEFAULT 1000
*" VALUE(I_INITFLAG) TYPE SBIWA_S_INTERFACE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SBIW_BOOL DEFAULT SBIW_C_FALSE
*" TABLES
*" I_T_SELECT TYPE SBIWA_T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SBIWA_T_FIELDS OPTIONAL
*" E_T_DATA OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
INCLUDE lrsalk01.
DataSource for table EKET
TABLES: zv_mm_eket.
interne Tabelle für Bearbeitung
DATA: itab_0 TYPE TABLE OF zstr_eket WITH HEADER LINE.
TYPES: BEGIN OF typ_categ,
j_4kbwef TYPE atnam,
/afs/bwel TYPE j_4kbwef,
END OF typ_categ.
DATA: l_s_data_eket TYPE zstr_eket,
ld_cat_struct TYPE j_4kcsgr,
lt_cat_fields TYPE TABLE OF j_4kcif001,
ls_cat_fields TYPE j_4kcif001,
ls_mara TYPE mara,
l_tabix LIKE sy-tabix,
itab_cat TYPE TABLE OF typ_categ ,
ls_cat TYPE typ_categ,
h_feldsize1(8) TYPE c,"wegen Typ-konflikt im FB
h_feldsize2(8) TYPE c."wegen Typ-konflikt im FB
Auxiliary Selection criteria structure
DATA: l_s_select TYPE rsselect.
Maximum number of lines for DB table
STATICS: s_t_select LIKE rsselect OCCURS 0 WITH HEADER LINE,
s_t_fields LIKE rsfieldsel OCCURS 0 WITH HEADER LINE,
counter
s_counter_datapakid LIKE sy-tabix,
cursor
s_cursor TYPE cursor.
Select ranges
RANGES: l_r_ebeln FOR zv_mm_eket-ebeln,
l_r_ebelp FOR zv_mm_eket-ebelp,
l_r_bsart FOR zv_mm_eket-bsart.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF i_initflag = sbiwa_c_flag_on.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check DataSource validity
CASE i_dsource.
WHEN 'ZDS_V_MM_EKET'.
WHEN OTHERS.
IF 1 = 2. MESSAGE e009(r3). ENDIF.
this is a typical log call. Please write every error message like this
log_write 'E' "message type
'R3' "message class
'009' "message number
i_dsource "message variable 1
' function modul was created for DS ' &
'ZDS_V_MM_EKET"!'.
"message variable 2
RAISE error_passed_to_mess_handler.
ENDCASE.
APPEND LINES OF i_t_select TO s_t_select.
Fill parameter buffer for data extraction calls
S_T_SELECT-REQUNR = I_REQUNR.
S_T_SELECT-DSOURCE = I_DSOURCE.
S_T_SELECT-MAXSIZE = I_MAXSIZE.
Fill field list table for an optimized select statement
(in case that there is no 1:1 relation between InfoSource fields
and database table fields this may be far from beeing trivial)
APPEND LINES OF i_t_fields TO s_t_fields.
ELSE. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF s_counter_datapakid = 0.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT s_t_select INTO l_s_select WHERE fieldnm = 'EBELN'.
MOVE-CORRESPONDING l_s_select TO l_r_ebeln.
APPEND l_r_ebeln.
ENDLOOP.
LOOP AT s_t_select INTO l_s_select WHERE fieldnm = 'EBELP'.
MOVE-CORRESPONDING l_s_select TO l_r_ebelp.
APPEND l_r_ebelp.
ENDLOOP.
LOOP AT s_t_select INTO l_s_select WHERE fieldnm = 'BSART'.
MOVE-CORRESPONDING l_s_select TO l_r_bsart.
APPEND l_r_bsart.
ENDLOOP.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
OPEN CURSOR WITH HOLD s_cursor FOR
SELECT (s_t_fields) FROM zv_mm_eket
WHERE
ebeln IN l_r_ebeln AND
ebelp IN l_r_ebelp AND
bsart IN l_r_bsart.
ENDIF. "First data package ?
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR s_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE e_t_data
PACKAGE SIZE i_maxsize.
FETCH NEXT CURSOR s_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE itab_0
PACKAGE SIZE i_maxsize.
LOOP AT itab_0 INTO l_s_data_eket.
l_tabix = sy-tabix.
Lesen Erstellungsdatum aus EKKO
SELECT SINGLE aedat FROM ekko INTO l_s_data_eket-sydat
WHERE ebeln = l_s_data_eket-ebeln.
Lesen Partner aus EKPA
SELECT SINGLE lifn2 FROM ekpa INTO l_s_data_eket-plief
WHERE ebeln = l_s_data_eket-ebeln AND
ebelp = l_s_data_eket-ebelp AND
ekorg = l_s_data_eket-ekorg AND
werks = l_s_data_eket-werks .
IF NOT l_s_data_eket-matnr IS INITIAL .
*A Lesen material für Kategoriestruktur j_4kcsgr(F001 oder R002)
CLEAR ls_mara.
CALL FUNCTION 'J_3A1_LESEN_MARA_SINGLE'
EXPORTING
i_matnr = l_s_data_eket-matnr
IMPORTING
e_mara = ls_mara
EXCEPTIONS
param_not_valid = 1
OTHERS = 2.
IF sy-subrc NE 0.
ENDIF.
*E Lesen material für Kategoriestruktur j_4kcsgr(F001 oder R002)
*A Aufsplitten Bestandskategorie
REFRESH lt_cat_fields.
CALL FUNCTION 'J_4KG_SPLIT_CAT'
EXPORTING
client = sy-mandt
csgr = ls_mara-j_4kcsgr
cat_appl = 'S'
cat_value = l_s_data_eket-j_4kscat
NECESSARY_SPECIFIED = ' '
TABLES
cat_fields_tab = lt_cat_fields
EXCEPTIONS
no_category_structure_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE."sy-subrc <> 0
Verarbeitung der Ergebnisse
LOOP AT lt_cat_fields INTO ls_cat_fields.
IF ls_cat_fields-j_4kbwef EQ 'BW_CAT_SCONFIG'.
l_s_data_eket-zz_bwel_sconfig = ls_cat_fields-j_4kcatv.
ENDIF.
IF ls_cat_fields-j_4kbwef EQ 'BW_CAT_CONFIG'.
l_s_data_eket-zz_bwel_config = ls_cat_fields-j_4kcatv.
ENDIF.
IF ls_cat_fields-j_4kbwef EQ 'BW_CAT_COUNTRY'.
l_s_data_eket-j_3abwel_country = ls_cat_fields-j_4kcatv.
ENDIF.
IF ls_cat_fields-j_4kbwef EQ 'BW_CAT_COUNTRYGRP'.
l_s_data_eket-zz_bwel_coungrp = ls_cat_fields-j_4kcatv.
ENDIF.
IF ls_cat_fields-j_4kbwef EQ 'BW_CAT_STOCKTYPE'.
l_s_data_eket-zz_bwel_stktype = ls_cat_fields-j_4kcatv.
ENDIF.
IF ls_cat_fields-j_4kbwef EQ 'BW_CAT_ORDER'.
l_s_data_eket-zz_bwel_order = ls_cat_fields-j_4kcatv.
ENDIF.
IF ls_cat_fields-j_4kbwef EQ 'BW_CAT_QUALITY'.
l_s_data_eket-j_3abwel_qual = ls_cat_fields-j_4kcatv.
ENDIF.
ENDLOOP."lt_cat_fields
ENDIF.
*E Aufsplitten Bestandskategorie
*A Aufsplitten MAtrix
IF NOT l_s_data_eket-j_3asize IS INITIAL.
CALL FUNCTION 'J_3A_SPLIT_SIZES'
EXPORTING
matnr = l_s_data_eket-matnr
j_3asize = l_s_data_eket-j_3asize
IMPORTING
j_3akord1 = l_s_data_eket-j_3abwel_color
j_3akord2 = h_feldsize1
j_3akord3 = h_feldsize2
EXCEPTIONS
no_grid_determined = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
l_s_data_eket-zz_bwel_size1 = h_feldsize1.
l_s_data_eket-zz_bwel_size2 = h_feldsize2.
ENDIF.
ENDIF."not l_s_data_eket-J_3ASIZE is initial
*E Aufsplitten MAtrix
MODIFY itab_0 FROM l_s_data_eket INDEX l_tabix.
ENDIF."not l_s_data_eket-matnr is initial
ENDLOOP. "itab_0
An Ausgabe-Tabelle übergeben
APPEND LINES OF itab_0 TO e_t_data.
IF sy-subrc <> 0.
CLOSE CURSOR s_cursor.
RAISE no_more_data.
ENDIF.
s_counter_datapakid = s_counter_datapakid + 1.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
regards
thorsten
Similar Messages
-
Generic datasource with Delta queue
Hi All,
I 've created a generic datasource on prices tables A* and KONP. Next, I used HowTo document "create generic datasource that uses delta queue", finding the right BTE that could catch prices modification. Up to this point, everything works fine.
I've extracted an Init delta to BW and now, on R/3, in RSA7, I can see a delta queue for my generic datasource.
When I modify price conditions in VK12, BTE works fine and I can see the counter in RSA7 increasing. I also can see new entries in table TRFCQOUT with status READY. (either in SE16 or in SMQ1 )
The problem is :
- in RSA7, if I want to display the posted data, system returns an empty list (whereas the counter is different from 0)
- when I run a delta InfoPackage, no data is sent to BW, but in table TRFCQOUT, status has been changed to READ for entries that previously had status READY (and old entries that had status READ due to a previous delta upload are deleted)
Does anyone has any idea about the reason of the issue ?
Thanks for any help
AJSure, I can.
The problem was in the specific coding that update the delta queue : not all the fields were updated and some of these fields were used as selection criteria in th delta infopackage...
in RSA7, when you try to see the data in the queue, the system only shows you the records that match the selection criterias of your delta IP...so in our case, because of those empty fields, no records were selected...
AJ -
Generic Datasource with Additive Delta
Hi all
I have a question.
In whic case can I use a generic datasource with additive delta?
Does this delta mode make sens only with function module extraction?
If I extract data directly from a table, can I use this delta mode only if a field represents changes?
Thanks for your help!
S.Stefania,
To my knowledge what you are thinking is wrong.
we have 2 Methods for Generic DS.
1. New status for changed Records.
2. Additive delta.
New status for changed records means
New Order
order no quantity
1000 10
order changed to quntity 8. then 2 records will posted 2 BW in first case.
1000 -10
1000 8
if you come to Additve delta.
for the same case it will send the same record as
1000 10
changed records
1000 -2
this is the difference. New status with changed records should be used only in association with ODS not cube becoz we don't have overwrite option.
Additive delta we can use for ODS and Cubes with update mode Addition.
Hope this is clear.
Regards,
Nagesh Ganisetti. -
Problem in creating a generic datasource with infoset
Dear Expert,
I have to create a generic datasource with infoset. I linked the infoset with a test program below. In the program, I have one selection option, which is s_order. After creating an infoset and a datasource, this selection option 'SELECT_S_ORDER' is added to my extract structure. However, after try filtering with this SELECT_S_ORDER, it doesn't filter data at all. Why? I want to filter data with my s_order.
REPORT ZBI_DS_TEST.
tables: vbak.
* DATA
field-symbols: <vbak> type vbak.
data: t_vbak type table of vbak,
w_vbak type vbak,
t_vbak2 type table of vbak,
w_vbak2 type vbak.
* SELECT-OPTIONS
selection-screen begin of block b1 with frame title text-001.
select-options: s_order for vbak-vbeln.
selection-screen end of block b1.
start-of-selection.
* <Query_head>
perform sub_select_data.
loop at t_vbak into w_vbak2.
move-corresponding w_vbak2 to vbak.
* <Query_body>
endloop.
*& Form sub_select_data
* Select data
FORM sub_select_data .
select *
into table t_vbak
from vbak
where vtweg = 'IP'.
ENDFORM. " sub_select_dataWhat do you mean by linking program with infoset?
Do you get the field in your RSA3 Tcode? -
Generice extracttion with delta
if we do generic extraction with delta in which table luws will be stored
LUW's for generic delta can be monitored in RSA7.
BW Delta queue is based on queue functions in the RFC technology for SAP Web Application servers (qRFC). The data is stored in the following 3 tables:
1. TRFCQOUT (Client Dependent pointer table per queue name and destination.
2. ARFCSSTATE: Likn between TRFCQOUT and ARFCSDARA
3. ARFCSDATA: Compressed data for tRFC/qRFC
refer following: http://help.sap.com/saphelp_nw04/helpdata/en/6f/66bca6ae43744283d74f1e456ff6c0/content.htm for delta queue maintenance. -
All;
We need to do live cache extraction for APO data. How do we set up that in BW? Is this done using generic datasource with a Function module? Can anyone give me some ideas?
Thanks,
Manasa.Hi,
In the Extractution structure you need to put the two dates and mark both like selection parameter.
This is the template for Generic FM Extractors "RSAX_BIW_GET_DATA_SIMPLE" to create the FM.
Follow the FM Code, in the part of the first execution you need to do two loops (one for every date).
Regards,
Dani -
Generic Datasource with Fuction Module with delta on Created Date
Hi Experts,
I have created a generic datasource using Function Module RSAX_BIW_GET_DATA. I have copied this function module and created a my own Function Module. I want to load delta using this. But I don't know how to handle delta in the code.
my code is working for full load but not for delta. I have seen that in ROOSOURCE tabel the Delta field is showing the AIE instead of D and extraction method is showing as F2. I have searched a lot of forums and articles but didn't get how to handle this.
Please advice.Hi Amit,
Go through the link as suggested by AKhan which lets you understand the concept of offsets and the last extraction status.
In case of Table or View based GDS, the system takes care of the deltas based on the selections you make in the "Generic Delta" screen whereas in case of FM based DS, it is your responsibility to handle this part. Within your code, capture if the load is a Delta load (I_UPDMODE = D). Since your delta is on Created Date, maintain a Z table with name of the DS as the Key and a field representing the current value of the Delta field(created date in this case). When you first load the delta, there will be no record for your DS in this table. Create an entry with the current day. Next time when you load a delta, take this value, compare it with sy-datum and get all the records falling within these days. This has to be done in the Select stmt. Once selection happens, replace the value in the Z table with sy-datum. This way you can simulate the delta. The Z table can be used for other FM based Datasources also as it has DS as the key.
It would be easy if the exact SAP table where RSA7 delta field status is stored is known. Otherwise, the above method can be used.
Revert for any further queries. -
Generic Datasource eventhough delta enabled not working
Hi Experts,
I have created a Datasource by creating a Function Module and also this function module i copied and did the changes the function module i used as a template is RSAX_BIW_GET_DATA_SIMPLE
and after creating the thing i have created a generic delta by using LAST_CHANGED_ON date as delta specific field and i have initialized the delta its fine it creating an entry in RSA7
in my first init load i got 4000 records so immly i have done delta again it brought 4000 but when i checked in RSA7 for delta their are no records but still its brining 4000 records ...but as per my assumption it should not get any records becoz we already got the delta.
Thanks and regards
SreedharHi
Even after making changes to code its still bring all the records with each load.
below i am pasting my code please advise what is that i am doing wrong so that delta is not getting picked up. instead every time its a full load.
FUNCTION ZRSAX_BIW_GET_DATA_SIMPLE.
""Local Interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA TYPE ZDPR_DASHBOARD_T OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
Example: DataSource for table SFLIGHT
TABLES: DPR_DASHBOARD.
Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
cursor
S_CURSOR TYPE CURSOR.
DATA : LF_OBJECT TYPE EVE_TV_OBJECT_GUID.
DATA : LF_DATE TYPE DPR_TV_LAST_CHANGE_DATE.
Select ranges
RANGES: L_R_OBJECT FOR LF_OBJECT .
RANGES: L_R_DATE FOR LF_DATE.
L_R_CONNID FOR SFLIGHT-CONNID.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZDPREXTRACTION'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
Fill field list table for an optimized select statement
(in case that there is no 1:1 relation between InfoSource fields
and database table fields this may be far from beeing trivial)
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'OBJECT_GUID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_OBJECT.
APPEND L_R_OBJECT.
ENDLOOP.
LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'LAST_CHANGE_DATE'.
MOVE-CORRESPONDING l_s_select TO l_r_date.
APPEND l_r_date.
ENDLOOP.
ENDLOOP.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM DPR_DASHBOARD
WHERE LAST_CHANGE_DATE in l_R_DATE. "AND
OBJECT_GUID IN L_R_OBJECT.
ENDIF. "First data package ?
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
Regards
Sreedhar
Message was edited by:
Sreedhar M -
Generic datasource with function module
I am trying to create a transactional generic datasouce with fm.
I create my structure ZNVBAK1, create a function group ZRSAX, a FM ZRSAX_BIW_GET_DATA_SIMPLE1 and I adjust my source code.
I activated both FM and Function Group.
Now under RSO2 I enter the datasource name as in my code, I enter the application component SD as well as the description
When I choose extraction by FM, nothing happens, no windows prompting me to enter my function module as well as extract structure, I checked everthing look good.
Any Idea what I might be doing wrong?
Thanks!!Hi ,
First put values in Short Description, Medium Description & long Description,fields and then click on the Extraction by FM. You will get those filelds unabled.
You can also refer.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
Edited by: Nilesh Vakil on May 31, 2011 7:57 AM -
Hi Every one,
I use an extractor based on a function module which is copy of the RSAX_BIW_GET_DATA_SIMPLE and gets delta records.
I have a doubt of how the communication happens between BW and R/3 when delta info package is ran inorder to get delta records.
Can any one explain how this FM RSAX_BIW_GET_DATA_SIMPLE works ie., the input parameters,usage of static var, Cursors etc?
FUNCTION RSAX_BIW_GET_DATA_SIMPLE.
""Lokale Schnittstelle:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SRSC_S_IF_SIMPLE-REQUNR
*" VALUE(I_DSOURCE) TYPE SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*" VALUE(I_READ_ONLY) TYPE SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
*" E_T_DATA STRUCTURE SFLIGHT OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
Example: DataSource for table SFLIGHT
TABLES: SFLIGHT.
Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
Maximum number of lines for DB table
STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
counter
S_COUNTER_DATAPAKID LIKE SY-TABIX,
cursor
S_CURSOR TYPE CURSOR.
Select ranges
RANGES: L_R_CARRID FOR SFLIGHT-CARRID,
L_R_CONNID FOR SFLIGHT-CONNID.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
Initialization: check input parameters
buffer input parameters
prepare data selection
Check DataSource validity
CASE I_DSOURCE.
WHEN '0SAPI_SFLIGHT_SIMPLE'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
this is a typical log call. Please write every error message like this
LOG_WRITE 'E' "message type
'R3' "message class
'009' "message number
I_DSOURCE "message variable 1
' '. "message variable 2
RAISE ERROR_PASSED_TO_MESS_HANDLER.
ENDCASE.
APPEND LINES OF I_T_SELECT TO S_S_IF-T_SELECT.
Fill parameter buffer for data extraction calls
S_S_IF-REQUNR = I_REQUNR.
S_S_IF-DSOURCE = I_DSOURCE.
S_S_IF-MAXSIZE = I_MAXSIZE.
Fill field list table for an optimized select statement
(in case that there is no 1:1 relation between InfoSource fields
and database table fields this may be far from beeing trivial)
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
Fill range tables BW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CARRID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
APPEND L_R_CARRID.
ENDLOOP.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
APPEND L_R_CONNID.
ENDLOOP.
Determine number of database records to be read per FETCH statement
from input parameter I_MAXSIZE. If there is a one to one relation
between DataSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
WHERE CARRID IN L_R_CARRID AND
CONNID IN L_R_CONNID.
ENDIF. "First data package ?
Fetch records into interface table.
named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF. "Initialization mode or data extraction ?
ENDFUNCTION.
Also how the delta queue is loaded in rsa7 when the delta records made?
When the delta info package is ran, the delta queue in rsa7 is changed to '0'.How is that communication made in between them?
Please clear my doubts?
Regards,
PraHi Suneel,
You can load delta to write optimized DSO. Your Data source will have delta load (through infopackage) and then with DTP (with Extraction Mehtod --> Delta) you can load delta records to this write optimized DSO. So only the new requests, which are not loaded yet will be loaded to WO-DSO. I tried it in system and it works.
They can be used in the following scenarios:
● You use a write-optimized DataStore object as a temporary storage area for large sets of data if you are executing complex transformations for this data before it is written to the DataStore object. The data can then be updated to further (smaller) InfoProviders. You only have to create the complex transformations once for all data.
● You use write-optimized DataStore objects as the EDW layer for saving data. Business rules are only applied when the data is updated to additional InfoProviders.
it is used when you don't want to wait for DSO activation and error troubleshooting. It will make raportable data available instantly.
Hope it helps...
Regards,
Ashish
Edited by: Ashish Tewari on May 6, 2009 1:33 PM -
Generic connector with webservice and SPML provider
Hi,
I have created a Generic connector in Oracle Identity server successfully with Webservice transport porvider and SPML payload provider. But when I am trying to create a user using this connector I am getting following error in OIM server log:
AJPRequestHandler-RMICallHandler-20 XELLERATE.WEBAPP - Setting the response code as GCPROV.ProvTransportProvider.WebServices.Caught exception while handling request: malformed array t
Can anyone please help me regarding this? I am even not able to identify where it is getting failed.
Thanks in advanceThis is what I've found in the docs:
"Each SPML request is sent in a SOAP message. The SOAP header carries authentication information for the request. The actual SPML request data is the SOAP message body. "
All I'm trying to do is create a SOAP web service (in this case with Java 6, but that's not fundamental) that can intercept that message and grab the SPML request (and then do what I have to do).
I tried with something like the following code:
package wsspml;
import javax.jws.WebService;
import java.io.IOException;
import java.util.logging.*;
@WebService
public class SPMLServer {
public String processRequest(String requestData) {
but it won't work. It's like the exposed SOAP method "processRequest" is invisible. It's not being called. Perhaps the signature is wrong. I don't know what to make of it. I'm trying to understand how to grab that SPML request that's coming from OIM through the custom generic technology connector that I configured. -
hi all,
can any one please provide any thing on generic extractors particular to delta (time-stamp)
VRKRHi,
please search the forums. This question has been asked already a lot of times. Additionally you might check my business card --> there is a link to a weblog related to that issue.
Siggi -
Generic datasource - Extract delta by FM
Hi,
I used the FM RSAX_BIW_GET_DATA_SIMPLE as template to extract data from datasource.
But this FM extarct full data.
I need to extract delta by FM.
Can you please send me a sample code that extract delta using timestamp?
Thanks,
Mohamad.Thank you Soumya for the reply.
I need a sapmle code. That's mean a FM that extract from non sap table, by delta.
Best Regards,
Mohamad. -
Delta-Specific Field for Generic DataSource
Hi,
I have defined a Generic DataSource for Transaction data on R/3-Side.
This DataSource is based on View/Table EKKO (Purchasing Document Header) for some specific customer requirements. Delta-Specific Field is AEDAT (Calend. Day). Safety Interval Upper Limit is set 1 Cal. Days. No Safety Interval Lower Limit has been defined. "New Status for Changed Records" has been marked.
When we see this DataSource in Extractor Checker (RSA3), this data source
Extracted all delta data where AEDAT is not blank.
When I see the content of table EKKO, I can find few records where AEDAT is blank.
These records are missing in Extractor Checker.
How I can solve this problem? Which delta-specific field can be used in
this generic Datasource? Should I define an additional Generic DataSource with
Delta-Specific Field BEDAT (as BEDAT is filled when AEDAT is blank in table EKKO)?
Thanks for the answer.Delta based on calday wont pick all the records which are recently posted and you can not run the delta more than one time in a day ,end of the day only you can run the delta.
Set the delta as Tme Stamp and specify the Upper limit to 5 minuts.
We can run the delta no. times and pick the documents posted in short interval of time.
With Regards,
Kishore. -
Using Transformations with Delta enabled Datasources
Hi,
I have a delta enables datasource which uses incremental update to my infoCube.
In order to populate some fields in the cube I used a transformation routine for a couple of these fields to do some lookups from some tables.
The problem that I am encountering is that when the delta update runs its only updates the directly assigned fields it does not also update the routine delivered fields.
Is there a way to get this to work or is it impossible?
ThanksHI,
The routines work fine for full load as the data is replaced with new data each time.
What I need to happen is I am using a SAP standard content datasource with delta enabled on the datasource and when loading from datasource to Cube all the 0 fields are updating correctly but my Z fields which i update with routines do not seem to be replaced.
Please advise of anyway to get this to work
Thanks
Maybe you are looking for
-
Can I use a flat screen monitor with my Power Mac G$?
Can I connect my Power Mac G4 (model M5183) to a modern flat screen monitor? I already tried it with a small flat screen TV which works fine with my MacBook Pro but couldn't make it work with the G4. I only need the G4 for a SCSI slide scanner that I
-
Hi Thinking that my issue was Pages related, I have posted similar questions in the Pages area but hope that this will have a wider readership amongst people here familiar with pdf production in OS X. I'm using Pages to design a document that needs t
-
Hi, I recently purchased this card as a upgrade from my onboard, and the card being OEM, didn't give me much detail other than it was a Sound Blaster Audigy and that it worked. So, I buy the card and install it, everything is working fine. about 4 we
-
IE7 running on Vista will not let me load Shockwave
It will not load. As I try to load Shockwave, I get an error message "Internet Explorer has Stopped Working" then in my Systems Tray I get a message "Data Execution Prevention has stopped a progarmme from loading". Help, how can I get around this pro
-
Hi, We are getting error message in Inbound IDOC process, When we look into SM58 log there is an entry saying EDI: Table passed to EDI_SEGMENTS_ADD_BLOCK is empty.Can any one help us why this message comes ? There is no problem in IDOC creation progr