Generic Extractor on Table VBAP
Hi Gurus,
I want to develop a Generic Extractor on table VBAP, but unfortunately its not giving me the extract structure when I save in RSO2, the screen wherein we select our fields are not displayed. Is there anything i am missing in the steps. Pls help us out with this issue.
I am able to create the generic extractor with other tables with usual proceedure.
Thanks in Advance.
Regards,
MSS
Hi
This is the problem with the amount and currency reference fields in your extract structure.
"This operation failed, because the template structure quantity fields or currency fields, for example, field CMPRE_FLT refer to a different table."
As you have an amount field, the currency reference table might be different and hence, it is giving this error.
I think u need to create view and then append the currency or quanity fields , and populate them through User exit.
Hope this helps.
Sonal...
Similar Messages
-
Hi
I would like to create a Generic Extractor on table QMFE which has Created Date and Changed Date fields.
If I have to get deltas, I can use only one field in Extractor for Delta option: Either Created Date or Change Date.
If I use Create Date, I'll miss Changes and vice versa.
I felt Function Module Extractor will be 2much complex.
Can any one suggest what is the best approach to get deltas in this scenario?
Thanks
Sree
Please search the forum before posting a thread
Edited by: Pravender on Aug 12, 2011 3:59 PMHi Sree,
1) The simplest approach will be to create a single extractor and set the delta pointer to Changed Date, but this is only possible if you populate changed date = Created date for the very first time you create records. So that by using changed date you will not miss any newly created delta records, check with your functional team whether this is possible or not?
2) Otherwise you can create two generic extractors and use two different delta pointers one with Created Date and other with changed date. In the generic extractor you simply need to set your delta pointer and modify the OPEN CURSOR statment to include the proper delta field in selection of data. Rest of your code will be same for both the extractors.
Now if you go for 1st approach then you will have to create only one IP in BW and include it in process chain but in 2nd approach you will have to create two IP (one for each DS) and include both in process chain. It will only increase your data loading time.
Regards,
Durgesh. -
Problem in creating a Generic Extractor on a custom 'Z' table
This is regarding an earlier question I posted in sdn today. I am trying to create a generic extractor on a custom 'Z' table and iam getting the following message.
Invalid extract structure template YBW_Z3PVR of DataSource YCNA_3PVAR_RPT
Message no. R8359
Diagnosis
You tried to generate an extract structure with the template structure Z3PVR. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table.
Procedure
Use the template structure to create a view or DDIC structure that does not contain the inadmissable fields.
Please advise. how do i solve this?Hi there,
Is your Z* table working? It must be add check field for quantity field and currency field.
Hope this helps. -
Creation of a generic extractor and data source for the FAGLFLEXA table
Hi All,
Need to create a generic extractor and data source for the FAGLFLEXA table to support AR reporting. This table contains the necessary profit center information to perform LOB reporting against the AR data.
Please advice on how to do this.
Regards, VishalHi Vishal,
Its seems a simple a work out.
1.Go to RSO2 & choose the relevant option ie. whether you want to create Transactional DS, Master Data DS or Text DS.
2. Name it accordingly & then create.
3. Give description to it & then give table name FAGLFLEXA.
4. Save it & activate. If you need it to be delta enabled then click over Delta & you can choose accordingly.
If you still face some problem then do mail me at [email protected]
Assign points if helpful
Regards,
Himanshu -
Create generic extractor based on 2 tables
hey BI gurus,
I have to create a generic extractor based on these 3 tables:
eban - i need all fields
vttk - i need only 4 fields i.e
route,
tknum,
datbg,
daten
ekbe - budat.
now the problem is thr is no common field between vttk & eban AND vttk & ekbe. but thr is a common field between eban & ekbe.so i can create a view only on these 2 tables but i want 3 tables
how do i proceed???Hi,
Sometimes, if your application or requirement makes it necessary, you have to create your own function module to extract the data from whatever sap system to bw.
Therefore you normally make a copy of the standard fm 'RSAX_BIW_GET_DATA_SIMPLE'. To make this new function work for you, you have to realize the following.
1.) the fm gets called by the extraction api for at least 2 times. First time is for initialization and from the 2nd time on it is for data extraction.
2.) right after the last data package (somehow you need to make sure that it is the last one) you have to raise the exception no_more_data.
Refer this links for more Info
SAP BI Generic Extraction Using a Function Module
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
SAP Network Blog: Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Take the help of an ABAPer if your are new to this process
Regards
Karthik
Assigning points is the way to say thanks -
Generic Extractor on DB Table without Date, Time stamp
Hi all,
We have requirement of creating a generic extractor on the table which doesnt have date or time stamp in the data field. The only option availabel is to extract from Document numbers.
And we cant put the extractor mode to "Read from view" because the table contains Currency field which refers to external table for currency key.
The moment we change the extractor mode from Extraction from view to Extraction from FM the option "Numeric pointer" gets hidden.
What shall we do in this scenario ?? Pls advice.
Thanks.
Regards
NimeshHello Tapan, Prakash
Prakash : Currency key is needed in BW .
Tapan : I was just trying diff. options i.e. extraction from view and FM . Problem with Generic Extractor is that i dont have any date fields getting updated in the table. The only field that can be used for delta is document number. And Generic extractor only allows date or time stamp option , its not allowing numeric pointer if one reads from FM.
Regards
Nimesh -
Generic Extractors with Fm / Finding out tables used
Hello Gurus,
for a requirement, i would like to find out the table used in a generic extractor with function module.
I can see the structure with the objects used but not the tables where they are from.
How can i find that out?
Thank you
PatHi Gilo ,
The best way to find out the tables used in the function module will be to analyze the code . Check all your Select Statements in the code and see the tables being used there .
Sometimes in the code , we use standard function modules from the ECC. Check those standard FMs also and see what table they are using .
Hope the above reply was helpful.
Thanks & Regards,
Ashutosh Singh -
Missing new fields in generic extractor but present in table view
Hi
I can't see new fields in generic extractor but they are present in the table view.
Few days ago I created a generic datasource based on table view. Now I included 2 more fields in the table view but these fields doesn't show in RSA6 and RSO2.
how can i resolve this.
thanksHi Bhat,
GO to RSA5 and give ur generic extractor name ....
Click on edit the newly added fields will be hided ...so u need to uncheck the hide olumn
once this is done save that.
U will find the fields in RSA3 and RS02
Regards
vamsi -
Building a Generic Extractor on the Material (MBEW) Valuation table
When I build an extractor based off the MBEW table does it matter whether the generic extractor is transactional i.e. any performance, conflict type issues? My thought is to build it as a Master data generic extractor? Thanks
Hi,
I hope, It Does not matter. We can created Master data source on MBEW.
If you want to define this DS as Transaction datasource and If MBEW has More than material and plant as primary key, then it is better to upload the data to ODS first to avoid duplicate records problems while uploading to master data infoobject.
With rgds,
Anil Kumar Sharma .P -
Generic extractors on pool table and Cluster tables
Good Afternoon all,
Can we create generic extractors on Cluster or pool Table. If yes Let me know how?
I am trying to create a Generic Extractor on BSEC Table but it is not allowing me to do this. It throws error that"Extraction from pool tables and cluster tables is not permitted"
Kindly guide me on this
Thanks,
Vaishali.Hi
you cannot do generic extraction directly on pooled or cluster tables.
You can create a function module, then you can create a Generic Data source based on this..
Hope it helps,
Thanks,
Teja
Edited by: Teja badugu on Apr 15, 2008 12:24 PM -
The Generic Extractor DataSource's TimeStamp table?
We known the FI DataSource has the TimeStamp table BWOM2_TIMEST which provide two fields TS_LOW and TS_HIGH to store the Safty Interval information. I think the Generic Extractors DataSource may has the similar TimeStamp table too. If it is right, where is the TimeStamp table to Generic Extractors DataSource? Thanks for your reply.
Many thanks for all of you. I have checked the tables and data flow.
The result is below,FYI
Field comment
ROOSOURCE-OLTPSOURCE (The DataSource name)
ROOSOURCE-DELTASAFE1 (The Safety Interval Lower Limit)
ROOSOURCE-DELTASAFE2 (The Safety Interval Upper Limit)
ROOSOURCE-TSTPDAT (The DataSource create date)
ROOSOURCE-TSTPTIME (The DataSource create time)
ROOSGENDLM-OLTPSOURCE (The DataSource name)
ROOSGENDLM-DELTAID (The Current Delta update Timestamp)
ROOSGENDLM-REPEATID (TheLast Delta update Timestamp)
RSA7->Current Status (The Current Delta update Timestamp) -
Creation of generic extractor in CRM
Hi Experts,
I want to create generic extractor in CRM.
In R/3 we can use table like VBAK,VBAP..etc while creating Generic extracor.But I am not able to find tables for transactions like Activities,Opportunities ...etc in CRM.
Pls let me know how to find tables in CRM.
Regards
Vishal.Hi Vishal,
The orders tables in CRM are CRMD_ORDERADM_H (header) and CRMD_ORDERADM_I (item-level).
For other tables, usually they begin with CRMD_*. They're related to document informations, like for example: CRMD_PARTNER for partners, CRMD_ORGMAN for document organizational data, and so on....
Kind regards, -
Delta fo Generic extractor using function module
Hi,
I am using the following function module for generic extractor but its always showing me extraction error.Could anyone please suggest to resolve the issue.
Thanks in advance fo rsuggestion.
FUNCTION Z_BW_SALESDATA_EXTRACT_CHNG2.
""Local interface:
*" IMPORTING
*" VALUE(I_REQUNR) TYPE SBIWA_S_INTERFACE-REQUNR
*" VALUE(I_ISOURCE) TYPE SBIWA_S_INTERFACE-ISOURCE OPTIONAL
*" VALUE(I_MAXSIZE) TYPE SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
*" VALUE(I_INITFLAG) TYPE SBIWA_S_INTERFACE-INITFLAG OPTIONAL
*" VALUE(I_UPDMODE) TYPE SBIWA_S_INTERFACE-UPDMODE OPTIONAL
*" VALUE(I_DATAPAKID) TYPE SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
*" VALUE(I_PRIVATE_MODE) OPTIONAL
*" VALUE(I_CALLMODE) LIKE ROARCHD200-CALLMODE OPTIONAL
*" VALUE(I_REMOTE_CALL) TYPE SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
*" TABLES
*" I_T_SELECT TYPE SBIWA_T_SELECT OPTIONAL
*" I_T_FIELDS TYPE SBIWA_T_FIELDS OPTIONAL
*" E_T_DATA OPTIONAL
*" E_T_SOURCE_STRUCTURE_NAME OPTIONAL
*" EXCEPTIONS
*" NO_MORE_DATA
*" ERROR_PASSED_TO_MESS_HANDLER
The input parameter I_DATAPAKID is not supported yet !
Example: InfoSource containing TADIR objects
TABLES: VBFA,VBRK,tadir.
Auxiliary Selection criteria structure
DATA: l_s_select TYPE sbiwa_s_select.
Maximum number of lines for DB table
STATICS: l_maxsize TYPE sbiwa_s_interface-maxsize.
user defined variables.
DATA : X_UPDMODE(1) Type c, " Update Type
X_LastUpdate Like Sy-Datum. " Last Update Date
X_LastUpdate TYPE RODELTAID. " Last Update Date "TCS_KAP
Select ranges
RANGES: L_R_VBELN FOR VBAK-VBELN,
L_R_AUDAT FOR VBAK-AUDAT.
Parameter I_PRIVATE_MODE:
Some applications might want to use this function module for other
purposes as well (e.g. data supply for OLTP reporting tools). If the
processing logic has to be different in this case, use the optional
parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
(I_PRIVATE_MODE = X).
If the message handling has to be different as well, define Your own
messaging macro which interprets parameter I_PRIVATE_MODE. When
called by BIW, it should use the LOG_WRITE macro, otherwise do what
You want.
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
The input parameter I_DATAPAKID is not supported yet !
Invalid second initialization call -> error exit
IF NOT g_flag_interface_initialized IS INITIAL.
IF 1 = 2. MESSAGE e008(r3). ENDIF.
log_write 'E' "message type
'R3' "message class
'008' "message number
' ' "message variable 1
' '. "message variable 2
RAISE error_passed_to_mess_handler.
ENDIF.
Check InfoSource validity
CASE i_isource.
WHEN 'Z_BW_SDDATA_CREATEON'.
WHEN 'Y'.
WHEN 'Z'.
WHEN OTHERS.
IF 1 = 2. MESSAGE e009(r3). ENDIF.
log_write 'E' "message type
'R3' "message class
'009' "message number
i_isource "message variable 1
' '. "message variable 2
RAISE error_passed_to_mess_handler.
ENDCASE.
Check for supported update mode
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.
Check for obligatory selection criteria
READ TABLE i_t_select INTO l_s_select WITH KEY fieldnm = 'VBELN'.
IF sy-subrc <> 0.
IF 1 = 2. MESSAGE e010(r3). ENDIF.
log_write 'E' "message type
'R3' "message class
'010' "message number
'PGMID' "message variable 1
' '. "message variable 2
RAISE error_passed_to_mess_handler.
ENDIF.
APPEND LINES OF i_t_select TO g_t_select.
Fill parameter buffer for data extraction calls
g_s_interface-requnr = i_requnr.
g_s_interface-isource = i_isource.
g_s_interface-maxsize = i_maxsize.
g_s_interface-initflag = i_initflag.
g_s_interface-updmode = i_updmode.
g_s_interface-datapakid = i_datapakid.
g_flag_interface_initialized = sbiwa_c_flag_on.
Store Update mode in static variable...
X_UPDMODE = I_UPDMODE.
Select Single DELTAID
Into X_LastUpdate
From ROOSGENDLM
Where OLTPSOURCE = 'Z_BW_SDDATA_CREATEON'.
If X_LastUpdate Is Initial.
X_LastUpdate = '19800101'. " The oldest..., this should not happen
Endif.
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 g_t_segfields.
ELSE. "Initialization mode or data extraction ?
Data transfer: First Call OPEN CURSOR + FETCH
Following Calls FETCH only
X_UPDMODE = I_UPDMODE.
First data package -> OPEN CURSOR
IF g_counter_datapakid = 0.
Fill range tables for fixed InfoSources. In the case of generated
InfoSources, the usage of a dynamical SELECT statement might be
more reasonable. BIW will only pass down simple selection criteria
of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'VBELN'.
MOVE-CORRESPONDING l_s_select TO L_R_VBELN.
APPEND L_R_VBELN.
ENDLOOP.
LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'AUDAT'.
MOVE-CORRESPONDING l_s_select TO L_R_AUDAT.
APPEND L_R_AUDAT.
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 InfoSource table lines and database entries, this is trivial.
In other cases, it may be impossible and some estimated value has to
be determined.
*added by Yogesh
DELETE FROM ZBWSALEDATA.
*ended by Yogesh
l_maxsize = g_s_interface-maxsize.
Check for supported update mode
CASE X_UPDMODE.
WHEN 'F' Or 'I'. " Full or Init
**get sales orders
SELECT *
INTO CORRESPONDING FIELDS OF TABLE I_SALESDATA
FROM VBAK AS K
INNER JOIN VBAP AS P
ON PVBELN = KVBELN
WHERE K~VBELN IN L_R_VBELN
AND K~AUDAT IN L_R_AUDAT
AND K~VBTYP = 'C'.
IF I_SALESDATA[] IS NOT INITIAL.
PERFORM F_GET_DATA. "get data
PERFORM F_DEL_VATCOND. "delete vat conditions
PERFORM F_GET_TAR_COSTUNIT. "get tariff cost unit
PERFORM F_GET_NETVAL TABLES IT_VBDPA1. "get net val of the item
PERFORM F_GET_SALESDATA.
*write perform with name F_INSERT_DB_ZBWSALEDATA.
PERFORM F_INSERT_DB_ZBWSALEDATA. "insert into table ZBWSALESDATA
LOOP AT I_SALESDATA WHERE NETPR = 0.
MOVE-CORRESPONDING I_SALESDATA TO I_SALESDATA_FIN.
APPEND I_SALESDATA_FIN.
ENDLOOP.
SORT I_SALESDATA_FIN BY VBELN POSNR KSCHL.
DELETE ADJACENT DUPLICATES FROM I_SALESDATA_FIN
COMPARING VBELN POSNR
KSCHL.
INSERT ZBWSALEDATA FROM TABLE I_SALESDATA_FIN.
ENDIF.
WHEN 'D'. " Delta
SELECT *
INTO CORRESPONDING FIELDS OF TABLE I_SALESDATA
FROM VBAK AS K
INNER JOIN VBAP AS P
ON PVBELN = KVBELN
WHERE K~ERDAT >= X_LastUpdate
WHERE K~ERDAT >= X_LastUpdate+0(8) "TCS_KAP
AND K~VBTYP = 'C'.
IF I_SALESDATA[] IS NOT INITIAL.
PERFORM F_GET_DATA. "get data
PERFORM F_DEL_VATCOND. "delete vat conditions
PERFORM F_GET_TAR_COSTUNIT. "get tariff cost unit
PERFORM F_GET_NETVAL TABLES IT_VBDPA1. "get net val of the item
PERFORM F_GET_SALESDATA.
*write perform with name F_INSERT_DB_ZBWSALEDATA.
PERFORM F_INSERT_DB_ZBWSALEDATA. "insert into table ZBWSALESDATA
LOOP AT I_SALESDATA WHERE NETPR = 0.
MOVE-CORRESPONDING I_SALESDATA TO I_SALESDATA_FIN.
APPEND I_SALESDATA_FIN.
ENDLOOP.
SORT I_SALESDATA_FIN BY VBELN POSNR KSCHL.
DELETE ADJACENT DUPLICATES FROM I_SALESDATA_FIN
COMPARING VBELN POSNR
KSCHL.
INSERT ZBWSALEDATA FROM TABLE I_SALESDATA_FIN.
ENDIF.
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.
**end get sales orders
OPEN CURSOR WITH HOLD g_cursor FOR
SELECT (g_t_fields) FROM ZBWSALEDATA.
WHERE pgmid IN l_r_pgmid AND
object IN l_r_object.
ENDIF. "First data package ?
Fetch records into interface table. There are two different options:
- fixed interface table structure for fixed InfoSources have to be
named E_T_'Name of assigned source structure in table ROIS'.
- for generating applications like LIS and CO-PA, the generic table
E_T_DATA has to be used.
Only one of these interface types should be implemented in one API !
FETCH NEXT CURSOR g_cursor
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE l_maxsize.
IF sy-subrc <> 0.
CLOSE CURSOR g_cursor.
RAISE no_more_data.
ENDIF.
g_counter_datapakid = g_counter_datapakid + 1.
ENDIF. "Initialization mode or data extraction ?
Best regards,
YogeshDear Yogesh,
Try to debug the code by putting a break point at select statement...is the FM Syntactically correct ??
Check the Select statements..if all fields are not required avoid using Select * , and use always for all entries rather than JOINS..
Note : For Joins you have to specify the Fields in the Select...Dont use Select * ....
Hope it helps..
Thanks,
Krish -
Error while creating Generic Extractor via Function Module
Hello Guys
I have created a Generic Extractor through a Function Module. I took the Standard FM: RSAX_BIW_GET_DATA_SIMPLE, gave it a new name and activated it. I made a few changes in it, like giving my structure name for E_T_DATA and giving the list of tables, from where I need to get the data. Then I created the datasource in RSO2 by giving this function module and the extract structure.
The DS was created properly, but when I check in RSA3 for records, its giving me an error: ---> <b>The extraction program does not support object YCNA_INVY_TRNS</b>
What do i do now? Can someone please tell me, what changes I need to make in the standard FM to suit my requirements??
Thanks.Hi,
Just try to reactivate the structure once again. And when you open the function module, if the problem still persists just try to press Return key several times. The message you are getting is just a warning message.
PS: I am not sure whether this is the correct way, but i personally resolved this by pressing the ENTER key 4 or 5 times. So just give a try.
Regards
Sunil -
How to identify update mode in function module for generic extractor
Hi All,
I have created generic extractor using function module which supports delta load.
Delta logic is handeled in coding...by using ROOSGENDLM table.
Now problem is we need to identify the update mode, requested from infopackage in our function module in order to apply logic for Repair full.
I would like to know table or parameter in source system, which contain the update mode (Init , Delta , Full).
Thanks,
NirajHi Niraj
You can use the FM import parameter "i_updmode" (This is of type "SBIWA_S_INTERFACE-UPDMODE") to determine if infopackage triggerred in full or delta mode.
I_REQUNR TYPE SBIWA_S_INTERFACE-REQUNR
I_ISOURCE TYPE SBIWA_S_INTERFACE-ISOURCE InfoSource Name
I_MAXSIZE TYPE SBIWA_S_INTERFACE-MAXSIZE Data Packet size
I_INITFLAG TYPE SBIWA_S_INTERFACE-INITFLAG Initial Flag
I_UPDMODE TYPE SBIWA_S_INTERFACE-UPDMODE Update Mode
I_DATAPAKID TYPE SBIWA_S_INTERFACE-DATAPAKID Datapacket Id
I_PRIVATE_MODE
I_CALLMODE TYPE ROARCHD200-CALLMODE Single-Character Flag
I_REMOTE_CALL TYPE SBIWA_FLAG
Cheers
Vasu Sattenapalli
Maybe you are looking for
-
Insert or Update method - removed from Web Services v2.0?
Was the "insert or update" method on standard objects taken out of Web Services v2.0 for a reason? Is there an equivalent of this functionality in Web Services v2.0? Thanks, -Kevin
-
Hi members: I have a BPM scenario - IDOC-to-JDBC I have to delete a record in the db after checking certain conditions. Lets say my IDOC has Field A etc..My db has Row 1 : field B, Field C, Field D Row 2 : field B, Field C, Field D etc.. after i rece
-
¿Should I go for less desviation media absolute or for less total error in forecast?
Hello, I have started using forecast process for automatic reorder level, I have set the system to use automatic mode and I used also "parameter optimization" in order to get the less DMA because it is an indicator for an accurate forecast, but since
-
I have downloaded a tv series to watch while travelling without wifi. It keeps freezing on me, how do I stop this?
-
How to verify existence/absence of debug information in a jar file
Given a jar, how can I tell if it contains debug information or not? Is there a tool for this? (e.g, like the 'file' utility on linux, which outputs whether an ELF executable is stripped or not) Amit