No delta can be captured on generic datasource
dear experts,
i create a new generic transaction datasource for sale order list.
the fields include : 1 sales order number
2 sales org
3 sales person
4 change date
5 bill to party
6 ship to party
i choose 1 sales order number as the delta field with numeric pointer and the upper limit is set 1
today(2009-03-18) i have a delta init with data on BW side and i get all sales order list data in PSA;
also, i can monitor its delta queue via rsa7, it shows the current staus is 2009-03-17.
then, i create a new sales order in r/3 side, and execute the first delta uploading on bw side.
but there is no any delta captured in PSA, and i repeat the delta, still nothing.
my question is why i can not get the delta when i create a new sales order.
many thanks.
best regards,
steve
Hi
Your Source System date is different?? does this leads to mismatch of delta records?? Check your timestamp /system Date again .. May be you need Functional Consultant also to update Sales Order...
If delta field is a Numeric Pointer i.e. generated record # like in GLPCA table, then use Lower Limit. Use count 10-100. Leave upper limit blank. If value 10 is used then last 10 records will be loaded again. If a record is created when load was running, those records may get lost. To prevent this situation, lower limit can be used to backup the starting sequence number. This may result in some records being processed more than once; therefore, be sure this DataSources is only feeding an ODS Object.
Hope it helps and clear
Similar Messages
-
Delta update failed with a generic datasource.
Dear all,
The initial update was successful with this datasource but the delta failed.
1. The datasource was created through a view which contains table MCHA and was appended with a structure which was filled by a function module in CMOD.The delta-specific field was a Calendar Day field.
2. Error message from the monitor in BW:
Error message from the source system
Diagnosis
An error occurred in the source system.
System Response
Caller 09 contains an error message.
Further analysis:
The error occurred in Extractor .
Refer to the error message.
The detail info in the monitor showed * "Errors occured in the* data selection."
3. The next delta update runned with a green light in the monitor, but it couldn't extract anything. The next with a red light ,and a green......on and on. All of the deltas couldn't extract anything.
4. Running RSA3 in R3 with update mode "D" resulted in failure with Error Message "Error occured during the extraction". No logs for it in RSA3.
Looking farward to any ideas.
Regards,
Bolun
Edited by: bolun li on Oct 14, 2008 4:55 PM
Edited by: bolun li on Oct 14, 2008 4:55 PMHi,
Did you try replicating the datasource and activating? Generally, Caller 09 error out because of this? If not, can you let us know what do you see from Error message in status tab? In RSA3, you must also give target system name (for eg BWDCLNT300) and try to run it. Once it is done and still error persist then check the log by clicking Display Log.
If you still facing the same problem then try to run the full update for minimal data selections and let us know.
~ Vaishnav -
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 -
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. -
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. -
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. -
Delta issue on a Generic Datasource
Hi
I had a Generic Datasource on a Z table.
The Z table had a Date field on which Delta is based.The Postings are performed manually.
How to solve the delta issue in the below scenario.
Ex; A user made a manual posting with a date 09AUG2010 today and delta is extracted to BW.
But tommorow a used made another posting with a date 14JULY2010....
Currently that record is not being extracted....how can i resolve this
ThanksHi,
Once the data source is created you will extract the data till that date and as the delta is set it will fetch the newly updated records .But i dont think one can post with the back dates in R/3 side.
If i'm not wrong if you are asking regarding record got missed out them wht need to be done?
Then do the repair full request and pull the missed delta records and it wont effect the delta settings.
Regards
KP -
Delta in Generic datasources.
For the generic datasource. I have to run Delta multiple times per day. In this case I hope that, TIMESTAMP is the suitable option to run delta. Here, to set up TIMESTAMP, I have to select the field name for Delta, based on that field name the delta will work and pick the records into BW side.I have 2 fields DATE and TIME to set up delta. I have given field DATE for delta.
For example.The data in the source system is
IC DATE TIME
XX 22/03/2009 09:30:41
I will run delta on 22/03/2009, 10 AM , then the above record will go to BW successfully.
At 11 AM one more record will be added into the source sytem on the same date 22/03/2009. Now the data in the source system is
IC DATE TIME
XX 22/03/2009 09:30:41
YY 22/03/2009 11:00:00
Again, at 11:30, I will run delta to pick the 2nd record. Here my doubt is, will that 2nd record be picked into the BW?. I doubt that, as we have set up delta based on the field DATE, Will the 2nd record will be picked into the BW side or not?. If the 2nd record will not be picked into the BW side.
How can I achieve this. But, I need to run multiple times per day and need all records.
Please let me know if you dont understand.Hi,
I understand your requirement, as you are using date as delta specific field you would not get another record created on the same day. To solve it you have two options,
1) Field with date and time combination. - e.g 20090317164909.
2) Or can you use time field as delta field.
Any of above can solve your problem.
Hope this helps.
Regards,
Viren
Edited by: Viren Devi on Mar 22, 2009 9:11 PM -
Hi all,
In case of standard datasource, the document posted in R/3 is written to BW delta queue. Generic datasources don't support delta update directly but support generic delta. Can you pleasce clarify what exactly happend in case of generic datasoure.
Thanks in advnce,
Zak.based on timestamp or values of certain field generic datasource shall manage delta. Check this please - Generic Delta-
http://help.sap.com/saphelp_nw70/helpdata/en/37/4f3ca8b672a34082ab3085d3c22145/content.htm -
How to Add delta functionality to generic datasource
Hello all,
My requirement is to make a Generic Transactional Data source Extractor to Delta enabled.
The datasource doesnt contain either of the following delta enabling functionality
-> Date
->time stamp
->Numeric pointer.
Could anyone suggest idea how to add these in Generic Datasource so that it can be delta enabled
regards
BalaHi Bala,
Coding should be done checking th trasaction and the tables.
but i can provide outline .
add a field last changed on and write a code saying last changed on is equal to sy-datum.
i am not sure of the scenario where to write this code and after which line.you can take a decision.
check the link below
https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008&overridelayout=true
Regards
Joga -
I am using generic datasource first time init sucessful, next time deltas
Hai ALL,
I am using Generic Datasource first time i run init next time i want to run the delta, delta is sucessful but 0 records. i am taken date field and new status fileds(DSO) for DSO. R/3 side table values chaging but not replicate to BI. Can any suggest how to run the delta for Generic Datasource.
Thanks & Regards,
SureshHi
Have you set delta pointers in your Generic datasource? if yes then what it is ? try to see if its logically related with your changes in records or you need to use any other type of delta pointer. -
Generic Datasource Delta Settings Change
Hi Experts,
Currently the delta field in generic datasource is set to timestamp (LOCAL) and Upper limit is blank.
I need to change the delta settings to timestamp(UTC) or set the upper limit to 1000 seconds.
Can anyone tell me how to change this in production. Do i need to change this in dev and transport this to production.
If i do the changes to generic datasource, do i have to initialise the delta again?
Pls provide me the step by step solution.
Regards,
AnandAnanda, What about the delta initialization? After transporting the datasource from R/3 dev to R/3 production, I have to replicate the datasource right.
In that case what will happen to my delta?.
One more thing incase i need to change only the upper limit value. Even for this, do i have to change it in dev and transport to production?
Regards,
Anand -
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 Delta upload Issue
Hi all,
I have created a Generic Datasource for Solution Manager ODS 0crm_process_srv_h which contains the userstatus, transaction number, transaction desc and GUID of CRM Order Object (ods key field),only these fields.
I have taken transaction number as delta field and it is as timestamp. But delta upload is not happening. If I give GUID or Status also delta upload is not happening . Please suggest which is the best way to give to delta upload.
Thanks and Regards,
SGK.Hi,
in your case you need to create a function module as a extractor. Create a extract structure as well and add a timestamp field (lets call it zdeltahelp) to be used as the delta relevant field of the datasource. After successful init the last extraction timestamp will be passed to the fm and you can start selecting all resb entries for orders created and/or changed from that time on as well as the ones deleted (but therefore you need to read the change documents as well). For more information about generic extraction using fm search the forum or check out my business card. There you will find a link to a weblog about that issue.
regards
Siggi -
To enable delta update in generic datasource
Hi All,
I'm creating a generic datasource for master data. I want to enable the delta update option. While creating the datasource the option is disabled and i'm not able to tick the checkbox. Can you please tell me how to enable the delta update option.
Thanks in advance,
SanandaHi Sananda,
when creating the DataSource, choose button Generic Delta. In the dialog box that appears, specify the delta-determining field and the type of this field. Maintain your entries and save data. After the DataSource has been generated, the delta update field is selected.
Regards,
Theodoros
Maybe you are looking for
-
How to add a new button in an ALV using factory method
im using factory method to creat an ALV The reason why I'm doing this is because I want the ALV and the selection screen in the same screen like exemplified here http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html CALL METHOD
-
SQLs erver migration performance issue
We are performing migration from oracle to MSSQL server 2005 (Windows 2003/SAP 4.6D).Our target system configuration is like below: ->OS - Windows 2003 x64 ->DB - MSSQL server 2005 SP4 ->SAP - 4.6 D kernel ->CPU - 4 processors (2.67ghz each) ->RAM -
-
Need help in selecting data dynamically in combobox
i am taking some values in combobox from database and i want that on selection of the option in 1st combobox the another set of values should come in 2nd combobox ,& that also from database i have saved the file as .php and also given the database in
-
Re: CS6 update failed-creative cloud
To all staff and Adobe ...fix this problem ...people payed a lot of money for CC and its ridiculous people can't update their software. Jesus christ unbelievable
-
Does an episensor accelerometer work with SCXI-1531
Please advise if an accelerometer with the below specifications (EpiSensor ES-U2, Uniaxial Force Balance Accelerometer) work fine with SCXI-1531 module: Key Features Low noise Extended bandwidth -- DC to 200 Hz User-selectable full-scale range Calibr