Transfer values between Function Groups

This may be a very silly question. I have two function groups x and y. X calls a z function module which is in the same funcion group as X. Now I want to pass some value that x gave to z to Y function module . How do I do it??

I think function Z shouldn't called by X, but Y.
Infact X and Z are in the same group so they can see the global variables of group.
For example:
GROUP 1 -> Function X, Z.
TOP include.
DATA: FIELD1 TYPE C.
DATA X_BKPF LIKE STANDARD TABLE OF BKPF.
FUNCTION A.
FIELD1 = 1.
X_BKPF = .....
ENDFUNCTION.
FUNCTION Z.
EXPORTING
  REFERENCE(FIELD)
TABLES
    T_BKPF...
  FIELD = FIELD1. "Take field1 value
  T_BKPF[] = X_BKPF[] "Take table values
ENDFUNCTION.
Group 2 Y
FUNCTION Y.
CALL FUNCTION Z
  IMPORTING FIELD = FIELD_Y
  TABLES    T_BKPF = T_BKPF_Y.
ENDFUCTION.
Message was edited by: max bianchi

Similar Messages

  • What is the difference between function groups and Object Orientation

    Hello all
    I have read about this on the help.sap.com site, I still do not understand it completely, can some one explain me with  a simple example please ? (Not the increment counter example please !).
    Thanks a ton.
    Rgds
    Sameer

    Hello Sameer
    When you call a module of a function group for the first time in your program then the entire function group is loaded. However, this can happen only once within your report and all global variables within the function group will have the same values all the time (except they are manipulated via fm's).
    In contrast, you can create as many instances of the same class as you want and all of them can have different global attributes. And all these instances are independent of each other.
    On the other hand, if fm_A changes global attributes of the function group and fm_B reads these attributes then fm_B read the changed values.
    Or in other words:
    Function Group = can be instantiated only ONCE
    Class = can be instantiated unlimited
    Regards
      Uwe

  • Transfer Employees between Business Group

    Dear All
    Please i found something called Oracle EBS Global Deployment under HR Professional Responsibility allow me to transfer employees between 2 Business Group
    but still am searching for more details
    because we need transfer employees between our companies  but for some reason all company defined as BG and we cannot do that.
    EX: Company A     Company B
    if we need transfer EMP from A to B we terminate him from A and we register him in B with new num
    Please any one can help me to solve it.
    Thanks

    Mahmed
    I would strongly say you need to refer the Workforce and Management guide
    Which will explain you the complete details of the Organization
    You need to get the basics for this because these BG and OU are going to be the foundation for the instance. So just by know the definition will not help you
    Thanks
    Regards
    Ramesh Kumar S

  • Losing variable values between functions...

    hi!
    I'm trying to do something simple in actionscript as simple as this:
    - Create a variable: var urlVideo:String;
    - Use that variable inside a function and give it a value: urlVideo = videoElemento.url.text();
    - Then create a new variable and give it the urlVideo value: var url:String = urlVideo;
    My problem is that urlVideo loses it's value
    Why is that happening?
    Here's my code:
    var idVideo:String = "12";
    var urlVideo:String;
    var xmlPath:String = "videos.xml";
    var xml:XML;
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    function xmlLoaded(e:Event):void
    if ((e.target as URLLoader) != null )
    xml = new XML(e.target.data);
    xml.ignoreWhitespace = true;
    getVideo(xml);
    function getVideo(videosInput:XML):void
    var listaVideos:XMLList = videosInput.Video;
    for each (var videoElemento:XML in listaVideos)
    if(videoElemento.id.text() == idVideo)
    urlVideo = videoElemento.url.text();
    trace(urlVideo); //has a value
    break;
    var url:String = urlVideo; //the urlVideo values is null !!
    What am i doing wrong?
    Can anyone help me?

    The above post is correct providing the way you displayed the code in your original post is the same way you have it in your program
    function getVideo(videosInput:XML):void
    var listaVideos:XMLList = videosInput.Video;
    for each (var videoElemento:XML in listaVideos)
    if(videoElemento.id.text() == idVideo)
    urlVideo = videoElemento.url.text();
    trace(urlVideo); //has a value
    break;
    var url:String = urlVideo;  this line occurs outside the function which means that until getVideo is called urlVideo will always be null because its never set until getVideo actualy gives it a value.
    zeroskillz method will set the url to play right inside the function which is a good way to organize.. keep behaviors together.
    now if you placed url= urlvideo before the end of the function you would have seen a trace like thus:
    function getVideo(videosInput:XML):void
    var listaVideos:XMLList = videosInput.Video;
    for each (var videoElemento:XML in listaVideos)
    if(videoElemento.id.text() == idVideo)
    urlVideo = videoElemento.url.text();
    trace(urlVideo); //has a value
    break;
    var url:String = urlVideo  //has value

  • Pass Values between two Function Modules RFC in Portal

    I need to pass values ​​between 2 FM RFC.
    I have an implicit enhancement in HRMSS_RFC_EP_READ_GENERALDATA RFC function module.
    PERNR LIKE  PSKEY-PERNR
    ENHANCEMENT 1  Z_ESS_EXPORT_PERNR.    "active version
      EXPORT pernr to memory id 'PMK'.
      set parameter id 'PMK' field pernr.
    ENDENHANCEMENT.
    On the other hand an RFC function module that has the code:
            pmk    LIKE PSKEY-PERNR,
            pmk_2  LIKE PSKEY-PERNR.
      get parameter id 'PMK' field pmk.
      IMPORT pmk_2 FROM MEMORY ID 'PMK'.
    When the execution is done in development environment, the modules function at the level of R3, the "get parameter id" works only if the debbuger is classic, otherwise not work. The Import to memory id never works.
    In the environment of quality, r3 do not work any of the 2 sentences. If run from portal (which is as it should be) does not work.
    Thanks if anyone can help me get the problem. Both function modules are executed at the portal.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 2:02 AM

    When the execution is directly in r3, in development environment or quality, does the set / get parameter id. Export / Import memory id not work.
    But if the FM are called from the portal, does not the set / get parameter id.
    I tried changing the sentence as I indicated harishkumar.dy still not working.
    Madhu: They're in different function groups, one is standard and the other not.
    Regards
    Edited by: Daynet1840 on Feb 15, 2012 3:08 PM
    Edited by: Daynet1840 on Feb 15, 2012 3:11 PM

  • GET function fails to get values between 1 and 0

    Hi i have the folowing code
    GET(CONTAVENDAS="PERCVOLUMECORP",FONTEDADO="INPUT",TEMPO="2011.INP",PRODUTO="%SPECIE%_IN",CANAL="NACANAL",ORGCOMERCIAL="NAORGCOM")
    When the value in the PERCVOLUMECORP account, is greater or equal to 1 let's say 80, the get function returns me the correct value, but when i have a value between 0 and one, for instance 0,25, the get function returns 0 (zero)
    Any ideas?
    Thanks in advance.
    Leandro
    Brasil

    Here is the entire script
    **SELECT(%ANO_BD_TRAB%,[YEAR],CATEGORIA,"ID='BDTRABALHO'")
    **SELECT(%ANO_BD_TRAB1%,[YEAR]+1,CATEGORIA,"ID='BDTRABALHO'")
    **SELECT(%ANO_BD_TRAB2%,[YEAR]+2,CATEGORIA,"ID='BDTRABALHO'")
    **SELECT(%MES_INCIO%, STARTMTH, CATEGORIA, "ID='BDTRABALHO'")
    **SELECT(%MESES%,[ID],TEMPO,"MONTHNUM>=%MES_INCIO% AND YEAR=%ANO_BD_TRAB% AND LEVEL='MONTH'")
    **SELECT(%MESES1%,[ID],TEMPO,"MONTHNUM>=%MES_INCIO% AND YEAR=%ANO_BD_TRAB1% AND LEVEL='MONTH'")
    **SELECT(%MESES2%,[ID],TEMPO,"MONTHNUM>=%MES_INCIO% AND YEAR=%ANO_BD_TRAB2% AND LEVEL='MONTH'")
    **SELECT(%CONTAS%, [ID], CONTAVENDAS, "TOPDOWNALLOC='Y'")
    *SELECT(%TODOSPROD%, [ID],PRODUTO,"GRUPO='PRODUTO'")
    **SELECT(%SPECIES%, [ID],PRODUTO,"GRUPO='TIPOESPECIE' AND FLAG_TOPDA='N'")
    **SELECT(%SPECIES_IN%, [ID],PRODUTO,"GRUPO='TIPOESPECIE' AND FLAG_TOPDA='Y'")
    *XDIM_MEMBERSET TEMPO = %MESES%,%MESES1%,%MESES2%,%ANO_BD_TRAB%.INP,%ANO_BD_TRAB1%.INP,%ANO_BD_TRAB2%.INP
    *XDIM_MEMBERSET CONTAVENDAS = %CONTAS%,PERCVOLUMECORP
    *XDIM_MEMBERSET PRODUTO = %SPECIES%,%SPECIES_IN%,%TODOSPROD%
    *OLAPLOOKUP VENDAS
      *DIM FONTEDADO="INPUT"
      *DIM TEMPO="2011.INP"
      *DIM PRODUTO="C_IN"
      *DIM CANAL="NACANAL"
      *DIM ORGCOMERCIAL="NAORGCOM"
      *DIM PERCVOL:CONTAVENDAS="PERCVOLUMECORP"
    *ENDLOOKUP
    *FOR %CONTA% = VOLUME
      *FOR %MES% = 2011.JAN
        *FOR %SPECIE% = C AND %SPECIENAME% = CERVEJAS
         *WHEN PRODUTO.SPECIETYPE
         *IS "%SPECIENAME%"
           *WHEN CONTAVENDAS
           *IS "%CONTA%"
             *WHEN TEMPO
             *IS "%MES%"
                    *REC(CONTAVENDAS="%CONTA%",EXPRESSION=LOOKUP(PERCVOL))
             *ENDWHEN
           *ENDWHEN
         *ENDWHEN
        *NEXT
      *NEXT
    *NEXT
    *COMMIT
    Thanks is advance.

  • Globale variable to exchange  value between two planning function (Formel)

    Hi,
    can I define a globale variable to exchange the value between two planning function?
    any anwser will be very appreciated.
    hongwei

    Hi,
    can I define a globale variable to exchange the value between two planning function?
    any anwser will be very appreciated.
    hongwei

  • Function Groups and Function Modules

    Hi,
    Can anyone give me the detail steps for creating Function Group and then from that function group creation of function module with example?
    Regards,
    Chandru

    Hi,
    Function Group creation -
           A function group is a program that contains function modules. With each R/3 system, SAP supplies more than 5,000 pre-existing function groups.
         In total, they contain more than 30,000 function modules. If the functionality you require is not already covered by these SAP-supplied function modules, you can also create your own function groups and function modules.
          We can put all the relevant function modules under one function group and all the global variables can be declared in this FG.
    FG Creation:
    1)     Function group can be created in SE80. There choose the 'Function Group' from the list of objects.
    2)    Then give a name for ur function group (starts with Y or Z) and press ENTER.
    3)   The click 'YES' in the create object dialog box and give a short desc. for this FG and save.
    Function Module:
                 A function module is the last of the four main ABAP/4 modularization units. It is very similar to an external subroutine in these ways:
    Both exist within an external program.
    Both enable parameters to be passed and returned.
    Parameters can be passed by value, by value and result, or by reference.
    The major differences between function modules and external subroutines are the following:
    Function modules have a special screen used for defining parameters-parameters are not defined via ABAP/4 statements.
    tables work areas are not shared between the function module and the calling program.
    Different syntax is used to call a function module than to call a subroutine.
    Leaving a function module is accomplished via the raise statement instead of check, exit, or stop.
    A function module name has a practical minimum length of three characters and a maximum length of 30 characters. Customer function modules must begin with Y_ or Z_. The name of each function module is unique within the entire R/3 system.
    Defining Data within a Function Module
    Data definitions within function modules are similar to those of subroutines.
    Within a function module, use the data statement to define local variables that are reinitialized each time the function module is called. Use the statics statement to define local variables that are allocated the first time the function module is called. The value of a static variable is remembered between calls.
    Define parameters within the function module interface to create local definitions of variables that are passed into the function module and returned from it (see the next section).
    You cannot use the local statement within a function module. Instead, globalized interface parameters serve the same purpose. See the following section on defining global data to learn about local and global interface parameters.
    Defining the Function Module Interface
    To pass parameters to a function module, you must define a function module interface. The function module interface is the description of the parameters that are passed to and received from the function module. It is also simply known as the interface. In the remainder of this chapter, I will refer to the function module interface simply as the interface.
    To define parameters, you must go to one of two parameter definition screens:
    1) Import/Export Parameter Interface
    2) Table Parameters/Exceptions Interface
    Then in the FM interface screen, give the following
    1) Import parameters
    2) Export parameters
    3) Changing parameters
    Then give
    1) Define internal table parameters
    2) Document exceptions
    You enter the name of the parameter in the first column and the attributes of the parameter in the remaining columns. Enter one parameter per row.
    Import parameters are variables or field strings that contain values passed into the function module from the calling program. These values originate outside of the function module and they are imported into it.
    Export parameters are variables or field strings that contain values returned from the function module. These values originate within the function module and they are exported out of it.
    Changing parameters are variables or field strings that contain values that are passed into the function module, changed by the code within the function module, and then returned. These values originate outside the function module. They are passed into it, changed, and passed back.
    Table parameters are internal tables that are passed to the function module, changed within it, and returned. The internal tables must be defined in the calling program.
    An exception is a name for an error that occurs within a function module. Exceptions are described in detail in the following section.
    Syntax for the call function Statement
    The following is the syntax for the call function statement.
    call function 'F'
        [exporting   p1 = v1 ... ]
        [importing   p2 = v2 ... ]
        [changing    p3 = v3 ... ]
        [tables      p4 = it ... ]
        [exceptions  x1 = n [others = n]].
    where:
    F is the function module name.
    p1 through p4 are parameter names defined in the function module interface.
    v1 through v3 are variable or field string names defined within the calling program.
    it is an internal table defined within the calling program.
    n is any integer literal; n cannot be a variable.
    x1 is an exception name raised within the function module.
    The following points apply:
    All additions are optional.
    call function is a single statement. Do not place periods or commas after parameters or exception names.
    The function module name must be coded in uppercase. If it is coded in lowercase, the function will not be found and a short dump will result.
    Use the call function statement to transfer control to a function module and specify parameters. Figure 19.9 illustrates how parameters are passed to and received from the function module.
    sample FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
      I_CALLBACK_PROGRAM                = ' '
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
      IT_FIELDCAT                       =
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = ' '
      IS_VARIANT                        =
      IT_EVENTS                         =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      I_HTML_HEIGHT_TOP                 = 0
      I_HTML_HEIGHT_END                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      IR_SALV_FULLSCREEN_ADAPTER        =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          =
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Example
    1  report ztx1905.
    2  parameters: op1 type i default 2,   "operand 1
    3              op2 type i default 3.   "operand 2
    4  data rslt type p decimals 2.        "result
    5
    6  call function 'Z_TX_DIV'
    7       exporting
    8            p1      = op1
    9            p2      = op2
    10      importing
    11           p3      = rslt.
    12
    13 write: / op1, '/', op2, '=', rslt.
    Regards,
    Shanthi.P
    Reward points if useful ****
    Edited by: shanthi ps on Jan 26, 2008 12:03 PM

  • In BADi , How to pass the values between two Method

    Hi Experts,
    We have two methods in BADis. How to pass the value  between two Methods. Can you guys explain me out with one example...
    Thanks & Regards,
    Sivakumar S

    Hi Sivakumar!
    Create a function group.
    Define global data (there is a similiar menu point to jump to the top include).
    Create one or two function modules, with which you can read and write the global data.
    In your BADI methods you can access the global data with help of your function modules. It will stay in memory through the whole transaction.
    Regards,
    Christian

  • Is it possible to link values between two numbers pages in icloud ?

    I want to work with different number pages (not sheets) and link values between them.
    The main reason is that I want a group of people to have access to one numbers document and a second group of people to get access to another document that has values extracted from the first document.
    Thanks,

    Thanks for the tip, not only will this help on the few pages I needed, I can utilize this feature for subsequent catalogs and other info that used to be a copy/paste type function.
    I ended up using this feature with a simple find/replace to change the page numbers.

  • Doubt in Selection-Screen for Program type "Function Group"

    Hi Gurus,
    I created a Function group in that i created one screen and writtem the Screen flow logic. In that screen I called a Function module "COMPLEX_SELECTIONS_DIALOG" For Creating a selection-Screen.
    The code snippet is like below.
    CASE ok_code .
        WHEN c_clk1.
          CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
         EXPORTING
           title                   = text-002
           text                    = 'Material Number'
           signed                  = 'X'
            lower_case              = ' '
            no_interval_check       = ' '
             just_display            = ' '          " Un commented by Srihari
             just_incl               = 'X'          " Un commented by Srihari
            excluded_options        =
            description             =
            help_field              =
            search_help             =
           tab_and_field           = st_tab
          TABLES
            range                   = r_matnr
         EXCEPTIONS
           no_range_tab            = 1
           cancelled               = 2
           internal_error          = 3
           invalid_fieldname       = 4
           OTHERS                  = 5.
    it works fine. But the problem is if i click the multiple selection button for the select-option in selection screen and enter the values and copy those value. In the multiple selection button green button is not coming like noram report selection-screen. Please remember I used the program type as "Function Group" not "Module Pool".
    Please send your suggestions.
    Thanks,
    Srihari.

    Ok, I am not 100% sure, if I understand you correctly, you said, you created one screen to 'simulate' a standard selection screen behavior without using select-options statement?
    If that's not correct, could you please post a few more details on what exactly you are doing.
    I had to 'simulate' a select-option behavior which I did as follows:
    - I created a range variable to store the values (s_ctby)
    - on the screen I defined the LOW (s_ctby-low), HIGH (s_ctby-high) and the multiple selection field pushbutton
    - In the PBO I set the icons for the multiple selection pushbutton
      READ TABLE s_ctby INDEX 2 TRANSPORTING NO FIELDS.
      IF sy-subrc NE 0.
        gv_createby = gc_icon_enter_data.
      ELSE.
        gv_createby = gc_icon_disp_data.
      ENDIF.
    - In the PBO make sure that any values entered on the screen are transferred to the range
    * transfer any changed values into the correct range for user transaction
    * (screen 0110) because that screen just 'simulates' a selection screen
    * so we have to make sure that any data the user enters in the selection
    * fields is passed into the appropriate ranges
      IF sy-tcode EQ gc_trans_user.
    *   created by
        IF NOT s_ctby-high IS INITIAL.
          s_ctby-sign   = c_i.
          s_ctby-option = c_bt.
          IF s_ctby[] IS INITIAL.
            INSERT s_ctby INDEX 1.
          ELSE.
            MODIFY s_ctby INDEX 1.
          ENDIF.
        ELSEIF NOT s_ctby-low  IS INITIAL AND
                   s_ctby-high IS INITIAL.
          s_ctby-sign   = c_i.
          s_ctby-option = c_eq.
          IF s_ctby[] IS INITIAL.
            INSERT s_ctby INDEX 1.
          ELSE.
            MODIFY s_ctby INDEX 1.
          ENDIF.
        ELSEIF s_ctby-low  IS INITIAL AND
               s_ctby-high IS INITIAL.
          DELETE s_ctby INDEX 1.
        ENDIF.
    - If the user hits the multiple selection pushbutton
        WHEN gc_fc_create_by.
    *     if the user hits the multiple selection button on the screen
    *     we call the standard SAP functionality to show the multiple
    *     selection popup SAP uses on a standard selection screen
          CALL FUNCTION 'COMPLEX_SELECTIONS_DIALOG'
            EXPORTING
              title             = text-t02
            TABLES
              range             = s_ctby
            EXCEPTIONS
              no_range_tab      = 1
              cancelled         = 2
              internal_error    = 3
              invalid_fieldname = 4
              OTHERS            = 5.
          IF sy-subrc NE 0 AND NOT sy-msgty IS INITIAL.
            MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
    *     now update the header line so the screen fields display the correct values
          CLEAR s_ctby.
          READ TABLE s_ctby INDEX 1.
    Hope that helps,
    Michael

  • Code inspection warnings in Function Group

    Hello,
    Help appreciated.
    I have created a Function Group. When code inspection is done it is giving following warnings :
    Warnings:
    1. Message code Len
    The parameter "I_INHDR" is transferred as value. Use reference transfer
    2. Message Code MESSAGEGM1
    Sequential read access possible for a sorted table.
    3. Message Code 19
    Field label has a fixed font instead of a proportional font
    4. Message Code 05
    First info not in line 1 or 3
    5. Message code str_innowr
    I am not able to understand how to resolve them. Kindly help me with the same.
    Thank You..

    Hi Anil,
    The first 2 warnings can be resolved as follows:
    1.  The parameter "I_INHDR" is probably hard coded. If feasible define it is a CONSTANT in data declaration or use a reference variable (i.e. passing value from a work area or internal table).
    2. You may be reading a sorted internal table. You can use 'BINARY SEARCH' for getting the record.
    For the other messages, paste your code lines for reference.
    Regards,
    Pranav.

  • Info on the ERP_LORD function group required

    Hello,
      Can anyone provide me a detailed knowledge on the function modules in ERP_LORD function group.
      These function modules have something to do with data transfer between ECC systems and CRM.
      Thanks a lot.
    Regards,
    Arjun Shenoy T

    No ERP_LORD.
    If you can help me with SLS_LORD also, that would be good.
    Thanks.

  • Difference between function module and a method?

    Hi Experts
    Can anybody pls tell me the technical and functional difference between function moduel and a method?
    Thanks
    Sudhansu

    Hi,
    Function modules are procedures that are defined in function groups (special ABAP programs with type F) and can be called from any ABAP program. Function groups act as containers for function modules that logically belong together. You create function groups and function modules in the ABAP Workbench using the Function Builder.
    Function modules allow you to encapsulate and reuse global functions in the R/3 System. They are stored in a central library. The R/3 System contains a wide range of predefined function modules that you can call from any ABAP program. Function modules also play an important role in database updates and in remote communications between R/3 Systems or between an R/3 System and a non-SAP system.
    You can declare methods in the declaration part of a class or in an interface. To declare instance methods, use the following statement:
    METHODS <meth> IMPORTING.. [VALUE(]<ii>[)] TYPE type [OPTIONAL]..
                   EXPORTING.. [VALUE(]<ei>[)] TYPE type [OPTIONAL]..
                   CHANGING.. [VALUE(]<ci>[)] TYPE type [OPTIONAL]..
                   RETURNING VALUE(<r>)
                   EXCEPTIONS.. <ei>..
    When you declare a method, you also define its parameter interface using the additions IMPORTING, EXPORTING, CHANGING, and RETURNING. The additions define the input, output, and input/output parameters, and the return code. They also define the attributes of the interface parameters, namely whether a parameter is to be passed by reference or value (VALUE), its type (TYPE), and whether it is optional (OPTIONAL, DEFAULT).
    Unlike in function modules, the default way of passing a parameter in a method is by reference.
    As in function modules, you can use exception parameters (EXCEPTIONS) to allow the user to react to error situations when the method is executed.
    As in function modules, you can use the RAISE <exception> and MESSAGE RAISING statements to handle error situations.
    Regards,
    Sruthi

  • Difference Between the grouped column

    Hi ,
    I have matrix based report in which the columns are dynamically generated based on the month and year.
    3 filter value in the report
    quarter,
    year and
    Previous 12 months .
    Katherine community moderator reporting services helped me achieving the with a similar kind of report. Due to some difference from the previous requirement am posting a new question .
    Current Matrix Outcome :
    Desired Outcome
    Please note that the Month columns are dynamically generated so for example if the filter value is quarterly 
    3 months will be generated , march-14,april-14,may-14 and then i need to display the difference
    in new columns like march-14 - april-14 ,april-14-may-14. The column headers of the new differential columns i can achieve
    but the difference between the types on monthly basis am unable to achieve.
    Similarly it goes for the yearly and previous 12 months filter value.
    Kindly let me know if more detail is required .
    Thanks
    Priya

    Hi Priya,
    According to your description, you have a matrix in your report. Now for each month, you want to always get the difference value between current month and previous month with columns generated. Right?
    In Reporting Service, if we want to compare values of two adjacent columns in a matrix, the best way is using custom code to deal with the logic. In this scenario, we want to compare the current value with previous value. The difference value is always along
    with columns generated. So we suggest put this column inside of group instead of appending them at the end of the matrix. In this column, we can call the function defined in the custom code. We have tested this case in our local environment. Here are steps
    and screenshots for your reference:
    Put the custom code into report:
    Private queueLength As Integer = 2
    Private queueSum As Double = 0
    Private queueFull As Boolean = False
    Private idChange As String=""
    Dim queue As New System.Collections.Generic.Queue(Of Integer)
    Public Function CumulativeQueue(ByVal currentValue As Integer,id As String) As Object
    Dim removedValue As Double = 0
    If idChange <> id then
            ClearQueue()
                    idChange = id 
                    queueSum = 0 
                    queueFull = False
                    CumulativeQueue(currentValue,id)
    Else  
                    If queue.Count >= queueLength Then
                                    removedValue = queue.Dequeue()
                    End If
                    queueSum += currentValue
                    queueSum -= removedValue
                    queue.Enqueue(currentValue)
                    If queue.Count < queueLength Then
                    Return Nothing
                    ElseIf queue.Count = queueLength And queueFull = False Then
                    queueFull = True
                    Return (queueSum-currentValue-currentValue) 
                    Else
                    Return (queueSum-currentValue-currentValue) 
                    End If
    End If
    End Function
    public function ClearQueue()
    Dim i as Integer
    Dim n as Integer = Queue.Count-1
    for i=n To 0 Step-1
                    queue.Dequeue()
    next i
    End function
    Create a matrix based on your information. Put expression into corresponding position.
    A: =Code.CumulativeQueue(Fields!Amount.Value,Fields!Type.Value)
    B: =IIF(Previous(Fields!Month.Value) is nothing,"",MonthName(IIF(Previous(Fields!Month.Value) is nothing,1,Previous(Fields!Month.Value)))&" - "&MonthName(Fields!Month.Value))
    C: =MonthName(Fields!Month.Value)
    Ps : You may need to modify the custom code and expression based on the data type in your dataset.
    Create parameter for filtering data.
    Save and preview. It looks like below:
    Reference:
    SSRS 2008 R2 - Add moving average to column group
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou
      

Maybe you are looking for

  • Mini DVI does not work in windows

    I have no problem using the Mini DVI adapter in OSX but when I go into windows it does not work. Any suggestions would be greatly appreciated. The only reason why I use windows is for the TVUplayer, which currently has no version for OSX

  • How do you get multiple live instruments to put out sound?

    I just got a M-Audio 61 keyboard from my wife for our anniversary. I love it and it works great with GarageBand 1.X. I also have a guitar I use with GB. It is plugged in the 1/8 in. mini jack input in the back of the Mac. I however can't get both to

  • Photoshop Elements 5 in Windows 7 64 bit fails to load

    If I click on the icon things happen (the spinning disk appears) then nothing opens up (and task manager seems ignorant of my actions). If however I click on a photograph and right click to select open with Photoshop everything works fine.Photoshop

  • Windows 8.1 VPN Functionality dissappears after joining a domain

    Hello! I can not seem to Identify the cause behind the following problem, I assume it is GP or permission related but I can not discover where. Summary: -New Tablet purchased from dell (Venue 11 pro series) started as windows 8.1 and the 8,1 pro pack

  • Callable Statement throws exception..pls help

    When I use Callable Statement calling my function which returns Y if person is employee or nothing if not I get this error.. Procedure not createdORA-06550: line 1, column 22: PLS-00103: Encountered the symbol "CHCK_EMP_STATUS" when expecting one of