Function Module Extraction!! Please HELP!!

Hi Experts,
This is my first project in BW. Please help!! The existing function module using 3 tables to extract (Full update) data. Now, I have to enable the delta for this generic extractor. I have seen RSA3_GET_DATA_SIMPLE (nothing specified for Delta) and RSVD_BW_GET_DELTA_DATA function module to make use of it using OPEN CURSOR but in that fm I can see only one table being used.
Should I use 3 cursors to extract if so how should I join them? Can anyone please help me how to use cursors joining 3 tables and extract right delta data?
This would be a greatest help!! Thanks in advance.
Rishi

Ok please find the original code below before I changed it... please do not mind as I was little scared to give exact tech names sorry... please find the code below.
FUNCTION zz_ods_bw_extract_fm.
""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
*"  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  ZZODS_BW_EXTRACT_STRUCT OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
  DATA : t_zzods_extract TYPE zzods_bw_extract_struct OCCURS 0
                                                   WITH HEADER LINE.
Local data declarations
  DATA: l_output TYPE proj-pspid.
Maximum number of lines for DB table
  STATICS: s_s_if TYPE srsc_s_if_simple,
           s_counter_datapakid LIKE sy-tabix.
  DATA: BEGIN OF t_prps OCCURS 0,
          posid     TYPE     ps_posid,
          psphi     TYPE     ps_psphi,
          zzdflt1     TYPE     zd_variable,
          zzdflt2     TYPE     zd_variable,
          zzdflt3     TYPE     zd_variable,
          zzdflt4     TYPE     zd_variable,
          zzdflt5     TYPE     zd_variable,
          zzdflt6     TYPE     zd_variable,
          zzdflt7     TYPE     zd_variable,
          zzdflt8     TYPE     zd_variable,
          zzdflt9     TYPE     zd_variable,
          zzdflt10     TYPE     zd_variable,
          zzdflt11     TYPE     zd_variable,
          zzvar1     TYPE     zd_var01,
          zzvar2     TYPE     zd_var02,
          zzvar3     TYPE     zd_var03,
          zzvar4     TYPE     zd_var04,
          zzvar5     TYPE     zd_var05,
          zzvar6     TYPE     zd_var06,
          zzvar7     TYPE     zd_var07,
          zzvar8     TYPE     zd_var08,
          zzvar9     TYPE     zd_var09,
          zzvar10     TYPE     zd_var10,
          zzvar11     TYPE     zd_var09,
          zzunit1     TYPE     zd_unit01,
          zzunit2     TYPE     zd_unit02,
          zzunit3     TYPE     zd_unit03,
          zzunit4     TYPE     zd_unit04,
          zzunit5     TYPE     zd_unit05,
          zzunit6     TYPE     zd_unit06,
          zzunit7     TYPE     zd_unit07,
          zzunit8     TYPE     zd_unit08,
          zzunit9     TYPE     zd_unit09,
          zzunit10     TYPE     zd_unit10,
          zzunit11     TYPE     zd_unit11,
          zztpemsnar1 TYPE     zd_tpemsnar,     
          zzrprtngyr1 TYPE     zd_rprtngyr,     
          zznonatar1       TYPE zd_nonatr,
          zzzcat1       TYPE zd_zcat,
          zzslitemar1  TYPE zd_slitemar,
          zzbnftyrs1        TYPE zd_bnftyrs,
          zzdescfrml   TYPE zd_descfrml,
         ZZFORMULA        type ZD_FRMLUSD,
        END OF t_prps.
  DATA: BEGIN OF t_emfactor OCCURS 0,
          naindex     TYPE     zd_index,     
          nayear     TYPE     zd_year,     
          cofactor     TYPE     zd_cofac,     
          vocfactor     TYPE     zd_vofac,     
          noxfactor     TYPE     zd_nofac,     
          pmfactor     TYPE     zd_pmfac,     
        END OF t_emfactor.
  DATA: BEGIN OF t_slef OCCURS 0,
         slindex     TYPE     zd_index,     
         slyear     TYPE     zd_year,     
         sltldfact     TYPE     zd_sltldfact,     
        END OF t_slef.
Initialization mode (first call by SAPI) or data transfer mode
(following calls) ?
  IF i_initflag = sbiwa_c_flag_on.
Check DataSource validity
    CASE i_dsource.
      WHEN 'ZZODS_DATA_TRANS'.
      WHEN OTHERS.
        RAISE error_passed_to_mess_handler.
    ENDCASE.
Fill parameter buffer for data extraction calls
    s_s_if-requnr    = i_requnr.
    s_s_if-dsource   = i_dsource.
    s_s_if-maxsize   = i_maxsize.
  ELSE.                 "Initialization mode or data extraction ?
Data transfer: First Call to pupulate data
First data package
    IF s_counter_datapakid = 0.
Extract data from prps for Project Types 15 and 17
      SELECT posid psphi zzdflt1 zzdflt2 zzdflt3
             zzdflt4 zzdflt5 zzdflt6 zzdflt7
             zzdflt8 zzdflt9 zzdflt10 zzdflt11
             zzvar1 zzvar2 zzvar3 zzvar4 zzvar5
             zzvar6 zzvar7 zzvar8 zzvar9 zzvar10
             zzvar11 zzunit1 zzunit2 zzunit3 zzunit4
             zzunit5 zzunit6 zzunit7 zzunit8
             zzunit9 zzunit10 zzunit11
             zztpemsnar1 zzrprtngyr1
             zznonatar1 zzzcat1 zzslitemar1
             zzbnftyrs1 zzdescfrml
       FROM prps
       INTO TABLE t_prps
       WHERE prart = '15' OR prart = '17'.
Check for fetched records
      IF sy-subrc EQ 0.
        SORT t_prps BY posid.
      ENDIF.
If the above condition is true
      IF NOT t_prps[] IS INITIAL.
Get the data from z_fact
Data : t_prps1 like t_prps occurs 0 with header line.
        SELECT naindex
               nayear
               cofactor
               vocfactor
               noxfactor
               pmfactor
         INTO TABLE t_emfactor
          FROM z_fact.
*RR          WHERE naindex = t_prps-zztpemsnar1+0(3)
*RR           WHERE naindex = l_prps_index
*GP        WHERE naindex = '01' or NAINDEX = '03'.
         AND  nayear  = t_prps-zzrprtngyr1.
Sort the data by index and construction year
        IF sy-subrc EQ 0.
          SORT t_emfactor BY naindex nayear.
        ENDIF.
Get the data from ztp_slef
        SELECT slindex
               slyear
               sltldfact
          INTO TABLE t_slef
           FROM ztp_slef.
*RR           WHERE slindex = t_prps-zztpemsnar1+0(3)
*GP        WHERE slindex = '01' or slindex = '03'.
*RR           AND  slyear  = t_prps-zzrprtngyr1.
        IF sy-subrc EQ 0.
          SORT t_slef BY slindex slyear.
        ENDIF.
      ENDIF.
Between this LOOP and ENDLOOP get the internal value of each project.
Get the required data stored in above internal tables and populate
the extract internal table
      LOOP AT t_prps.
        CLEAR l_output.
        CALL FUNCTION 'CONVERSION_EXIT_KONPD_OUTPUT'
          EXPORTING
            input  = t_prps-psphi
          IMPORTING
            output = l_output.
        t_zzods_extract-psphi  = l_output.
        CLEAR t_emfactor.
        READ TABLE t_emfactor WITH KEY NAINDEX = t_prps-zztpemsnar1+0(3)
                                       nayear  = t_prps-zzrprtngyr1
                                       BINARY SEARCH.
        IF sy-subrc EQ 0.
          t_zzods_extract-cofactor  = t_emfactor-cofactor.
          t_zzods_extract-vocfactor =      t_emfactor-vocfactor.
          t_zzods_extract-noxfactor =      t_emfactor-noxfactor.
          t_zzods_extract-pmfactor  =     t_emfactor-pmfactor.
        ENDIF.
        CLEAR t_slef.
        READ TABLE t_slef WITH KEY     slindex = t_prps-ZZSLITEMAR1+0(3)
                                       slyear  = t_prps-zzrprtngyr1
                                       BINARY SEARCH.
        IF sy-subrc EQ 0.
          t_zzods_extract-sltldfact =     t_slef-sltldfact.
        ELSE.
           t_zzods_extract-sltldfact = '0'.
        ENDIF.
        t_zzods_extract-posid    = t_prps-posid.
        t_zzods_extract-zzdflt1  = t_prps-zzdflt1.
        t_zzods_extract-zzdflt2  = t_prps-zzdflt2.
        t_zzods_extract-zzdflt3  = t_prps-zzdflt3.
        t_zzods_extract-zzdflt4  = t_prps-zzdflt4.
        t_zzods_extract-zzdflt5  = t_prps-zzdflt5.
        t_zzods_extract-zzdflt6  = t_prps-zzdflt6.
        t_zzods_extract-zzdflt7  = t_prps-zzdflt7.
        t_zzods_extract-zzdflt8  = t_prps-zzdflt8.
        t_zzods_extract-zzdflt9  = t_prps-zzdflt9.
        t_zzods_extract-zzdflt10 = t_prps-zzdflt10.
        t_zzods_extract-zzdflt11 = t_prps-zzdflt11.
        t_zzods_extract-zzvar1       = t_prps-zzvar1.
        t_zzods_extract-zzvar2       = t_prps-zzvar2.
        t_zzods_extract-zzvar3       = t_prps-zzvar3.
        t_zzods_extract-zzvar4       = t_prps-zzvar4.
        t_zzods_extract-zzvar5       = t_prps-zzvar5.
        t_zzods_extract-zzvar6       = t_prps-zzvar6.
        t_zzods_extract-zzvar7       = t_prps-zzvar7.
        t_zzods_extract-zzvar8       = t_prps-zzvar8.
        t_zzods_extract-zzvar9       = t_prps-zzvar9.
        t_zzods_extract-zzvar10  = t_prps-zzvar10.
        t_zzods_extract-zzvar11  = t_prps-zzvar11.
        t_zzods_extract-zzunit1  = t_prps-zzunit1.
        t_zzods_extract-zzunit2  = t_prps-zzunit2.
        t_zzods_extract-zzunit3  = t_prps-zzunit3.
        t_zzods_extract-zzunit4  = t_prps-zzunit4.
        t_zzods_extract-zzunit5  = t_prps-zzunit5.
        t_zzods_extract-zzunit6  = t_prps-zzunit6.
        t_zzods_extract-zzunit7  = t_prps-zzunit7.
        t_zzods_extract-zzunit8  = t_prps-zzunit8.
        t_zzods_extract-zzunit9  = t_prps-zzunit9.
        t_zzods_extract-zzunit10 = t_prps-zzunit10.
        t_zzods_extract-zzunit11 = t_prps-zzunit11.
        t_zzods_extract-zznonatar1  = t_prps-zznonatar1.
        t_zzods_extract-zzzcat1  = t_prps-zzzcat1.
        t_zzods_extract-zztpemsnar1 = t_prps-zztpemsnar1.
        t_zzods_extract-zzslitemar1 = t_prps-zzslitemar1.
        t_zzods_extract-zzrprtngyr1 = t_prps-zzrprtngyr1.
        t_zzods_extract-zzbnftyrs1  = t_prps-zzbnftyrs1.
        t_zzods_extract-zzdescfrml   = t_prps-zzdescfrml.
       t_ZzODS_EXTRACT-ZZFORMULA   = t_prps-ZZFORMULA.
        APPEND t_zzods_extract.
        CLEAR t_zzods_extract.
      ENDLOOP.
Delete the record before filling the custom Records
      CLEAR e_t_data.
      REFRESH e_t_data.
Submit all the extracted records to extract table
      e_t_data[] = t_zzods_extract[].
      s_counter_datapakid = s_counter_datapakid + 1.
    else.
      Raise NO_MORE_DATA.
    ENDIF.
   s_counter_datapakid = s_counter_datapakid + 1.
  ENDIF.              "Initialization mode or data extractio
ENDFUNCTION.

Similar Messages

  • Problem with calling a report from a function module. Please help! URGENT!

    Hi Experts,
       I have a scenarion like this:
      XI -
    > Function Module -
    > ABAP Report
      From XI I am callingf a function module in another R/3 system. This function module inturn calls a ABAP report using SUBMIT statement. The function module and the report reside in the same R/3 system.
      I am calling the report like this:
    SUBMIT yseg_save_bp_data WITH SELECTION-TABLE rspar
                                 AND RETURN.
    The problem is when I run the function module directly in the R/3 system then it calls the report without any problem.
    On the other hand, when I call the function module from XI then the report is not called. On debug mode I found that the program exits just at the Submit statement. Why is this strange problem?
    What mistake am I doing? Is there any limitations or restrictions with SUBMIT statement.
    What is the correct way of using submit statement in this scenario?
    Kindly help me!
    Thanks
    Gopal

    Hi Rao,
       I have created the FM as remote RFC. Infact XI is able to call the FM. Only problem is when it reaches the point where the report is called via SUBMIT it exits.
    Help me please!
    Thanks
    Gopal

  • Can generic function module extractions possible with CRM data sources.

    Hi Friends,
    can generic function module extractions possible with CRM data sources.
    90% extractions are generic function module extractions.
    How is it possible without BW adapters..
    It's very urgent ...Please.
    Thanks,
    Basava Raju

    Hi Madhu,
       Just curious ... if you already have a generic FM extractor then just go into it and find out where it is reading the data from. If its reading data from the CRM system then thre is no need for any BW adapter ... just in case you need any ABAP help ... post here ... I may be of use to you.
    Best regards,
    Kazmi

  • Function Module for search help Exit

    How to create a function Module for search help exits?
    please explain in details with step by step process.

    Hi,
    How to create a function Module for search help exits?
    function module for search help F4IF_SHLP_EXIT_EXAMPLE
    dynamic search help use 'F4IF_INT_TABLE_VALUE_REQUEST'
    please check out the link below it will help you
    A repository object maintained in the ABAP Dictionary. It supplies input fields on Dynpros with single- or multi-column input helps. Search helps can be linked in the Dictionary with components from structures, data elements, and check tables. A search help enables you to search for entry values with assigned data, without you having to know the exact spelling of the value.
    http://help.sap.com/saphelp_46c/helpdata/EN/cf/21ee52446011d189700000e8322d00/content.htm
    please explain in details with step by step process.
    create a search help exit:
    1. create an fm with this interface:
    *" TABLES
    *" SHLP_TAB TYPE SHLP_DESCR_TAB_T
    *" RECORD_TAB STRUCTURE SEAHLPRES
    *" CHANGING
    *" VALUE(SHLP) TYPE SHLP_DESCR_T
    *" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
    put this logic in it:
    Delete duplicate filter logic.
    This logic only needs to apply at the 'DISP' event - which is just
    before the hit list is displayed
    if callcontrol-step = 'DISP'.
    delete adjacent duplicates from record_tab.
    endif.
    2. edit your search help in se11 and enter the name of the above search help exit fm
    check this sample code..for dynamic search help
    REPORT  ZTEST_F4HELP                              .
    *---Report with selection screen and to display the list of
    possible entries for field 'B' as per the value in field 'A'.
    parameters: p_vbeln type vbak-vbeln,
                p_posnr type vbap-posnr.
    at selection-screen on value-request for p_posnr.
      data: begin of help_item occurs 0,
              posnr type vbap-posnr,
              matnr type vbap-matnr,
              arktx type vbap-arktx,
            end of help_item.
      data: dynfields type table of dynpread with header line.
      dynfields-fieldname = 'P_VBELN'.
      append dynfields.
      call function 'DYNP_VALUES_READ'
           exporting
                dyname               = sy-cprog
                dynumb               = sy-dynnr
                translate_to_upper   = 'X'
           tables
                dynpfields           = dynfields
           exceptions
                invalid_abapworkarea = 1
                invalid_dynprofield  = 2
                invalid_dynproname   = 3
                invalid_dynpronummer = 4
                invalid_request      = 5
                no_fielddescription  = 6
                invalid_parameter    = 7
                undefind_error       = 8
                double_conversion    = 9
                stepl_not_found      = 10
                others               = 11.
      read table dynfields with key fieldname = 'P_VBELN'.
      p_vbeln = dynfields-fieldvalue.
      call function 'CONVERSION_EXIT_ALPHA_INPUT'
           exporting
                input  = p_vbeln
           importing
                output = p_vbeln.
      select posnr matnr arktx into table help_item
                     from vbap
                          where vbeln = p_vbeln.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
           exporting
                retfield    = 'POSNR'
                dynprofield = 'P_POSNR'
                dynpprog    = sy-cprog
                dynpnr      = sy-dynnr
                value_org   = 'S'
           tables
                value_tab   = help_item.
    also check this link it will help you
    /message/3854825#3854825 [original link is broken]
    *********please reward points if the information is helpful to you*************

  • My 4th generation ipod touch is not turning off when i hold the wake button for few seconds the Voice Control Function Starts Automatically.Please help me to get out of this problem.

    My 4th generation ipod touch is not turning off when i hold the wake button for few seconds the Voice Control Function Starts Automatically.Please help me to get out of this problem.

    Sorry i mistakenly made this question. It was alright. No Problem At ALL

  • Function module for F4 help download

    HI Experts
    What is the function module for F4 help download.
    Thanks in advance

    Hi,
      Function module is F4IF_FIELD_VALUE_REQUEST.
    Use the Function moduel like this in this i create screen 100 by using se51.
    REPORT zcl_f4_help.
    TYPES: BEGIN OF values,
             carrid TYPE spfli-carrid,
             connid TYPE spfli-connid,
           END OF values.
    DATA: carrier(3) TYPE c,
          connection(4) TYPE c.
    DATA: progname TYPE sy-repid,
          dynnum   TYPE sy-dynnr,
          dynpro_values TYPE TABLE OF dynpread,
          field_value LIKE LINE OF dynpro_values,
          values_tab TYPE TABLE OF values.
    CALL SCREEN 100.
    MODULE init OUTPUT.
      progname = sy-repid.
      dynnum   = sy-dynnr.
      CLEAR: field_value, dynpro_values.
      field_value-fieldname = 'CARRIER'.
      APPEND field_value TO dynpro_values.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE value_carrier INPUT.
      CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
           EXPORTING
                tabname     = 'DEMOF4HELP'
                fieldname   = 'CARRIER1'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'CARRIER'.
    ENDMODULE.
    MODULE value_connection INPUT.
      CALL FUNCTION 'DYNP_VALUES_READ'
           EXPORTING
                dyname             = progname
                dynumb             = dynnum
                translate_to_upper = 'X'
           TABLES
                dynpfields         = dynpro_values.
      READ TABLE dynpro_values INDEX 1 INTO field_value.
      SELECT  carrid connid
        FROM  spfli
        INTO  CORRESPONDING FIELDS OF TABLE values_tab
        WHERE carrid = field_value-fieldvalue.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'CONNID'
                dynpprog    = progname
                dynpnr      = dynnum
                dynprofield = 'CONNECTION'
                value_org   = 'S'
           TABLES
                value_tab   = values_tab.
    ENDMODULE.
    you use this exaple  code.
    Plz Reward if Help,
    Mahi.

  • Function Module for F4 Help

    HI Experts
    What is the function module for F4 help download.
    Thanks in advance

    Hi,
    try these fn modules,
    F4IF_INT_TABLE_VALUE_REQUEST
    its a F4 help that returns the values selected in an internal table.
    F4_IF_FIELD_VALUE_REQUEST
    It uses values from a DDIC table to provide a list of possible values

  • TS2771 Suddenly the sound of my iPods keyboard suddenly becomes very faint bit when I have my headset on its functioning very well please help thanks

    Suddenly the sound of my iPods keyboard suddenly becomes very faint bit when I have my headset on its functioning very well please help thanks

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                             
    - Restore to factory settings/new iOS device.
    If still problem, make an appointment at the Genius Bar of an Apple store since it appears you have a hardware problem.
    Apple Retail Store - Genius Bar          

  • Function Module to Make Help on Your Field

    Hi,
    Is there any FM to Make Help on Field?
    Thanks

    Hi,
    You can do this by two way:
    1. Make a help by using SE11 & attach it to your field like this 'parameters abc like zstudent-name matchcode object id = search help name'
    2. Use Function module to make help on your field by using this coding.
    DATA: lc_vbeln      LIKE vbrk-vbeln,
          ltab_fields LIKE help_value OCCURS 0 WITH HEADER LINE,
          BEGIN OF ltab_values OCCURS 0,
            feld(40) TYPE c,
          END OF ltab_values.
    **&      Form  HELP_CHECK
          text
    FORM help_check.
    *-- Set up fields to retrieve data
      ltab_fields-tabname    = 'VBRK'.
      ltab_fields-fieldname  = 'VBELN'.
      ltab_fields-selectflag = 'X'.
      APPEND ltab_fields.
      ltab_fields-tabname    = 'VBRK'.
      ltab_fields-fieldname  = 'FKDAT'.
      ltab_fields-selectflag = space.
      APPEND ltab_fields.
    *-- Fill values
      SELECT * FROM vbrk WHERE kunag = 'RICO0US'.
        ltab_values-feld = vbrk-vbeln.
        APPEND ltab_values.
        ltab_values-feld = vbrk-fkdat.
        APPEND ltab_values.
      ENDSELECT.
      CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE'
        EXPORTING
          fieldname                 = 'VBELN'
          tabname                   = 'VBRK'
          title_in_values_list      = 'Select a value'
        IMPORTING
          select_value              = pr_vbeln
        TABLES
          fields                    = ltab_fields
          valuetab                  = ltab_values
        EXCEPTIONS
          field_not_in_ddic         = 01
          more_then_one_selectfield = 02
          no_selectfield            = 03.
    ENDFORM.                    "fiscal_year
    End of Coding
    Make this coding according to your program.
    Reward if helpful..
    Varishtah.

  • Function Module Extraction from KONV Table taking lot of time for extractio

    Hi
    I have a requirement wherein i need to get records from KONV Table (Conditions (Transaction Data) ). i need the data corresponding to Application (KAPPL) = 'F'.
    For this i had written one function module but it is taking lot of time (@ 2.5 hrs) for fetching records as there are large number of records in KONV Table.
    I am pasting the Function Module code for reference.
    <b>kindly guide me as to how the extraction performance can be improved.</b>
    <b>Function Module Code:</b>
    FUNCTION ZBW_SHPMNT_COND.
    ""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
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZBW_SHPMNT_COND 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 !
      TABLES: KONV.
    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.
    Maximum number of lines for DB table
      STATICS: S_S_IF TYPE SRSC_S_IF_SIMPLE,
    counter
              S_COUNTER_DATAPAKID LIKE SY-TABIX,
    cursor
              S_CURSOR TYPE CURSOR.
    Select ranges
      RANGES: L_R_KNUMV  FOR KONV-KNUMV,
              L_R_KSCHL  FOR KONV-KSCHL,
              L_R_KDATU  FOR KONV-KDATU.
    Declaring internal tables
    DATA : I_KONV LIKE KONV OCCURS 0 WITH HEADER LINE.
      DATA : Begin of I_KONV occurs 0,
             MANDT LIKE konv-mandt,
             KNUMV LIKE konv-knumv,
             KPOSN LIKE konv-kposn,
             STUNR LIKE konv-stunr,
             ZAEHK LIKE konv-zaehk,
             KAPPL LIKE konv-kappl,
             KSCHL LIKE konv-kschl,
             KDATU LIKE konv-kdatu,
             KBETR LIKE konv-kbetr,
             WAERS LIKE konv-waers,
             END OF I_KONV.
    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 'X'.
         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.
    For full upload
          WHEN 'F'.
          WHEN 'D'.
          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.
        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.
    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_fields.
    Interpretation of date selection for generic extraktion
       CALL FUNCTION 'RSA3_DATE_RANGE_CONVERT'
         TABLES
           i_t_select = g_t_select.
      ELSE.                 "Initialization mode or data extraction ?
       CASE g_s_interface-updmode.
         WHEN 'F' OR 'C' OR 'I'.
    First data package -> OPEN CURSOR
        IF g_counter_datapakid = 0.
       L_MAXSIZE = G_S_INTERFACE-MAXSIZE.
          LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'KNUMV'.
            MOVE-CORRESPONDING l_s_select TO l_r_knumv.
            APPEND l_r_knumv.
          ENDLOOP.
          LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'KSCHL'.
            MOVE-CORRESPONDING l_s_select TO l_r_kschl.
            APPEND l_r_kschl.
          ENDLOOP.
          Loop AT g_t_select INTO l_s_select WHERE fieldnm = 'KDATU'.
            MOVE-CORRESPONDING l_s_select TO l_r_kdatu.
            APPEND l_r_kdatu.
          ENDLOOP.
    *In case of full upload
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
       APPEND LINES OF I_T_FIELDS TO S_S_IF-T_FIELDS.
          OPEN CURSOR G_CURSOR FOR
            SELECT MANDT
                   KNUMV
                   KPOSN
                   STUNR
                   ZAEHK
                   KAPPL
                   KSCHL
                   KDATU
                   KBETR
                   WAERS
            FROM   KONV
            WHERE KNUMV IN l_r_knumv
            AND   KSCHL IN l_r_kschl
            AND   KDATU IN l_r_kdatu
            AND   KAPPL EQ 'F'.
        ENDIF.
        Refresh I_KONV.
        FETCH NEXT CURSOR G_CURSOR
                   APPENDING CORRESPONDING FIELDS OF TABLE I_KONV
                   PACKAGE SIZE S_S_IF-MAXSIZE.
        IF SY-SUBRC <> 0.
          CLOSE CURSOR G_CURSOR.
          RAISE NO_MORE_DATA.
        ENDIF.
        LOOP AT I_KONV.
         IF I_KONV-KAPPL EQ 'F'.
          CLEAR :E_T_DATA.
          E_T_DATA-MANDT = I_KONV-MANDT.
          E_T_DATA-KNUMV = I_KONV-KNUMV.
          E_T_DATA-KPOSN = I_KONV-KPOSN.
          E_T_DATA-STUNR = I_KONV-STUNR.
          E_T_DATA-ZAEHK = I_KONV-ZAEHK.
          E_T_DATA-KAPPL = I_KONV-KAPPL.
          E_T_DATA-KSCHL = I_KONV-KSCHL.
          E_T_DATA-KDATU = I_KONV-KDATU.
          E_T_DATA-KBETR = I_KONV-KBETR.
          E_T_DATA-WAERS = I_KONV-WAERS.
          APPEND E_T_DATA.
       ENDIF.
        ENDLOOP.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.
    ENDFUNCTION.
    Thanks in Advance
    Regards
    Swapnil.

    Hi,
    one option to investigate is to select the data with a condition on KNUMV (primary IDX).
    Since shipment costs are store in VFKP I would investigate if all your F condition records are used in this table (field VFKP-KNUMV).
    If this is the case then something like
    SELECT *
    FROM KONV
    WHERE KNUMV IN (SELECT DISTINCT KNUMV FROM VFKP)
    or
    SELECT DISTINCT KNUMV
    INTO CORRESPONDING FIELD OF <itab>
    FROM VFKP
    and then
    SELECT *
    FROM KONV
    FOR ALL ENTRIES IN <itab>
    WHERE...
    will definitively speed it up.
    hope this helps....
    Olivier

  • Urgent: problems in function module extraction

    Hi Gurus,
    I am new to BW and My requirement is to extract the notes from CRM as it is not stored in database tables i used functional module to extract it i have used standard FM RSAX_BIW_GET_DATA_SIMPLE but in that when i map E_T_DATA with my own structure with like or type keyword in tables tab(e.g. E_T_DATA LIKE/TYPE ZCRM_OREDR_STR) i am getting a warning msg "tables parameters are obsolete". Would anyone please suggest me what i need to do. I appreciate it in advance. I def. award points.
    Thanks a lot
    With Regards
    Venkat

    Hi PSG,
    Thanks a lot for quick response. when i use tables it is once again giving an error "The typing method can be 'Like', 'Type', or 'Type Ref To'" I even used all the three than also same problem. Actually it is coming in Function Builder in Tables tabstrip when i use E_T_DATA Like/tables/type/type ref to ZCRM_ORDER_STR I donot know why it is happening. Please would you suggest me what to do.
    Thanks a lot
    With Regards
    Venkat.

  • Function module extracter

    hi,
    i created a function module as an extractor.
    FUNCTION z_biw_get_data_ps005.
    ""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 TYPE  ZT_PS005 OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
    TABLES: SFLIGHT.
      TABLES : lips .
    Auxiliary Selection criteria structure
      TYPES : BEGIN OF ty_lips ,
              vgbel TYPE vgbel ,
              vgpos TYPE vgpos ,
              lfimg TYPE lfimg ,
              END OF ty_lips.
      TYPES : BEGIN OF ty_ps ,
              ebeln TYPE ebeln ,
              ebelp(6) TYPE n ,
              poqty TYPE bstmg ,
              ereqty TYPE bstmg ,
              frnt_avl TYPE bstmg ,
              posid TYPE ps_posid ,
              lfimg TYPE lfimg ,
              END OF ty_ps .
      DATA : l_s_select TYPE srsc_s_select.
      DATA : git_ps005 TYPE TABLE OF ty_ps.
      DATA : git_lips TYPE TABLE OF ty_lips .
      DATA : gs_lips TYPE ty_lips .
      DATA : gs_ps005 TYPE ty_ps .
      DATA : gs_gsps005 TYPE zgs_ps005 .
    Maximum number of lines for DB table
      STATICS: s_s_if TYPE srsc_s_if_simple,
    counter
              s_counter_datapakid LIKE sy-tabix,
    cursor
              s_cursor TYPE cursor.
    Select ranges
    RANGES: l_r_carrid  FOR sflight-carrid,
             l_r_connid  FOR sflight-connid.
    Initialization mode (first call by SAPI) or data transfer mode
    (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    Initialization: check input parameters
                    buffer input parameters
                    prepare data selection
    Check DataSource validity
        CASE i_dsource.
          WHEN 'ZD_PS005'.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
    this is a typical log call. Please write every error message like this
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_dsource   "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
        APPEND LINES OF i_t_select TO s_s_if-t_select.
    Fill parameter buffer for data extraction calls
        s_s_if-requnr    = i_requnr.
        s_s_if-dsource = i_dsource.
        s_s_if-maxsize   = i_maxsize.
    Fill field list table for an optimized select statement
    (in case that there is no 1:1 relation between InfoSource fields
    and database table fields this may be far from beeing trivial)
        APPEND LINES OF i_t_fields TO s_s_if-t_fields.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    First data package -> OPEN CURSOR
        IF s_counter_datapakid = 0.
    Fill range tables BW will only pass down simple selection criteria
    of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
    *SELECTION FROM VIEW ZBW_PS005 AND LIPS
          SELECT ebeln ebelp poqty ereqty frnt_avl posid  FROM zbw_ps005
                   INTO TABLE git_ps005 .
          IF NOT git_ps005[] IS INITIAL .
            SELECT vgbel vgpos lfimg
                   FROM lips
                   INTO TABLE git_lips
                   FOR ALL ENTRIES IN git_ps005
                   WHERE vgbel = git_ps005-ebeln
                   AND   vgpos = git_ps005-ebelp .
          ENDIF .
          LOOP AT git_ps005 INTO gs_ps005 .
            READ  TABLE git_lips INTO gs_lips WITH KEY
                                     vgbel = gs_ps005-ebeln
                                     vgpos = gs_ps005-ebelp .
            MOVE gs_ps005-ebeln TO gs_gsps005-ebeln .
            MOVE gs_ps005-ebelp TO gs_gsps005-ebelp .
            MOVE gs_ps005-poqty TO gs_gsps005-poqty .
            MOVE gs_ps005-ereqty TO gs_gsps005-ereqty .
            MOVE gs_ps005-frnt_avl TO gs_gsps005-frnt_avl .
            MOVE gs_ps005-posid TO gs_gsps005-posid.
            MOVE gs_lips-lfimg TO gs_gsps005-lfimg .
            APPEND gs_gsps005 TO e_t_data .
            CLEAR : gs_ps005 , gs_lips , gs_gsps005 .
          ENDLOOP.
         LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CARRID'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_CARRID.
           APPEND L_R_CARRID.
         ENDLOOP.
         LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'CONNID'.
           MOVE-CORRESPONDING L_S_SELECT TO L_R_CONNID.
           APPEND L_R_CONNID.
         ENDLOOP.
    Determine number of database records to be read per FETCH statement
    from input parameter I_MAXSIZE. If there is a one to one relation
    between DataSource table lines and database entries, this is trivial.
    In other cases, it may be impossible and some estimated value has to
    be determined.
         OPEN CURSOR WITH HOLD s_cursor FOR
         SELECT (s_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.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    wen i extracted data in rsa3 its showz  perfect 11 records.
    but wen i schedule in bw it feched 11 records but it does not turn green .
    wen i check process overviiew, it showz status running.
    shud i give some termination condition in extractor plz let me know.
    wt shud be the termination condition
    thnx

    Hi,
    you need to raise the exeption NO_MORE_DATA at the end of the fm in case there is no more data available in your internal tables.
    Here the code:
    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.
    if e_t_data[] is initial.   ***********
      raise no_more_data. ************
    endif.                         ************
    ENDIF. "Initialization mode or data extraction ?
    ENDFUNCTION.
    That should do the trick.
    regards
    Siggi

  • Function Module for F1 help

    Hi all!
    I want to know the function module to create your own F1 help.
    Please Help me Out

    U can use FMs 'DSYS_SHOW_FOR_F1HELP'/1.     HELP_OBJECT_SHOW_FOR_FIELD /HELP_OBJECT_SHOW
    Example:
    REPORT  ZGB_TEST_SEARCH_HELP                    .
    INTERNAL TABLE FOR STORING NAMES IN SELECTION LIST
    data: begin of t_itab occurs 0,
            name(10) type c,
          end of t_itab.
    *FIELDNAME AND TAB NAME FOR THE SELECTION
    DATA :field_tab LIKE dfies  OCCURS 0 WITH HEADER LINE.
    *THE TABLE FOR RETURNING THE NAME OF THE SELECTED ITEM
    DATA : return_tab LIKE ddshretval OCCURS 0 WITH HEADER LINE.
    *START THE SELECTION SCREEN BLOCK
    selection-screen begin of block ss1 with frame.
    parameters: p_name1(10) type c.
    selection-screen end of block ss1.
    *& F4 Help for p_name1                                                 *
    at selection-screen on value-request for p_name1.
    *CLEAR ALL EXISTING DATA
    *TO BE DONE EVERYTIME F4 HELP IS REQUESTED
    REFRESH t_itab.
    REFRESH field_tab.
      field_tab-fieldname = 'ERNAM'.
      field_tab-tabname = 'VBAK'.
    APPEND field_tab.
    t_itab-name = 'Andrews'.
    append t_itab.
    t_itab-name = 'Jennie'.
    append t_itab.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = field_tab-fieldname
      PVALKEY                = ' '
      DYNPPROG               = ' '
      DYNPNR                 = ' '
      DYNPROFIELD            = ' '
      STEPL                  = 0
        WINDOW_TITLE           = 'Select name'
      VALUE                  = ' '
      VALUE_ORG              = 'C'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = ' '
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      MARK_TAB               =
    IMPORTING
      USER_RESET             =
      tables
       value_tab              = t_itab
       FIELD_TAB              = field_tab
       RETURN_TAB             = return_tab
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
             WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    else.
    p_name1 = return_tab-fieldval.
    ENDIF.
    *& F1 Help for p_name1                                                 *
    at selection-screen on help-request for p_name1.
    CALL FUNCTION 'DSYS_SHOW_FOR_F1HELP'
      EXPORTING
      APPLICATION              = 'SO70'
        dokclass                 = 'TX'
        DOKLANGU                 = SY-LANGU
        dokname                  = 'Z_GAURAB_DEMO'
      DOKTITLE                 = 'This appears as bold title'
      HOMETEXT                 = ' '
      OUTLINE                  = ' '
      VIEWNAME                 = 'STANDARD'
      Z_ORIGINAL_OUTLINE       = ' '
      CALLED_FROM_SO70         = ' '
      SHORT_TEXT               = ' '
      APPENDIX                 = ' '
    IMPORTING
      APPL                     =
      PF03                     =
      PF15                     =
      PF12                     =
    EXCEPTIONS
       CLASS_UNKNOWN            = 1
       OBJECT_NOT_FOUND         = 2
       OTHERS                   = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards,
    Joy.

  • Function module for F4 help in ranges.

    The function module COMPLEX_SELECTIONS_DIALOG is used for providing the multiple selection popup screen for a particuler field.Now the problem is F4 help is not availble for each row in the multiselection pop up screen if the field refers to a custom table's field.But it is available if it refers to standard table.
    Please suggest if there is nayway to do this or is there any other alternative function module.
    Thanks!
    Savitha.

    Hi
    Have you assigned the CUSTOM table as a CHECK table against the fields of the row.
    Or declare as a master data table fields to see the F4 help.
    Or use the fun module F4IF_INT_TABLE_VALUE_REQUEST
    see the sample code
    See the following ex:
    TYPES: BEGIN OF TY_MBLNR,
    MBLNR LIKE MKPF-MBLNR,
    END OF TY_MBLNR.
    DATA: IT_MBLNR TYPE STANDARD TABLE OF TY_MBLNR WITH HEADER LINE.
    data: it_ret like ddshretval occurs 0 with header line.
    At selection-screen on value-request for s_mat-low.
    Select MBLNR from mkpf into table it_mblnr.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'MBLNR'
    PVALKEY = ' '
    DYNPPROG = ' '
    DYNPNR = ' '
    DYNPROFIELD = ' '
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'S'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    MARK_TAB =
    IMPORTING
    USER_RESET =
    TABLES
    VALUE_TAB = IT_MBLNR
    FIELD_TAB =
    RETURN_TAB = IT_RET
    DYNPFLD_MAPPING =
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    IF SY-SUBRC = 0.
    read table it_ret index 1.
    move it_ret-fieldval to S_mat-low.
    ENDIF.
    Go through the test program.
    REPORT Ztest_HELP .
    TABLES : MARA.
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS : P_MATNR(10) TYPE C.
    SELECTION-SCREEN END OF BLOCK B1.
    DATA : BEGIN OF ITAB OCCURS 0,
    MATNR TYPE MATNR,
    END OF ITAB.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_MATNR.
    SELECT MATNR
    FROM MARA
    INTO TABLE ITAB
    UP TO 10 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    RETFIELD = 'MATERIAL NUMBER'
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_MATNR'
    VALUE_ORG = 'S'
    TABLES
    VALUE_TAB = ITAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3. 
    Regards
    Anji

  • Clarification on some reading: Datasource and Function Module extraction

    Hi,
    I found a link on Help.sap which explains how to create a function module and I have some questions after my review:
    It basically uses function module to read some filght data from the table SPFLI
    1.
    I got into this research since one of the methods for data extraction from R3/ECC to BW is through Function Modules.
    Why couldn't that extraction be based on a view of the table SPFLI.
    i.e. why is this complication of writing an ABAP code to achieve something which could be done with a DB view or table?
    2.
    Any example or scenario where you think a datasource could NOT be created based on a table, Database View or Sap Query and that it must be done with a Function Module?
    3.
    So, once the function module is successfully created; how to do create a Datasource based on this function modeule to take care of the delta's on the source data?
    4.
    There was a discussion about "remote function call" which I did not get completely. Will extracting data from R3/ECC to BI be regarded as "remote call"
    Thanks

    1. Why couldn't that extraction be based on a view of the table SPFLI. i.e. why is this complication of writing an ABAP code to achieve something which could be done with a DB view or table?
    A DataSource could have been created directly from table SPFLI. It was used as an example in the case of the document is my guess. There are some table types, however, that you cannot create a DataSource directly off of.
    2. Any example or scenario where you think a datasource could NOT be created based on a table, Database View or Sap Query and that it must be done with a Function Module?
    Pool/Cluster tables cannot be directly read and therefore must use a Function Module for extraction. Another reason for using a Function Module, even against a single table, is in the case that you have more than one field that you want to create a generic delta against. SAP delivers the capability in the application to set a generic delta on only one field within the DataSource. If there is more than one, say created on and changed on dates, a Function Module is require in order to enable that.
    3. So, once the function module is successfully created; how to do create a Datasource based on this function modeule to take care of the delta's on the source data?
    Go to tocde RSO2, enter the DataSource name, click on the Create button. In the next screen, there are three buttons toward the top to tell what is the source of the DataSource: 1) Extraction from View (default); 2) Extraction from Query; and 3) Extraction from Function Module. When you click on the Extraction from Function Module button, the View/Table field will gray out and the Function Module and Extraction Structure fields will un-gray.
    4. There was a discussion about "remote function call" which I did not get completely. Will extracting data from R3/ECC to BI be regarded as "remote call"
    I think that this is referring to a process whereby you create a remote-enabled Function Module on the source R3/ECC system and then create an ABAP program in BW that calls that remote-enabled Function Module. Basically, the ABAP program on BW would send some parameters through to the remote-enabled Function Module on R3/ECC. The Function Module would extract data into an internal table and then pass that internal table back through to the ABAP program in BW for further processing.
    Edited by: Dennis Scoville on Aug 20, 2009 8:18 AM

Maybe you are looking for