Handling Init/Full/Delta-Loading for a generic DS based on function-module
Hi Experts,
we need to build a generic datasource based on a function-module; and we would like to
implement a slightly different logic in the function-module depending on the data-staging-mode that was selected in the InfoPackage.
What we're missing is a possibility to distinguish (in the ds-function-module) if an init/delta/full-load was requested.
Could you please provide some information/hints about that topic?
Thanks in advance,
Marco
Hi Anjum,
we found an alternative that seems to be closer to SAPs idea of how it should work:
We check the status of the Init-Table (RSA7) - depending on the result
a) Init exists ---> Delta or Full
b) Init does not exist --> Init or Full
we check if the system itself passes a timestamp together with the data-request.
1) If it does so --> Delta/Init
2) If it doesn't provide a timestamp --> Full.
Summary:
a1 --> Delta
a2 --> Full
b1 --> Init
b2 --> Full
Similar Messages
-
Init ,full,delta load
Hi friends,
can u tell difference between init ,full,delta updates
and what situation we use these updates ?and any more update methods are there other than these?manohar ,
init - it is used to initialize the data load and will be followed by delta loads thereafter
delta - incremental data loads and can be done only after an init
full - you load all the data at once and do not wish to init. You cannot run a delta load after a full load. you will always have to init first and then do the delta loads.
please refer back to previous postings for more information on the same.
Arun -
Delta loads - for DB Connect and master data.
Hi there,
Would appreciate if any one clarify me on:
1) Are delta loads are possible as far as Master data is concerned?
2) What are all types of data loads (Initial/ delta/ Full)are possible as far extracting data from DB connect is concerned?
Thanks in anticipation.
Rgds,
A.
Message was edited by: AshHi Ash,
As far as I know, with DB connect you have the only option to have delta functionality - to use ODSs. Make full load from the source system to ODSs. Then update data targets from ODSs. During this update you'll have an option for init/full/delta load.
Best regards,
Eugene -
Generic Data Source Based On Function Module (Delta capable)
Hi,
My requirement is to develop a Generic Extractor based on Function Module (Delta capable). As I already found many threads explaining this concept, but most of them discussing FM RSAX_BIW_GET_DATA_SIMPLE with Extraction Method F2. There is another FM RSAX_BIW_GET_DATA which, one can use to build delta enabled extractor.
Although I do have some doubts:
what is the E_T_SOURCE_STRUCTURE_NAME ?
read table i_t_select into l_s_select with key fieldnm = 'PGMID'. Use of this code ?
Templet only showing
case i_updmode.
when 'F'.
when others.
if 1 = 2. message e011(r3). endif.
log_write 'E' "message type
'R3' "message class
'011' "message number
i_updmode "message variable 1
' '. "message variable 2
raise error_passed_to_mess_handler.
endcase.
i.upmode as F, D(delta) is not included, do i need to include this?
Can someone help to solve this. Appropriate points will be allotted to helpful suggestions.
Edited by: Debjit_Singha_86 on Jul 23, 2011 8:35 AMTry using following piece of code;
READ TABLE g_t_select INTO l_s_select
WITH KEY fieldnm = 'Date Field for Delta'.
IF sy-subrc EQ 0.
SELECT SINGLE *
FROM ROOSGENDLM
WHERE oltpsource EQ 'DataSource Nameu2019
AND slogsys EQ lw_slogsys.
IF sy-subrc EQ 0.
lw_date = roosgendlm-deltaid+0(8).
lw_time = roosgendlm-deltaid+8(6).
ENDIF. " IF SY-SUBRC EQ 0.
ENDIF.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT * FROM TABLE
WHERE CPUDT GE lw_date AND
CPUTIME GE lw_time.
ENDIF.
Table R00SGEMDLM stores the date and time data was last extracted from a data source.
Alternatively, you can also try using the i_updmode.
When 'F'.
SELECT * FROM TABLE (without any where clause on last change date)
When 'D'
SELECT * FROM TABLE
WHERE CPUDT GE lw_date AND
CPUTIME GE lw_time.
These are just suggestions. Try these out, I hope it helps.
Regards,
Gaurav -
Delta extraction for a generic datasource
Hi BWers,
I want put in Delta the extraction of a generic datasource.
Currently this generic datasource is based on the table VBPA (Sales Document: Partner). Any time field exists.
We need a time field in order to converse to a Delta extraction. This time field exists in the table VBAP (Sales Document: Item data). In fact two time fields exist: one which is filled at the creation of the sales order (ERDAT), another at the change of the sales order (AEDAT).
The fields VBELN, POSNR and MANDT are keys in the tables VBAP and VBPA.
The table VBAP changes when partner functions is created or changed in a sales order (VBELN) :
- When it is a creation of a new sales order (with new partner functions), a new record is created in VBAP and the field ERDAT (Created on) is filled. The field AEDAT (Changed on) is empty.
- When is a change of an existing sales order, the corresponding record in VBAP changed, and the field AEDAT is filled. ERDAT stays unchanged.
In order to converse to the Delta extraction, i need a only one time-field (calendar day) in RSO2 / Generic Delta.
But there is 2 time-fields ERDAT and AEDAT. So i just need to get AEDAT if it is filled, else if AEDAT is empty I will get ERDAT.
I would base my datasource on a view between VBPA and VBAP with one field which will be filled by AEDAT or ERDAT (with the conditions below). But it seems it is not possible.
Can you give me other ideas ?
Thanks a lot.
Cheers,
Vince.In order to create a generic delta from two source fields, ERDAT and AEDAT in this case, you're going to have to create your generic extractor from a Function Module. Otherwise you'll only have the standard functionality available to you for creating the generic delta, which allows you to base it on only one column.
Here's a sample you can use, that was created for VBFA, and change for your DataSource.
FUNCTION y_docu_flow.
*"*"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 YSDS_DOCU_FLOW OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
*& Global Data Declarations
* Type for VBFA Data
TYPES : BEGIN OF ty_vbfa ,
mandt TYPE vbfa-mandt ,
vbelv TYPE vbfa-vbelv ,
posnv TYPE vbfa-posnv ,
vbeln TYPE vbfa-vbeln ,
posnn TYPE vbfa-posnn ,
vbtyp_n TYPE vbfa-vbtyp_n ,
rfmng TYPE vbfa-rfmng ,
meins TYPE vbfa-meins ,
rfwrt TYPE vbfa-rfwrt ,
waers TYPE vbfa-waers ,
vbtyp_v TYPE vbfa-vbtyp_v ,
plmin TYPE vbfa-plmin ,
erdat TYPE vbfa-erdat ,
aedat TYPE vbfa-aedat ,
END OF ty_vbfa .
* Internal Tables and Selection Criteria Structure
DATA : t_vbfa TYPE STANDARD TABLE OF ty_vbfa ,
l_s_select TYPE srsc_s_select .
* Field Symbols
FIELD-SYMBOLS : <fs_fields> TYPE rsfieldsel.
* Constants
CONSTANTS : c_error_msgty TYPE rslogparms-msgty VALUE 'E' ,
c_error_msgid TYPE rslogparms-msgid VALUE 'YAERO_WTY_VSR',
c_error_msgv1 TYPE rslogparms-msgv1 VALUE ' MESSAGE_V1 ' ,
c_error_msgv2 TYPE rslogparms-msgv1 VALUE ' MESSAGE_V2 ' ,
c_error_msgv3 TYPE rslogparms-msgv1 VALUE ' MESSAGE_V3 ' ,
c_error_msgv4 TYPE rslogparms-msgv1 VALUE ' MESSAGE_V4 ' ,
c_error_msgno TYPE rslogparms-msgno VALUE 999 ,
c_alias(2) TYPE c VALUE 'A~' ,
c_vbfa TYPE dntab-tabname VALUE 'VBFA' .
* Maximum Database Lines, Data Package Counter and Cursor
STATICS : s_s_if TYPE srsc_s_if_simple ,
s_counter_datapakid TYPE sy-tabix ,
s_cursor TYPE cursor .
* Select Ranges
RANGES : r_erdat FOR vbfa-erdat ,
r_aedat FOR vbfa-aedat ,
r_vbelv FOR vbfa-vbelv ,
r_posnv FOR vbfa-posnv ,
r_vbeln FOR vbfa-vbeln ,
r_posnn FOR vbfa-posnn .
*& Processing Logic
* Refresh Internal Table and Clear work area
REFRESH: t_vbfa ,
e_t_data .
* Check the Extraction Mode (Delta Initialization Or Delta)
IF i_initflag EQ sbiwa_c_flag_on.
* Determine DataSource Validity
IF i_dsource NE 'YSDDS_DOCU_FLOW'.
* Call Function to Write Log
CALL FUNCTION 'RSAL_LOG_WRITE'
EXPORTING
i_msgty = c_error_msgty
i_msgid = c_error_msgid
i_msgno = c_error_msgno
i_msgv1 = c_error_msgv1
i_msgv2 = c_error_msgv2
i_msgv3 = c_error_msgv3
i_msgv4 = c_error_msgv4.
* Raise Exception
RAISE error_passed_to_mess_handler.
ENDIF. " IF i_dsource NE 'YSDDS_DOCU_FLOW'.
* Append the Selection Criteria
APPEND LINES OF i_t_select TO s_s_if-t_select.
* Fill parameter buffer for data extraction calls
MOVE : i_requnr TO s_s_if-requnr ,
i_dsource TO s_s_if-dsource ,
i_maxsize TO s_s_if-maxsize .
* Append Fields to be Selected
APPEND LINES OF i_t_fields TO s_s_if-t_fields.
* Add the Alias to Fields
LOOP AT s_s_if-t_fields
ASSIGNING <fs_fields>.
CONCATENATE c_alias
<fs_fields>-fieldnm
INTO <fs_fields>-fieldnm.
CONDENSE <fs_fields>-fieldnm NO-GAPS.
ENDLOOP. " LOOP AT s_s_if-t_fields..
ELSE. " IF i_initflag EQ sbiwa_c_flag_on
* For First Data Package, Open Cursor
IF s_counter_datapakid EQ 0.
* Clear Ranges
CLEAR : r_erdat ,
r_aedat ,
r_vbelv ,
r_posnv ,
r_vbeln ,
r_posnn .
* Fill Selection Ranges
LOOP AT s_s_if-t_select
INTO l_s_select.
* Determine Selection Range Field Name
CASE l_s_select-fieldnm.
* Created On Date
WHEN 'ERDAT'.
MOVE : l_s_select-sign TO r_erdat-sign ,
l_s_select-option TO r_erdat-option ,
l_s_select-low TO r_erdat-low ,
l_s_select-high TO r_erdat-high .
APPEND r_erdat.
* Fill the change date too
MOVE r_erdat[] TO r_aedat[].
* Predecessor Document Number
WHEN 'VBELV'.
MOVE : l_s_select-sign TO r_vbelv-sign ,
l_s_select-option TO r_vbelv-option ,
l_s_select-low TO r_vbelv-low ,
l_s_select-high TO r_vbelv-high .
APPEND r_vbelv.
* Predecessor Document Line Item
WHEN 'POSNV'.
MOVE : l_s_select-sign TO r_posnv-sign ,
l_s_select-option TO r_posnv-option ,
l_s_select-low TO r_posnv-low ,
l_s_select-high TO r_posnv-high .
APPEND r_posnv.
* Successor Document Number
WHEN 'VBELN'.
MOVE : l_s_select-sign TO r_vbeln-sign ,
l_s_select-option TO r_vbeln-option ,
l_s_select-low TO r_vbeln-low ,
l_s_select-high TO r_vbeln-high .
APPEND r_vbeln.
* Successor Document Line Item
WHEN 'POSNN'.
MOVE : l_s_select-sign TO r_posnn-sign ,
l_s_select-option TO r_posnn-option ,
l_s_select-low TO r_posnn-low ,
l_s_select-high TO r_posnn-high .
APPEND r_posnn.
ENDCASE. " CASE l_s_select-fieldnm.
ENDLOOP. " LOOP AT s_s_if-t_select..
* Open Cursor on View to Fetch data
* If full load with Selection on Fiscal Year
IF r_aedat[] IS INITIAL.
* Full Extraction
OPEN CURSOR
WITH HOLD s_cursor FOR
SELECT (s_s_if-t_fields)
FROM vbfa AS a
JOIN pnwtyv AS b
ON a~vbelv EQ b~sdvbeln
WHERE a~vbelv IN r_vbelv
AND a~posnv IN r_posnv
AND a~vbeln IN r_vbeln
AND a~posnn IN r_posnn
AND a~rfmng NE 0
AND a~erdat IN r_erdat
AND b~sdvbeln NE space.
ELSE.
* Delta Extraction Using ERDAT and AEDAT
OPEN CURSOR
WITH HOLD s_cursor FOR
SELECT (s_s_if-t_fields)
FROM vbfa AS a
JOIN pnwtyv AS b
ON a~vbelv EQ b~sdvbeln
WHERE a~vbelv IN r_vbelv
AND a~posnv IN r_posnv
AND a~vbeln IN r_vbeln
AND a~posnn IN r_posnn
AND a~rfmng NE 0
AND ( a~erdat IN r_erdat
OR a~aedat IN r_aedat )
AND b~sdvbeln NE space.
ENDIF. " IF r_aedat[] IS INITIAL
ENDIF. " IF s_counter_datapakid..
* Fetch Records into Interface Table
FETCH NEXT CURSOR s_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE t_vbfa
PACKAGE SIZE s_s_if-maxsize.
* No More Data, Raise Exception
IF sy-subrc NE 0.
* Close the Cursor
CLOSE CURSOR s_cursor.
* Raise Exception
RAISE no_more_data.
ELSE.
* Move Extracted Data to Output Structure
MOVE t_vbfa[] TO e_t_data[].
* Release Memory
FREE t_vbfa.
* Sort Output Structure
SORT e_t_data BY vbelv
posnv
vbeln
posnn
vbtyp_n.
* Delete Duplicate Records from Output Structure
DELETE ADJACENT DUPLICATES
FROM e_t_data
COMPARING vbelv
posnv
vbeln
posnn
vbtyp_n.
* Increment Data Package Number
s_counter_datapakid = s_counter_datapakid + 1.
ENDIF. " IF sy-subrc NE 0
ENDIF. " IF i_initflag EQ sbiwa_c_flag_on
ENDFUNCTION.
Edited by: Dennis Scoville on Jul 16, 2009 8:29 AM
Edited by: Dennis Scoville on Jul 16, 2009 8:29 AM -
Delta Loads for 2lis_02_scl and 2lis_02_itm
Hi Experts,
I am facing an issue, After initializing the setup tables and doing the init load for 2lis_02_scl and 2lis_02_itm whenever I do the delta loading for these two, all the dataload finish with green status and extracting 0 from 0 records.
I can see the queues for both these datasources in RSA7 in R/3, yet no record is extracted.
Any help will be appreciated.
Regards.Hi,
have a look into transaction smq1. there you should be able to see your extraction queues with the entry MCEX02 (or likewise)
Please schedule the program RMBWV302 and when this one is finished, start the deltapackage.
hth
cheers
sven -
Delta load for 2LIS_06_INV is failing after EHP5 upgrade of ECC system
Hi Experts,
Our ECC Production system was upgraded to EHP5 last weekend.
Since then Delta load for datasource 2LIS_06_INV is failing. This is the only datasource got impacted. Full Load and Initialization Loads are running fine. Only Delta load is failing because of following error:
Error in the ABAP Application Program
The current ABAP program "SAPMSSY1" had to be terminated because it has
come across a statement that unfortunately cannot be executed.
The following syntax error occurred in program "/BI0/SAPLQI2LIS_06_INV " in
include "/BI0/LQI2LIS_06_INVU04 " in
line 1:
"Function "/BI0/QI2LIS_06_INV0002" not found in Function Library."
Thanks and Regards,
Sandeep SharmaSAP suggested Note to fix this issue.
-
Hi Friends,
I have a issue in delta load for 0customer. The load was initialized with data transfer for the first time load ,The data was loaded succesfully , now we have enhaced the 0customer_attr with customer group .In RSA3 if we check we are getting values for customer group. we created one delta infopackage with update status as delta and scheduled the load .we are getting data load success status but with 0 records. Please can anybody share the process for delta load for master data objects. Iam facing similar problem while uploading delta load for 0MATERIAL.
Regards,
DippyHi
in source system, check whether your enhanced field is with hide check box ticked.
As soon as you add filed in append structure by default it is having that field is hidden. You have to uncheck it.
Then replicate the datasource in BW.
Now if delta is the issue that you are not getting ant record, that may be because there is no change in master data, delta will only bring records when there will be nay change in master data update.
So my suggestion is to crate a full repair infopackage, extract everything in to PSA and then load the data with FULL DTP.
I hope this will work.
Thank-You.
Regards,
Vinod -
Table with Full / Delta Load information?
Is there a table I can go to where I can see if a cube is a full load vs delta?
Thanks, I will assign points!
~NathanielHi,
ckeck the table ROOSPRMSC in R/3.It gives you the complete details of your Init and Delta Loads.
hope this helps.
Assign points if useful.
Regards,
Venkat -
HI,How can i set delta option for costumised Generic data source
Hi Sir/Madam,
How can i set delta option for costumised Generic data source.
Regards,
Vishali.R
Please search the forum before posting a thread
Edited by: Pravender on Aug 15, 2011 1:26 PMHi,
Go to RSO2 transaction and click on change then on the tool bar click on Generic Delta button. In the next popup you can set your delta.
Regards,
Durgesh. -
How to do Delta upload using Generic Extractor built on Function Module?
Hello Guys,
I have never created a Generic Extractor using a Function Module. I wanted to know how can we support Delta mechanism if we create Generic extractor using Function Module.
Regards,
AbhishekHi Abishek,
Please check the standard Function Module RSAX_BIW_GET_DATA for your delta mechnism.
Hope it will help you.
Thanks,
Chandra -
Hi,
We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
Thanks,
RaviHi,
Step1-Create a table structure which you need to create same as the fields you require in you data source.
Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
Step 3-create infoset query.In the infoset query give your table structure name and program name which you developed.
Step4-create data source on top of that query -
Generic Data Source with Function Module data mismatch in BI
Hi All,
I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
and single record is divided into 2 records in BI side(not all the records), how can it be possible???
is there anything Im missing to explain you my issue???
if understood please help me out.
Thanks n Regards,
ravi.the datasource frame work starts the function module several times.
1. the initialization
2. the serval times, until you "raise no_more_data".
check you coding: have you refreshed necessary internal tables.
Sven -
Generic Data Source with Function Module data mismatch
Hi All,
I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
and single record is divided into 2 records in BI side(not all the records), how can it be possible???
is there anything Im missing to explain you my issue???
if understood please help me out.
Thanks n Regards,
ravi.HI rkiranbi,
1. FIrst you excute function module according to your paramers, you will get some records. then goto tcode RSA3 --> excute
Provide your Data source name and under setting we have options like Data records/calls, Display extractor calls and selections --> fields .
in that options you have to increase the values. and then you have to pass paramers in RSA3 according to your function module
selections in SE37. Now you will get equal values in both functin module selection and RSA3 Selection. if it fail means you need to
check coding logic in function module.
2. if your are getting wrong values in BI System then check with
1. compare with PSA data and data target data (here you need to check with characterstic as well as keyfigures)
if you find any mistake you need change the coding in function module according to client requirement.
2. compare data with RSA3 and bi report data or data target data.
check it properly above steps, you will get solution.
thanks and regards,
malli -
Full load to Delta load for 0ASSET_AFAB_Text load
Hi Experts,
Standard extractor is not enabled to change the mode to Delta.
Is it possible to change the Standard Extrator from Full to Delta. if so how we can do it?? Full load it taking long time so want to change the process to delta.
Please suggest me any other options too......
Thanks in advance,
rCm.
No Luck
Edited by: rCm on Jan 29, 2010 2:10 PMHi,
0ASSET_AFAB_TEXT Datasource will fetch the Data based on the Function Module ARBW_BIW_GET_MASTER_DATA
SAP has not provided the Delta Functionality for this Datasource,
check the Roosource and Rodeltam tables for more clarity
Regards
Reddy A
Maybe you are looking for
-
How do i update my ipad to the ios 4.3
i have the original ipad...it is saying i need to update to an iso 4.3 how do I do this
-
Hello from a new member and help with random images on refresh
Hi All, I've just joined the forum. In fact I've really only just started to use Dreamweaver. I've covered a lot of ground in the last few weeks and have manage to set up a basic site using CSS for layout but now I've hit my first problem. On the ind
-
Is Hoefler Text safe for the web?
I notice that Hoefler Text is the default font for the Highlighter theme. Yet it does not appear in the web-safe fonts list. Should I change all my pages from Hoefler Text to a font on the list? Will I run into problems by leaving them as Hoefler?
-
Safari won't start up after applying a recent MS Office Update Here is the error:
Process: Safari [909] Path: /Applications/Safari.app/Contents/MacOS/Safari Identifier: com.apple.Safari Version: 6.0.5 (8536.30.1) Build Info: WebBrowser-7536030001000000~6 Code Type: X86-64 (Native) Parent Process: launchd [161]
-
Hi, We want to compare the tables between DEV and QA. Can you please let me know as what is the quick process we need to follow to compare all the tables between DEV and QA. Please help Thanks