Generic datasource with FM
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
Similar Messages
-
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? -
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 WeissHi 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 -
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. -
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 -
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 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 delta with function module
Hi Gurus,
Is it possible to create a generic DataSource with delta support using function module following the queue delta mechanism (u can get some function moduel in MCEX function group, and check the outbound delta queue before and after update in transaction smq1.
I can store the delta data using qRFC and collective update mechanism. but I don't know how to create a generic data with delta and how to attach a rfc destination (& logical system) to the data source. The Source system information is stored in the table "ROOSGEN". Is there any configuration setting required to do the same.
Regards,
JugalJugal,
What I understand you to be asking is if it is possible to create a generic delta extractor which uses the delta queue. If this indeed is your question the answer is yes.
First you need to create your data source so it is visible via tx RSA5 and need to make sure that the delta type (ie ABR, AIM)is set appropriately for the datasource.
The issue however is determining from where you will associate your delta hook (when will you write to the queue)? I have in the past utilized BTE's, Business Transaction Events to write information out to the delta queue, you can see a list of available BTE's in your system via tx FINF.
Once you find a place to write your deltas from you call the below FM with the appropriate datasource.
RSC1_TRFC_QUEUE_WRITE.
Once you have done this the standard BW extractor for deltas will pull the information from the delta queue. But from what I understand you just want to know how to associate the data with the delta and that is the FM listed above.
Hope this helps,
Cheers,
Scott
> Hi Gurus,
>
> Is it possible to create a generic DataSource with
> delta support using function module following the
> queue delta mechanism (u can get some function moduel
> in MCEX function group, and check the outbound delta
> queue before and after update in transaction smq1.
> I can store the delta data using qRFC and collective
> update mechanism. but I don't know how to create a
> generic data with delta and how to attach a rfc
> destination (& logical system) to the data source.
> The Source system information is stored in the table
> "ROOSGEN". Is there any configuration setting
> required to do the same.
>
> Regards,
> Jugal -
Creating a Generic Datasource using Function Module
Hi Guru's
We are tryin to create a Generic datasource using function module, we have found few old how to guides for doing the same but it is not effective and need to be altered. Can anyone suggest me the latest step by step procedure to create the above, also if you have the how to guide kindly paste the link as it will be a great help at this point.
Thanks in advance
Regards
LiquidHi,
Please goto the Following links :-
PDF
1) http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?quicklink=index&overridelayout=true
2) http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
SAP Forum
3) Re: DataSouce based on FM
4) http://forums.sdn.sap.com/post!reply.jspa?messageID=10050614
5) https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
6) Re: Generic datasource with functional module
7) Generic Extractor (FM based) - Delta Enabled
Regards
Obaid -
Hi,
I have to rename an exisitng generaic daatsource technical name.
Could you please tell me how i can do this?
Regards
SyedWe cannot change the techninal name of any object .
If you want the generic datasource in your desired techinal name, then create a new Generic Datasource with the same settings like your old datasource. And then use the new datasource in your dataflow And delete the old one if you dont need it..
--- Thanks... -
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. -
How to deal with delete record in generic delta of generic datasource
Hi,
Anyone can give me suggestion about the delete record in generic delta of generic data. I need extract data with a generic datasource and hope deleted record in datasource also can be "delete" in next delta extraction. I do a test with generic delta. It seem that the delete record can not be updated in ODS. but updated record can be updated in next delta extraction.
How dose BW generic delta deal with the deleted record with generic delta mechanisim? Or how can I use generic delta mechanisim to realize that BW "delete" the deleted record of source system in ODS with delta extraction?
Thanks in advance!
BillyDelete is not supported in delta mechanism of generic delta extractor. You will need to add a workaround for that.
- Capture the deleted records somewhere (maybe enhance the txn deleting the record so the key is written to a Z table). Take these records to BW and manipulate the recordmode to affect deletion of corresponding record from ODS.
- If your generic delta is based on FM, and if the 'delete' is captured in change document tables, add the logic to check change document tables whether any records are deleted, and if yes, send those to BW with appropriate recordmode to achieve deletion. -
Problem with Generic datasource from function
I developed generic datasource from function module.
But I have problem with the select options.
First one is order number OBJECT_ID type char 10. When I input Object_ID = 45755 , no data selected.
When input 0000045755, one data record selected.
But I called functiion CONVERSION_EXIT_ALPHA_INPUT to conevet the input data. And I found 45755 was converted to 0000045755, but no record selected.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'OBJECT_ID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_OBJECT_ID.
APPEND L_R_OBJECT_ID.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = L_R_OBJECT_ID-high
IMPORTING
OUTPUT = L_R_OBJECT_ID-high
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = L_R_OBJECT_ID-low
IMPORTING
OUTPUT = L_R_OBJECT_ID-low
ENDLOOP.
Another problem is CREATED_AT, which type is DEC 15, how could I handle it ? input is yyyymmdd, I tried to add '000000', but can't select any data.
Thanks for any help.code is :
FUNCTION ZACTIVITY_PLAN_PARTNER.
""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 STRUCTURE ZACTIVITY_PLAN_PARTNER OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
Example: DataSource for table SFLIGHT
TABLES: CRMD_ORDERADM_H.
Auxiliary Selection criteria structure
DATA: L_S_SELECT TYPE SRSC_S_SELECT.
DATA: BEGIN OF ACTIVITY,
OBJECT_ID type CRMT_OBJECT_ID_DB,
PROCESS_TYPE type CRMT_PROCESS_TYPE_DB,
OBJECT_TYPE type CRMT_SUBOBJECT_CATEGORY_DB,
CREATED_BY type CRMT_CREATED_BY,
CREATED_AT type CRMT_CREATED_AT,
END OF ACTIVITY.
DATA: ZACTIVITY LIKE TABLE OF ACTIVITY WITH HEADER LINE,
Zorder LIKE TABLE OF ZORDER_S WITH HEADER LINE,
d_start type c length 15,
d_end type c length 15
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_OBJECT_ID FOR CRMD_ORDERADM_H-OBJECT_ID,
L_R_CREATED_AT FOR CRMD_ORDERADM_H-CREATED_AT,
L_R_date for ZACTIVITY_PLAN_PARTNER-ZPLAN_DAT.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
IF I_INITFLAG = SBIWA_C_FLAG_ON.
Check DataSource validity
CASE I_DSOURCE.
WHEN 'ZACTIVITY_PLAN_PARTNER'.
WHEN OTHERS.
IF 1 = 2. MESSAGE E009(R3). ENDIF.
this is a typical log call. Please write every error message like this
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.
APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
ELSE. "Initialization mode or data extraction ?
First data package -> OPEN CURSOR
IF S_COUNTER_DATAPAKID = 0.
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'OBJECT_ID'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_OBJECT_ID.
APPEND L_R_OBJECT_ID.
ENDLOOP.
if L_R_OBJECT_ID-option is initial.
L_R_OBJECT_ID-option = 'EQ'.
L_R_OBJECT_ID-sign ='I'.
endif.
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = L_R_OBJECT_ID-high
IMPORTING
OUTPUT = L_R_OBJECT_ID-high
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
EXPORTING
INPUT = L_R_OBJECT_ID-low
IMPORTING
OUTPUT = L_R_OBJECT_ID-low
LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CREATED_AT'.
MOVE-CORRESPONDING L_S_SELECT TO L_R_CREATED_AT.
APPEND L_R_CREATED_AT.
ENDLOOP.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT OBJECT_ID FROM CRMD_ORDERADM_H
WHERE OBJECT_ID IN L_R_OBJECT_ID
AND CREATED_AT IN L_R_CREATED_AT and
PROCESS_TYPE EQ 'Z220'.
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. -
Generic Delta enabled datasource with Functional Module
Hi All,
We have a requirement to create a Generic Data Source which will be having fields from the tables COEP, COBK & BKPF. Generic datasource should be delta enabled. We are planning to achive it by writing a Functional Module.
No my question is can i use BWFI_AEDAT & BWOM2_TIMEST tables to make Generic Datasource delta enabled. If i can then please let me know how. If i can't then please let me know what should i do to make it delta enabled.
Thanks & Kind REgards,
HarmanHi,
before looking in specifics on your question please have a look at
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f1a423-02ae-2e10-bd85-bde64e61fe7b?QuickLink=index&overridelayout=true
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70806d62-1c59-2e10-7597-91c114600d32?QuickLink=index&overridelayout=true
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?QuickLink=index&overridelayout=true
And finally:
http://help.sap.com/saphelp_nw70/helpdata/en/d0/4cc138944cfa06e10000000a11405a/content.htm
Last link is talking about deltas from COEP table and one of the fields you are mentioning (which might mean something else than you expected)
Hope this helped
C. -
Problems with real-time extraction from generic datasource.
Hello,
I have a real-time extraction from generic datasoruce with numeric field as a delta pointer. I have created an initilization infopackage, delta IP and real-time IP, real-time data transfer process, real-time deamon. The problem is that real-time extraction does not see delta updates. Deamon creates requests in PSA every minute, but there are all empty. When i delete the deamon and shedule not real-time delta infopackage, it loads delta records correctly. Version of BI - 7.0 SP 18.
The second question: a cannot stop real-time deamon. I stop it in RSRDA, but when i try to shedule standart IP, i get an error, that deamon is still running. So i have to delete it and recreate.
And the 3rd question, theoretical. What real-time extraction is necessary for? As i understand, i can create a process chain that will be sheduled every 1 (5, 10, ...) minute. What are advantages of real-time extraction rather such variant?
Thanks.Hi,
1.Note 1113610 - P17:SDL:PC:RDA:Daemon runs: Do not start delta/init IPackage
Summary
Symptom
When a daemon runs or is scheduled, you may not start a 'normal' delta/init InfoPackage.
Other terms
RDA, real-time data acquisition, daemon, InfoPackage, scheduler
Reason and Prerequisites
This problem is caused by a program error.
Solution
SAP NetWeaver 7.0 BI
Import Support Package 17 for SAP NetWeaver 7.0 BI (BI Patch 17 or SAPKW70017) into your BI system. The Support Package is available when Note 1106569 "SAPBINews BI7.0 Support Package 17", which describes this Support Package in more detail, is released for customers.
**********you can apply the correction instructions provided in the note
2.i refered closing of the request in the target i.e DSO not psa.
3. Note 1000157 - RDA daemon does not get data from delta queue
Summary
Symptom
You use Real-time Data Acquisition (RDA) to load data from an SAP source system. After several hours or days, the system no longer reads the data from the delta queue. In the RDA monitor, you can see that the InfoPackage has been executed, however the data transfer process (DTP) has not been executed for a long time. In transaction RSA7 in the source system, you can see that there is already data in the delta queue.
Cheers,
swapna.G
Maybe you are looking for
-
after the newest update ( iso 7) , i can no longer type in traditional chinese ( pin yin), does anyone else have the same problem?
-
Transformation related info in CAD Integration
Hello All, we are trying to migrate the Legacy Solid Edge assemblies. does any one have any idea which table in SAP does the transformation information for the DIRs below an assemby get stored from CDESK. Thanks & Regards Srikanth Aduri.
-
Mail service keeps corrupting.
Hello all, My mail service keeps corrupting on my PowerMac running Mac OS X 10.3 Server. I have reinstalled my server 3 times due to this problem. Any one else having the same problem? any solutions? Thanks, Chris
-
Dear Experts, Could you give some clues as to how change log is used . When do you pull data directly from it and what mechanism is used for pulling data from change log. Thanks, Suzie
-
Photoshop CC Smart Sharpen Optimization
What is the best laptop configuration (CPU, GPU, Memory, SSD) to optimize speed of Photoshop CC's smart sharpen feature?