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 AM

Hi 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

Similar Messages

  • 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
    Rohith

    Hi,
    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.

  • 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
    balaji

    hi 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

  • 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

  • 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
    balaji

    hi 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.

  • 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

  • How to debug mapping function module during delta extraction?

    Hi experts,
    Somehow our delta is not working properly, and i would like to debug our mapping function module. How can i debug it during a delta extraction?
    Some info:
    Our source system is CRM and our extractor is extracting one order document (contracts in this case). I know that when we modify a contract, a bdoc is generated and then passed throught the mapping function then the extracted data to the delta queue. I just need to debug when the bdoc is being mapped to see what's wrong with the extracted data.
    Thanks in advance,
    Van

    Hi,
    Since you are using a Function Module for the Extraction. Edit the Function Module and give "BREAK-POINT" before the loop command. Check and activate the Function Module.
    Now Extract the datasource using RSA3. Now you can debug it. After checking remove the "BREAK-POINT" from the function module. Also Check and activate the same.
    Regards
    Jayaram M

  • 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

  • Error while calling the Mapping function module for BW Extraction

    Hi
    iam getting runtime error while calling the BW mapping function
    The error description is as shown below.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    <b>Short text</b>
        Type conflict during structure parameter transfer at CALL FUNCTION.
    <b>What happened?</b>
        Error in the ABAP Application Program
        The current ABAP program "GP466CV1Y7W2VML1PJ3VB80KDOP" had to be terminated
         because it has
        come across a statement that unfortunately cannot be executed.
    <b>Error analysis</b>   
    An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
         not caught in
        procedure "CALL_MAPPING_FUNCTION" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        In the function "CMS_CB_BW_MAP", the STRUCTURE parameter "EXTRACT_DATA" is
         typed in such a way
        that only actual parameters are allowed, which are compatible in Unicode
         with respect to the fragment view. However, the specified actual
        parameter " " has an incompatible fragment view.
    I am passing the EXTRACT_DATA  parameter as specification LIKE with the associated type  - corresponding structure
    Please let me know how can i resolve this issue
    Regards
    Leon

    Dear benarji ,
    I'm having the  same problem help me to correct . I have mentioned below as what error i got.
    Runtime Errors         CALL_FUNCTION_UC_STRUCT
    Except.                CX_SY_DYN_CALL_ILLEGAL_TYPE
    Short text
         Type conflict during structure parameter transfer at CALL FUNCTION.
    What happened?
         Error in the ABAP Application Program
         The current ABAP program "ZDLROUTSTANDING_COPY" had to be terminated because it
          has
         come across a statement that unfortunately cannot be executed.
    Error analysis
         An exception occurred that is explained in detail below.
         The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_TYPE', was
          not caught in
         procedure "PDF" "(FORM)", nor was it propagated by a RAISING clause.
         Since the caller of the procedure could not have anticipated that the
         exception would occur, the current program is terminated.
         The reason for the exception is:
         In the function "/1BCDWB/SF00000080", the STRUCTURE parameter "IT_WORKS_SF" is
          typed in such a way
         that only actual parameters are allowed, which are compatible in Unicode
          with respect to the fragment view. However, the specified actual
         parameter "SFTWORKS" has an incompatible fragment view.
    Missing RAISING Clause in Interface
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     876
        Module type                             (FORM)
        Module Name                             PDF
    Trigger Location of Exception
        Program                                 ZDLROUTSTANDING_COPY
        Include                                 ZDLROUTSTANDING_COPY
        Row                                     894
        Module type                             (FORM)
        Module Name                             PDF
    Source Code Extract
    Line  SourceCde
      864 **            i_logo             = 'ENJOYSAP_LOGO'
      865 *            IT_LIST_COMMENTARY = I_LIST_COMMENTS1.
      866
      867 ENDFORM.                    "alv_top_of_page1
      868 *&---------------------------------------------------------------------*
      869 *&      Form  PDF
      870 *&---------------------------------------------------------------------*
      871 *       text
    872 *----------------------------------------------------------------------*
    873 *  -->  p1        text
    874 *  <--  p2        text
    875 *----------------------------------------------------------------------*
    876 FORM pdf .
    877
    878 *  *** Smartforms & PDF ***
    879
    880   ssfctrlop-no_dialog = 'X'.
    881   ssfctrlop-preview   = 'X'.
    882   ssfctrlop-getotf    = 'X'.
    883   ssfcompop-tddest = 'ERP7'.
    884   DATA : mcheck LIKE sy-subrc.
    885   CLEAR : fm_name.
    886
    887   "Get Function module name for given smartform
    888   CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    889     EXPORTING
    890       formname = 'ZSFDLOS1'
    891     IMPORTING
    892       fm_name  = fm_name.
    893
    >>>>   CALL FUNCTION fm_name
    895   EXPORTING
    896         control_parameters   = ssfctrlop
    897         output_options       = ssfcompop
    898         mrefno               = mrefno
    899 *       P_TITLE              = MTITLE
    900   IMPORTING
    901         document_output_info = st_document_output_info
    902         job_output_info      = st_job_output_info " IT_OTF_DATA
    903         job_output_options   = st_job_output_options
    904   TABLES
    905         it_works_sf          = sftworks
    906   EXCEPTIONS
    907         formatting_error     = 1
    908         internal_error       = 2
    909         send_error           = 3
    910         user_canceled        = 4
    911     OTHERS               = 5.
    912
    913   IF sy-subrc NE 0.
    Advance Thanks

  • 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.

  • 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

  • Function module in Genaric Extraction

    hi,
    this sudhakar
    can any one helpme out about this
    when do we go for functional module
    and what senario we can use
    can any one hlepme about this
    I didn't work on this
    thanking you
    sudhakar

    Hi sudha,
        under  Generic Extraction...    normally... when we dont have a bussiness content  then only we go for generic extraction..
    in that , we  select Function module for a specific  conditions... that means. when we want to extract data from multiple tbales...(more than one table..)  and those tables  having ONE- TO MANY relationship. then we select  this functionmodule extractions..
       if  the relationship between  tables is ONE -TO - ONE, then we go for   extract from Views
    i think this will helpfull to u.. plz dont forget to ASSIGN POINTS.
    thanks
    @jay

  • Need Some help on Function Module

    Hello;
        Hello i want to put some data in BAPI's Function Module hard codedly..can anybody give some suggestion..
    Thanks and Regards,
         Omkar..
    Moderator message: please search for available information before asking, do not ask basic or generic questions, warning #4 (this is the last one from my side)
    [Asking Good Questions in the Forums to get Good Answers|/people/rob.burbank/blog/2010/05/12/asking-good-questions-in-the-forums-to-get-good-answers]
    locked by: Thomas Zloch on Sep 28, 2010 9:53 AM

    hI!
    I mean coding like this in :
    IF fieldname = project definition
    select value  by     'F4IF_FIELD_VALUE_REQUEST'
    save it in global variable
    IF fieldname = 'DATE'.
    select dates with saved project definition and show values with HELP_VALUES_GET_WITH_TABLE
    but it no good solution.
    Another  way - create seach help with import export parameters and assign to tables fields.
    Look at example:
    REPORT  z_popup                               .
    DATA: BEGIN OF fields OCCURS 1.
            INCLUDE STRUCTURE sval.
    DATA: END OF fields.
    CLEAR fields.
    MOVE 'T001L' TO fields-tabname.
    MOVE 'WERKS' TO fields-fieldname.
    APPEND fields.
    CLEAR fields.
    MOVE 'T001L' TO fields-tabname.
    MOVE 'LGORT' TO fields-fieldname.
    APPEND fields.
    CALL FUNCTION 'POPUP_GET_VALUES_USER_HELP'
      EXPORTING
        popup_title = 'test'
      TABLES
        fields      = fields.
    it works as you need it.

  • Function module searched: Data extraction from BW to R/3?

    Hello everybody,
    has anyboday any idea on which function module or function group could be used for data extraction from BW to R/3?I have seen some threads,and found the function group RSAX which is actually for extraction from R/3 to BW,is it also suitable for the other direction(BW to R/3)?
    I have looked for this topic for a long time,but so far no success...
    Would you like to give me some hints?
    Regards,
    Liying
    Message was edited by: Liying Wang

    Hi,
    It's going to be an extraction to specific application in R/3 - couldn't be any universal extractor - applications have their own specific.
    But you can try application specific retractors, as examples look here:
    http://help.sap.com/saphelp_sem320bw/helpdata/en/99/97157967e3440a94d199538959cd0b/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c4/b2af6569e64418a21bd0ab4d83be83/content.htm
    Open hub functionality is another option:
    http://help.sap.com/saphelp_sem40bw/helpdata/en/ce/c2463c6796e61ce10000000a114084/frameset.htm
    Best regards,
    Eugene

Maybe you are looking for

  • How do i add a mp3 file purchased from amazon to show on my iPhone iTunes library?

    i purchased an mp3 file from amazon and added it to my itunes library on the imac. However, when i synced my iphone, the mp3 file (song) does not show on the itunes library. What could I be doing wrong?

  • My Podcast is no Longer in the directory...did I do something wrong?

    I have had some problems with my feed and have only been updating my podcast about once per month but I can no longer find my podcast: South Mississippi Music Sampler in the directory. I also need to change my feed to smms.libsyn.com/rss but am not s

  • Exception not caught

    Hi all. At my new customer, I have to implement webdynpro applications. The problem is that when I want to test the application, IE displays a message like this: "The following error text was processed in the system EPB : An exception occurred that w

  • ATV not syncing all of movies

    Just purchased new macbook 2 months ago and aTV; have installed all updates including new itunes update. Everything was working fine until yesterday turned on aTV and about 1/3 of movies in itunes not showing up in aTV and will not sync. Can't figure

  • Can't Install Flash Player insufficient privledges yet I'm in administrator mode

    The problem I am having is that I can't seem to install the latest version of Flash Player . Every time I try , I get the message "the user does not have sufficient privledges to install Adobe Flash Player" ...yet I am in Adminstrator mode. I have un