Extractor FM Problem

Hi all,
i'm  creating a FM extractor, and in the end of the program i append all the data to table e_t_data
and it's o.k. .
the Problem is that when i check the DataSource in RSA3 I Dont Get any data.
What can be the problem?
Regards

Hi
This is My Code:
FUNCTION zdc_sales_person.
*"*"Local Interface:
*"  IMPORTING
*"     REFERENCE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
*"     REFERENCE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
*"     REFERENCE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
*"     REFERENCE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
*"     REFERENCE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
*"  TABLES
*"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT
*"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS
*"      E_T_DATA STRUCTURE  ZDC_SALES_PERSON OPTIONAL
*"  EXCEPTIONS
*"      NO_MORE_DATA
*"      ERROR_PASSED_TO_MESS_HANDLER
*maximum number of lines for DB table
  STATICS: s_s_if TYPE srsc_s_if_simple,s_counter_datapakid LIKE sy-tabix,s_cursor TYPE cursor.
*counter
*cursor
  DATA:first_per TYPE char1.
* 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 !
* check for supported update mode and InfoSource validity
    IF i_dsource EQ 'ZDC_SALES_MEN_DESCRPTION'.
      CLEAR s_counter_datapakid.
    ENDIF.
    IF s_counter_datapakid = 0.
      FREE:  zdc_sales_person.
        SELECT DISTINCT pernr parvw
        FROM vbpa
        INTO CORRESPONDING FIELDS OF TABLE it_vbpa
        WHERE parvw LIKE 'Y%'
        AND posnr = '000000'.
        SORT it_vbpa BY pernr.
        DELETE ADJACENT DUPLICATES FROM it_vbpa COMPARING pernr.
        SELECT *
        FROM pa0002
        INTO CORRESPONDING FIELDS OF TABLE emp_name
        FOR ALL ENTRIES IN  it_vbpa
        WHERE pernr = it_vbpa-pernr
        AND begda LE sy-datum
        AND endda GE sy-datum.
        LOOP AT it_vbpa ASSIGNING <fs_vbpa> .
          READ TABLE emp_name INTO wa_emp_name WITH KEY pernr = <fs_vbpa>-pernr.
          IF sy-subrc = 0.
            CONCATENATE wa_emp_name-vorna wa_emp_name-nachn
            INTO <fs_vbpa>-sales_men_name SEPARATED BY space.
            CLEAR : wa_emp_name.
          ENDIF.
        ENDLOOP.
        APPEND LINES OF it_vbpa TO zdc_sales_person.
*removing duplicates
*first we sort it that the duplicates lines will be together and than delete
*removing double lines
        DELETE ADJACENT DUPLICATES FROM zdc_sales_person.
*counting the lines
        DESCRIBE TABLE zdc_sales_person LINES tabix_all_max.
      ENDIF.
*    IF g_counter_datapakid = 0.
      tabix_all_from = 1 + ( s_counter_datapakid * i_maxsize ) .
*     ENDIF.                             "First data package ?
*for the lines counting
      IF tabix_all_from > tabix_all_max.
        RAISE no_more_data.
      ENDIF.
      tabix_all_to = tabix_all_from + i_maxsize - 1." + ( s_counter_datapakid * i_maxsize ).
      IF tabix_all_to > tabix_all_max.
        tabix_all_to = tabix_all_max.
      ENDIF.
      CLEAR: e_t_data, e_t_data[].
      APPEND LINES OF zdc_sales_person FROM tabix_all_from TO tabix_all_to TO e_t_data.
      tabix_all_from = tabix_all_to + 1.
      s_counter_datapakid = s_counter_datapakid + 1.
    ENDIF.
    APPEND LINES OF zdc_sales_person FROM tabix_all_from TO tabix_all_to TO e_t_data.
  ENDFUNCTION.
Best Regards

Similar Messages

  • Generic extractor Delta problem

    hello,
    i have created a Generic extractor based on the AUFM table and the delta field is MBLNR (Material document no) that is a numeric pointer used for delta. My problem is that when i pull the delta not all records are being pulled. Why is that so? Can anyone give suggestions.
    thanks
    Laura.

    Well, using Function module is one approach. I can provide you another approach.
    You can create a View based on the following tables
    AUFM and MKPF,
    use the join condition
    AUFM-MANDT= MKPF-MANDT.
    AUFM-MBLNR = MKPF-MBLNR
    AUFM-MJAHR = MKPF-MJAHR
    In AUFM select all the fields that you want and MKPF select the "Accounting Document entry date" field which you can take it as delta field and select calday as your delta option.
    Once view is created, you can generate the datasource.
    Please check this option.
    I think it should work...
    Thanks
    Vj

  • Extractor enhacement problem - 0WBS_ELEMT_ATTR

    Datasource 0WBS_ELEMT_ATTR
    First 100 records from extraction test.
    We enhanced the extractor (via RSU5_SAPI_BADI) to include the following fields:
    Field Name     Field Type
    ZZTERRIT01     Calculated Field
    ZZTERRIT02     Calculated Field
    ZZTERRIT03     Calculated Field
    ZZTERRIT04     Calculated Field
    ZZTERRIT05     Calculated Field
    ZZTERRIT06     Calculated Field
    ZZTERRIT7     Calculated Field
    Z_C_EXEC     Table Field
    Z_ECONOMIC     Table Field
    Z_FUNCIONAL     Table Field
    ZTERRITORIS     Table Field
    Our BAdi implementation name is ZZRSU5_SAPI_BADI.
    As you can see in the images below all fields are populated in test mode (transaction RSA6).
    The problem arises when we execute the Datasource in BI.
    Weu2019re not getting calculated fields populated in BI.
    I have a detailed document explaining the enhancement we made, but can't attach it here.
    Thanks!

    Hi Oscar
    Did you replicate the datasource....the fields appear there?
    The fields appear. Datasource extraction in test mode brings all fields but the ZZT* came up empty.
    Did you load to PSA in BI....are the fields there?...
    Fields are in PSA.
    Did you change the transfer rules in order to add the new fields in the structure??
    Datasource as been migrated to new concept. No transfer rules apply.
    I don't know what else to check

  • Classification extractor (CTBW) - problems with deleted classifications

    Hello all,
    we have several classification objects on 0customer. Until now we always made a FULL load for this classification extractors but now we realized the following problem:
    If a customer has an classification and it is deleted we don't get the deletion into BI. In our master data the customer still has his old (invalid) classification.
    I made some tests with the delta extraction. The only things we get by delta is changes on the classification value or if a classification is added. What don't get the case that the classification is deleted on a special customer.
    How can we solve this problem? Any ideas?
    This would be great!
    Thanks a lot + kind regards from sunny Germany
    Bettina

    Hi Bettina,
    well I think you need to do an enhancement for the datasource and add some code to check for deleted data. But I am not sure if there are change documents in cdhdr/cdpos for this type of data. If it is the case, you can get the deletions from there and append to your data package. Additionally you need to update a field in the data package with a 'D'. I believe you have a field for update mode in the data package. When the data is posted to a ods the record mode 'D' will cause the deletion of that record.
    Siggi

  • 0hrposition_cctr_attr extractor load problem

    hello ,
    i have loaded 0hrposition_attr ...i'm trying to load the position and cost centers using the 0hrposition-cctr_attr extractor...but the load never finished and its shows 0 records...the status doesnt change from yellow to green...
    would appreciate your help in resolving this issue...
    Thanks

    hi  shruti
    In the Monitor->environment->Transfer TRFc-> check in Datawarehouse and sourcesystem if u find any entries .. just right click on those and click on execute LUWs...
    check in both R3 and Bw  before deleting the JOB
    if not go thru the below steps
    1) if ur job is active..
    2) delete the ur process in SM50
    3) select ur process ID in SM50 and on menu ->program->delete without core.
    4) come to Sm37 and right click on the Job and clcik on the status.. if that status is clciked it will chcnge to canceld
    5) Re Run the load..
    and also check with ur Basis team to look into the issue why it is taking that much of time...
    hope it helps
    regards
    AK

  • Enhance BW Extractor - coding problems

    hi gurus
    i need to enhance extractor 0customer_attr so that field from KNKK-GRUPP is pulled in along with 0customer_attr extraction
    so i enhance the extractor using append and type it in the data element, PROVIDED zzxyzno in the field name and extracted it and UNHIDE it.
    now i wrote below code:
    GRUPP
    DATA: L_S_INFOSTRU LIKE biw_kna1_s.
    CASE I_DATASOURCE.
    WHEN '0ustomer_attr'.
      DATA: biw_kna1_s_data LIKE biw_kna1_s.
      LOOP AT C_T_DATA INTO L_S_INFOSTRU.
        L_TABIX = SY-TABIX.
    biw_kna1_s_data-ZZXYZNO = KNKK-GRUPP
      ENDLOOP.
    ENDCASE.
    but it is still not pulling in values from extractor...
    can you please correct my code ???

    thank u sir
    can you please give me the correct code?
    what needs to be written in Read **
    where read needs to be inserted etc. etc.
    if u refering some thread can u please give that thread
    or let me know !!

  • Generic extractor question/problem

    Hello,
    I want to create a generic extractor on custom table which should delta enabled . This custom table has ERDAT( creation date) and ERZET u2013 Entry time but the client is asking me to use both fields for delta functionality . I am not sure how to do this . Please help .
    Regards,

    As you said client want you to use both the date n time stamp field to extract delta you can follow the below steps.
    - Create the generic data source as per you requirement in order to pic the delta
    - Open you extract structre and append the field TZNTSTMP, this is the field which holds the time stamp.
    - to setup deltas click on generic delta --> select time stamp(UTC)
    Regards
    KP

  • RSA3 Extractor Testing problem importing request selection values

    Hi, I am trying to use RSA3 to test an extract and I am trying to pull in the values from an existing request on the BW side.  When I specify the request ID it only pulls in 7 values.
    The request I am pulling from has 9 values for "Document Type - BLART" and 18 values from "Account - RACCT".  When I specify the request ID I am only getting 7 values for BLART and none of the others.
    Any ideas why RSA3 wouldn't pull in all of the values?

    Hi,
    If the Datasource is LO then it will fetch the data Setup tables, so see it properly. See teh below articles about RSA3
    Checking the Data using Extractor Checker (RSA3) in ECC Delta Repeat Delta etc...
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/80f4c455-1dc2-2c10-f187-d264838f21b5&overridelayout=true 
    Data Flow from LBWQ/SMQ1 to RSA7 in ECC and Delta Extraction in BI
    http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/d-f/data%20flow%20from%20lbwq_smq1%20to%20rsa7%20in%20ecc%20and%20delta%20extraction%20in%20bi.pdf
    https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
    Thanks
    Reddy

  • CRM EXTRACTOR 0CRM_SRV_PROCESS_I PROBLEM

    Hi,
             I'm using 0crm_srv_process_i datasource . While I'm trying to extracting data from CRM to BW (for some dates or some data selections) I found all data showing under one Sales Group in BW,So I checked in RSA3 in CRM than I found all data showing under one Sales Group ,so that effects problem while extraction in BW also. I checked my mappings in BW , it running fine so no problem in my BW.
    Please help me to resolve this issue.
    Note: My delta was running fine. Daily I'm getting correct data.
    Edited by: nsrikanth1.abm on Feb 29, 2012 12:06 PM

    Hi
    This looks like a midlewear type of problem.
    first try to process the Idoc.
    IDocs stuck? Go to where it's stuck and run BD87. Find the stuck one, and "Process" it.
    That'll get it through.
    Alternatively, check the TRFC monitor via SM58 to see if it's stuck there and need
    "Execute LUW".
    If this does not help try you basis admin for more help.
    Reg's
    Edan

  • Extractor checker problem

    Hello experts,
    I have done some enhancements to the billing data source (2LIS_13_VDITM) but i cant view that record in the extractor checker. But when I check the Delta queue i can view those new records.
    Please need ur inputs on this as to how we can view the records in RSA3. Its very important.
    Thanks in advance
    Rohit

    Hi,
    Sometimes its not possible to view the records for the changes using RSA3. Try to view them in both F and D modes using the extract checker.
    In this case, would suggest you to pull over the deltas upto the PSA and then check the changes there.
    Cheers,
    Kedar

  • Error while filling set up table SD-Billing Documents - Perform Setup

    Hello friends,
    while filling set up table of SD-Billing Documents - Perform Setup
    i am getting error 'TSV_TNEW_PAGE_ALLOC_FAILED' . i am executing this job in background process . Please suggest me a solution .
    Regards
    Nilesh Vakil

    Hi,
    Try some other LO extractor in RSA3 to check if you get the same error.
    If you dont then it may not be system memory issue, check if thr is some user exit written for the extractor.The problem could be in the user exit whr the internal table may get overflown and lead to the page overfloen dump.
    If this is also not the case try reducing the packet size.
    Let me know if the issue is resolved.
    Regards,
    Ashwin

  • Rocancel shows wrong value

    Hi,
    I am currently working with  2lis_o4_P_arbpl extractor my problem is that after i delete an operation from Production order  and extract record in delta queue i get value for ROCANCEL for  that particular record as 'X' and i think it should be 'D' or
    'R' which is strange.
    Can any one let me know what can be possible problem and how can i go about it in this case please....
    Regards,
    Rahul.

    Hi,
    The cancellation indicator will give value'X for the cancelled document and it is giving you the correct values.Basically it indicates whether the document is cancelled or not.
    Thanks

  • Problem in scheduling agreement  dates with 2LIS_12_VCSCL extractor

    I am using 2LIS_12_VCSCL extractor to get the order fulfilment report.
    I am using ODS as an infprovider and on BW 3.5.
    Scenario on Sale Order screen - VA33 [ Scheduling Agreemnent ]
    Sales doc   Item  Line-No     Qty      Del NO    Req-Date         Actual GI Date
        100          10      1            10          222        5/10/2008        5/10/2008   ( this is the only item that is delivered)
         ---            --       2            10                       6/10/2008
         ---            --       3            10                       7/10/2008
    This Scenario when we view the data in rsa3 by running 2LIS_12_VCSCL
    Sales doc   Item  Line-No     Qty      Del NO     Req-Date        Actual GI Date
         100       10      1            10           222         5/10/2008         5/10/2008 
            ---       2            10          222        6/10/2008          5/10/2008
            ---       3            10          222        7/10/2008           5/10/2008
    Note that the delivery no is assigned to the unschedules schedulines(ie; these are open schedulelines that have not been delivered, but the extractor is assigning the first delivery no to all these schedule lines)
    We are confused and do not understand if this is how this extractor works . what we actually expected to get is only one recored for which the delivery has been made.
    like :
    Sales doc   Item  Line-No     Qty      Del NO    Req-Date        Actual GI Date
           100       10      1            10          222        5/10/2008        5/10/2008 
    the other two lines should not get extracted. If this is a bug in the extractor program please point us to the OSS notes or the fix that can be applied.
    Else if this is how this extractor works please suggest the fix that can be applied on the BW side to extract only the first record (ie; the schedule line  record for which the delivery has been done)
    Greatly appreciate help on this issues.
    Thank You,
    Edited by: Swordfish on May 12, 2008 1:09 PM
    Edited by: Swordfish on May 12, 2008 1:21 PM

    Hello,
    I think we have the same problem.  Data pulled over to BW has alot more records for a single delivery.
    Anybody have any thoughts on this.

  • CO-PA, problem with extractors. (Account Based)

    Hi everybody,
    I have a problem when I want to execute RSA3, on the extractors that automatically generate the systems. I followed all the step that the document say, I belive.
    1.- <KEB0>, I still use mandatory fields PERIO and KOKRS.
    2.- <KEDV>. I put on the all fields a “*” , with exceptions KOKRS. (on it put the variable Controlling Area).
    3.- <KEDU> Summarization levels.
      3.1- Delete an regenerate
      3.2- Refresh. (In this point I show that the systema take very short time, and when check with transactions KEDV, I can see that the refresh records are cero (0).
    4.- Modify on SE11, the tables COEP and COEJ the index 4.
    5.- <RSA3>, finally with the parameters, as example :
    KOKRS: CO01
    PERIO: 2006004,
    The systems show a error.
    I can’t execute the extractors.
    So , I know that is a problem with R3, but I don't use it if I dont want to use BW.
    Some one knows the problems or the other steps that I forget to execute?
    I appreciate your help,
    regards,

    HI,
    To understand, why system behaving like this, you can analyze derivations in KEPM (Extras-> Analyze derivations). Try to enter manually using parameter set and then do Extras->Analyze derivation.
    You could also try chaing the Target fied attributes to 'Overwrite with new value only if new value found' from 'Do no overwrite' in KEDR for your Table look up step.
    Hope this helps.

  • PROBLEM in function module extractor

    Hi ,
    i m facing a problem in creating a function module as extractor in srm but its not working plz letme know the way i can create the zfunction module as extrator.
    i created a datasource ZSRM_CS in which i m using BBP_PDS_CND as extraction structure and Z_BIW_GET_DATA_SIMPLE as zfunction module
    but even wen i use rsa3 in debug mode its not stoping and gives error
    ERROR6 plz letmme know the problem.
    i copied the standard module RSAX_BIW_GET_DATA_SIMPLE .
    n hide the irrelvant things. tell me y its not stoping in debug mode in rsa3
    Thnx
    Regards

    Thnx for ur concern ...but i have already mentioned. my code goes llike this.plz have a luk
    FUNCTION Z_BIW_GET_DATA_SIMPLE.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR OPTIONAL
    *"     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 TYPE  ZT_BBP_PDS_CND OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    Example: DataSource for table SFLIGHT
      TABLES: ZQUOTATION.
    Auxiliary Selection criteria structure
      DATA : L_S_SELECT TYPE SRSC_S_SELECT.
      DATA : GIT_QTN type table of ZQUOTATION with header line .
      DATA : GIT_TAB type table of BBP_PDS_CND with header line .
    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 '0SAPI_SFLIGHT_SIMPLE'.
         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'.
       select * from ZQUOTATION
                into table GIT_QTN .
       LOOP AT GIT_QTN .
        CALL FUNCTION 'BBP_PDCND_GETDETAIL'
          EXPORTING
            i_p_guid                      = GIT_QTN-GUID1
           I_P_KIND                      = 'B'
           I_OBJECT_TYPE                 = GIT_QTN-OBJECT_TYPEH
         IV_VERSION_TYPE               = ' '
            iv_header_guid                = GIT_QTN-HEADER
          IV_WITH_DELETED_RECORDS       = ' '
         IMPORTING
           ET_CONDITIONS                 = GIT_TAB
          E_COM                         =
        TABLES
          E_T_DATA                      =
          MOVE-CORRESPONDING GIT_TAB TO E_T_DATA.
        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.
    plz letme know where i m wrong in code,
    wt my code is doing its picking the GUID! and header from view zquation and through fm 'BBP_PDCND_GETDETAIL' its returning et conditions whichi have to pass to data source .
    Thnx

Maybe you are looking for