Generic delta with function module

Hi Gurus,
Is it possible to create a generic DataSource with delta support using function module following the queue delta mechanism (u can get some function moduel in MCEX function group, and check the outbound delta queue before and after update in transaction smq1.
I can store the delta data using qRFC and collective update mechanism. but I don't know how to create a generic data with delta and how to attach a rfc destination (& logical system) to the data source. The Source system information is stored in the table "ROOSGEN".  Is there any configuration setting required to do the same.
Regards,
Jugal

Jugal,
What I understand you to be asking is if it is possible to create a generic delta extractor which uses the delta queue. If this indeed is your question the answer is yes.
First you need to create your data source so it is visible via tx RSA5 and need to make sure that the delta type (ie ABR, AIM)is set appropriately for the datasource.
The issue however is determining from where you will associate your delta hook (when will you write to the queue)? I have in the past utilized BTE's, Business Transaction Events to write information out to the delta queue, you can see a list of available BTE's in your system via tx FINF.
Once you find a place to write your deltas from you call the below FM with the appropriate datasource.
RSC1_TRFC_QUEUE_WRITE.
Once you have done this the standard BW extractor for deltas will pull the information from the delta queue. But from what I understand you just want to know how to associate the data with the delta and that is the FM listed above.
Hope this helps,
Cheers,
Scott
> Hi Gurus,
>
> Is it possible to create a generic DataSource with
> delta support using function module following the
> queue delta mechanism (u can get some function moduel
> in MCEX function group, and check the outbound delta
> queue before and after update in transaction smq1.
> I can store the delta data using qRFC and collective
> update mechanism. but I don't know how to create a
> generic data with delta and how to attach a rfc
> destination (& logical system) to the data source.
> The Source system information is stored in the table
> "ROOSGEN".  Is there any configuration setting
> required to do the same.
>
> Regards,
> Jugal

Similar Messages

  • How to copy a generic extractor with function module into a new system?

    Dear Gurus,
    i would like to know how i can copy a gneric datasource with function module from one system to the target system.
    Thank you
    Cheers

    Hi Anesh,
    thank you for replying.
    Since the Datasource will have a new new in the new system, i will create a new one.
    Create a generic datasource base on the table is not the problem.
    My problem is how could i copy the FM in the new system?
    If you can help me on that, it will be fine.
    Thanks

  • Generic delta   using function module with two fields  AEDAT AND ERDAT

    Hi,
        i have scenario that i have to create a generic data source  having delta using funcation module and the delta speci fields are AEDAT AND ERDAT . Is there possibility with out using these two fields ( i mean AEDAT AND ERDAT)  in the extract structure can i create the data source . and provide sample code for me . it is very urgent.
    waiting for the reply,
    sri.c

    Hi Sri,
    here some coding, I hope this helps!
    first, get the delta-field
          LOOP AT s_s_if-t_select INTO l_s_select.
            CASE l_s_select-fieldnm.
              WHEN 'ZDATE'.
                MOVE-CORRESPONDING l_s_select TO r_date.
                IF r_date-high IS INITIAL OR r_date-high = space.
                  r_date-high = '9991231'.
                ENDIF.
                APPEND r_date.
            ENDCASE.
          ENDLOOP.
    Cursor öffnen
          OPEN CURSOR WITH HOLD s_cursor FOR
          SELECT * FROM
          WHERE  ....
          AND    erdat in r_date
          AND    aedat IN r_date.
          FETCH NEXT CURSOR s_cursor INTO CORRESPONDING FIELDS OF table e_t_data package size s_s_if-maxsize.
    regards
    Siggi
    PS: Note that this coding only works for a very straight forward extraction.
    Message was edited by: Siegfried Szameitat

  • Urgent: Problems in Generic Deltas by Function Module

    Hi BW Experts,
    My requirement is to extract text from CRM to BW using Zfunction module, copy of RSAX_BIW_GET_SIMPLE_DATA
    which works fine for full loads but the problem arises only when i go for generic deltas. My code in FM for Deltas is:
    LOOP AT s_s_if-t_select INTO l_s_select.
    CASE l_s_select-fieldnm.
    WHEN 'ZDATE'.
    s_date_from = l_s_select-low.
    s_date_to = l_s_select-high.
    WHEN OTHERS.
    ENDCASE.
    ENDLOOP.
    IF s_date_from IS INITIAL.
    s_date_from = '20060401'.
    ENDIF.
    IF s_date_to IS INITIAL.
    s_date_to = '99991231'.
    ENDIF.
    OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT * FROM STXH
    WHERE TDOBJECT = 'CRM_ORDERH'
    AND TDID = 'A002'
    AND TDSPRAS = sy-langu
    and TDLDATE between s_date_from and s_date_to
    or tdfdate between s_date_from and s_date_to.
    ENDIF.
    FETCH NEXT CURSOR S_CURSOR
    APPENDING CORRESPONDING FIELDS
    OF TABLE wa_stxh
    PACKAGE SIZE S_S_IF-MAXSIZE.
    TDFDATE is creation date and TDLDATE is changed on
    My extract structure contains Zdate(TDLDATE), Ztext1,2,3, Key field and langu in RSO2 I have selected calday in generic delta and Zdate as field Nm and upper limit as 1 and lower limit as space in settings and new status for changed records button.
    Did I missed something because when i check in RSA7 i didnot see any changed records under totals column and i tried to load without it into BW than i didnot received single record evenafter changes.Would anyone suggest me the good solution for it I appreciate it in advance. I have seen lot of posts in SDN but I didnot find this type of secenario anywhere.
    Thanks in advance
    Regards
    Kishore

    Kishore,
    go through the thread... which i provided for Generic DS using function for CRM Texts.
    Re: Urgent: Extraction through function module
    Any questions please let me know. If you have any questions update the thread with your mail id.
    Replace the code with ...
    LOOP AT S_S_IF-T_SELECT INTO L_S_SELECT WHERE FIELDNM = 'ZDATE'.
    MOVE-CORRESPONDING L_S_SELECT TO L_R_TDLDATE.
    APPEND L_R_TDLDATE.
    ENDLOOP.
    OPEN CURSOR WITH HOLD S_CURSOR FOR
    SELECT * FROM STXH
    WHERE TDOBJECT = <Text Object>
    AND TDID = <Text ID >
    AND TDSPRAS = sy-langu
    AND (TDLDATE IN L_R_TDLDATE
    or TDFDATE IN L_R_TDLDATE).
    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 wa_stxh
    PACKAGE SIZE S_S_IF-MAXSIZE.
    L_R_TDLDATE will be calculted by the system. Internally, system will save the Last Delta date(you need to enable this field for Generic delta).
    all the best.
    Regards,
    Nagesh Ganisetti.

  • Doubt about generic delta using function module.

    Hi,
    I have the following scenario.
    I have to create a generic data source having delta using funcation module.
    The full load works fine, but the delta load not.
    I don't know, if always the field that was specified as a delta, must be part of the cursor in this case AFRU~LAEDA
    This is my cursor:
    OPEN CURSOR WITH HOLD S_CURSOR FOR
               SELECT AFIHAUFNR AFIHADDAT AFIHIPHAS AFIHILART AFIH~AKKNZ
                             AFIHPLKNZ AFIHILOAN AFIHIWERK AS ZPLANPLANT AFIHEQUNR
                             ILOA~TPLNR
                             AFKOGSTRP AFKOGLTRP AFKOGSTRS AFKOGLTRS AFKOGSTRI AFKOGETRI AFKO~FTRMI
                             AUFKAEDAT AUFKERDAT AUFKWERKS AUFKKOSTL AUFKKOKRS AUFKSOWRK AUFK~OBJNR
                             AUFKAUART AUFKVAPLZ
                             CRHD~ARBPL
                            TKA01~WAERS AS ZCOSTP_ML_UM
                  FROM AFIH
                       INNER JOIN AFKO ON AFIHAUFNR = AFKOAUFNR
                       LEFT OUTER JOIN ILOA ON ILOAILOAN = AFIHILOAN
                       INNER JOIN AUFK ON AFIHAUFNR = AUFKAUFNR
                       INNER JOIN TKA01 ON AUFKKOKRS = TKA01KOKRS
                       LEFT OUTER JOIN CRHD ON CRHDOBJID = AFIHGEWRK
                  WHERE AFIH~AUFNR in L_R_AUFNR
                        AND AFIH~EQUNR in L_R_EQUNR
                        GROUP BY AFIHAUFNR AFIHADDAT AFIHIPHAS AFIHILART AFIHAKKNZ AFIHPLKNZ AFIH~ILOAN 
                                           AFIHIWERK AFIHEQUNR
                                          ILOA~TPLNR
                                          AFKOGSTRP AFKOGLTRP AFKOGSTRS AFKOGLTRS AFKOGSTRI AFKOGETRI AFKO~FTRMI
                                          AUFKAEDAT AUFKERDAT AUFKWERKS AUFKKOSTL AUFKKOKRS AUFKSOWRK 
                                         AUFKOBJNR AUFKAUART AUFK~VAPLZ
                                         CRHD~ARBPL
                                         TKA01~WAERS.
    For each aufnr I must go to the afru table and totalize the real work (IWNW)  and real duration (IDAUR) when AFRUSTZHL > 0 and totalize too when AFRUSTZHL = 0 but with sign to negative.
    This is my external query, i need that the field AFRU~LAEDA must be taken as delta field:
              SELECT AFRUERSDA AFRULAEDA AFRUSTZHL SUM( AFRUISMNW ) AS ZTRA_REAL AFRUISMNE AS ISMNE SUM( AFRUIDAUR ) AS ZDURAC_REAL AFRU~IDAUE AS IDAUE
                     INTO CORRESPONDING FIELDS OF TABLE WT_AFRU_OM
              FROM AFRU
                   WHERE AUFNR = WT_ZCUROM-AUFNR
                         AND AFRU~STZHL = 0
                   GROUP BY AFRUERSDA AFRULAEDA AFRUSTZHL AFRUAUFNR AFRUISMNE AFRUIDAUE AFRUISMNW AFRUIDAUR
                   order by AFRUERSDA AFRULAEDA AFRUSTZHL AFRUIDAUE AFRU~ISMNE.
              IF sy-subrc = 0.
                CLEAR WT_AFRU_OM2.
                REFRESH WT_AFRU_OM2.
                SELECT AFRUERSDA AFRULAEDA AFRUSTZHL SUM( AFRUISMNW ) AS ZTRA_REAL AFRUISMNE AS ISMNE SUM( AFRUIDAUR ) AS ZDURAC_REAL AFRU~IDAUE AS IDAUE
                       INTO CORRESPONDING FIELDS OF TABLE WT_AFRU_OM2
                FROM AFRU
                     WHERE AUFNR = WT_ZCUROM-AUFNR
                           AND AFRU~STZHL > 0
                     GROUP BY AFRUERSDA AFRULAEDA AFRUSTZHL AFRUAUFNR AFRUISMNE AFRUIDAUE AFRUISMNW AFRUIDAUR
                     order by AFRUERSDA AFRULAEDA AFRUSTZHL AFRUIDAUE AFRU~ISMNE.
                IF sy-subrc = 0.
                  LOOP AT WT_AFRU_OM2.
                    WT_AFRU_OM2-ZTRA_REAL = WT_AFRU_OM2-ZTRA_REAL * -1.
                    WT_AFRU_OM2-ZDURAC_REAL = WT_AFRU_OM2-ZDURAC_REAL * -1.
                    APPEND WT_AFRU_OM2 TO WT_AFRU_OM.
                  ENDLOOP.
                ENDIF.
                LOOP AT WT_AFRU_OM.
                  "fjro incluir el clear y el move
                  CLEAR WT_DATOS_OM.
                  MOVE-CORRESPONDING W_DATOS_BASE to WT_DATOS_OM.
                  MOVE-CORRESPONDING WT_AFRU_OM TO WT_DATOS_OM.
                  APPEND WT_DATOS_OM.
                  APPEND WT_DATOS_OM TO WT_ESTFIN_OM.
                ENDLOOP.
              ENDIF.
    It's possible set the delta field in a external query of the cursor.
    Best Regards
    Ramon Sanchez
    Edited by: RAMON SANCHEZ on Aug 20, 2010 2:46 PM

    Hi Sri,
    here some coding, I hope this helps!
    first, get the delta-field
          LOOP AT s_s_if-t_select INTO l_s_select.
            CASE l_s_select-fieldnm.
              WHEN 'ZDATE'.
                MOVE-CORRESPONDING l_s_select TO r_date.
                IF r_date-high IS INITIAL OR r_date-high = space.
                  r_date-high = '9991231'.
                ENDIF.
                APPEND r_date.
            ENDCASE.
          ENDLOOP.
    Cursor öffnen
          OPEN CURSOR WITH HOLD s_cursor FOR
          SELECT * FROM
          WHERE  ....
          AND    erdat in r_date
          AND    aedat IN r_date.
          FETCH NEXT CURSOR s_cursor INTO CORRESPONDING FIELDS OF table e_t_data package size s_s_if-maxsize.
    regards
    Siggi
    PS: Note that this coding only works for a very straight forward extraction.
    Message was edited by: Siegfried Szameitat

  • Error in Generic Delta using Function Module

    Hi All,
    I have created one function module by copying the RSAX_BIW_GET_DATA_SIMPLE  module.
    Now when i am giving this in RSO2 Tcode and trying to save it its giving error that
    Required Table does not Exist..
    Please Help.

    Hi
    Look at below links
    Re: Generic function module for delta - which FM ?
    http://www.jt77.com/business-warehouse/work-flow-03485.html

  • Generic datasource with function module

    I am trying to create a transactional generic datasouce with fm.
    I create my structure ZNVBAK1, create a function group ZRSAX, a FM ZRSAX_BIW_GET_DATA_SIMPLE1 and I adjust my source code.
    I activated both FM and Function Group.
    Now under RSO2 I enter the datasource name as in my code, I enter the application component SD as well as the description
    When I choose extraction by FM, nothing happens, no windows prompting me to enter my function module as well as extract structure, I checked everthing look good.
    Any Idea what I might be doing wrong?
    Thanks!!

    Hi ,
    First put values in Short Description, Medium Description & long Description,fields and then click on the Extraction by FM. You will get those filelds unabled.
    You can also refer.
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
    Edited by: Nilesh Vakil on May 31, 2011 7:57 AM

  • Generic extraction with function module

    hai experts,
    can u please forward the material about Generic extraction using FM
    and  infoset query with step by step and real-time requirements to my
    mail id.([email protected])
    Regards
    DJReddy

    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33

  • Creating a Generic Datasource using Function Module

    Hi Guru's
                  We are tryin to create a Generic datasource using function module, we have found few old how to guides for doing the same but it is not effective and need to be altered. Can anyone suggest me the latest step by step procedure to create the above, also if you have the how to guide kindly paste the link as it will be a great help at this point.
    Thanks in advance
    Regards
    Liquid

    Hi,
    Please goto the Following links  :-
                                                                          PDF
    1)         http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c062a3a8-f44c-2c10-ccb8-9b88fbdcb008?quicklink=index&overridelayout=true
    2)        http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33?quicklink=index&overridelayout=true
                                                     SAP Forum
    3)        Re: DataSouce based on FM
    4)       http://forums.sdn.sap.com/post!reply.jspa?messageID=10050614
    5)       https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0f46157-e1c4-2910-27aa-e3f4a9c8df33
    6)       Re: Generic datasource with functional module
    7)       Generic Extractor (FM based) - Delta Enabled
    Regards
    Obaid

  • Generic Datasource with Fuction Module with delta on Created Date

    Hi Experts,
    I have created a generic datasource using Function Module RSAX_BIW_GET_DATA. I have copied this function module and created a my own Function Module. I want to load delta using this. But I don't know how to handle delta in the code.
    my code is working for full load but not for delta. I have seen that in ROOSOURCE tabel the Delta field is showing the AIE instead of D and extraction method  is showing as F2. I have searched a lot of forums and articles but didn't get how to handle this.
    Please advice.

    Hi Amit,
    Go through the link as suggested by AKhan which lets you understand the concept of offsets and the last extraction status.
    In case of Table or View based GDS, the system takes care of the deltas based on the selections you make in the "Generic Delta" screen whereas in case of FM based DS, it is your responsibility to handle this part. Within your code, capture if the load is a Delta load (I_UPDMODE = D). Since your delta is on Created Date, maintain a Z table with name of the DS as the Key and a field representing the current value of the Delta field(created date in this case). When you first load the delta, there will be no record for your DS in this table. Create an entry with the current day. Next time when you load a delta, take this value, compare it with sy-datum and get all the records falling within these days. This has to be done in the Select stmt. Once selection happens, replace the value in the Z table with sy-datum. This way you can simulate the delta. The Z table can be used for other FM based Datasources also as it has DS as the key.
    It would be easy if the exact SAP table where RSA7 delta field status is stored is known. Otherwise, the above method can be used.
    Revert for any further queries.

  • Generic Extractor using Function module with Complex Interface

    Hi,
    Has anyone created Generic extractor using Function module with Complex Interface?
    What is the difference between Complex and Simple interface in Function module?
    Pls explain.
    Thanks,
    Gopal

    Hi,
    Go through this link.....
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d3219af2-0c01-0010-71ac-dbb4356cf4bf
    GTR

  • Generic Data Source with Function Module data mismatch in BI

    Hi All,
    I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
    when I run the InfoPackage in BI im Getting more no. of records than what i got executing the function module..
    and single record is divided into 2 records in BI side(not all the records), how can it be possible???
    is there anything Im missing to explain you my issue???
    if understood please help me out.
    Thanks n Regards,
    ravi.

    the datasource frame work starts the function module several times.
    1. the initialization
    2. the serval times, until you "raise no_more_data".
    check you coding: have you refreshed necessary internal tables.
    Sven

  • Generic Data Source with Function Module data mismatch

    Hi All,
    I'm using Generic Data Source with Function Module, When I execute the Function Module (Which I have Created), I'm getting 16000 records and when run extractor(in RSA3) im getting different no.of records(infact they are more no.).
    when I run the InfoPackage  in BI im Getting more no. of records than what i got executing the function module..
    and single record is divided into 2 records in BI side(not all the records), how can it be possible???
    is there anything Im missing to explain you my issue???
    if understood please help me out.
    Thanks n Regards,
    ravi.

    HI rkiranbi,
    1. FIrst you excute function module according to your paramers, you will get some records. then goto tcode RSA3 --> excute
    Provide your Data source name and under setting we have options like Data records/calls, Display extractor calls and selections --> fields .
    in that options you have to increase the values. and then you have to pass paramers in RSA3 according to your function module
    selections in SE37. Now you will get equal values in both functin module selection and RSA3 Selection. if it fail means  you need to
    check coding logic in function module. 
    2. if your  are getting wrong values in BI System then check with
                  1. compare with PSA data and data target data (here you need to check with characterstic as well as keyfigures)
                  if you find any mistake you need change the coding in function module according to client requirement.
                  2. compare data with RSA3 and bi report data or data target data.
                                 check it properly above steps, you will get solution.
    thanks and regards,
    malli

  • Generic DataSource on Function Module - Query

    Hi All,
    We have a requirement wherin we have to pull data from MARM  (Material UOM fields) table. This table has some 1,130,000 records.  Since this table doesn't have a Last Changed on or Created on field we are not able to create a Generic Delta on the table itself.
    We have come to know that in MM02, we can change the Unit of Measure fields for material. When we update in MM02, both MARA and MARM table gets changed. MARA will be updated with  the last changed date.
    So we are thinking of creating a Generic DataSource on Function module so that we can perform the delta on Last changed or Created on field of MARA.
    I have a doubt about creating the function module. How should we achieve the initial load (Getting all the material and it's UOM to BW) and then Delta loads through the function module?
    Does the first load needs to be or should be a full load?
    If someone can tell me the steps that should be followed, it would be very helpful
    Please let me know your suggesstion.
    Regards,
    Vivek Das Gupta

    Hi
    Could u try creating a view based Datasource.
    Also u can do a full load in parallel by creating 4-5 Infopackages. After which a Init without data transfer can be done.
    Hope this helps.
    Reg
    Aparna

  • Urgent: Problems in Generic Extraction by Function Module

    Hi BW Gurus,
    I am new to SDN and also new to generic extraction using function module. My requirement is to extract long text(142 char) from CRM to BW as the text is not stored in database table I used function module read_text with in another ZXXX function module copy of (RSAX_BIW_GET_DATA_SIMPLE). In my extract structure I used GUID(char,32), Langu, long text(142 char) and 2 placeholders. Text can be extracted by passing STXH table fields(Tdname, Tdid, Tdobject, Tdspars) to read_text as parameters and i also need to use CRMD_ORDERADM_H field GUID(32 char) to compare 1st 32 chars of tdname(70 char) with Guid to select Guids and loop thru this Guids and for each Guid i need to append lines of text to e_t_data but as i donot know ABAP i unable to write the code for this. Through my friends help i wrote code when i check in RSA3 it is displaying the text but when i replicate into BW and load into data target in monitor the status is red with records initially but afterwards it will be red status again with 0 from 0 records for initial load again.when i check on job logs the errors i have are:
    The background job has created a job log file of 2Gb size and it is currently on a infinite loop writing entries into the SAP System Log that it cannot write to the Job log file due to “Error 22 for write/read access to a file” this is because of the datasource i have created. Please find my Function module and if anyone would please correct FM and send me that will be really great.I appreciate it in advance.
    MY Function Module is:
    FUNCTION Z_CRMORDERH_STR_TXT.
    ""Local Interface:
    *"  IMPORTING
    *"     VALUE(I_REQUNR) TYPE  SRSC_S_IF_SIMPLE-REQUNR
    *"     VALUE(I_DSOURCE) TYPE  SRSC_S_IF_SIMPLE-DSOURCE OPTIONAL
    *"     VALUE(I_MAXSIZE) TYPE  SRSC_S_IF_SIMPLE-MAXSIZE OPTIONAL
    *"     VALUE(I_INITFLAG) TYPE  SRSC_S_IF_SIMPLE-INITFLAG OPTIONAL
    *"     VALUE(I_READ_ONLY) TYPE  SRSC_S_IF_SIMPLE-READONLY OPTIONAL
    *"     VALUE(I_REMOTE_CALL) TYPE  SBIWA_FLAG DEFAULT SBIWA_C_FLAG_OFF
    *"  TABLES
    *"      I_T_SELECT TYPE  SRSC_S_IF_SIMPLE-T_SELECT OPTIONAL
    *"      I_T_FIELDS TYPE  SRSC_S_IF_SIMPLE-T_FIELDS OPTIONAL
    *"      E_T_DATA STRUCTURE  YCRM_TEXT_STR OPTIONAL
    *"  EXCEPTIONS
    *"      NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
    ***"  EXCEPTIONS     NO_MORE_DATA
    *"      ERROR_PASSED_TO_MESS_HANDLER
      Tables: CRMD_ORDERADM_H, STXH.
    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.
    data: i_crmtext type standard table of TLINE .
      types: begin of xsreph ,
              GUID type CRMD_ORDERADM_H-guid,
            end of xsreph.
       data: i_guid type standard table of xsreph.
      data: I_TEXT type STXH-TDNAME.
      data: xempl like  YCRM_TEXT_STR occurs 0 with header line.
      data: t_tab like dd03l-tabname.
    Select ranges
      ranges: l_r_guid for CRMD_ORDERADM_H-guid.
             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 'yCRM_TEXT'.  " for S_SREPH1
          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.
    we will do our selection based on what is in the p table for the
    infoobject
      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 = 'GUID'.
            MOVE-CORRESPONDING L_S_SELECT TO L_R_GUID.
            APPEND L_R_GUID.
          ENDLOOP.
          case i_dsource.
            when 'YCRM_TEXT'.  " for S_SREPH1
              t_tab = 'CRMD_ORDERADM_H'.
          endcase.
          select GUID
          from (t_tab)
          into table i_guid where   PROCESS_TYPE = 'ZACI'  and ( OBJECT_ID < '0000000042').
         select tdname from stxh into i_text where tdobject = 'TEXT'.
         if sy-subrc ne 0.
           message e009(r3).
    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
                     'No master data found'.           "message variable 2
           raise error_passed_to_mess_handler.
         endif.
    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 CRMD_ORDERADM_H
                                  where GUID in L_R_GUID .
                                   ENDIF.
    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.
    as we are doing this only once can use the select statement.
    ***data: crmtext like tline occurs 0 with header line.
    **data: i_crmtext type standard table of TLINE.
    **data: i_guid type standard table of xsreph.
    data: l_guid type THEAD-TDNAME.
    data: st_guid type xsreph.
    data: st_crmtext type TLINE.
    data: lan type THEAD-TDSPRAS.
    lan = 'E'.
    loop at i_guid into st_guid.
    l_guid = st_guid-guid.
    CALL FUNCTION 'READ_TEXT'
       EXPORTING
       CLIENT                        = SY-MANDT
         ID                            = 'A002'
         LANGUAGE                      = lan
         NAME                          = l_guid
         OBJECT                        = 'CRM_ORDERH'
       ARCHIVE_HANDLE                = 0
       LOCAL_CAT                     = ' '
    IMPORTING
       HEADER                        =
       TABLES
         LINES                         = i_crmtext.
    EXCEPTIONS
       ID                            = 1
       LANGUAGE                      = 2
       NAME                          = 3
       NOT_FOUND                     = 4
       OBJECT                        = 5
       REFERENCE_CHECK               = 6
       WRONG_ACCESS_TO_ARCHIVE       = 7
       OTHERS                        = 8
    e_t_data-guid = l_guid.
    loop at i_crmtext into st_crmtext.
    move lan to e_t_data-langu.
    move st_crmtext-tdline to e_t_data-description.
    append e_t_data.
    endif.
    endloop.
    clear: st_guid,l_guid.
    refresh: i_crmtext.
    endloop.
    S_COUNTER_DATAPAKID = S_COUNTER_DATAPAKID + 1.
    endif.
    ENDFUNCTION.
    please Gurus as I donot know ABAP i appreciate if anyone would write a FM based on requirement and send me that will be really great this is my request. I gurantee of award points for good answers.
    Regards
    Kishore

    Hi,
    The statement <b>RAISE NO_MORE_DATA</b> should be active (uncommented) in your code. Otherwise, the infinte loop occurs.
    See also, the Siggi's blog:
    /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    BTW, was it your thread here:
    Re: Urgent: problems in extracting Long Text
    Best regards,
    Eugene

Maybe you are looking for

  • Error on the updating program

    I intalled the Nokia Software Updater(the us version and the ro version) and both give me the same error when I try to start them. I tried to plug first my phone to the pc and I also tried to plug it after the program should start. In both situation

  • I can't see my pictures from my mac 10.9.4

    i try to see my picture library and i can't see no pictures what can o do

  • Template moved to new site

    I started coding a a site on my server, nd now I transfered it to my clients server. First of all, I dont know how to get my site pages to link up to the template again! Second, I need to create an additional page and when I do "create new page from

  • 'apple application not found' error message

    Every time I try to open my iTunes, I get an error message that says 'Apple Application Support not found, please uninstall iTunes and re download.'  I have uninstalled and re-installed, and I continue to get the same message. Help!

  • Is is possible to somehow include a php website in a other?

    Hi, What I'm trying to accomplish is including the index page of a appointment-system on a page of a other website. Both are on the same server and are sub domain sites of one domain name. Both have php extension so I'm looking for a trick to do the