Generic Extractor Messages

Hi, I'm looking to put messages into the Monitor during Generic extractor.  In the template they use the LOG_WRITE macro which puts out entries into the SLG1 Application Logs.  I am using this, but I think it puts out to the application log only and not the monitor. 
1. What do I have to do to output incoming record errors to the Monitor and show up as errors in PSA?
2. I notice some strange code "IF 1 = 2. MESSAGE E009(R3).  ENDIF.
What would this be for?
Aswer: This is for maintenance reasons.  Executing a where-used for this message number will return a hit if this is in place.  If only the LOG_WRITE is in place then a where-used for this message number would not produce a hit.
Found the answer here:
http://ezinearticles.com/?SAP-If-1=2What-Is-This-Code-About?&id=937994
Thanks,

Hi,
To put the records in error use the below:
    DATA:
      MONITOR_REC    TYPE rsmonitor.
IF <condition>.
else.
MONITOR_REC-MSGID = 'RSM'.
      MONITOR_REC-MSGTY = 'E'.
      MONITOR_REC-MSGNO = '799'.
      MONITOR_REC-MSGV1 =
'No value found in the source field'.
      ENDIF.
-Vikram

Similar Messages

  • Delta fo Generic extractor using function module

    Hi,
    I am using the following function module for generic extractor but its always showing me extraction error.Could anyone please suggest to resolve the issue.
    Thanks in advance fo rsuggestion.
    FUNCTION Z_BW_SALESDATA_EXTRACT_CHNG2.
    ""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 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 !
    Example: InfoSource containing TADIR objects
      TABLES: VBFA,VBRK,tadir.
    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.
    user defined variables.
      DATA : X_UPDMODE(1) Type c,        " Update Type
            X_LastUpdate Like Sy-Datum. " Last Update Date
             X_LastUpdate TYPE RODELTAID. " Last Update Date   "TCS_KAP
    Select ranges
      RANGES: L_R_VBELN   FOR VBAK-VBELN,
              L_R_AUDAT   FOR VBAK-AUDAT.
    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 'Z_BW_SDDATA_CREATEON'.
          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.
         WHEN 'F'.
         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.
    Check for obligatory selection criteria
       READ TABLE i_t_select INTO l_s_select WITH KEY fieldnm = 'VBELN'.
       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.
    Store Update mode in static variable...
       X_UPDMODE = I_UPDMODE.
        Select Single DELTAID
               Into   X_LastUpdate
               From   ROOSGENDLM
               Where  OLTPSOURCE = 'Z_BW_SDDATA_CREATEON'.
        If X_LastUpdate Is Initial.
          X_LastUpdate = '19800101'. " The oldest..., this should not happen
        Endif.
    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.
      ELSE.                 "Initialization mode or data extraction ?
    Data transfer: First Call      OPEN CURSOR + FETCH
                   Following Calls FETCH only
    X_UPDMODE = I_UPDMODE.
    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 = 'VBELN'.
            MOVE-CORRESPONDING l_s_select TO L_R_VBELN.
            APPEND L_R_VBELN.
          ENDLOOP.
          LOOP AT g_t_select INTO l_s_select WHERE fieldnm = 'AUDAT'.
            MOVE-CORRESPONDING l_s_select TO L_R_AUDAT.
            APPEND L_R_AUDAT.
          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.
    *added by Yogesh
          DELETE FROM ZBWSALEDATA.
    *ended by Yogesh
          l_maxsize = g_s_interface-maxsize.
    Check for supported update mode
          CASE X_UPDMODE.
            WHEN 'F' Or 'I'. " Full or Init
    **get sales orders
              SELECT *
                           INTO CORRESPONDING FIELDS OF TABLE I_SALESDATA
                           FROM VBAK AS K
                           INNER JOIN VBAP AS P
                                 ON  PVBELN = KVBELN
                           WHERE K~VBELN IN L_R_VBELN
                           AND   K~AUDAT IN L_R_AUDAT
                           AND   K~VBTYP = 'C'.
              IF I_SALESDATA[] IS NOT INITIAL.
                PERFORM F_GET_DATA.                   "get data
                PERFORM F_DEL_VATCOND.                "delete vat conditions
                PERFORM F_GET_TAR_COSTUNIT.           "get tariff cost unit
                PERFORM F_GET_NETVAL TABLES IT_VBDPA1. "get net val of the item
                PERFORM F_GET_SALESDATA.
    *write perform with name F_INSERT_DB_ZBWSALEDATA.
                PERFORM F_INSERT_DB_ZBWSALEDATA.      "insert into table ZBWSALESDATA
               LOOP AT I_SALESDATA WHERE NETPR = 0.
                 MOVE-CORRESPONDING I_SALESDATA TO I_SALESDATA_FIN.
                 APPEND I_SALESDATA_FIN.
               ENDLOOP.
               SORT I_SALESDATA_FIN BY VBELN POSNR KSCHL.
               DELETE ADJACENT DUPLICATES FROM I_SALESDATA_FIN
                                               COMPARING VBELN POSNR
                                                         KSCHL.
               INSERT ZBWSALEDATA FROM TABLE I_SALESDATA_FIN.
              ENDIF.
            WHEN 'D'. " Delta
              SELECT *
                             INTO CORRESPONDING FIELDS OF TABLE I_SALESDATA
                             FROM VBAK AS K
                             INNER JOIN VBAP AS P
                                   ON  PVBELN = KVBELN
                            WHERE K~ERDAT >= X_LastUpdate
                             WHERE K~ERDAT >= X_LastUpdate+0(8)          "TCS_KAP
                             AND   K~VBTYP = 'C'.
              IF I_SALESDATA[] IS NOT INITIAL.
                PERFORM F_GET_DATA.                   "get data
                PERFORM F_DEL_VATCOND.                "delete vat conditions
                PERFORM F_GET_TAR_COSTUNIT.           "get tariff cost unit
                PERFORM F_GET_NETVAL TABLES IT_VBDPA1. "get net val of the item
                PERFORM F_GET_SALESDATA.
    *write perform with name F_INSERT_DB_ZBWSALEDATA.
                PERFORM F_INSERT_DB_ZBWSALEDATA.      "insert into table ZBWSALESDATA
               LOOP AT I_SALESDATA WHERE NETPR = 0.
                 MOVE-CORRESPONDING I_SALESDATA TO I_SALESDATA_FIN.
                 APPEND I_SALESDATA_FIN.
               ENDLOOP.
               SORT I_SALESDATA_FIN BY VBELN POSNR KSCHL.
               DELETE ADJACENT DUPLICATES FROM I_SALESDATA_FIN
                                               COMPARING VBELN POSNR
                                                         KSCHL.
               INSERT ZBWSALEDATA FROM TABLE I_SALESDATA_FIN.
              ENDIF.
            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.
    **end get sales orders
          OPEN CURSOR WITH HOLD g_cursor FOR
          SELECT (g_t_fields) FROM ZBWSALEDATA.
         WHERE pgmid  IN l_r_pgmid AND
                                        object IN l_r_object.
        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.
          RAISE no_more_data.
        ENDIF.
        g_counter_datapakid = g_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    Best regards,
    Yogesh

    Dear Yogesh,
    Try to debug the code by putting a break point at select statement...is the FM Syntactically correct ??
    Check the Select statements..if all fields are not required avoid using Select * , and use always for all entries rather than JOINS..
    Note : For Joins you have to specify the Fields in the Select...Dont use Select * ....
    Hope it helps..
    Thanks,
    Krish

  • Problem in creating a Generic Extractor on a custom 'Z' table

    This is regarding an earlier question I posted in sdn today. I am trying to create a generic extractor on a custom 'Z' table and iam getting the following message.
    Invalid extract structure template YBW_Z3PVR of DataSource YCNA_3PVAR_RPT
    Message no. R8359
    Diagnosis
    You tried to generate an extract structure with the template structure Z3PVR. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table.
    Procedure
    Use the template structure to create a view or DDIC structure that does not contain the inadmissable fields.
    Please advise. how do i solve this?

    Hi there,
    Is your Z* table working? It must be add check field for quantity field and currency field.
    Hope this helps.

  • Error while creating Generic Extractor via Function Module

    Hello Guys
    I have created a Generic Extractor through a Function Module. I took the Standard FM: RSAX_BIW_GET_DATA_SIMPLE, gave it a new name and activated it. I made a few changes in it, like giving my structure name for E_T_DATA and giving the list of tables, from where I need to get the data. Then I created the datasource in RSO2 by giving this function module and the extract structure.
    The DS was created properly, but when I check in RSA3 for records, its giving me an error: ---> <b>The extraction program does not support object YCNA_INVY_TRNS</b>
    What do i do now? Can someone please tell me, what changes I need to make in the standard FM to suit my requirements??
    Thanks.

    Hi,
            Just try to reactivate the structure once again. And when you open the function module, if the problem still persists just try to press Return key several times. The message you are getting is just a warning message.
    PS: I am not sure whether this is the correct way, but i personally resolved this by pressing the ENTER key 4 or 5 times. So just give a try.
    Regards
    Sunil

  • How to Generate Information Errors in Generic Extractor Function Module

    Hi, In my Generic Extractor logic I am reaching out to an additional table to get a field.  I would like to produce an informational error or red error in the process monitor if I'm unable to get the field.  Is this possible?  How can I generate these messages in the Extractor Function Module?
    Thanks!

    Hi,
    Please go through the below doc. It explanins each and every step of creation of generic extractor through Function module.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?quicklink=index&overridelayout=true
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30aefb04-7043-2c10-8e92-941536eebc79?quicklink=index&overridelayout=true
    Regards,
    mahesh

  • Text load af vendor sub range - generic extractor

    Hello BW experts,
    I have created a generic extractor for transfering vendor sub range texts into the text table of an info object. However the text doen't end up in the table..
    It transfers all included lines in the source table to BW, but I get the error message that some posts are duplicate in the PSA. Nothing ends up in the destination table... Can certain lines be erased in the PSA? Could this really be the reason for the difficulties to load?
    Please help!!!
    BR,
    Fredrik

    Hi Fredrik,
    In your InfoPackage > Processing tab > choose Only PSA and Update Subsequently into Data Targets and also Ignore Double Data Records. This way you will not get the duplicate entries error message and the data should load.
    Hope this helps...

  • Error when building a Generic Extractor

    When I try and build a Generic Extractor using the table S642 I get the following error:
    System setting does not allow changes to
    to object OSOA ZS642_INVENTORY          
    Why is this and how do I resolve? Thanks

    Hi Niten
    Can you try building generic extractor based on view.
    Create a view on table S642 and then based on this view create the generic datasource.
    Also the error message you are getting is system settings does not allow changes to object- is ZS642_INVENTORY the name of generic data source you are trying to create? I hope you have authorization to create generic datasource and system is open for changes.
    Hope this helps
    Regards
    Pradip

  • How to make a field as required fields in Generic extractor

    Hi!
    Can any one please let me know , how can i make a field mandatory in generic extractor. I am creating extractor using function module.
    Thanks
    Y

    Hi,
    You can do this in the FM i guess.When u capture the values from the section screen of the extractor check it that particular field is empty or not if its empty display an error message saying that field is compulsory.
    i.e where u do the filling of  range tables after that do a check for that field if its empty or not.
    Hope this helps.
    Ravi

  • Generic extractor OK in RSA3 but no result with IP

    Hi Gurus
    I have a generic extractor which runs well in RSA3 but when I call it with an IPAK the R/3 job (BI_REQ) runs forever and gives no result.
    This happens in full and delta mode.
    Any ideas ?
    Thanks

    Here is the main code.
    The idea is to use the input packet to create an output packet with the same structure but different fields populated.
    FUNCTION zbw_biw_pricing.
    *"*"Interface locale :
    *"  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  ZBW_KONH OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    * DI.08.0055 Remontée prix VKPB
    *  'Delta hook' par BTE, voir transactions FINF, FIBF et
    *  MF Z_BW_BTE_DELTA_00503301_01 et Z_BW_BTE_DELTA_00503301_01_WRI
    *                         Création
    * Auteur: JWA                            Date: 30/04/2007
    * DataSource for view of Delta Q alimenté par le BTE
      TABLES: zbw_konh, usr01.
    * Auxiliary Selection criteria structure
      DATA: l_s_select TYPE srsc_s_select.
    * 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,
    * Vue 1 article actifs -> 1 GM
              t_mara     TYPE STANDARD TABLE OF zmatnr_matkl,
    * Vue 1 GM -> n articles actifs
              t_mara2     TYPE STANDARD TABLE OF zmatnr_matkl,
    * Vue 1 division -> 1 OA + 1 Société
              t_zvt001_wk TYPE STANDARD TABLE OF zvt001_wk,
    * Date de validité pricing
              w_datextract TYPE sydatum,
              w_separator TYPE zseparateur,
    * Data pour selections IP
         l_r_matnr TYPE STANDARD TABLE OF matnr_ran WITH HEADER LINE,
         l_r_werks TYPE STANDARD TABLE OF werks_ran WITH HEADER LINE,
         l_r_spart TYPE STANDARD TABLE OF spart_ran WITH HEADER LINE,
         l_r_matkl TYPE STANDARD TABLE OF matkl_ran WITH HEADER LINE.
    * Data pour paramètrer VKPB
      DATA :
           t_matnr_low TYPE STANDARD TABLE OF matnr_ran ,
           t_werks_low TYPE STANDARD TABLE OF werks_ran ,
           w_t_mara TYPE zmatnr_matkl,
           w_e_t_data TYPE zbw_konh,
    * Data pour liste VKPB
           t_liste     TYPE STANDARD TABLE OF abaplist ,
           t_listasci  TYPE STANDARD TABLE OF zchar150 ,
    * Paquet retourné d'après la liste VKPB.
           e_t_data2   TYPE STANDARD TABLE OF zbw_konh .
    * 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 'ZDS_PRICING'.
          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
        APPEND LINES OF i_t_fields TO s_s_if-t_fields.
    * Date extraction
        w_datextract = sy-datum.
    * Vue 1 article actif -> 1 GM pour binary search.
        SELECT  matnr matkl spart FROM  mara INTO TABLE t_mara
          WHERE  lvorm  = ' '.
        SORT t_mara BY matnr.
    * Vue 1 GM -> n articles actifs pour binary search.
        t_mara2[] = t_mara[].
        SORT t_mara2 BY matkl.
    * Vue 1 division->1 OA, divison->1 société  pour binary search
        SELECT * FROM zvt001_wk  INTO TABLE t_zvt001_wk.
        SORT t_zvt001_wk BY werks.
    * Séparateur
        SELECT SINGLE * FROM  usr01
         WHERE  bname   = sy-uname.
        IF usr01-dcpfm = 'X'.                "decimal separator is point
          w_separator-sep1 = ',' .           "suppress commas
        ELSE.
          w_separator-sep1 = '.' .           "suppress points.
        ENDIF.
      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'.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'MATNR'.
            MOVE-CORRESPONDING l_s_select TO l_r_matnr.
            APPEND l_r_matnr.
          ENDLOOP.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'WERKS'.
            MOVE-CORRESPONDING l_s_select TO l_r_werks.
            APPEND l_r_werks.
          ENDLOOP.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'SPART'.
            MOVE-CORRESPONDING l_s_select TO l_r_spart.
            APPEND l_r_spart.
          ENDLOOP.
          LOOP AT s_s_if-t_select INTO l_s_select WHERE fieldnm = 'MATKL'.
            MOVE-CORRESPONDING l_s_select TO l_r_matkl.
            APPEND l_r_matkl.
          ENDLOOP.
    * Determine number of database records to be read per FETCH statement
    * from input parameter I_MAXSIZE.
          OPEN CURSOR WITH HOLD s_cursor FOR
    *      SELECT (s_s_if-t_fields) FROM zbw_konh
           SELECT  kotabnr vakey FROM zbw_konh
              WHERE
              kvewe = 'A'        AND "Détermination prix
              kappl IN ('M','V') AND "ADV et Achats'
    * A modifier si nouvelle condition, + extraction des champs paramètre
              kotabnr IN ('017', '018', '071', '073', '074', '079') .
        ENDIF.                             "First data package ?
    * Fetch records into interface table.
        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.
    * Dérivation des paramètres pour VKPB
        PERFORM params_vkpb
         TABLES
    * Paquet entrée
           e_t_data
    * Paramètres lancement VKPB
           t_matnr_low
           t_werks_low
    * Paramètres venant de l'IP
           l_r_matnr
           l_r_werks
           l_r_matkl
           l_r_spart
    * vues
           t_mara
           t_mara2
           t_zvt001_wk.
    * Appel de VKPB si au moins un article trouvé
        IF NOT t_matnr_low[] IS INITIAL.
          PERFORM submit_vkpb
          TABLES
    * Paramètres lancement VKPB
           t_matnr_low
           t_werks_low
           t_listasci
        USING w_datextract.
    * Interpretation Liste VKPB
    *    BREAK ALEREMOTE.
    *    BREAK JWADDELL.
          PERFORM list_vkpb
            TABLES
              t_listasci
              e_t_data2
    * Paramètres venant de l'IP pour filtrage
              l_r_spart
    * pour le cas toutes divisions
              l_r_werks
    * vues
              t_mara
              t_zvt001_wk
    * Date validité
          USING w_datextract
              w_separator.
    * Retourner paquet
          e_t_data[] = e_t_data2[].
          REFRESH e_t_data2[].
        ELSE.
    * no data
          REFRESH  e_t_data[].
        ENDIF.
        s_counter_datapakid = s_counter_datapakid + 1.
      ENDIF.              "Initialization mode or data extraction ?
    ENDFUNCTION.=

  • Enhancing a BW Generic Extractor

    I have built a generic extractor in the BW system and want to add some ZZ fields.  Where can I write the exit to populate the ZZ field?  I get the message "Program does not exist" when I go to for example: ZXRSAU01 or ZXRSAU02 in the BW system? Thanks

    Hi Niten,
      First you will have to create a new project in BW in CMOD transaction and
      you have to assign the enhancment RSAP0001 to it in CMOD . I think you are
      taking RSAP0001 as the project which is wrong .  Please follow the below steps
    1. Go to T-code CMOD in BW and enter a new project name say ZBW1. Click on the 'Attributes' radio button below and select the Create button . Enter a short text in the next window and save it.
    2 Click on the radio button 'Enhancement Assignement' and press change button .
       In the next window assign 'RSAP0001' as the enhancement .
    3. Now activate the project and select the ' Components' Radio button . Press Change button and you will see the exits EXIT_SAPLRSAP_001 , 002 , 003 and 004. Click on 001 and you will get a new window . Click on include program ZXRSAU01 and press enter . Here you can start coding the user exit.
    But please not that if the RSAP0001 enhancement is used in some other project then it can't be used again in other project.
    Regards,
    Prakash

  • Generic extractor help needed badly.

    Hi Geeks,
    As continuation to questions I posted in the morning.
    1> I have created a generic extractor say ZBW_PRICING.
    2> ZBW_PRICING is based on tables A508 & KONP.
    3> One of the currency fields I am interested in that is
       KBETR has reference field RV13A-KBETR.
    4> Rv13A is a structure not a DB table so I can not give
       reference to RV13A while building view.
    5> So I appended the extract structure with two fields.
       ZZKBETR (rate) & ZZKONWA (currency key) to populate  it  from KONP.
    6> I activated the appended structure as well as extract structure.
    7> In RSA6 when I try to unhide field & save it.
       I get following error.
       The OLTP source still has errors.
       Message no R8417.
    Please help fellows its important for me.
    thanx in advance.
    Monica

    Kunal and Subray,
    I had the same problem while trying to unhide the field.
    I solved the error by giving the proper reference table and field names to the required field in extract structure, which in my case has been a currency field.
    ( Since I have a generic extractor, I changed the Reference Table name to Transparent table name. I changed the field name to corresponding field name within the Transparent table).
    Thank you.
    (Also, I see that Transparent Table name = extract structure name = DataSource name. I think the names might be same for Generice Datasources by default)

  • Delta update  for generic extractor ?? Urgent!!!!

    Hi All
    In my project I am pulling data from 4 R/3 tables... I have created view & then Generic DataSource.
    Can a delta update be set-up for the generic extractor based on adds/changes to the R/3  tables?
    Thanks & Regards,
    Sheetal
    Message was edited by:
            Sheetal Dhore

    Hi,
    Please take a look at the following doc.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    Regards,
    ®

  • Generic Extractors for LO

    Hi,
    Has anyone attempted to write their own generic extractors to mimic the LO process because the results from this module did not meet their requirements? Would you recommend doing this?
    Thanks
    "<i>Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws</i>." ~ Plato (427-347 B.C.)
    "<i>Forgive your enemies, but never forget their names.</i>" ~ John F. Kennedy (1917-1963)
    Forgivenes - <i>Just get out of my life and spare me the anguish of pitying you</i> ~ Anonymous Author
    Message was edited by:
            Ellen DeGeneres

    The LO process of extraction cannot be mimicked. If the requirement is such that you need more/different  fields then you have the following options.
    1. If the fields are in the extract structure of the datasource in question then just add the fields to the datasource and use the LO extraction process.
    2. If you need to add some fields which are not in the extract structure of the datasource then add them to the datasource and use user exit to fill them.
    3. If the need is for a completely different extractor. Then creat the extractor in RSO2,
    More detailed info is in the weblogs by Robert Negro.
    Hope this helps.
    Bhargava

  • Generic extractor could't activate due to SBIWA_FLAG

    Hello SAP Gurus,
    I am creating a generic extractor and when I activate, I get the following Syntax Error message :-
    Program SAPLZBW_DATASRC
    Type "SBIWA_FLAG" is unknown
    I have already included I_REMOTE_CALL parameter with type SBIWA_FLAG with default value 'SBIWA_C_FLAG_OFF'
    Please advise Thanks

    Raymond,
    In the top include of the function group of your extractor, make sure you have the following line
    INCLUDE lrsaxd01.
    Alternatively, you can also use the line
    TYPE-POOLS: sbiwa, rsap, srsc.
    Regards,
    Suhas

  • Generic Extractors & Mobile Engine

    Bonjour,
    I have some doubts certain aspects of generic extractors and Mobile Reporting. Hope I can clarify them in SDN.
    1. Is Repair Request only suitable for certain Data Sources which is delta-enabled and has full update?
    2. Flat file upload allows assignment of more than 1 data sources. Is this multi-data source feature only for Datasources which only can support 1 update mode that is Full update?
    3. i-mode and wap can have ad-hoc analyses with standard web template. What does ad-hoc analyses mean? Is it ad-hoc query (web item ad-hoc query)?
    4. Is Mobile Engine used as technical basis when downloading precalculated web template by WebDav & Web folder or is it another alternative way to download the same?
    Would greatly appreciate it if you could reply to all / some of the questions.
    best regards,
    Pascal Gabin
    Message was edited by: Pascal Gabin

    Hi,
    If a delta fails (status ’red’ in the monitor) or the overall status of the delta request has been set to red manually, the next data request will be performed in repeat mode. A repeat request extracts the incorrect or incompletely loaded data from the failed delta request, along with any new data since the original request. A repeat can only be requested in the dialog. If data from the failed delta request has already been updated to the data targets, delete the data from the data targets affected. If you cannot delete the data from the data targets, duplicate data records may be produced when the repeat request is performed.
    Check it once
    Regards,
    Priyanka

Maybe you are looking for

  • 4 pin to 4 pin or 4 pin to 6 pin

    I was told by SOny that I need an iLink port in order to download video onto my computer....and my camcorder has a 4 pin connection....what is the MacBook pro?

  • Modify css of Left navigation - ms-core-listMenu-verticalBox

    Hi, I have a left navigation in which the first letter of text is getting capitalized. Below is the css which I got from IE Developer tools: <div id="zz15_V4QuickLaunchMenu" class=" noindex ms-core-listMenu-verticalBox"> <ul id="zz16_RootAspMenu" cla

  • Wireless Degradation with iOS 5?

    I have 5 devices that were upgraded successfully to iOS 5, but I appear to be getting some degraded performance on three devices when using wireless. my iPhone 4S, iPad and another iPhone 4 all appear to degrade over time whilst using the wireless in

  • Displaying ALV tree in expanded form in first ouput

    Hi all,       I have a problem with alv tree. My requirement is, on the first output itself the alv tree should appear expanded depending on one of the filter criteria in the tool bar. How can i trigger the toolbar event in PBO itself? Can it be done

  • E-mail suddenly won't send.  I've been using this account on this iMac for years.

    When I try to send, I get an error message that it can't send mail on this server.  I've checked all my settings and rebuilt the mailbox.  The settings are the same as on my iPhone, and the phone has no problem sending.  I can also send using my acco