Global Routine

Hi All
what is global routine? Where do you find the option to write it?
Regards
Saddy

Hi,
Start Routines in Transfer Rules
Use
You have the option of creating a start routine in the transfer rules maintenance screen. This start routine is run for each data package after the data has been written to the PSA and before the transfer rules have been executed. The entire data package in the transfer structure format is used as parameter for the routine.
Functions
You can change the data package by adding or deleting records.
Transfer routine
Creating Transfer Routines
Procedure
1. In the transfer rule maintenance screen, choose Create Routine for the relevant InfoObject.
2. For the transfer rule choose Routine ® Create in the dialog box.
3. Specify a name for the local transfer routine that you want to create.
4. You have the option of using transfer structure fields in the routine. You can choose between
· No fields:
The routine does not use any source structure fields. Make this selection when you determine the user name from a system variable (SY-UNAME), for example.
· All fields:
The routine uses all source structure fields. In contrast to explicitly selecting all fields (see below), this option also includes fields that are added to the source structure later.
· Selected fields:
If you make this selection, you have to explicitly select the fields used. Also in the program editor for implementing routines, only the selected fields are available to you in this case.
You need these settings, for example when using SAP RemoteCubes, so that you can also determine the transfer structure fields for InfoObjects that are filled using transfer routines.
Choose Next. You get to the transfer routine ABAP editor.
5. Create a local transfer routine or change an existing routine.
You can not delete the fields used in the routines from the transfer structure. They are displayed in the where-used list
For SAP RemoteCubes you may have to create an inversion routine for transaction data. See also Inversion Routines.
6. Save your entries.
Also....
transfer routine
start routine in transfer rules
update routine
start routine in update rules
Hope it helps,
Thanks,
Happy Life,
Aravind

Similar Messages

  • Info object Global routine

    Hi,
    i had infoobject ZEBAY01 and need to write global transfer routine for this infoobject. Now the infoobject value is comming 0000999999 but the business wants the output value as 009999. They want to see output value as 6digit like (009999).can someone help me how to write code here
    ROGRAM CONVERSION_ROUTINE.
    Type pools used by conversion program
    TYPE-POOLS: RSD, RSARC, RSARR.
    TYPES: DE_ZEBAY01(000015) TYPE C.
    Conversion rule for InfoObject ZEBAY01
        Data type       = CHAR
        ABAP type       = C
        ABAP length     = 000015
    FORM CONVERT_ZEBAY01
      USING    RECORD_NO LIKE SY-TABIX
               SOURCE_SYSTEM TYPE RSA_LOGSYS
               IOBJ_NAME TYPE RSIOBJNM
      CHANGING RESULT TYPE DE_ZEBAY01 " InfoObject value
               RETURNCODE LIKE SY-SUBRC.
    $$ begin of routine - insert your code only below this line

    Hi Sri,
    This would be helpful to you.
    Data: de_zebay(15) type c value '000099999911223', " here i have given default value as 15 digits: 000099999911223
             de_zebay1(15),
             de_zebay(15).
    de_zebay1 = de_zebay3(6). "This will read 6 characters from 4th char onwards and place it to de_zebay1+
    de_zebay2 = de_zebay12(3). "This will read 3 characters from 13th char onwards and place it to de_zebay2+
    concatenate de_zebay1 de_zebay2 into de_zebay.
    result = de_zebay.
    Output: 099999223

  • Select flat file name using routine

    Hi experts!
    I am trying to write a routine in the infopackage for flat file extraction, which will select the flat file automatically according to the date. I need to load always the file of the previous week. Please help me correcting the code. The file name is: DatAuftragsbestandSeiten_W(number of week).fix
    For example: DatAuftragsbestandSeiten_W16.fix
    Thank you for your help!
    program filename_routine.
    Global code
    $$ begin of global - insert your declaration only below this line  -
    Enter here global variables and type declarations
    as well as additional form routines, which you may call from the
    main routine COMPUTE_FLAT_FILE_FILENAME below
    *TABLES: ...
    DATA:   ...
    DATA: Str1 value '/strans/appl/anzeigen_bw/DatAuftragsbestandSeiten_W',
    Str3 value '.fix'.
    DATA: iweek(2).
    call function 'WEEKNR_GET'
      EXPORTING
        DATE         = sy-datum
      IMPORTING
        WEEK+4(2)    = iweek.
    iweek = iweek - 1.
    $$ end of global - insert your declaration only before this line   -
    form compute_flat_file_filename
      using    p_infopackage  type rslogdpid
               p_datasource   type rsoltpsourcer
               p_logsys       type rsslogsys
      changing p_filename     type RSFILENM
               p_subrc        like sy-subrc.
    $$ begin of routine - insert your code only below this line        -
    This routine will be called by the adapter,
    when the infopackage is executed.
      p_filename =
    *....Concatenate str1 iweek str3 into p_filename.
      p_subrc = 0.
    $$ end of routine - insert your code only before this line         -
    endform.

    hi Doris,
    try
    in global routine
    data : l_week type SCAL-WEEK,
           i_week(2).
    in form compute_...
    data : Str1 type string,
           Str3 type string.
           str1 = '/strans/appl/anzeigen_bw/DatAuftragsbestandSeiten_W'.
           str3 = '.fix'.
           call function 'DATE_GET_WEEK'
              exporting
                 date = sy-datum
              importing
                 week = l_week.
              i_week = l_week+4(2).
              i_week = i_week - 1.
              if strlen( i_week ) = 1.
                 concatenate str1 '0' i_week str3 into p_filename.
              else.
                 concatenate str1 i_week str3 into p_filename.
              endif.
    hope this helps.

  • How to write a Globla Routine for Transfer Rules

    Hi Experts,
    How to write a Global Routine for Tranfer Rules ? Where all the infoobjects need to be grouped? Effect need to be shown on group of fields that are available in a single structure.
    Thanks in Advance
    Vara

    Hi,
    Are you aware of Start Routine available?.. This helps to write a routine on all the infoObjects available in Transfer Structure
    http://help.sap.com/saphelp_nw04/helpdata/en/b3/0ef3e8396111d5b2e80050da4c74dc/frameset.htm
    regards
    Happy Tony

  • 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

  • EXPLAIN ABOUT ROUTINES?

    hi experts,
      What is the difference between ROUTINE,GLOBAL ROUTINE,START ROUTINE AND TRANSFER ROUTINE.
    What is the advantages and disadvantages from one to another
    anbody can explain breafly pl. hepl me in this.
    thanks & regards
    vijay

    Routine is mainly written to change the source data the way we want in BW. Now there are different defination of routine based on what steps we are modifying the source data.
    In 3.5, we used to have transfer routing and start routine.
    1) transfer routing is used when we want to do data modification as soon as it comes to BW. There rules needs to write which used to be object to object mapping rule. This affect only perticular object for whcih rules is written.
    2) Start routine is used at global level where it affects all infoobjects available in transfer structure.
    In 7.0 release, there is new concept used. we would be knowing that now mapping is done in Transformation. So on this transformation screen, you will see Start Routine and End Routine.
    1) Start Routine is used when data needs to be changed before transformation. In this case, source_table is used in code and changed data goes as it is to data target.
    2) End routine isused when data target wise data needs to be changed. This works after transformation and Result_table is used in code.
    Hope this helps...if yes please assign points.
    Regards
    Pankaj

  • Error in global conversion rule for 0DOC_CATEG

    Hi Friends,
    My transfer rules are inactive for 2LIS_11_VAITM. When i tried to get activate i am getting the below error message...
    Error in global conversion rule for 0DOC_CATEG
    How i can activate the transfer rules.
    is there any global routine for this infoobject.
    Please suggest a solution.
    Thanks & Regards,
    Anand

    Hi Reddy,
    Goto Change mode of the info object 0DOC_CATEG. Just edit the description of 0DOC_CATEG by adding a "." and activate it.
    Again change the description by removing the "." and activate the info object.
    After doing this, activate the transfer rules. It'll work fine.
    -- Selva

  • Migration routines

    Hi
    I migrated the transfer rules from 3.5 to 7.0. The transformations are created by default with all the routines copies. But in transformation, All my routines are showing under the global routines.
    For ex: In update rule key figure 1 has routine u201CABCu201D and key figure 2 has routine u201CDEFu201D and key figure 3 has routine u201CGHIu201D
    After migration, in transformation key figure 1 has routine u201CABCu201D, u201CDEFu201D, u201CGHIu201D in global routine.
    I donu2019t understand what is happening. Can anyone give me understand on what happens after migration?
    Regards
    Annie

    Hi Annie,
    Please refere the following SAP note:
    SAP Note 912841 Migration help
    Link: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_whm/~form/handler
    & Migrating transfer rules and update rules for BW7.x
    SAP Note Number: 1052648
    Link:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_bw_whm/~form/handler
    Hope it helps.
    Thanks & Regards,
    Rashmi.

  • Design of Time Management infocube

    Hi, I need the help of HR BW experts!!!
    The scenario is this:
    1) I'm loading transactional data for time and accidents through Flat files into an ODS
    2) My final cube, must have the 0EMPLOYEE and their attributes as well to use in reports
    3) I  know master data 0EMPLOYEE is time dependant.
    4) I added attributes as fieds in my Cube (for performance reasons). The question is WHICH IS THE BEST WAY TO FILL ALL ATTR?
    I'm looking at the standard. In the doc there is 2 routines: Personne and a Global routine. But I can not see them!!! Even this, I understand that this attributes must be filled with the values according to the date of loadind (business rule).
    So, do I have to create a function - routine to read master data according to the DATE of loading?
    Or it is already done in the standard?
    In SAP note 336229, it says:
    4.All attributes of 0PERSON and 0EMPLOYEE must be time-dependent.
    Maintenance of the validity slice (Transaction RSDV) for InfoCube 0PAPA_C02 after the first load of data:to-mode 'Fixed value' and '31.12.9998' as a date
    What is it? Can apply for PT??
    Please, if somebody has implemented this, PT information, Time Management, tell me which is the best solution for this, having into account performance issues.
    Thank you!!
    Regards
    Rosana

    0employee has time dependent attributes.
    So, when you are loading the transactional data, the system will check the attribute value, which is valid currently and load the data accordingly.
    Lets say
    0employee   Valid from    Valid to           Country
    10001           21.03.2008   22.03.2009      IN
    10001           23.03.2009    31.12.9999     SG   
    Country is an attribute of 0employee.
    When you are loading the data today, the system will check the valid country ( country = SG is valid today) and fill the attributes.
    Hope this is clear.
    Ravi

  • Variable exit populates value in RSRT And bex analyzer but not on web

    Hi everyone
    I am trying to populate my end date with the number of days, and it gives me the right result everytime I execute the query in RSRT or when I go through the BeX analyzer in BI 7. So when I put 30 days, my end date automatically gets populated with the range todays date to todays date + 30 days.
    But when I execute the same query through the query designer on the web, it doesnt get populated with the right value. and just gets populated with the range : todays date to todays date.
    Please let me know, how to correct this value, I think the problem is how the web template has been defined. Could you please let me know, how to correct the error.
    will surely reward points for the correct answer.
    thanks
    amit

    Hi Amit !!
    Maybe you should try to populate a variable on a global routine. Its works to us with for example a variable for a year to planificate and version. !!
    Hope this helps !
    Natalia.

  • SUD-Dialog Variablen-​Rückgabe

    Hallo NI'ler,
    ich erstelle gerade meinen ersten SUD-Dialog mit 5 CheckBoxen. Je nach dem, welche Box nun aktiviert wurde, soll eine Variable einen anderen Wert zugewiesen bekommen. Mein bisheriger Ansatz war
    Sub CheckBox1_EventChange()
    Dim This : Set This = CheckBox1
     checkbox1.RunChange
     L1 = 1
     checkbox2.Value = 0
    End Sub
    Im VBS-Script sollte dann per "msgbox" der entsprechende Wert von L1 ausgegeben werden. Egal, welche der Boxen aktiviert wird, erhalte ich "0" als Rückgabewert. Könnte mir bitte jemand die korrekte vorgehensweise erklären?
    Danke!
    Björn
    Message Edited by bk220 on 11-02-2007 09:38 AM

    Hallo Björn!
    Doch noch was Zeit gefunden
    Das grundsätzliche Problem bei deinem Code ist das du wechselweise die Werte von Controls in den Change Events änderst. Dazu kurz ein Umweg in die Theorie: Hat man z.B. zwei Checkboxen in einem Dialog so werden bei jeder Änderung die zugehörige EventChange Routine ausgeführt. Eine Änderung kann interaktiv durchen Anwender erfolgen oder aber durch Ändern des Wertes (Value-Eigenschaft) per Skript. Wird nun in der EventChange Routine des ersten CcheckBox der Wert der zweiten Checkbox verändert so wird auch sofort deren EventChange durchlaufen. Beachtet man dies nicht kommt es zu 'seltsamen' Verhalten.
    Das führte dann bei dir dazu das du einen RunChange Aufruf zur Hilfe nehmen musstes damit es überhaupt irgendwie funktionierte. Mach mal Messageboxen in die Routinen und spiel mal was damit herum.
    Nun zur Lösung (meine, es gibt da mehrere mögliche Ansätze):
    Ich würde in jeden EventChange-Routine einen Aufruf in eine globale Routine machen und die notwendigen Werte als Parameter übergeben. Das sieht dann für die ersten beiden CheckBoxen so aus:
    Sub CheckBox1_EventChange()
    Dim This : Set This = CheckBox1
    Call UpdateCheckBox(1,CheckBox1.Value)
    End Sub
    Sub CheckBox2_EventChange()
    Dim This : Set This = CheckBox2
    Call UpdateCheckBox(2,CheckBox2.Value)
    End Sub
    Die globale Routine sieht dann so aus:
    Public Sub UpdateCheckBox(Byref nNo, Byref nValue)
    If (L1 <> nNo) And (nValue = 1) Then
    ' es hat sich was geändert
    L1 = nNo
    Elseif (L1 = nNo) And (nValue = 0) Then
    ' auch alle AUS zulassen
    L1 = 0
    End If
    ' Umwandlung L1 Wert in gecheckte Box
    checkbox1.Value = (L1 = 1)
    checkbox2.Value = (L1 = 2)
    checkbox3.Value = (L1 = 3)
    checkbox4.Value = (L1 = 4)
    checkbox5.Value = (L1 = 5)
    checkbox6.Value = (L1 = 6)
    checkbox7.Value = (L1 = 7)
    End Sub
    Die richtigen Zustände der Checkboxen werden dort gesammelt aus L1 abgeleitet. Die Logik ist so das auch alle Boxen aus sein dürfen. Die Logik am Anfang verhindert Rekursionen.
    Ich hoffe das hilft
    Matthias
    Matthias Alleweldt
    Project Engineer / Projektingenieur
    Twigeater?  

  • Material length

    hi
    this is my scenerio
    my DS is 0material_text
    i am getting 0material, text and lanu
    at transfer rules 0 material is mapped with produect (char) with length 40. they have wirtten 1 rountine chnage length from 18 to 40 to target field.
    this infosource is assigned my cubes already uisng at production.
    now their requirement is in future they may create some more cubes . they need the infosource ( that material) lenthg will be same.
    they can use same infosource , they can write update routine for new cubes. they dont wnat like, they want field with 18 length at infosource level
    i suggested this solution
    create Z datasource (generic extraction withtext) assign this new ds to any new infosource and use this new infosource for  new cubes?
    please let me know my suggested solution is correct ?
    or please let em know any best solution is theer for this scenerio

    Hi Suneel......
    0material_text is a master data..............did u mean that u have used same infosource for both master data and transaction data.........but how.........as per my knowledge it is not possible.........
    Whatever....ur solution is ok........
    But u can do another thing...........u will include product infoobject in those infocubes......right........
    Now before transaction data we will load master data......Now u..........in the General tab page of the characteristic infoobject ........there is a option to create Transfer routine...........this routine is a global routine......and there u can write code to chnage length from 18 to 40 to target field............
    Here u hav to write code only once............but if u write it at infosource level..........it will be local.........infosource specific......
    Hope this helps.....
    Regards,
    Debjani.........

  • Global variable declaration in form routines

    Hi All,
    i am new of the smartforms, i have a small problem in smartforms.
    i need to display the one text based on the condtions, already i have putted the condtions in the condition tab for the text, i need to compare the one more condtion, the condtion is TB_INFORMATION IS NOT INITIAL.
    the code was devaloped in the formroutines , i need to implement the one condtion in the form routines,
    the condition is if TB_INFORMATION IS NOT INITIAL is not initial
                                  va_information = x.
                                endif.
    already i declared the variable in the global defination ,but i am getting the error.
    where can i declare the global variable in form routines.
    Please help me,
    Thanks & Regards
    charan

    declare in global data and it will be visible and available in form routines too.

  • Accessing Global Internal Table in Field Routine Level

    I am working on a transformation. I have created a Global Internal Table with the structure of my Source Target + extra fields not in my source target. In the start routine of the transformation I am first copying all corresponding fields from SOURCE_PACKAGE to internal table and then finally doing a lot of manipulations and modifying and appending the internal table with data now ready for populating to target.
    I want to populate the target fields at field routine level by  the data present in the Global internal table. Can you please tell me how to code here. If data was being read by SOURCE_PACKAGE, I would have read the value of SOURCE_FIELDS - (Value). But incase of value to be read from Global Internal Table, can I refer to the internal table work area directly. Thanks.
    Global Internal Table - G_ITAB
    Work Area - WA_G_ITAB
    Is the below correct ?
    Result = WA_G_ITAB-(Field Name).

    Let me understand this with an example as I am still not clear. Suppose I am loading to a DSO having 17 Key Fields say K1, K2, K3.........K17.
    And if the 3.5x logic is
    DATA : L1 LIKE COMM_STRUCTURE-amt.
      CLEAR L1 .
      IF COMM_STRUCTURE-CHK = '222'
       OR COMM_STRUCTURE-CHK = '333' .
        L1 = COMM_STRUCTURE-amt .
      ENDIF.
      RESULT = L1 .
    Can you tell me the code of the above in BI7 at field level routine now. Please note I need to take data from G_ITAB internal table and that the DSO has 17 key fields?

  • What is the order of execution of global transfer routine where multiple routines are involved?

    Hi,
    Suppose we have start routine, transformation routines and end routine defined between datasource and data target, and also we have a global transfer routine created on an infoobject.
    What is the order of execution of routines in this scenerio?
    Also if conversion routine like ALPHA is defined for an Infoobject, when does this come into flow.?
    Please enlighten me.
    Thanks,
    Akshara

    Hello Akshara ,
    The sequence of routines are as
    1. Start Routine
    2. Master Data Look Up or
    3. Field Level Routine
    4. End Rountine
    Apart from this , there is Expert routine, which is used in special cases, when there are not the sufficient functions to perform a transformation. It can be used as a interim solution , and it performs all the  functions of Start routine, end routine , field routine.
    Note : if you have created  transformation, and then created Expert routine, then system will delete all the existing transformations.
    Further to this, you can explore more, by debug the transformation as suggested by Vijay Kumar.
    Hope this helps !
    Regards
    YN

Maybe you are looking for

  • How to setup the reply-to email in a concurrent Program

    Hi I am trying to setup the e-mail Delivery Options when submitting af Concurrent Program in OEBS 12.1.3. I submit a concurrent job and choose the Delivery Option -> Email and then enter a To: e-mail. Then the "From:" address is populated with my e-m

  • Stop Command+F from bogarting my current window

    Hi, all - Is there any known way to tell Finder that when I initiate a new search (Command+F) it should search in a new window, rather than commandeering the current front-most Finder window? In the first iteration of Command+F (or back when it autom

  • Help needed on a new MacBook Pro asap :)

    I have just purchased a brand new MacBook Pro.. Do I need to install any anti virus software on to it or is it already protected and therefore not needed? Also, is there an equivalent to Microsoft Office (incl. Word, Excel, Powerpoint etc) that you c

  • Rhythmbox error on startup

    Rhythmbox starts up really slow for me. When I run it from the command line, I get this: (rhythmbox:1804): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed ** Message: pygobject_register_sinkfunc is deprecated (GstObj

  • Problems updating my iBook G4

    Im getting this error message everytime i try to update. please could some one give me some advice. "Make sure you have permission to write to /private/tmp/501/TemporaryItems/com.apple.SoftwareUpdate, then try again." iBook G4   Mac OS X (10.3.9)