Generic DataSource by View on EKBE table.
Hi All
I am also trying to create View based on EKBE table . I am getting some errors even through I have included at reference table ( EKBE,EKKO and T001) with respective fields.
View is Ok, only when I try to activate DataSource in RSO2 , I am getting error like this
Invalid extract structure template ZEKBE of DataSource ZPU_EKBE_FLEX1
Message no. R8359
Diagnosis
You tried to generate an extract structure with the template structure ZEKBE. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table.
Anybody had same issue ?
Regards.
E
Hi Ram,
Again Thanks for your reply.
Like you said I have created everything from RSO2, except View .
I am not lucky yet. getting same error.
Invalid extract structure template ZEKBE of DataSource ZEKBE
Message no. R8359
Diagnosis
You tried to generate an extract structure with the template structure ZEKBE. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table.
Kind regards.
E
Similar Messages
-
Generic datasource based on custom table and hierarchy table
Hi Gurus,
I have a doubt regarding generic datasource.
my requirement: to create a datasource with 10 fields. (7 fields from custom table and 3 fields whose values can be derived from a hierarchy table).
I have a custom table. In this table one field refers to a hierarchy table. Using this hierarchy table, we can derive values to 3 new fields.
My question is, If i create a generic datasource based on the custom table, how can i include the extra 3 fields which gets values from the hierarchy table.
Where can i write the logic to extract the values for those 3 fields from the hierarchy table.
Thanks
Regards,
Aarthi
[email protected]Hi Aarthi,
Sample code in the user exit woul be like this:
DATA: i_biw_tab LIKE BIW_MARA_S.
WHEN '<data source>'.
LOOP AT i_t_data INTO i_biw_tab.
SELECT fields
INTO <table from which you want the value
FROM <table>
WHERE <your condition>.
IF sy-subrc = 0.
MODIFY i_t_data FROM i_biw_tab.
ENDIF.
ENDLOOP.
Bye
Dinesh -
Issue iwth generic Datasource -Urgent Help
HI All,
I needed to create a generic DataSource through view . The view is created successfully however I have some dependant key figure in view such as Tips amount referring to MSEG(Referring Table ) _WAERS (Referred field name.) because of which I am facing issues with Generic DataSource.
In the view I cannot include referred table field name as MSEG WAERS because there is no joining condition available between MSEG and the custom define table Ztips ?
When I create the data source I get the same error as Invalid extract structure as Tips_Amt referring to a different table MSEG and waers.
How to handle this situation ?
Will assign points and much appreciateHi,
If you want to include field of a table which is referencing another table in the generic data source.....you will have to include the another table also then only you can include it.
Also if a table field is referencing another tables field then there would be certainly a relation between those two tables that is those two tables will defenately have any key common if notn then that field i\will not be getting populated since there is no relation between these tables.
So in your case since it is a custome defined table you can go for the enchancemencts of this table and include the keys of the MSEG table in this Z table and then make a view on this .
Just check whether thic currency is getting populated or not in the Z table.
Also go to the z- table-> Entry help Check and you will find which field is refencing which table field and you will know that all the filed referenced are in the form of the foreign key relation.
So I think referencing the MSEG_WAERS field is not possible from the Z table.Refer directly the tbale TCURC table directly.
Hope it helps
Thanks -
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 -
How do i assign master datasource to my generica datasource
Hi All,
I got confused when linking master datasource to Generic datasources.
I have created a generic datasource using View in CRM system (tables - CMSD_CB,CMSD_LO_QUANT AND CMSD_LO_PRICE) and replicated in bw.
all records are coming to BW system and it is working fine.
We want to link master datasources- 0ORGUNIT and 0BPARTNER because commission analyse is done based on Sales Representative(business partner number) wise quantity and price.
- 0ORGUNIT will give all CRM and R/3 sales offices, sales group...etc
- 0BPARTNER will give all business partner ..etc
Could some one help me how to proceed/.
Thanks in advance...
MahanteshHi Mahantesh,
Since SAP is already giving you the datasources, why don't you join the data togther into a ODS table or create a InfoSet that shows the join for you. Cheers! Bill -
Hi Gurus,
Good Day to all. I just like to inquire some details for creating generic datasource with delta enabled. I have created a view table with fields from EKBE table, and created generic datasource that reads the view table I have created from EKBE, now it needs delta process with CPUDT as delta specific field name, seeing the data type of CPUDT, it is DATS with 8 length.
I would like to assure if what will be use as marker of delta, timestamp utc, timestamp local, calendar day and numeric pointer?
And if I use one of the above, what settings that needs to be use for the safety interval upper and lower limit?
Thank you for your inputs and really appreciate it.Hi,
use the CALDAY as a generic delta pointer.
i would like to recommend as: Safety Interval for Upper Limit as 1 and Safety Interval for lower Limit as ZERO
i think your are using the DSO as a staging layer no worry about duplicates.
Thanks,
Phani. -
Problem while creating generic DataSource using table
Hello all,
I am creating a generic DataSource using table EKBE. It is giving error " invalid extract structure template EKBE ". The reason is " The system tried to generate an extract structure with the template structure EKBE. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table (EKPO)".
Could you suggest how to approach?
Thanks,
Zak.hi zahir,
In your case the reference table used for quantity is ekko and the field is meins.
and the reference table used for currency is ekpo and the field is waers.
So you are not taking data from a single table. so you better create a view give the table name ekbe and select the corresponding fields you want.
Add MEINS and WAERS and as well your required field in the view for example Zview and for Quantity field mention Zview as reference table and reference field as MEINS same for WAERS.
try this if it doent work, tell me what error you are facing.
with regards!
ramesh -
Dear All,
I have created a view on following tables MARA, AFKO and MSEG. The Table/Join condition is as follow:
AFKO--AUFNR = MSEG--AUFNR
AFKO--PLNBEZ = MARA--MATNR
I have included all the fields from MSEG and other all fields from MARA and AFKO. The view is created successfully and contents/records are also being fetched/displayed from this view.
See screen shot as well:
But when I go to RSO2 to create a "Generic DataSource" on this view. I get a series of warning messages and then error message "Invalid Extract Structure" and therefore I'm unable to create my DataSource on this view. See below screen shots of warning and error messages.
Other warning messages are as follow:
Field GAMNG with reference field MEINS: Reference table MARA is replaced by ZOXPRD0150
Field PLSVB with reference field PLNME: Reference table PLKO is replaced by ZOXPRD0150
Field PLSVN with reference field PLNME: Reference table PLKO is replaced by ZOXPRD0150
Field LODIV with reference field MEINS: Reference table MARA is replaced by ZOXPRD0150
Following is the screen shot of error message:
1. How can I get rid of this error message and be able to create my "Generic DataSource" on top of this "View"?
2. What should I do to resolve the above warning and error messages?
I will appreciate your reply.
Many thanks!
Tariq AshrafHi Vipul,
as you can find in CKIS table, the reference feild for value feild "WERTN" is missing.
As per the table the reference feild is HWAER. This should have been used in place of FWAER.
Try mentioning this in your view and this should work.
Also I am a little enthusiastic to know, what are you trying to get from the datasource.
If you are trying to get the cost estimate of multi level BOM, not (just one child level), then this approach may not work.
There is a BAPI that gives such itemization split. Just FYI, in case you are looking for multi level explosion.
"BAPI_COSTESTIMATE_ITEMIZATION".
Hope this helps.
Naveen.A -
Generic Extraction (or) How to use table in R/3 system as datasource in BW?
Hi all,
Hope all are having a great day
Can any1 tell me the steps, for Generic Extraction.
It will be very helpful, if the steps are as much as simpler as posible.
I know to create a simple cube in BW.
I have this much knowledge, depending on this can any1 tell me the steps for Generic Extraction from R/3.
examples wud be vry useful
Regards,
Souravhi,
Maintaining Generic DataSources
Use
Independently of application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any kinds of transparent tables, database views, InfoSets of the SAP query or using a function module. As a result, you can make use of the generic extraction of data.
Procedure
Creating a Generic DataSource(RSO2)
1. Select the DataSource type and give it a technical name.
2. Choose Create.
The creating a generic DataSource screen appears.
3. Choose an application component to which the DataSource is to be assigned.
4. Enter the descriptive texts. You can choose any text.
5. Choose from which datasets the generic DataSource is to be filled.
a. Choose Extraction from View, if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
After generation, you get a DataSource whose extract structure is congruent with the database view or the transparent table view.
For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
b. Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
Notes on Extraction Using SAP Query
After generation, you now have a DataSource whose extract structure matches the InfoSet.
For more information about maintaining the InfoSet, see the System Administration documentation.
c. Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
The data must be transferred by the function module in an interface table E_T_DATA.
Interface Description and Extraction Process Flow
For information about the function library, see the ABAP Workbench: Tools documentation.
d. With texts, you also have the option of extraction from domain fixed values.
6. Maintain the settings for delta transfer where appropriate.
7. Choose Save.
When extracting, look at SAP Query: Assigning to a User Group.
Note when extracting from a transparent table or view:
If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
A screen appears in which you can edit the fields of the extract structure.
8. Editing the DataSource:
 Selection
When scheduling a data request in the BW Scheduler, you can enter the selection criteria for the data transfer. For example, you may want to determine that data requests are only to apply to data from the previous month.
If you set the Selection indicator for a field within the extract structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
 Hide field
You should set this indicator to exclude an extract structure field from the data transfer. As a result of your action, the field is no longer made available in BW when setting the transfer rules and generating the transfer structure.
 Inversion
Reverse postings are possible for customer-defined key figures. For this reason, inversion is only possible for certain transaction data DataSources. These include DataSources that have a field that is indicated as an inversion field, for example, the field update mode in the DataSource 0FI_AP_3. If this field has a value, then the data records are interpreted as reverse records in BW.
Set the Inversion indicator if you want to carry out a reverse posting for a customer-defined field (key figure). The value of the key figure is then transferred in inverted form (multiplied by 1) into BW.
 Field only known in exit
You can enhance data by extending the extract structure for a DataSource using fields in append structures.
The indicator Field only known in Exit is set for fields of an append structure. In other words, by default these fields are not passed onto the extractor from the field list and selection table.
Deselect the indicator Field Only Known in Exit to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list as well as in the selection table.
9. Choose DataSource ® Generate.
The DataSource is now saved in the source system.
Maintaining Generic DataSources
Change the DataSource
To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
You can change the assignment of a DataSource to an application component as well as the texts of a DataSource. Double-clicking on the name of the table, view, InfoSet or extract structure takes you to the appropriate maintenance screen. Here you can make changes required to add new fields. You can fully swap transparent tables and database views, but not InfoSets. If you return to the DataSource maintenance and choose Create, the screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource ® Generate.
If you want to test extraction in the source system independently of a BW system, choose DataSource ® Test Extraction.
Delta DataSource
In the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the associated query. If you want to delete a DataSource, this must not be connected to a BW system.
For more information about extracting using SAP Query, see Extraction using the SAP Query.
hope this helps.
assign point if so
partha -
Implementing Outer join Views in creating Generic datasource
Guys,
Iam bringing the Purchase document level data from R/3 into BW.I have couple
of other Ztables also from which i need to collect the information.So iam going to create a generic datasource based on the view.
In case of Database view it is taking inner join, which is undesirable since the
final data coming out of view will be reduced as we join the main base tables with ztables..Since Ztables may have very less data.And inner join gives complete information only if all tables contain the information given out in the view output.
One option is to use maintainance view which uses outer join. Is it recommendable
to use maintainance view in case of basing the Generic datasources on the view.
Please inform me if any of you have done generic datasources using database view.Any idea in this regard is welcome.Hi,
I think you may have to develop your Generic Datasorce with "Function Module" since there is no common field.
Regards,
Suman -
'table does not exist' when creating generic datasource
I went to SBIW->Business Content DataSources->Transfer Business Content DataSources-chose "content delta". it said 'comparison bct <-> cust version ' then it counted thru several objects for a few minutes and finished with no warnings.
then I selected each datasource under co-om-cca and activated those with no problems.
problem: now when i try to create came generic datasource using co-om-cca application component i get mssg when saving 'the specified table does not exist'...so now it isn't even letting me create a datasource at all using a standard application component either.
I have been having many problems with creating datasources and using application components and this is why I did the first paragraph because I don't know what else to try.
Please help, thanks.I have answered my own question. I wasn't entering the view/table and it was my own complete oversight.
-
Create generic datasource by using view
Iu2019ve to create generic datasource by using view.
View has to be build on top of two tables which have key relationship. While creating it asking type of view, I mean database view, projection view, maintenance view like that.
Which type of view is best one?
Advance thank you very muchHi,
for understanding all view type just refer this link
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ec5d446011d189700000e8322d00/content.htm.
and for our purpose as already said use database view.
Regards, -
Faglflexa table :Generic datasource
Hi
I have to pull the data from the FAGLFLEXA table.
im plaaning to create a generic datasource because here we do not have 0fi_gl_14 datasource.
so how can handle delta from faglflexa table.
even can i use old standard datasoucre like 0fi_gl_4
i need to take cost from faglflexa and doctype from bkpf.
the data to be accumaled at region and profit centre hierarcy.
ThanksHi you can can create generic extractor based on faglflexa table and use the TIMESTAMP filed from it. Just create view of FM based on your FAGLFLEXA and BKPF of BSIK/BSID table and use TIMESTAMP field.
-
Generic datasource by function module to fetch data from multiple tables?
I'm writing a function module to fetch price, for generic datasource.
At first, extract test is OK. But InfoPackage never stop when loading data to PSA in BW.
And I find the example codes:
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT (S_S_IF-T_FIELDS) FROM SFLIGHT
WHERE CARRID IN L_R_CARRID AND
CONNID IN L_R_CONNID.
ENDIF. "First data package ?
* Fetch records into interface table.
* named E_T_'Name of extract structure'.
FETCH NEXT CURSOR S_CURSOR
APPENDING CORRESPONDING FIELDS
OF TABLE E_T_DATA
PACKAGE SIZE S_S_IF-MAXSIZE.
IF SY-SUBRC <> 0.
CLOSE CURSOR S_CURSOR.
RAISE NO_MORE_DATA.
ENDIF.
S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
ENDIF.
There using Cursor to fetch data package by package, and raise exception NO_MORE_DATA to stop the loading process.
Now I fetch data from multiple tables, I don't think I can use Cursor.
Then How can I handle this?
Thanks a lot.Thanks
IF IT_999[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A999 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_999
WHERE
* A~KNUMH = IT_999-KNUMH AND
( ( A~KSCHL = 'ZPRC' AND VKORG = 'Z000' AND VTWEG = 'Z1' ) OR
( A~KSCHL = 'ZPRD' AND VKORG = 'A000' AND VTWEG = 'Y3' ) ) AND
* A~DATBI >= SY-DATUM AND
LOEVM_KO = ''.
SELECT A~KNUMH A~MATNR A~KSCHL VKORG VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A999 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_999
WHERE
* A~KNUMH = IT_999-KNUMH AND
A~KSCHL = 'ZPR3' AND A~VKORG = 'I000' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
IF IT_997[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL VTWEG A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A997 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_997
WHERE
* A~KNUMH = IT_997-KNUMH AND
A~KSCHL = 'ZPRA' AND VTWEG = 'Y1' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
IF IT_996[] IS INITIAL.
SELECT A~KNUMH A~MATNR A~KSCHL A~DATBI A~DATAB KBETR AS KHETR KMEIN KPEIN C~MTART APPENDING CORRESPONDING FIELDS OF
TABLE TP_DATA
FROM A996 AS A
INNER JOIN KONP AS B
ON A~KNUMH = B~KNUMH
INNER JOIN MARA AS C
ON A~MATNR = C~MATNR
* FOR ALL ENTRIES IN IT_996
WHERE
* A~KNUMH = IT_996-KNUMH AND
A~KSCHL = 'ZPRB' AND
* DATBI >= SY-DATUM AND
LOEVM_KO = ''.
ENDIF.
SELECT MATNR "u7269u6599u53F7u7801
MEINH "u4ED3u50A8u5355u4F4Du7684u5907u7528u8BA1u91CFu5355u4F4D
UMREZ "u57FAu672Cu8BA1u91CFu5355u4F4Du8F6Cu6362u5206u5B50
UMREN "u8F6Cu6362u4E3Au57FAu672Cu8BA1u91CFu5355u4F4Du7684u5206u6BCD
FROM MARM
INTO CORRESPONDING FIELDS OF TABLE IT_MARM
FOR ALL ENTRIES IN TP_DATA
WHERE MATNR = TP_DATA-MATNR AND MEINH = TP_DATA-KMEIN.
LOOP AT TP_DATA.
IF TP_DATA-KPEIN NE 0.
TP_DATA-KBETR = TP_DATA-KBETR / TP_DATA-KPEIN.
TP_DATA-KHETR = TP_DATA-KHETR / TP_DATA-KPEIN.
ENDIF.
IF TP_DATA-KSCHL = 'ZPRA'.
* TP_DATA-MEINH = 'ZI'.
* TP_DATA-KSCHL = 'B4'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'CT'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPRB'.
* TP_DATA-KSCHL = 'L0'.
* TP_DATA-MEINH = 'ZI'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPRC' OR TP_DATA-KSCHL = 'ZPRD'.
* TP_DATA-MEINH = 'ZI'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'WZI'.
TP_DATA-KBETR = TP_DATA-KBETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KHETR = TP_DATA-KBETR * '1.17'.
ENDIF.
ELSEIF TP_DATA-KSCHL = 'ZPR3'.
* TP_DATA-KSCHL = 'B2'.
IF TP_DATA-KMEIN = 'ZI'.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ELSE.
READ TABLE IT_MARM INTO WA_MARM1 WITH KEY MATNR = TP_DATA-MATNR MEINH = TP_DATA-KMEIN.
* READ TABLE IT_MARM INTO WA_MARM2 WITH KEY MATNR = TP_DATA-MATNR MEINH = 'BAG'.
TP_DATA-KHETR = TP_DATA-KHETR * WA_MARM1-UMREN / WA_MARM1-UMREZ.
* * WA_MARM2-UMREZ / WA_MARM2-UMREN.
TP_DATA-KBETR = TP_DATA-KHETR / '1.17'.
ENDIF.
ENDIF.
TP_DATA-MEINH = '01'.
MODIFY TP_DATA.
E_T_DATA-MATNR = TP_DATA-MATNR.
E_T_DATA-KSCHL = TP_DATA-KSCHL.
E_T_DATA-KHETR = TP_DATA-KHETR.
E_T_DATA-KBETR = TP_DATA-KBETR.
E_T_DATA-KMEIN = TP_DATA-KMEIN.
E_T_DATA-DATAB = TP_DATA-DATAB.
E_T_DATA-DATBI = TP_DATA-DATBI.
APPEND E_T_DATA.
CLEAR WA_MARM1.
CLEAR WA_MARM2.
ENDLOOP.
Edited by: Shen Peng on Oct 20, 2010 10:09 AM -
Generic Datasource on table IMRG in R/3- delta on timestamp is it ok ?
Hi
I am creating Generic datasource based on table IMRG in R/3, This has stoppages related data. which we need in BI report. There is a field for Time-stamp in the table, i have checked values in table IMRG, but in R/3 it shows no data for the time-stamp.
Now i want to create delta basis for this generic datasource based on table, so shall i create delta based on time-stamp or date field.
If I create delta based on time-stamp will it create problem in delta extraction subsequently? Please share your experience in such a cases.There is a field for Time-stamp in the table, i have checked values in table IMRG, but in R/3 it shows no data for the time-stamp.
Delta specific field should be something which defines changes in your table, not something which is blank always.Based on the change in this delta specific field only delta will be pulled.Having it blank will never pull you delta.
Hope this helps.
Maybe you are looking for
-
Partner Application Registration
When using the Administer Partner Applications page, it appears the application is not being registered completely. The information does not appear in the WWSEC_ENABLER_CONFIG_INFO$ table, as has been suggested in prior posts (everything is fine in W
-
FileUpload problem: InputStream does not contain a serialized object
Hi All, I'm using the FileUpload component in a JSPDynPage and the htmlb component seems to work fine but I cannot read the file (InputStream). I get the following error(IOException): "InputStream does not contain a serialized object". Please let me
-
I can't update the iTunes and my phone isn't working properly because of it
-
Devsuit upgrade error from 10.1.2.0 to 10.1.2.3
hi all, as i upgrade the devsuit from 10.1.2.0 to 10.1.2.3 by universal installer, but the following error is thrown, Please help, many thanks. java.io.IOException: The system cannot find the file specified at oracle.sysman.oii.oiix.OiixJarClass
-
Create directory (using RMI)
Hi all, I would like to create a directory in the server part of a RMI application. It appears that I don't have permission to do that... Can anyone tell me which permissions do I need to be able to create a directory ?? My policy file is: grant code