Include for Routine in Infopackages

Hi All,
i created a routine in infopackage. The extraction is working as expected.
We have several Infopackages which should work with the same logic.  That means i have to copy the routine in all IP.
I would like to avoid that by inserting  the routine in an include so that by changing something, the chnage should be central.
I could i do it?
Thanks

Hello,
you can write a universal routine in se38 and call it in all your IP. You can also implement OOPs concept and use a global class for your requirement. Goto tcode SE24 and declare the class with methods. Call this class in all your IP.\
Else you can write a global routine in SE38 (INCLUDE) and call this include in all your IP. This what we are doing in our project where we need to implement the same logic in all 10 IPs. We declared a subroutine and call this subroutine every where.
Regards,
satyam

Similar Messages

  • ABAP Routine in InfoPackage for selection

    Hello,
    I have 2 InfoPackages for loading from ODS1 to ODS2. InfoPackage 1 is restricted via ABAP Routine to load only certain customer numbers.
    InfoPackage 2 is supposed to load all other customer numbers - therefore the ABAP Routine makes ranges that exclude the customer numbers selected in InfoPackage 1.
    Now I face the fact that the selection of InfoPackage 2 is much to small in numbers. Problem is, the ranges only work when entered manually - but via ABAP entry these ranges don`t work. I can`t understand why this problem happens. Do you have an idea?
    Example (first number is from, 2nd number is to)
    InfoPackage 1:       customer numbers     
    5| 5
    100|100
    999|999
    InfoPackage 2: customer numbers
    0|4
    4|99
    101|998
    1000|99999
    But selection of InfoPackage 2 does not work propberly...
                                                                                    Thanks for your help,
    Angelika

    Hi,
    no, that was just a typing mistake. Sorry.
    The problem is, that in Monitoring I can see the selection and it looks good.
    But when I check the number of datasets selected it is far to small. Therefore I don`t believe the selection works.
    I tried manually to put all the ranges selected by ABAP Routine in InfoPackage 2 in another InfoPackage 3 - the selection is identically to InfoPackage 2 (but not made via ABAP, but manually) and in Monitoring the selection looks absolutly alike.
    But the manuall InfoPackage 3 selects far more records than InfoPackage 2.
    I can`t understand the problem. Can you? Can you give me advice?
    Thanks,
    Angelika

  • Routine in Infopackage not working

    Hi all..
    I wrote a routine in Infopackage with the selection Abap routine 6. for some reason the code is not selecting..i mean if the code has to get fisc year 2007, instead its getting all the records from all the years. i tested out the code in abap se38, it works fine, the function module is working fine, i am missing something here in infopackage, can anyone please let me know.
    Here is the code.
    data: l_idx like sy-tabix,
            Year  type /BIC/CS8ZCBFCOPA-FISCYEAR.
    data : begin of itab occurs 0.
    include structure /BIC/PZOCDPYCTA.
    data : end of itab.
      CALL FUNCTION 'ZBW_GET_FY_PKG_SELECTIONS'
        EXPORTING
          VTYPE     = '010'
        IMPORTING
          ZOCDPYCTA = itab.
      loop at itab.
      read table l_t_range with key
           fieldname = 'FISCYEAR'.
      l_idx = sy-tabix.
      l_t_range-SIGN = ' I '.
      l_t_range-OPTION = ' EQ '.
      l_t_range-LOW = itab-FISCYEAR.
      modify l_t_range index l_idx.
      endloop.
      p_subrc = 0.
    The FM takes the input as 010 and gets all the records related to that..which is 2007 year records instead its getting all the records from all years..please help me.
    Thanks
    Vj

    Check the monitor to see what values are entered as the restrictions in the infopackages for fiscal year. if the correct values don't show up in the monitor you know the routine is the problem and not a system bug.
    Also, you may want to consider doing a range if the multiple single values isnt working.

  • Routine in Infopackage selection

    Hi,
    We are using DB Connect and hence we need to write a routine in Infopackage selections to restrict the data to be extracted.
    In the source file, there is a field called " Time stamp".
    This is a Char 23 field with mm-dd-yyyy-hh.mm.ss.sssss format.
    My requirement is lookinto first 10 char ( only for date) and filter the records.  If the date = Sy-datum, then only, i want to extract the data in BI staging.
    Is it possible to write a routine in Infopackage ?   Can you pls help me ?
    Or do i need to take the whole data into PSA and then write a routine in transformation while uploading to Data Target ?
    Regds,
    BW Small

    Hi,
    See the below code for Including  0FISCPER dynamically, so in that way you can write code to get your selection or change the data formate etc.., show this code to ABAPer ask according to this code implement your logic.
    In below code I'm calculating  0FISCPER based on Sy-Datum using FM.
    program conversion_routine.
    * Type pools used by conversion program
    type-pools: rsarc, rsarr, rssm.
    tables: rssdlrange.
    * Global code used by conversion rules
    *$*$ begin of global - insert your declaration only below this line  *-*
    * TABLES: ...
    * DATA:   ...
    *$*$ end of global - insert your declaration only before this line   *-*
    *     InfoObject      = 0FISCPER
    *     Fieldname       = FISCPER
    *     data type       = NUMC
    *     length          = 000009
    *     convexit        = PERI7
    form compute_FISCPER
      tables   l_t_range      structure rssdlrange
      using    p_infopackage  type rslogdpid
               p_fieldname    type rsfnm
      changing p_subrc        like sy-subrc.
    *       Insert source code to current selection field
    *$*$ begin of routine - insert your code only below this line        *-*
      DATA: l_idx LIKE sy-tabix,
            zzdate LIKE sy-datum,
            zzbuper LIKE t009b-poper,
            zzbdatj LIKE t009b-bdatj,
            zzperiod(7) TYPE c.
      READ TABLE l_t_range WITH KEY
           fieldname = 'FISCPER'.
      l_idx = sy-tabix.
      zzdate = sy-datum - 1.
      CALL FUNCTION 'DATE_TO_PERIOD_CONVERT'
        EXPORTING
          i_date               = zzdate
    *             I_MONMIT             = 00
          i_periv              = 'V3'
               IMPORTING
         e_buper              = zzbuper
         e_gjahr              = zzbdatj.
    *           EXCEPTIONS
    *             INPUT_FALSE          = 1
    *             T009_NOTFOUND        = 2
    *             T009B_NOTFOUND       = 3
    *             OTHERS               = 4
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      CONCATENATE zzbdatj zzbuper INTO zzperiod.
      l_t_range-low = zzperiod.
      l_t_range-option = 'EQ'.
      l_t_range-sign = 'I'.
      MODIFY l_t_range INDEX l_idx.
      p_subrc = 0.
    *$*$ end of routine - insert your code only before this line         *-*
    endform.
    Thanks
    Reddy

  • Regarding the routine in infopackage

    Hi Experts,
    I have an infopackage with only full load update,i am loading a daily load into the target with that ..now what i want to know is that i want to create a routine in infopackage so that it deletes the previous day data automatically ..so that if i am loading todays data it wont be duplicated..so can any one give me the code and step by step ways to  do that ..i would appreciate the answers and assign maximum points for the valuable one...
    regards,
    Rk

    If it is going to be full load, you have some options like:-
    a. At Infopackage Level:- Under the data-targets tab, you have a check box for deleting the targets contents before loading, if you check that tab, the data will be deleted automatically before loading.
    But beware that ALL data will be deleted and only today's data will remain there.
    b. Process Chains:- If your selections are same, you can use a process type "Delete Overlapping Request" in the process chain, and it will delete the contents before reloading them.
    Hope this helps.
    Cheers,
    Sumit

  • Routine in Infopackage - Extraction

    Hi All,
    I want to know ; How to write Routine in the Infopackage Extraction?
    I know that we can write Routine in Infopackage extraction.
    PLease let me know the steps.
    Regards,
    Macwan James.

    Hi
    In ifopackage we use routine for selection, please find below threads related to this which will be helpfull to you:
    Infopackage Selections Tab-OLAP Variable/ABAP Routine
    ABAP Routine correction in the selections fields of a Infopackage
    Re: how to write routine for infopackage
    Regards
    Ravi

  • Request Transport issue for routines

    Hi All,
    I have created one routine 950,The system craeted include for this is RV60C950.
    This include saved under the inculde of RV60CNNN.
    After transported this changes to Qulatiy We have the routine RV60C950 inculde
    But In the program RV60CNNN we do not have RV60C950 include
    What is the cause?
    Through access key i saved the include RV60CNNN in development and transported to qualtiy ,Request saying successfully transported but change not at all reflecting.What is the cause.
    Please help me?

    Hi,
    Now trnasported ,i think its some server problem
    thanks

  • Licence   is not included for the material - J1IH

    Hi All
    We are working on ECC 6.0.
    While doing J1IH ( Additional Excise) with Subtransaction Type 01, we are getting a warning message as -
    Licence   is not included for the material
    Message no. 8I993
    However if we process without any Subtransaction Type, no warning is flashed.
    Please let me know the reason for the same and what could be done so that system doesnt prompt it?
    Regards
    Kapil

    Hi
    Check SAP note 1223591
    Regards
    Antony

  • Error while opening BSP:page included for Technical Reasons: VIsta & Win7

    Hi Experts,
    when trying to open the Appriasal document in user worklist  BSP page opens as an  R/3 screen saying "this page is included for Techinical reason" and then stops. it is nop
    This issue is faced in Windows Vista and Windows7 not in lower versions of Windows OS.
    Any suggestions will be really helpful and will be rewarded
    With Regards,
    Dayakar.

    Hi Dayakar ,
    Check in nwa if you see any traces related to the issue . Check how other BSP's behave in your portal and try viewing the contents directly from backend . You mentioned that the issue is coming in win7 , vista - so it could be that the portal is not compatible . Check out the compatibility in PAM .
    Regards
    Mayank

  • URGENT: How to find out the Tables for Routines  in BW.

    Hi BW Gurus,
    How to find out the Tables for Routines  in BW.
    I have this routine id <b>45XFAEI7LKIFIRDUKQG127YWW</b> and it is in inactive state and i want to activate it.
    thanks in advance,
    points will be rewarded.
    Regards,
    Maruthi.

    Hi Maruthi,
    Check table RSUPDROUT using the routine id as input for the field CODEID. You will get the technical name of the update rule.
    Cheers,
    Praveen.

  • Licence   is not included for the material

    Hi,
    I have maintained account ddetermination for DIEX ETT for sub transaction type 22. When I am doing Additional Excise in J1IH system is giving the warning message as "Licence   is not included for the material" and it is not picking any G/L accounts. Where as without subtransaction , it is picking concerned G/L accounts. Please suggest, what I have to do?
    Regards,

    Hi
    Check SAP note 1223591
    Regards
    Antony

  • What are the settings for datasource and infopackage for flat file loading

    hI
    Im trying to load the data from flat file to DSO . can anyone tel me what are the settings for datasource and infopackage for flat file loading .
    pls let me know
    regards
    kumar

    Loading of transaction data in BI 7.0:step by step guide on how to load data from a flatfile into the BI 7 system
    Uploading of Transaction data
    Log on to your SAP
    Transaction code RSA1—LEAD YOU TO MODELLING
    1. Creation of Info Objects
    • In left panel select info object
    • Create info area
    • Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    • Create new characteristics and key figures under respective catalogs according to the project requirement
    • Create required info objects and Activate.
    2. Creation of Data Source
    • In the left panel select data sources
    • Create application component(AC)
    • Right click AC and create datasource
    • Specify data source name, source system, and data type ( Transaction data )
    • In general tab give short, medium, and long description.
    • In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    • In proposal tab load example data and verify it.
    • In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    • Activate data source and read preview data under preview tab.
    • Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    3. Creation of data targets
    • In left panel select info provider
    • Select created info area and right click to create ODS( Data store object ) or Cube.
    • Specify name fro the ODS or cube and click create
    • From the template window select the required characteristics and key figures and drag and drop it into the DATA FIELD and KEY FIELDS
    • Click Activate.
    • Right click on ODS or Cube and select create transformation.
    • In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    • Activate created transformation
    • Create Data transfer process (DTP) by right clicking the master data attributes
    • In extraction tab specify extraction mode ( full)
    • In update tab specify error handling ( request green)
    • Activate DTP and in execute tab click execute button to load data in data targets.
    4. Monitor
    Right Click data targets and select manage and in contents tab select contents to view the loaded data. There are two tables in ODS new table and active table to load data from new table to active table you have to activate after selecting the loaded data . Alternatively monitor icon can be used.
    Loading of master data in BI 7.0:
    For Uploading of master data in BI 7.0
    Log on to your SAP
    Transaction code RSA1—LEAD YOU TO MODELLING
    1. Creation of Info Objects
    • In left panel select info object
    • Create info area
    • Create info object catalog ( characteristics & Key figures ) by right clicking the created info area
    • Create new characteristics and key figures under respective catalogs according to the project requirement
    • Create required info objects and Activate.
    2. Creation of Data Source
    • In the left panel select data sources
    • Create application component(AC)
    • Right click AC and create datasource
    • Specify data source name, source system, and data type ( master data attributes, text, hierarchies)
    • In general tab give short, medium, and long description.
    • In extraction tab specify file path, header rows to be ignored, data format(csv) and data separator( , )
    • In proposal tab load example data and verify it.
    • In field tab you can you can give the technical name of info objects in the template and you not have to map during the transformation the server will automatically map accordingly. If you are not mapping in this field tab you have to manually map during the transformation in Info providers.
    • Activate data source and read preview data under preview tab.
    • Create info package by right clicking data source and in schedule tab click star to load data to PSA.( make sure to close the flat file during loading )
    3. Creation of data targets
    • In left panel select info provider
    • Select created info area and right click to select Insert Characteristics as info provider
    • Select required info object ( Ex : Employee ID)
    • Under that info object select attributes
    • Right click on attributes and select create transformation.
    • In source of transformation , select object type( data source) and specify its name and source system Note: Source system will be a temporary folder or package into which data is getting stored
    • Activate created transformation
    • Create Data transfer process (DTP) by right clicking the master data attributes
    • In extraction tab specify extraction mode ( full)
    • In update tab specify error handling ( request green)
    • Activate DTP and in execute tab click execute button to load data in data targets.

  • ABAP routine in infopackage that runs function in ECC

    Hi All
    I need to have dynamic filter in the info package
    I have program in ECC that brings me the value that I need to filter in my info packege
    I want to use  ABAP routine in infopackage that runs function in ECC and brings the value that was received from the ECC function
    Is that possible?
    Thanks

    Hi All
    my CTO found the following option
    function module that is "remote-enabled module "
    then you call CALL FUNCTION 'Y_FM_IDOC_CATSDB' DESTINATION 'SAP4.7E'
    you need to define it in SM59
    code example
    data: BEGIN OF IT_SOBSL OCCURS 0,
          SOBSL(2),
          END OF IT_SOBSL.
    DATA: ls_range type STANDARD TABLE OF rssdlrange WITH HEADER LINE.
    SELECT /BIC/ZSPEPROCI FROM /BIC/SZSPEPROCI INTO TABLE IT_SOBSL
                          WHERE /BIC/ZSPEPROCI NOT BETWEEN 'AA' AND 'ZZ'
                          AND /bic/zspeproci ne '' .
    BREAK-POINT.
    LOOP AT IT_SOBSL.
    ls_range-IOBJNM = 'SOBSL'.
    ls_range-LOW = IT_SOBSL-SOBSL.
    ls_range-SIGN = 'I'.
    ls_range-OPTION = 'EQ'.
    APPEND ls_range .
    ENDLOOP.
    loop at ls_range.
      append ls_range to l_t_range.
    endloop.

  • Question about using a PHP include for the head info...

    Hi,
    I'm currently using PHP includes for my site header and footer info.
    All my js/css files and meta declarations are in the head portion, which is in the header include.
    How would I go about giving each page its own individual TITLE if the modifiable content of my pages is inside the body only? Since we can't specify title inside the body, am I stuck with the same page title for each page on the website?

    Is it true that you header include file has the </head> and <body> tags embedded? It would seem a lot neater - and safer - to use two include files, one for the header and one for the body. That way, the <title> is not in either of them and you can do with it what you will.
    Barry

  • What is use of routine in Infopackage screen

    Hi,
    What is use of routine in Infopackage screen.
    can anyone provide me a scenerio.
    Thanks,
    cheta.

    Yes they are very helpful...
    I will explain you one scenario....
    Because of certain irregularities in the system, I have to take a full upload everyday from 1st Apr 2007 to the current date...earlier I was extracting that data manually because I have to give the current date in the "TO" field....now my From date is 1st April 2007 and From Date is Sy-Datum...now this package is scheduled and I have removed the manual intervention.
    Hope this clears you.
    Regards
    Gajendra

Maybe you are looking for