Function Module in Generic DataSources in BI
Hi,
I appreciate your answer about the Function Module in Generic DataSources in BI.
These are the steps I followd on R/3 side.
1) Create a structure with the R/3 table fileds based on the requirement.
2) Create a function module by copying RSAX (Function Group) and RSAX_BIW_GET_DATA_SIMPLE (Functin Module) into our own function group & Function Module (name starting with Y /Z). And use the structure(ex: ZSPMT) created in the reference data of 'Tables' tab (ex: E_T_DATA LIKE ZSPMT).
3) Use the structure name & function module name in the Generic DataSource
Finally when I want to use the Generic DataSource, do i need to insert the records myself in the table (or structre) I created ZSPMT? (which is used in Function Module)
If I need to insert the data into table ZSPMT myself, what is use of function module?
Can't I use the view of this table (ZSPMT) directly in Generic DataSource?
Is the function module used to filter/restrict the data based on client need?
Thank you in advance for you answers
It will help undderstand the difference among View, InfoSet Query & Function Module
used in creating Generic DataSource.
Regards,
Lakshmi
hi,
why did you prefered function module?
if the table ZSPMT egts the data that you enter automatically then no need to use FM.
directly extract with tables/if more than one table then use views.
if you need especially the FM that could solve ur complex requirmnet.
http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/content.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/84bf4d68-0601-0010-13b5-b062adbb3e33
Ramesh
Similar Messages
-
Creating Function Module in Generic Extractor?
Hello All
DO anyone has steps how to create a Functional Module in Generic Extraction?
Pl let me know
Many Thanks
balajihi Balaji,
first create your function module (se37),
sample code see function module
RSAX_BIW_GET_DATA_SIMPLE.
then follow steps in create generic datasource
http://help.sap.com/saphelp_nw04/helpdata/en/3f/548c9ec754ee4d90188a4f108e0121/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/86/1c8c3e94243446e10000000a114084/frameset.htm
hope this helps. -
When we go for Views and Function Modules for Generic Extraction
Hi Experts,
Can you please explain when we go for extracting the data using Views and when we got using Function Modules using Generic Extraction from R/3 system to BW with examples. And also can you explain when we go for delta for the above both scenarios.
Thanks for you help in advance
RohithHi,
Scenario for Extarction using FM
Imagine the scenario where you need to extract data from
tables having no common field between them and thereby preventing you from creating a view on top of those tables..
Or simply consider tables that are highly unrelatd in terms of fields, but you have a requiremnt to extract data from them.
Also Refer.
create generic extractor based on 2 tables
Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
Steps.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
http://help.sap.com/saphelp_nw04/helpdata/en/86/1c8c3e94243446e10000000a114084/frameset.htm
Scenario for Extraction using View
If there are more number of tables and data in those tables can be represented using joins then we can use this type of extraction
For more info Refer these links
http://help.sap.com/saphelp_nw2004s/helpdata/en/cf/21ecf9446011d189700000e8322d00/frameset.htm
Difference between "Help View" and "Search Help"
http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ed06446011d189700000e8322d00/frameset.htm
for more detailed info look on:
http://www.sap-img.com/abap/what-is-the-different-types-and-usage-of-views.htm
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/abap+dictionary&
For GEneric Delta refer these links
[generic with delta;
[https://forums.sdn.sap.com/click.jspa?searchID=11388803&messageID=5164737] -
How to extract data by using function module in generic extraction please
how to extract data by using function module in generic extraction please give me steps required
Dear Deba,
Generic Extraction via Function Module
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
If the requirement is like extracting data from multiple tables with some complex logic then views cannot be used..so u cna go for FM is used where it can be achieved.
Chk these
/people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
check the following thread
generic extraction with function module
Generic Extraction with function module
Regards,
Ram. -
Business scenarios on SD and MM modules for generic datasources and enhance
Hi,
Can anybody send some documents on SD and MM module on generic datasource and on enhancements.Pl send it to my MailID:[email protected]
Thanks,
ChinnaHi,
MM Process flow:
The typical procurement cycle for a service or material consists of the following phases:
1. Determination of Requirements
Materials requirements are identified either in the user departments or via materials planning and control. (This can cover both MRP proper and the demand-based approach to inventory control. The regular checking of stock levels of materials defined by master records, use of the order-point method, and forecasting on the basis of past usage are important aspects of the latter.) You can enter purchase requisitions yourself, or they can be generated automatically by the materials planning and control system.
2. Source Determination
The Purchasing component helps you identify potential sources of supply based on past orders and existing longer-term purchase agreements. This speeds the process of creating requests for quotation (RFQs), which can be sent to vendors electronically via SAP EDI, if desired.
3. Vendor Selection and Comparison of Quotations
The system is capable of simulating pricing scenarios, allowing you to compare a number of different quotations. Rejection letters can be sent automatically.
4. Purchase Order Processing
The Purchasing system adopts information from the requisition and the quotation to help you create a purchase order. As with purchase requisitions, you can generate Pos yourself or have the system generate them automatically. Vendor scheduling agreements and contracts (in the SAP System, types of longer-term purchase agreement) are also supported.
5. Purchase Order Follow-Up
The system checks the reminder periods you have specified and - if necessary - automatically prints reminders or expediters at the predefined intervals. It also provides you with an up-to-date status of all purchase requisitions, quotations, and purchase orders.
6. Goods Receiving and Inventory Management
Goods Receiving personnel can confirm the receipt of goods simply by entering the Po number. By specifying permissible tolerances, buyers can limit over- and underdeliveries of ordered goods.
7. Invoice Verification
The system supports the checking and matching of invoices. The accounts payable clerk is notified of quantity and price variances because the system has access to PO and goods receipt data. This speeds the process of auditing and clearing invoices for payment.
Common Tables used by SAP MM:
Below are few important Common Tables used in Materials Management Modules:
EINA Purchasing Info Record- General Data
EINE Purchasing Info Record- Purchasing Organization Data
MAKT Material Descriptions
MARA General Material Data
MARC Plant Data for Material
MARD Storage Location Data for Material
MAST Material to BOM Link
MBEW Material Valuation
MKPF Header- Material Document
MSEG Document Segment- Material
MVER Material Consumption
MVKE Sales Data for materials
RKPF Document Header- Reservation
T023 Mat. groups
T024 Purchasing Groups
T156 Movement Type
T157H Help Texts for Movement Types
MOFF Lists what views have not been created
A501 Plant/Material
EBAN Purchase Requisition
EBKN Purchase Requisition Account Assignment
EKAB Release Documentation
EKBE History per Purchasing Document
EKET Scheduling Agreement Schedule Lines
EKKN Account Assignment in Purchasing Document
EKKO Purchasing Document Header
EKPO Purchasing Document Item
IKPF Header- Physical Inventory Document
ISEG Physical Inventory Document Items
LFA1 Vendor Master (General section)
LFB1 Vendor Master (Company Code)
NRIV Number range intervals
RESB Reservation/dependent requirements
T161T Texts for Purchasing Document Types
Transaction Codes:
RFQ to Vendor - ME41
Raising Quotation - ME47
Comparison of Price - ME49
Creation of PO - ME21N
Goods Receipt - MIGO
Invoice (Bill PAssing) - MIRO
Goods Issue - MB1A
Physical Inventory - MI01( Create doc)
MI04 (Enter Count)
MI07 (Post)
Also please check this links.
http://www.sapgenie.com/sapfunc/mm.htm
http://www.sap-basis-abap.com/sapmm.htm
SD Process Flow:
The sales documents you create are individual documents but they can also form part of a chain of inter-related documents. For example, you may record a customers telephone inquiry in the system. The customer next requests a quotation, which you then create by referring to the inquiry. The customer later places an order on the basis of the quotation and you create a sales order with reference to the quotation. You ship the goods and bill the customer. After delivery of the goods, the customer claims credit for some damaged goods and you create a free-of-charge delivery with reference to the sales order. The entire chain of documents the inquiry, the quotation, the sales order, the delivery, the invoice, and the subsequent delivery free of charge creates a document flow or history. The flow of data from one document into another reduces manual activity and makes problem resolution easier. Inquiry and quotation management in the Sales Information System help you to plan and control your sales.
Transaction Codes:
Inquiry - VA11/VA12/VA13
Quotation - VA21/VA22/VA23
Sales Order - VA01/VA02/VA03
Delivery - VL01N/VL02N/VL03N
Billing/Invoicing - VF01/VF02/VF03
Also please check this links.
http://www.sapgenie.com/sapfunc/sd.htm
http://www.sap-basis-abap.com/sapsd.htm
http://www.sapgenie.com/abap/tables_sd.htm
Production Planning:
For example, consider a pump manufacturing plant, based on the customer requirement, planning is done for future months ( we plan for a qty on particular
date). Pump is an assembly - were main component would be manufactured in the plant and others would be procured. As PP, we are concerned only in the inhouse
manufacturing but the final assembly (considering BOM) can be done only if the procured components are available. MRP helps in planning the shortage, on
particular date based on the planned date. Work center (ex. lathe) place the components are machined/assembled (were the operation is done). Sequence of
operation is routing (lead time scheduling data is got from routing). In the MRP Run,basic or lead time scheduling (need to know when to start/finish date)
is done. On creation of the production order, system checks for which BOM and routing to be picked up (if there are many routings or BOM for that particular
finished product). Availabilty checks for material,PRT and capacity needs to be done. on release of the order, confirmation of the order can be done (on
completion of the order or after manufacturing the quantities). GI and GR have to be done.PP flow ends here
step 1: creation of master data (Material master,BOM,Work center,Routing)
step 2: Planning - can be done by Planned independent requirement (MD61), Independent requirement (MD81).
we plan for a quantity, on which date (it would be finish date).
step 3: MD04 -stock/requirement lsit (plan made can be viewed in MD04)
step 4: MRP run - MD02, PIR is converted into Planned order
step 5:Planned order to be converted production order - CO40, CO41
step 6: production order to be released - CA02
step 7: confirm the production order (order confirmation-CO15 (after which GI and GR is done)
assign pts if helpful... -
Function Module for Generic Extractor
Hi, I have a generic extractor that uses a Function Module to extract the data. I have a change I need to make that only affects the code in the Function Module. Do I need to regenerate the DataSource or can I just change the function Module and transport the change to the function module?
Thanks for any details...As long as you are not changing the extract structure, you do not need to regenerate the datasource or replicate. Send FM only.
Regards,
Chad -
How to control iteration of function module in generic extraction to BW
Hi Experts,
I am customizing standard Function module RSAX_BIW_GET_DATA_SIMPLE. My problem is, while excecuting datasource in RSA3, my function module is repeating many times.....example if my FM fetches data of 70 records.......FM is repeating 70* n times while executing it in a data source.
How to contol this loop?
Can anyone please help me.Hi,
This FM is used to get list of files from Application server (will work in Background). This cannot be used to list files from presentation server. There is no way , by which you can process presentation server files in background mode.
Regards
Vinod -
Error while activation Function module for generic data extraction
Hi,
I have created a generic data source ZMATERIAL in which i have selected the Extraction by Function module. I copied the function module RSAX_BIW_GET_DATA_SIMPL to ZMATERIAL_FM, but when i activate this module it gives me error
REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
The main program of the function "Z_BWGENDATAMATERIAL" does not begin with "FUNCTION-POOL".
Please help me in this.Hi Dipika,
I think a similar issue is discussed
Refer this thread
REPORT/PROGRAM statement missing, or program type is I (INCLUDE).
Compiling INCLUDE progam
question related to includes
question related to includes
Hope these helps
Regards
Karthik -
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 -
Any docs regarding Table/View,Function Module for Generic Extraction
Hello All
I need to do Generic Extraction,for that if anyone has docs., I need docs on how to create table,view,Function module and infoset query ,on that pl forward to my id
[email protected]
Many Thanks
balajihi Amit
Thanks for your docs,but this docs i have already,do u have any thing different one,if so please forward?
Facing a Problem
Iam trying to create view(database view)for <b>vbak</b> and <b>vbap</b> and given in Tables in <b>Table/Join Conditions</b> tab and clicked in <b>Relationship</b> and the relantionship has been generated automatically,now when i tried to activate this view its saying like "<b>No tables and/or fields are defined for view xxxxx</b>(xxxx-> name of a view)
what will be the problem?pl let me know how to create a view?
And also I need to know the diffference between database view,Manintenance view,Projection view and help view?
Pl let me know on this?
Many Thanks
balaji -
Function module based generic extractor - Problem with the selection
Hi all
The following is my code in the function module. I am able to get the entire data if i dont give any selections and the number of records is also correct. But when i select a MATNR value, it returns 0 records where as it needs to return 3 records. If i give selection based on bukrs, werks, lgort its working fine. But if i give selection based on MATNR, then it is not working.... I think there is a problem in the bold part of my code. If i debug, LS_MATNR is having the correct value which indicates that there is no problem with the value being passed to LS_MATNR from my selection screen of my datasource in RSA3. Even GT_WERKS is also having data. Please help.
OPEN CURSOR WITH HOLD S_CURSOR FOR
SELECT MARA~MANDT
MARA~MATNR
MARC~WERKS
MARD~LGORT
MARA~MEINS
MARD~LABST
MARD~EINME
MARD~SPEME
MARD~RETME
MARD~INSME
MARD~UMLME
MARD~VMLAB
MARD~VMEIN
MARD~VMSPE
MARD~VMRET
MARD~VMINS
MARD~VMUML
MARC~XCHPF
MARD~KLABS
MARD~KEINM
MARD~KSPEM
MARD~KINSM
from MARA inner join MARC on
MARAMANDT = MARCMANDT AND
MARAMATNR = MARCMATNR
inner join MARD on
MARAMANDT = MARDMANDT AND
MARAMATNR = MARDMATNR
AND MARCWERKS = MARDWERKS
for all entries in gt_werks
where MARC~werks EQ gt_werks-werks
AND MARA~MATNR in LS_MATNR.
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.try this
select marc~matnr MARC~WERKS into t_marc for all entries in gt_werks
where werks EQ gt_werks-werks and lvorm = space.
if t_marc is not initial.
select MARD~LGORT MARD~WERKS MARA~MEINS MARD~LABST MARD~EINME
MARD~SPEME MARD~RETME MARD~INSME MARD~UMLME
MARD~VMLAB MARD~VMEIN MARD~VMSPE MARD~VMRET
MARD~VMINS MARD~VMUML MARC~XCHPF MARD~KLABS
MARD~KEINM MARD~KSPEM MARD~KINSM MARA~MEINS from
mard inner join MARA on mard~matnr = mara~matnr
for all entries in t_marc where mard~matnr = t_marc-matnr and mard-werks = t_marc-matnr
and mard~lvorm = space. -
Help on Function module in Generic Extraction
Hi ,
i am writing FM in for Generic Extraction.
i am dont know ABAP.
i am using RSAX_BW_GET_DATA_SIMPLE..
i created Strcture from the MVER table ..
Strcture fileds : MATNR
GJAHR
GSV01,
GSV02,
SUM.
SUM is not in the MVER table .
Pl . give me code for this logic ..
Logic :
Take sum of GSV01 , GSV02 from table MVER with the key
MVER-MATNR = MARA- MATNR and
MVER-GJAHR = Year from SY-DATUM.
Pl . give me code for this logic..
i assign points ..
Regards,
PSR
Edited by: PSR on Feb 19, 2008 11:08 AMHi Diego Lombardini ,
thanks for fast reply..
i retrieve fields from 6 tables , thats why i choose function module but
my main logic mention above .
i created view but it gives wrong values bcoz lot of joins .
so i decide FM is better option ..
Pl . provide code for this logic ..
Regards,
PSR -
Function module to reactivate datasource
hello all,
anyone out there with a useful function module which will allow me to reactivate a datasource?
thanks.Hi,
You can also use the program "RSDS_DATASOURCE_ACTIVATE_ALL" to activate all / individual datasources for a source system.
Here, you also have an option to choose whether you want to activate an inactive datasource or to reactivate an active datasource. Hope this helps.
Regards,
Sarika -
FUNCTION MODULE CREATION FOR GENERIC DATA SOURCE
Hi BI gurus,
I am creating function module for generic datasource. For that I followed below mentioned steps
Steps
1. Created s structure with the fields that needed.
2. Created FM by copying the standard Function module
" RSAX_BIW_GET_DATA_SIMPLE " and Give a New name starting With
Y or Z .
3. IN SE37 ->Your Function module name -> Change, In table tab given structure
name by deleting the associated type given in E_T_DATA .
And inserted the required code given below
PROGRAM 'ZHU_BALANCE'.
*& Report ZHU_BALANCE
TABLES: VEKP, VEPO.
DATA: BEGIN OF T_DISPLAY,
DATE LIKE SY-DATUM,
EXIDV LIKE VEKP-EXIDV,
LGORT LIKE VEPO-LGORT,
WERKS LIKE VEKP-WERKS,
END OF T_DISPLAY.
DATA: ITAB_DISPLAY LIKE TABLE OF T_DISPLAY.
DATA: WA_ITAB_DISPLAY LIKE LINE OF ITAB_DISPLAY.
SELECT VEKPEXIDV VEPOLGORT VEPO~WERKS
INTO CORRESPONDING FIELDS OF TABLE ITAB_DISPLAY
FROM VEKP AS VEKP INNER JOIN VEPO AS VEPO
ON VEKPVENUM = VEPOVENUM
AND VEKPWERKS = VEPOWERKS
WHERE VEKP~VSTEL = SPACE
AND VEKP~VEGR1 = '401'
AND VEKP~VPOBJ = '12'
AND VEKP~STATUS = '0020'
AND VEPO~VEPOS = '000001'.
LOOP AT ITAB_DISPLAY INTO WA_ITAB_DISPLAY.
WA_ITAB_DISPLAY-DATE = SY-DATUM.
MODIFY ITAB_DISPLAY FROM WA_ITAB_DISPLAY TRANSPORTING DATE.
ENDLOOP.
WRITE:/ 'DATE', 20 'EXIDV', 40 'LGORT', 60 'WERKS'.
ULINE.
LOOP AT ITAB_DISPLAY INTO WA_ITAB_DISPLAY.
WRITE:/ WA_ITAB_DISPLAY-DATE, 20 WA_ITAB_DISPLAY-EXIDV , 40 WA_ITAB_DISPLAY-LGORT, 60 WA_ITAB_DISPLAY-WERKS.
ENDLOOP.
While checking the function module its populating the syntax error as
THE TYPE SRSC_S_IF_SIMPLE IS UNKOWN. (Though this is commented in program)
So pls suggest
Regards,
prafulhi indira,
thanx for ur reply we have created the funcion module successfuly it is also showing the output correct. But when we put that function module in the generic data source and try to extract data in RSA3 it shows the correct output of function module but with the msg ' 0 entries found in customer enhancement' and therfore zero records in the display list.
is there any correction or steps to be followed in data extraction
pls suggest
regards,
praful -
Creating a Generic Datasource using Function Module
Hi Guru's
We are tryin to create a Generic datasource using function module, we have found few old how to guides for doing the same but it is not effective and need to be altered. Can anyone suggest me the latest step by step procedure to create the above, also if you have the how to guide kindly paste the link as it will be a great help at this point.
Thanks in advance
Regards
LiquidHi,
Please goto the Following links :-
PDF
1) http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?quicklink=index&overridelayout=true
2) http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
SAP Forum
3) Re: DataSouce based on FM
4) http://forums.sdn.sap.com/post!reply.jspa?messageID=10050614
5) https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
6) Re: Generic datasource with functional module
7) Generic Extractor (FM based) - Delta Enabled
Regards
Obaid
Maybe you are looking for
-
Photo editing software problem
I have a Cannon Pixma pro 9000 Mark ll printer. I have several photo editing programs. The only one that will let me make a print the "exact size", in other words, not 8x10 or 5x7, etc., is Photoshop Elements ll. Even the software that came with my
-
How to convert a text file content to String in JSP?
Hi, I need to read the content of a text file and convert it into String and display it on to a JSP file. But the codings below don't work. Please advise me on how can i display the text file content. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
Your Help is Greatly Appriciated
hello, I am trying to load a SWF file (photo album) into my Main Flash Enviroment (index.swf). My photo album uses a wait function to pause on each photo for a period of the time (2 Second) as it flips thru the photos. I have realised that when I rem
-
FireWire400 Drive disconnects randomly - Acomdata 250GB External - Help?
I bought a Acomdata 250GB External hard drive with FireWire400. It has worked beautifully for me for the past week or so. I used it with Time Machine and I also backed up files (movies, music, etc.) onto it which worked pretty well. I never formatted
-
I am updating MS CS6 and I am getting this for Fireworks
Fireworks CS6 update to improve Mac 10.8 platform compatibility and resolve usability bugs. There was an error installing this update. Please quit and try again later. Error Code: U44M1I200