Extracting data through fn module to smartforms

i am writing a select statement to extract the data from a table and that table i have to export to the smart form

See the following ex:
REPORT  zfi_credit_note  MESSAGE-ID       00.
*--- Table declaration
TABLES: bseg,
        t001,
        bkpf.
TYPES: BEGIN OF TY_DOC.
        INCLUDE STRUCTURE ZFI_CREDIT_NOTE.
TYPES: END OF TY_DOC.
*--- Data declaration
DATA: t_ssfcrescl TYPE ssfcrescl,
      t_ssfctrlop TYPE ssfctrlop,
      g_subrc     LIKE sy-subrc,
      fname       TYPE rs38l_fnam.
DATA: IT_DOC TYPE STANDARD TABLE OF TY_DOC WITH HEADER LINE.
SELECTION-SCREEN
SELECTION-SCREEN: BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_bukrs LIKE bkpf-bukrs OBLIGATORY.
SELECT-OPTIONS: S_belnr FOR bkpf-belnr OBLIGATORY MATCHCODE OBJECT fmcj_fi_reference_debi.
PARAMETERS: p_gjahr LIKE bkpf-gjahr OBLIGATORY.
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN
Validate Company code
AT SELECTION-SCREEN ON p_bukrs.
  SELECT SINGLE * FROM t001 INTO t001
          WHERE bukrs EQ p_bukrs.
  IF sy-subrc NE 0.
    MESSAGE e368 WITH text-003.
  ENDIF.
Validate Document number
AT SELECTION-SCREEN ON S_belnr.
  SELECT SINGLE * FROM BKPF INTO BKPF
          WHERE bukrs EQ p_bukrs
            AND belnr IN S_belnr
            AND ( BLART = 'DG' or
                  BLART = 'ZN' ).
  IF sy-subrc NE 0.
    MESSAGE e368 WITH S_belnr ' ' text-002.
  ENDIF.
Validate Fiscal year
AT SELECTION-SCREEN ON p_gjahr.
  SELECT SINGLE * FROM bseg INTO bseg
          WHERE gjahr EQ p_gjahr.
  IF sy-subrc NE 0.
    MESSAGE e368 WITH text-004.
  ENDIF.
START-OF-SELECTION
START-OF-SELECTION.
  SELECT BELNR FROM BKPF INTO CORRESPONDING FIELDS OF TABLE IT_DOC WHERE BELNR IN S_BELNR.
Call Smart form
  CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
    EXPORTING
      formname           = 'ZCREDIT_NOTE'
    IMPORTING
      fm_name            = fname
    EXCEPTIONS
      no_form            = 1
      no_function_module = 2
      OTHERS             = 3.
  IF sy-subrc <> 0.
    MOVE sy-subrc TO g_subrc.
    CASE g_subrc.
      WHEN 1.
        MESSAGE e368 WITH 'No form exist'.
      WHEN 2.
        MESSAGE e368 WITH 'No Function Module'.
      WHEN OTHERS.
        " Do nothing.
    ENDCASE.
    EXIT.
  ENDIF.
  CALL FUNCTION fname
    EXPORTING
    ARCHIVE_INDEX              =
    ARCHIVE_INDEX_TAB          =
    ARCHIVE_PARAMETERS         =
     CONTROL_PARAMETERS         = t_ssfctrlop
    MAIL_APPL_OBJ              =
    MAIL_RECIPIENT             =
    MAIL_SENDER                =
    OUTPUT_OPTIONS             =
    USER_SETTINGS              = 'X'
      G_BUKRS                    = P_BUKRS
      G_GJAHR                    = P_GJAHR
  IMPORTING
    DOCUMENT_OUTPUT_INFO       =
     JOB_OUTPUT_INFO            = t_ssfcrescl
    JOB_OUTPUT_OPTIONS         =
    TABLES
      IT_DOC                     = IT_DOC
   EXCEPTIONS
     FORMATTING_ERROR           = 1
     INTERNAL_ERROR             = 2
     SEND_ERROR                 = 3
     USER_CANCELED              = 4
     OTHERS                     = 5
  IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

Similar Messages

  • Error in extracting data through function module

    Hi All
             Need  ur help .I am extracting data from crm thru function module.I have copied RSAX_BIW_GET_DATA_SIMPLE and modified it by using code.I am getting an error while testing extraction
    Structure I have created ztest_01
    Data Source :zmgc_ds1.
    There 3 crm tables from where data is picked crmd_orderadm_h,crmd_customer_h,crmd_order_index.
    I am attaching the code,can any body help me in correctring the error.Tell me if tthe placing of the code in the template is correct.please give details.
    Error which I got:
    An exception occurred that is explained in detail below.
    The exception, which is assigned to class 'CX_SY_DYN_CALL_ILLEGAL_FUNC', was
      not caught in
    procedure "RSA3_GET_DATA_SIMPLE" "(FUNCTION)", 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:
    The program "SAPLRSA3" contains the CALL FUNCTION statement.
    The name of the function module to be called is "ZRSAX_BIW_GET_DATA_SIMPLE_01"
    but "ZRSAX_BIW_GET_DATA_SIMPLE_01" cannot be found in its function group.
    Possible reasons:
    a) The function module "ZRSAX_BIW_GET_DATA_SIMPLE_01" has not been activated.
      Therefore,
        it cannot be found at runtime.
    b) The Function Library contains an incorrect entry for
      "ZRSAX_BIW_GET_DATA_SIMPLE_01".
    c) The function module contains no code, even FUNCTION ... ENDFUNCTION
        is missing.
    You help would be appreciated.
    Don't worry about points,.

    Did you create your function module without problems...assigned the Z* function group? activate the function module? i assume that you copy the function module code and the variables definition on TOP include of RSAX_BIW_GET_DATA_SIMPLE
    Regards
    Message was edited by:
            Oscar Díaz

  • Error while extracting data using function module

    Hello,
    I created one generic datasource and i want to extract data with the option "Extraction by Function Module".
    But when i specified function module name and was trying to save, it thrown a error message saying
    'The specified table does not exist'.
    What could be the reason?
    Please help me out.
    Thanks,
    Regards,
    Steve

    Hi Steve,
       Once you execute T.Code RSO2, you need to fill in the details and click Create, specify the Appl. Component and in Extraction by Function Module, give Function Module name and Extrct Structure in the given boxes.
    "This structure is used by a DataSource that was created using the transaction RSO2 (generic extraction) and selects data using a function module.
    The data must be transferred from this function module to an interface table E_T_DATA."
    I'll try to comeup with small piece of code to sort your issue.
    Hope it helps!!!!
    Amit

  • Binding Data through function module in adobe to display charts

    Hello Gurus,
    This is the requirement :-
    Through function module output i have to display the chart.
    For ex:-In sales order transaction there is a field called status.For every order there is status (open, complete, inprocess). Display the chart based on the order status that how many open, complete and inprocess are there.
    Thanks,
    Karan

    post Adobe related questions to RIA forum at
    User Interface Technology

  • Is it possible to define multiple Initial Extract Date' for Different modules ? INITIAL_EXTRACT_DATE

    HI
    We are configuring BI Apps 11.1.1.7.1 For HRMS and Financials.  HRMS data should extract from  '2010-01-01' and Financials Data should extract from '2012-01-01'
    is it possible?
    Source system: EBS 12.1.3
    OBIEE: 11.1.1.7
    BI APPS: 11.1.1.7.1
    ODI: 11.1.1.7.0
    OS: Windows server 2008 R2
    by default 'Configure Initial Extract Date' to set the value of INITIAL_EXTRACT_DATE to '2005-01-01'.
    http://docs.oracle.com/cd/E28271_01/fusionapps.1111/e16814/overview.htm
    Regards
    Sher ullah

    HI Srini VEERAVALLI
    ITs confusing point. Cause on Configuration manager i am able to see 'Initial Extract Date' for HRMS also and in Financials also.
    I created two separate Implementation projects respectively HRMS and Financials. so whether 'Initial Extract Date' can be setted Different for both.
    Regards
    Sher

  • Delta extraction(date) with Function module problem

    Hi All,
    FUNCTION zrsax_biw_get_data_pr_d.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SBIWA_S_INTERFACE-REQUNR
    *"     VALUE(I_ISOURCE) TYPE  SBIWA_S_INTERFACE-ISOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SBIWA_S_INTERFACE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SBIWA_S_INTERFACE-INITFLAG OPTIONAL
    *"     VALUE(I_UPDMODE) TYPE  SBIWA_S_INTERFACE-UPDMODE OPTIONAL
    *"     VALUE(I_DATAPAKID) TYPE  SBIWA_S_INTERFACE-DATAPAKID OPTIONAL
    *"     VALUE(I_PRIVATE_MODE) OPTIONAL
    *"     VALUE(I_CALLMODE) LIKE  ROARCHD200-CALLMODE OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SBIWA_T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SBIWA_T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  ZPR_ST OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    * The input parameter I_DATAPAKID is not supported yet !
    * Example: InfoSource containing TADIR objects
    *  TABLES: tadir.
    *DATA: BEGIN OF zpr_st_copy,
    *        banfn TYPE zpr_st-banfn,
    *        bnfpo TYPE zpr_st-bnfpo,
    *        zebkn TYPE zpr_st-zebkn,
    *        knttp TYPE zpr_st-knttp,
    *        vbeln TYPE zpr_st-vbeln,
    *        ps_psp_pnr TYPE zpr_st-ps_psp_pnr,
    *        gsber TYPE zpr_st-gsber,
    *        werks TYPE zpr_st-werks,
    *        statu TYPE zpr_st-statu,
    *        ekgrp TYPE zpr_st-ekgrp,
    *        menge TYPE zpr_st-menge,
    *        frgdt TYPE zpr_st-frgdt,
    *        meins TYPE zpr_st-meins,
    *         loekz TYPE zpr_st-loekz,
    *      END OF zpr_st_copy.
    * 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.
    * Select ranges
    *  RANGES: l_r_pgmid  FOR tadir-pgmid,
    *          l_r_object FOR tadir-object,
        RANGES: PRNO for zpr_st-banfn,
                DATE1 FOR zpr_st-frgdt.
    * Parameter I_PRIVATE_MODE:
    * Some applications might want to use this function module for other
    * purposes as well (e.g. data supply for OLTP reporting tools). If the
    * processing logic has to be different in this case, use the optional
    * parameter I_PRIVATE_MODE (not supplied by BIW !) to distinguish
    * between BIW calls (I_PRIVATE_MODE = SPACE) and other calls
    * (I_PRIVATE_MODE = X).
    * If the message handling has to be different as well, define Your own
    * messaging macro which interprets parameter I_PRIVATE_MODE. When
    * called by BIW, it should use the LOG_WRITE macro, otherwise do what
    * You want.
    * Initialization mode (first call by SAPI) or data transfer mode
    * (following calls) ?
      IF i_initflag = sbiwa_c_flag_on.
    * Initialization: check input parameters
    *                 buffer input parameters
    *                 prepare data selection
    * The input parameter I_DATAPAKID is not supported yet !
    * Invalid second initialization call -> error exit
        IF NOT g_flag_interface_initialized IS INITIAL.
          IF 1 = 2. MESSAGE e008(r3). ENDIF.
          log_write 'E'                    "message type
                    'R3'                   "message class
                    '008'                  "message number
                    ' '                    "message variable 1
                    ' '.                   "message variable 2
          RAISE error_passed_to_mess_handler.
        ENDIF.
    * Check InfoSource validity
        CASE i_isource.
          WHEN 'ZPR_ST_DS_D' OR ''.
          WHEN OTHERS.
            IF 1 = 2. MESSAGE e009(r3). ENDIF.
            log_write 'E'                  "message type
                      'R3'                 "message class
                      '009'                "message number
                      i_isource            "message variable 1
                      ' '.                 "message variable 2
            RAISE error_passed_to_mess_handler.
        ENDCASE.
    * Check for supported update mode
        CASE i_updmode.
          WHEN 'F' OR ''.
          WHEN 'C'.
          WHEN 'R'.
          WHEN 'S'. " DELTA INITIALIZATION
          WHEN 'I'. "DELTA INITIALIZATION FOR NON CUMULATIVE
          WHEN 'D'. "DELTA
          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.
    BREAK-POINT.
    * Check for obligatory selection criteria
    *    READ TABLE i_t_select INTO l_s_select WITH KEY fieldnm = 'ZPR_ST-FRGDT'.
    *    IF sy-subrc <> 0.
    *      IF 1 = 2. MESSAGE e010(r3). ENDIF.
    *      log_write 'E'                    "message type
    *                'R3'                   "message class
    *                '010'                  "message number
    *                'PGMID'                "message variable 1
    *                ' '.                   "message variable 2
    *      RAISE error_passed_to_mess_handler.
    *    ENDIF.
        APPEND LINES OF i_t_select TO g_t_select.
    * Fill parameter buffer for data extraction calls
        g_s_interface-requnr    = i_requnr.
        g_s_interface-isource   = i_isource.
        g_s_interface-maxsize   = i_maxsize.
        g_s_interface-initflag  = i_initflag.
        g_s_interface-updmode   = i_updmode.
        g_s_interface-datapakid = i_datapakid.
        g_flag_interface_initialized = sbiwa_c_flag_on.
    * Fill field list table for an optimized select statement
    * (in case that there is no 1:1 relation between InfoSource fields
    * and database table fields this may be far from beeing trivial)
        APPEND LINES OF i_t_fields TO g_t_segfields.
    *   Start tracing of extraction
    *    bice_trace_open g_r_tracer i_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 g_counter_datapakid = 0.
    * Fill range tables for fixed InfoSources. In the case of generated
    * InfoSources, the usage of a dynamical SELECT statement might be
    * more reasonable. BIW will only pass down simple selection criteria
    * of the type SIGN = 'I' and OPTION = 'EQ' or OPTION = 'BT'.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'PGMID'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_pgmid.
    *        APPEND l_r_pgmid.
    *      ENDLOOP.
    *      LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'OBJECT'.
    *        MOVE-CORRESPONDING l_s_select TO l_r_object.
    *        APPEND l_r_object.
    *      ENDLOOP.
    LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'ZPR_ST-FRGDT'.
                MOVE-CORRESPONDING l_s_select to DATE1.
                DATE1-sign = 'I'.
                DATE1-option = 'GE'.
                clear DATE1-high.
                APPEND DATE1.
          ENDLOOP.
    * Determine number of database records to be read per FETCH statement
    * from input parameter I_MAXSIZE. If there is a one to one relation
    * between InfoSource table lines and database entries, this is trivial.
    * In other cases, it may be impossible and some estimated value has to
    * be determined.
          l_maxsize = g_s_interface-maxsize.
          OPEN CURSOR WITH HOLD g_cursor FOR
    *      SELECT (g_t_fields) FROM tadir
    *                               WHERE pgmid  IN l_r_pgmid AND
    *                                     object IN l_r_object.    "#EC CI_GENBUFF
    *@ CODE FOR THE STRUCTURE TO FILL IN FROM EBAN AND EBKN@*
                SELECT a~banfn a~bnfpo k~zebkn a~knttp k~vbeln k~ps_psp_pnr k~gsber a~werks a~statu a~ekgrp a~menge a~menge a~frgdt a~meins
    * INTO CORRESPONDING FIELDS OF TABLE IT1
                FROM  eban AS a INNER JOIN ebkn AS k ON ( a~banfn = k~banfn AND a~bnfpo = k~bnfpo )
                WHERE a~banfn GE '2000000000' AND a~banfn LE '2999999999' and a~loekz eq ' ' and a~frgdt ge '20130401' and a~FRGKZ eq '2'.
    *BREAK-POINT.
        ENDIF.                             "First data package ?
    * Fetch records into interface table. There are two different options:
    * - fixed interface table structure for fixed InfoSources have to be
    *   named E_T_'Name of assigned source structure in table ROIS'.
    * - for generating applications like LIS and CO-PA, the generic table
    *   E_T_DATA has to be used.
    * Only one of these interface types should be implemented in one API !
        FETCH NEXT CURSOR g_cursor
                   APPENDING CORRESPONDING FIELDS
                   OF TABLE e_t_DATA
                   PACKAGE SIZE l_maxsize.
        IF sy-subrc <> 0.
          CLOSE CURSOR g_cursor.
    *      bice_trace_close g_r_tracer.
          RAISE no_more_data.
        ENDIF.
    *    bice_collect_table g_r_tracer e_t_data.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.
    in the above I_t_fields and I_T_select structures  are not getting data .....
    can any one pleasee let me know what mistake i hvae done with my code?
    and i m unbale to change data source value to F1 if i am trying to change my function module and extract structure are disappearing....
    i m not getting why it is happening .......
    thank you
    vijay

    Hi yasemin,
       I m bit confused here with the line below
                                     IF i_initflag = sbiwa_c_flag_on.(if we pass 'X' then it will enter loop and checks for F or D and then assigns values to I_T_SELECT and I_T_Fields structure)
          accordfing to my code i feel it will work for any one not both(F or D).
    one more doubt rsax_biw_get_data extraction method is F2 few of them are asking to change to F1.
    so tried running a code then in RSO2 extact structure and FM both dissapeared i did not get why it happened ?
    can you please let me know why it happend
    thanks
    vijay

  • How to calculate system date through function module date

    Hi friends!!
    i declare a variable "date like sy-datum".
    now i want to add 15 days to the system date,
    please give me the function module name which can do it.
    xample.
    date = sytem date. -> date= 13/08/2010
    i want                          date= 28/08/2010.
    please help.
    Edited by: sandeep08 on Aug 13, 2010 1:53 PM
    Moderator message: date calculation questions = FAQ, please search before posting.
    locked by: Thomas Zloch on Aug 13, 2010 2:03 PM

    Hi,
    You can directly add 15 to the date. It will give you appropriate results.
    Regards,
    Aparna Alashe.

  • Extract data on forms9i through ODBC/systemDSN

    Im trying to extract data through system DSN using ODBC utility on
    forms 9i , i'll be grateful if anyone help me that how can i connect to ODBC/system DSN on forms9i and inform me in this regard.
    Asim

    Well yeah,
    That's what I have done actually (I just forgot to update this thread).
    I was actually able to create views over informix tables with serial data type, using a cast to integer, and then, I was able to extract data from those informix tables.
    Indeed, the DI documentation states that the serial datatype in informix is not supported in DI...
    I just wonder how I could solve that if I hadn't the right to create views in the production database....
    Any thoughts ?

  • % Wildcard selection - extract data via Query as a Web Service

    Hello all,
    I am using Query as a Web Service to extract data through to my Xcelsius document. I have a series of charts that display summed data according to user selections within some combo boxes.
    Is there any way to send through a wildcard selection, i.e. pass a " like '%' " query string somehow through to the database?
    With the query that I have created:
    I have a measure value returned
    I have 4 filter objects
    I have selected the "Prompt" option for each
    Within the Data Manager, the prompt fields are assigned to cells which reference the combo box selections
    When I build the query, the selections available are many (equal to, not equal to, greater than, greater than or equal to, etc), but there is no 'like' comparison.
    Alternatively, is there a way that I can pass the selected parameter values, including " like '%' " if no value is selected within a dropdown, to the original measure calculations within the universe?
    I hope this makes sense, let me know if I need to clarify anything. Any help would be very much appreciated.
    Cheers,
    Marco

    Very easy solution - select 'matches pattern' within the filter objects selection when building the query.
    Don't know why I didn't try this earlier.

  • How to create delta extraction through function module?

    Hi all,
    So far i have created the data source through full load. But currently i would like to convert the couple of function module generic extraction converted through delta.
    Can anyone let me know how to convert from full load to delta using generic extraction
    thanks

    Hi,
    Try these Links, helps u in getting an idea.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30aefb04-7043-2c10-8e92-941536eebc79?QuickLink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30f1a423-02ae-2e10-bd85-bde64e61fe7b?QuickLink=index&overridelayout=true&51947629650864
    Regards,
    Aravind.

  • Hi guru i want "lo-cockpit" in bw-3.5 steps to extract data mm-module

    hi guru,
              can any one help me in sending the "lo-cockpit" from bw-3.5 steps to exctract data from mm-module with navigation steps with scenarios
    so that it can help me
    Thanks n Regards
    srinivas

    Hi,
    I think below steps will help you.
    LO Cockpit Step By Step
    Here is LO Cockpit Step By Step
    LO EXTRACTION
    u2022     Go to Transaction LBWE (LO Customizing Cockpit)
    1). Select Logistics Application
    SD Sales BW
    Extract Structures
    2). Select the desired Extract Structure and deactivate it first.
    3). Give the Transport Request number and continue
    4). Click on `Maintenance' to maintain such Extract Structure
    Select the fields of your choice and continue
    Maintain DataSource if needed
    5). Activate the extract structure
    6). Give the Transport Request number and continue
    u2022     Next step is to Delete the setup tables
    7). Go to T-Code SBIW
    8). Select Business Information Warehouse
    i. Setting for Application-Specific Datasources
    ii. Logistics
    iii. Managing Extract Structures
    iv. Initialization
    v. Delete the content of Setup tables (T-Code LBWG)
    vi. Select the application (01 u2013 Sales & Distribution) and Execute
    u2022     Now, Fill the Setup tables
    9). Select Business Information Warehouse
    i. Setting for Application-Specific Datasources
    ii. Logistics
    iii. Managing Extract Structures
    iv. Initialization
    v. Filling the Setup tables
    vi. Application-Specific Setup of statistical data
    vii. SD Sales Orders u2013 Perform Setup (T-Code OLI7BW)
    Specify a Run Name and time and Date (put future date)
    Execute
    u2022     Check the data in Setup tables at RSA3
    u2022     Replicate the DataSource
    Use of setup tables:
    You should fill the setup table in the R/3 system and extract the data to BW - the setup tables is in SBIW - after that you can do delta extractions by initialize the extractor.
    Full loads are always taken from the setup tables
    With Compliments by: Chits
    Fast Links:
    Get help for your SAP BW problems
    Do you have a SAP BW Question?
    SAP Books
    SAP Business Warehouse, Functional, Basis Administration and ABAP Programming Reference Books
    SAP BW Tips
    SAP BW Tips and Business Information Warehouse Discussion Forum
    Best regards,
    SAP Basis, ABAP Programming and Other IMG Stuff
    http://www.sap-img.com
    All the site contents are Copyright © www.sap-img.com and the content authors. All rights reserved.
    All product names are trademarks of their respective companies. The site www.sap-img.com is in no way affiliated with SAP AG.
    Every effort is made to ensure the content integrity. Information used on this site is at your own risk.
    The content on this site may not be reproduced or redistributed without the express written permission of
    www.sap-img.com or the content authors.
    2.
    LO
    LO Cockpit (Use transaction LBWE)
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/u/21406 [original link is broken]
    To understand LO extraction go through these weblogs by Roberto
    /people/sap.user72/blog/2004/12/16/logistic-cockpit-delta-mechanism--episode-one-v3-update-the-145serializer146
    step by step procedure
    http://www.sap-img.com/business/lo-cockpit-step-by-step.htm
    LO EXTRACTION
    As a prerequisite first Go to RSA9 and transfer application component hierarcy node.Then transfer the required BC DS from RSA5.
    http://help.sap.com/saphelp_nw04s/helpdata/en/b3/c30a0e9c44204eb596c6353c827d2e/frameset.htm
    Go to Transaction LBWE (LO Customizing Cockpit)
    1). Select Logistics Application
    SD Sales BW
    Extract Structures
    2). Select the desired Extract Structure and deactivate it first.
    3). Give the Transport Request number and continue
    4). Click on `Maintenance' to maintain such Extract Structure
    Select the fields of your choice and continue
    Maintain DataSource if needed
    5). Activate the extract structure
    6). Give the Transport Request number and continue
    Next step is to Delete the setup tables
    7). Go to Transaction SBIW
    8). Select Business Information Warehouse
    i. Setting for Application-Specific Datasources
    ii. Logistics
    iii. Managing Extract Structures
    iv. Initialization
    v. Delete the content of Setup tables (Transaction LBWG)
    vi. Select the application (01 u2013 Sales & Distribution) and Execute
    Now, Fill the Setup tables
    9). Select Business Information Warehouse
    i. Setting for Application-Specific Datasources
    ii. Logistics
    iii. Managing Extract Structures
    iv. Initialization
    v. Filling the Setup tables
    vi. Application-Specific Setup of statistical data
    vii. SD Sales Orders u2013 Perform Setup (Transaction OLI7BW)
    Specify a Run Name and time and Date (put future date)
    Execute
    Check the data in Setup tables at RSA3
    Replicate the DataSource
    and then follow the standard procedure.
    Hope this help

  • Generic Extraction business Requirement, through function module,

    Generic Extraction business Requirement, specifically through function module and source code in function module.

    Dear Karthik,
    Go to transaction SBIW -> Generic Datasource -> Maintain Generic Datasources -> Choose Master/Transaction Data -> Maintain proper entries (Application Component, Descriptions) -> Extraction by FM if you want to extract using FM.
    Maintaining Generic DataSources - Independently of application, you can create and maintain generic DataSources for transaction data, master data attributes or texts from any kinds of transparent tables, database views, InfoSets of the SAP query or using a function module. As a result, you can make use of the generic extraction of data.
    Creating a Generic DataSource
           1.      Select the DataSource type and give it a technical name.
           2.      Choose Create. The creating a generic DataSource screen appears.
           3.      Choose an application component to which the DataSource is to be assigned.
           4.      Enter the descriptive texts. You can choose any text.
           5.      Choose from which datasets the generic DataSource is to be filled.
                                a.      Choose Extraction from View, if you want to extract data from a transparent table or a database view. Enter the name of the table or the database view.
    After generation, you get a DataSource whose extract structure is congruent with the database view or the transparent table view.
    For more information about creating and maintaining database views and tables, see the ABAP Dictionary Documentation.
                                b.      Choose Extraction from Query, if you want to use a SAP query InfoSet as the data source. Select the required InfoSet from the InfoSet catalog.
    After generation, you now have a DataSource whose extract structure matches the InfoSet.
    For more information about maintaining the InfoSet, see the System Administration documentation.
                                c.      Choose Extraction using FM, if you want to extract data using a function module. Enter the function module and extract structure.
    The data must be transferred by the function module in an interface table E_T_DATA.
    For information about the function library, see the ABAP Workbench: Tools documentation.
                                d.      With texts, you also have the option of extraction from domain fixed values.
    Maintain the settings for delta transfer where appropriate.
           7.      Choose Save.
    Note when extracting from a transparent table or view:
    If the extract structure contains a key figure field, that references to a unit of measure or currency unit field, this unit field must appear in the same extract structure as the key figure field.
    A screen appears in which you can edit the fields of the extract structure.
           8.      Editing the DataSource:
           Selection
    When scheduling a data  request in the BW Scheduler, you can enter the selection criteria for the data transfer. For example, you may want to determine that data requests are only to apply to data from the previous month.
    If you set the Selection indicator for a field within the extract structure, the data for this field is transferred in correspondence with the selection criteria in the scheduler.
           Hide field
    You should set this indicator to exclude an extract structure field from the data transfer. As a result of your action, the field is no longer made available in BW when setting the transfer rules and generating the transfer structure.
           Inversion
    Reverse postings are possible for customer-defined key figures. For this reason, inversion is only possible for certain transaction data DataSources. These include DataSources that have a field that is indicated as an inversion field, for example, the field update mode in the DataSource 0FI_AP_3. If this field has a value, then the data records are interpreted as reverse records in BW.
    Set the Inversion indicator if you want to carry out a reverse posting for a customer-defined field (key figure). The value of the key figure is then transferred in inverted form (multiplied by –1) into BW.
           Field only known in exit
    You can enhance data by extending the extract structure for a DataSource using fields in append structures.
    The indicator Field only known in Exit is set for fields of an append structure. In other words, by default these fields are not passed onto the extractor from the field list and selection table.
    Deselect the indicator Field Only Known in Exit to enable the Service API to pass on the append structure field to the extractor together with the fields of the delivered extract structures in the field list as well as in the selection table.
    9. Choose DataSource -> Generate.
    The DataSource is now saved in the source system.
    Maintaining Generic DataSources
    ·        Change the DataSource
    To change a generic DataSource, in the initial screen of DataSource maintenance, enter the name of the DataSource and choose Change.
    You can change the assignment of a DataSource to an application component as well as the texts of a DataSource. Double-clicking on the name of the table, view, InfoSet or extract structure takes you to the appropriate maintenance screen. Here you can make changes required to add new fields. You can fully swap transparent tables and database views, but not InfoSets. If you return to the DataSource maintenance and choose Create, the screen for editing a DataSource appears. To save the DataSource in the SAP source system, choose DataSource  -> Generate.
    If you want to test extraction in the source system independently of a BW system, choose DataSource  ->  Test Extraction.
    ·        Delta DataSource
    In the Change Generic DataSource screen, you can delete any DataSources that are no longer relevant. If you are extracting data from an InfoSet, delete the associated query. If you want to delete a DataSource, this must not be connected to a BW system.
    Also visit :[Data Extraction from SAP Source System | http://help.sap.com/saphelp_nw04/helpdata/en/28/4c553c42360a40e10000000a114084/content.htm]
    Regards,
    Naveen.

  • How to extract data from generic view and function module

    hi experts,
    can anybody give me the steps to extract data from generic view and  functon modules.
    thanks and regards
    venkat

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    https://websmp103.sap-ag.de/~sapidb/011000358700007535452002
    Hope it Helps
    Chetan
    @CP..

  • Extracting data from Essbase & loading into flat file through ODI

    Hi,
    I want to extract data from Essbase and load it into a flat file through ODI(for extraction from essbase I'm using a report script) and I’m using these KM’s:- LKM Hyperion Essbase data to SQL,IKM SQL to FILE Append & for reversing I’m using RKM Hyperion Essbase.All the mappings have been done and the interface has been made. But when I’m executing the interface it is throwing the error below:-
    ODI-1217: Session ESS_FILEI (114001) fails with return code 7000.
    ODI-1226: Step ESS_FILEI fails after 1 attempt(s).
    ODI-1240: Flow ESS_FILEI fails while performing a Loading operation. This flow loads target table ESS_FILE.
    ODI-1228: Task SrcSet0 (Loading) fails on the target FILE connection FILE_PS_ODI.
    Caused By: java.sql.SQLException: ODI-40417: An IOException was caught while creating the file saying The system cannot find the path specified
    at com.sunopsis.jdbc.driver.file.impl.commands.CommandCreateTable.execute(CommandCreateTable.java:62)
    at com.sunopsis.jdbc.driver.file.CommandExecutor.executeCommand(CommandExecutor.java:33)
    at com.sunopsis.jdbc.driver.file.FilePreparedStatement.execute(FilePreparedStatement.java:178)
    at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:163)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
    at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
    at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2906)
    at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2609)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:537)
    at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:453)
    at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:1740)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:338)
    at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:214)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:272)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:263)
    at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:822)
    at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:123)
    at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
    at java.lang.Thread.run(Thread.java:619)
    Please let me know what I'm missing and how I can resolve this error.
    Thanks

    It seems that you are trying to use the file as your staging areas. Hyperion LKM extracts essbase data into a DB staging area which can then be used by your file IKM to load it into file.
    You need to use a RDBMS for your staging area.

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

Maybe you are looking for