Alert.show in ActionScript: Which value to pass as "Parent"

For CS5 and ActionScript:
When debugging my InDesign Extension, I occaionally get random exceptions thrown without an indication of where on the stack it was thrown. I suspect that this is being caused by Alert.show, and I further suspect that it is due to the value I pass for "parent", I have tried "this" and "Sprite(mx.core.Application.application)".
E.g.,
Alert.show("Place Block succeeded","",Alert.OK, Sprite(mx.core.Application.application));
What should I be using?
TIA
mlavie

Hi Lavie,
This question is really more appropriate for the CS SDK forum, but...
The correct way to do it is:
Alert.show("text", "title", Alert.OK, Sprite(mx.core.Application.application));
See here:
http://127.0.0.1:51088/help/topic/com.adobe.cside.docs/programmers_guide/customizing_the_u i.htm
FWIW, I usually use jsxInterface.alert(alertString). You get a much more standard looking (synchronous) alert dialog like that...
Harbs

Similar Messages

  • Crashing whenever using mx.controls.Alert.show

    Flex Project: Desktop (AIR)
    Flex SDK: 4.1
    Flash Builder 4
    Problem: Whenever I use Alert.show even with the simplest strings passed it crashes showing the following error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
        at mx.controls::Alert$/show()[E:\dev\4.x\frameworks\projects\framework\src\mx\controls\Alert.as:566]
    And it is pointing at Alert.as line:
    var sm:ISystemManager = ISystemManager(FlexGlobals.topLevelApplication.systemManager);
    How do I use this? What's wrong? Any fix?

    It sounds like you're referencing a NULL object somewhere.  Any chance you could provide us with some sample code?  I just successfully tried the following out:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                                xmlns:s="library://ns.adobe.com/flex/spark"
                                xmlns:mx="library://ns.adobe.com/flex/mx"
                                applicationComplete="init()">
         <fx:Declarations>
              <!-- Place non-visual elements (e.g., services, value objects) here -->
         </fx:Declarations>
         <fx:Script>
              <![CDATA[
                   import mx.controls.Alert;
                   public function init():void
                        Alert.show("This is a test", "My Alert");
              ]]>
         </fx:Script>
    </s:WindowedApplication>
    Thanks,
    Chris

  • How to pass parameter to function when confirm(Alert.show) closed?

    <![CDATA[
    import mx.controls.*;
    import mx.events.*;
    private function deleteItem(guid:String):void
    Alert.show("Are sure you want to delete?", "Confirm Delete", Alert.YES|Alert.NO, this, alertClicked);
    private function alertClicked(event:CloseEvent) {
    if(event.detail == Alert.YES) {
      Alert.show("yes "+guid); //<-- here I want to get guid
    else if (event.detail == Alert.NO){
      Alert.show("no ");
      return;
    ]]>
    Thanks.

    Hi Itambs,
    You can do the following:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="deleteItem('Dummy GUID VALUE')">
    <mx:Script>
      <![CDATA[
       import mx.controls.*;
       import mx.events.*;
       private var myAlert:Alert;
       private function deleteItem(guid:String):void
        myAlert = Alert.show("Are sure you want to delete?", "Confirm Delete", Alert.YES|Alert.NO, this, alertClicked);
        myAlert.data = guid;
        myAlert.height = 150;
                    myAlert.width = 300;
       private function alertClicked(event:CloseEvent):void{
        if(event.detail == Alert.YES) {
           //Alert.show("yes "+guid); //<-- here I want to get guid
           Alert.show("yes "+ myAlert.data);
        else if (event.detail == Alert.NO){
           Alert.show("no ");
           return;
      ]]>
    </mx:Script>
    </mx:Application>
    Note: you can also do this in another way by decalring a global variable guid as ...... private var _guid:String="";
    set _guid = guid; in deleteItem() function and then in alertClicked() function you can access the value as _guid again...which holds the saved value...
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Which 'Values' need to Export in START-OF-SELECTION for Hotspot

    I develop a small Test Report for Hotspot, and it's working fine.
    Actually, Here - Error is at START-OF-SELECTION.
    I tried many combinations for passing the Parameters but It's Not Working.
    Which 'Values' I need to Export ?
    START-OF-SELECTION.
      CREATE OBJECT lr_details.
      lr_details->data_gathering( ).
      IF gi_final IS NOT INITIAL.
        lr_details->display_alv( ).
        lr_details->on_double_click( EXPORTING row = ? column = '?' ). " ?
        lr_details->on_link_click( EXPORTING row = ? column = '?' ).     " ?
      ELSE.
        MESSAGE 'No Data for the Selection Critaria' TYPE 'S' DISPLAY LIKE 'E'.
      ENDIF.
    Here row & column are obligatory fileds - I need to pass the Values
    (I am already passing the Values with Form get_aufnr_info.)
    I try with Hard Coding row = 1 & column = 'AUFNR'
        lr_details->on_double_click( EXPORTING row = 1 column = 'AUFNR' ).
        lr_details->on_link_click( EXPORTING row = 1 column = 'AUFNR' ).
    One may find it Silly, But in this Case - Hotspot is not working & when I go for 'BACK' it's showing IW33 (req. Tcode).
    The Complete code for HOTSPOT is as follow.
    METHODS:  data_gathering,
                  display_alv,
                  on_double_click FOR EVENT double_click OF cl_salv_events_table IMPORTING row column,
                  on_link_click FOR EVENT link_click OF cl_salv_events_table IMPORTING row column.
    METHOD on_double_click.
        PERFORM get_aufnr_info USING row column.
      ENDMETHOD.                   
      METHOD on_link_click.
        PERFORM get_aufnr_info USING row column.
      ENDMETHOD.
    FORM get_aufnr_info  USING row TYPE salv_de_row
                            column TYPE salv_de_column.
      IF column = 'AUFNR'.
        CLEAR: gwa_final.
        READ TABLE gi_final INTO gwa_final INDEX row.
        IF sy-subrc EQ 0.
          SET PARAMETER ID 'ANR' FIELD gwa_final-aufnr.
          CALL TRANSACTION 'IW33' AND SKIP FIRST SCREEN.
        ENDIF.
      ENDIF.
    ENDFORM.      

    Thanks Clemens & Lakshmi,
    But Here I am not taking a FieldCat and
    cl_gui_custom_container, "Detail container
    cl_gui_alv_grid        , "Detail ALV instance
    I am taking display as -->code
    DATA:  lr_table     TYPE REF TO cl_salv_table,
               lr_layout    TYPE REF TO cl_salv_layout,
               lr_functions TYPE REF TO cl_salv_functions_list,
               lr_columns   TYPE REF TO cl_salv_columns_table,
               lr_column1   TYPE REF TO cl_salv_column_table,
               lr_column    TYPE REF TO cl_salv_column,
               lr_events    TYPE REF TO cl_salv_events_table .
        DATA  : gr_events TYPE REF TO get_details.
        DATA: ls_layout TYPE salv_s_layout_key.
        ls_layout-report = sy-repid.
          TRY.
            CALL METHOD cl_salv_table=>factory           " call factory method of alv
    *        EXPORTING
              IMPORTING
                r_salv_table   = lr_table
              CHANGING
                t_table        = gi_final.
          CATCH cx_salv_not_found .
        ENDTRY.
        lr_functions = lr_table->get_functions( ).    " activate the alv funcationality
        lr_layout  = lr_table->get_layout( ).
        lr_table->display( ).
          TRY.
            CALL METHOD pr_columns->get_column
              EXPORTING
                columnname = 'AUFNR'
              RECEIVING
                value      = lr_column.
          CATCH cx_salv_not_found.
        ENDTRY.
        lr_column->set_long_text( text-006 ).
    I already developed Reports With FIELDCAT(set_table_for_first_display) with double_click
    And also created a small Test Report where I am taking double_click in CLASS DEF.
    Both are working.
    But when I am using double_click in Reports with  START-OF-SELECTION it's not working. -
    If I need not Use double_click in START-OF-SELECTION, THEN HOW I SHOULD CALL IT ??

  • Does Alert.show put a message on the screen, or not?

                            var year:int;
                            var days:int;
                            days = 0;
                            year = 2010;
                            if (year > 2099)
                                  Alert.show("Unable to calculate day number for years beyond 2099.");  // Because, for example, 2100/2/29 will not exist
                            var T0:int;
                            T0 = days + ((year - 1964) / 4) * (3 * 365 + 366);  // This oomplex expression is evaluated incorrectly, so I have broken it down to help the compiler out
                            var T1:int;
                            var T2:int;
                            var T3:int;
                            var T4:int;
                            T1 = year - 1964;
                            T2 = T1 / 4;
                            T3 = 3 * 365 + 366;
                            T4 = T2 * T3;
                            days = days + T4;
                            if (T0 != days)
                                  Alert.show("Fault in evaluation because " + T0.toString() + " does not equal " + days.toString());

    Yes, and http://livedocs.adobe.com/flex/3/html/help.html?content=03_Language_and_Syntax_11.html reports that the int data type was added to Adobe Flex to improve performance when the programmer knows only integers shall be dealt with.   The livedocs page, to which you refer, was written before there even was an integer data type.  There is definitely something wrong with the way Adobe's software handles complicated integer expressions.    I did try changing all int data types to Number data types.   The complicated expression is handled properly in that case.
    The int data type is stored internally as a 32-bit integer and comprises the set of integers from
    -2,147,483,648 (-231) to 2,147,483,647 (231 - 1), inclusive. Previous versions of ActionScript offered only the Number data type, which was used for both integers and floating-point numbers. In ActionScript 3.0, you now have access to low-level machine types for 32-bit signed and unsigned integers. If your variable will not use floating-point numbers, using the int data type instead of the Number data type should be faster and more efficient.

  • How to suspend the script be executed before Alert.show() completed?

    how to suspend the script be executed before Alert.show()
    completed?
    In a window, when users want query and display new data, they
    should be asked whether to save the old data. The
    queryAndDispleyNewData script should not be executed untile the old
    data is saved or be gived up.
    queryNewData(){
    if (Alert.show(askSaveOrNot)==YES) doSave();
    queryAndDisplyNewDate_Script;
    however, the face if the queryAndDisplyNewDate_Script is
    always executed before doSave(). how could I do?
    Any suggestion will be appreciated.

    You cannot suspend the script. Flex/ActionScript is
    event-driven. When you post a dialog box - modal or not - you
    assign event listeners to it. It is in the event listeners that you
    do whatever it is the dialog is asking - saving data back to the
    server, for example.
    Requesting and posting data to the server is event-driven
    too. If you request data from the server you must process it in an
    event handler (which includes data binding).
    If you are going to develop Flex applications you will need
    to understand event-driven programming.

  • DragDrop Question With Alert.show

    Hi Everyone,
    I have some list controls which I have set the property dropEnabled="true".
    <mx:HBox label="SMR Vessels" height="220" width="100%" horizontalAlign="left" dropEnabled="true">
      <mx:List id="ls1" width="100%" height="100%" dropEnabled="true" dragDrop="ls1_dragDrop(event)"  >
      </mx:List>
      <mx:List id="ls2" width="100%" height="100%" dragEnabled="true" dragMoveEnabled="false"  >
       </mx:List>
    </mx:HBox>
    private function ls1_dragDrop(evt:DragEvent):void
      // Get the data from the dragEvent parameter.
      objDragSource = evt.dragSource.dataForFormat("items");
      //.... Do some things
      //Call an alert.show function to confirm from user if proceed.
      Alert.show('Proceed?', 'TITLE', Alert.YES | Alert.NO, null, alertHandler, null, Alert.YES);
      // Some scripts here...but these are executed right away even before the alert.show's button is clicked.
    When the alert message shows, the only recourse I have is to continue the operation in the alertHandler event.  But I how will I be able to reference the dragDrop event parameter from the alertHandler?
    I am banging my head the whole day on this.  Shouldn't it be that the script after the alert.show only continue once the alertHandler has finished executing its scripts.  But apparently, with Flex, that is not the case since it executes the script after the alert.show was called concurrently with the alerthandler.
    Inputs highly appreciated.
    Thanks.

    The alert handler is also declared in the same MXML file.
    <mx:HBox label="SMR Vessels" height="220" width="100%" horizontalAlign="left" dropEnabled="true">
      <mx:List id="ls1" width="100%" height="100%" dropEnabled="true" dragDrop="ls1_dragDrop(event)"  >
      </mx:List>
      <mx:List id="ls2" width="100%" height="100%" dragEnabled="true" dragMoveEnabled="false"  >
       </mx:List>
    </mx:HBox>
    private function ls1_dragDrop(evt:DragEvent):void
      // Get the data from the dragEvent parameter.
      objDragSource = evt.dragSource.dataForFormat("items");
      //.... Do some things
      //Call an alert.show function to confirm from user if proceed.
      Alert.show('Proceed?', 'TITLE', Alert.YES | Alert.NO, null, alertHandler, null, Alert.YES);
      // Some scripts here...but these are executed right away even before the alert.show's button is clicked.
    private function alertHandler(evt:CloseEvent):void
      if(evt.detail == Alert.YES)
        // Continue with the drag and drop processing here.
        // Take note that I need to reference the dragEvent parameter which was only visible in the ls1_dragDrop event.
      else
        // Here i should be calling the dragEvent's preventDefault function to prevent the drag and drop from happening since the user
        // does not confirm to proceed with the operation
    I tried to declare a application level scope variable, and set the value, but the scripts after the alert.show are executed right away without checking the values set in the alertHandler event.  Thus, I am getting incorrect execution.

  • Alert.Show WEIRDNESS

    OK, riddle me this, Batman:
    I've got a function (example attached) with a number of items
    running in it (alot of setting of variables, and outputting them to
    text areas and such). When I have an Alert.show call, all is well
    and the variables get set and output just fine.
    But when I remove or comment out the Alert.show call, the
    whole thing comes to a grinding halt and variables are not set.
    And here's the weird part (like the stuff above wasn't weird
    enough): the Alert.show can't be a hard-coded string, it has to be
    the value that one of the variables is being set to (in other
    words, the original value that was saved as a variable, not he
    variable itself).
    I've hit this now both in Flex 3 and Flex 3 AIR
    applications...
    HELP! (and thanks)

    I was having trouble with Alert.show and thought it was a
    problem with the function, too. But it was something I was doing.
    You don't say how myGameText is declared, but it seems pretty
    obvious. You might want to try enclosing variables in String() when
    you are passing them to functions that require strings. Like
    gmDate.text=String(myGame.@date);

  • Customize Alert messages for checking duplicate value and Success alert

    Hi All,
    I want to show two alert against the same "Submit" button to--
    1. Alert messages for checking duplicate value and show the Duplicate value found alert and
    2. Success Alert if the form is success to commit and no duplicate value found.
    I did all thing but when alert-1 shows and i pressed the ok button of the alert then the second alert also shows which i don't want to show.
    Which i can do in this issue? Have there anyone to help me!
    Arif

    Hi Manu,
    I have placed the following code
    1. against the Submit button--
    if error_code=40508 then
         commit_form;
    elsif :USERDELETION.CANCELLATION_USERID is not null then
    do_key('COMMIT_FORM');
    else null;
    end if;
    2. Code against the key-commit trigger in the form level--
    commit_form;
    DECLARE
    vAlert NUMBER;
    BEGIN
    set_alert_property('ALERT_TO_VERIFY',ALERT_MESSAGE_TEXT, 'Your Form has successfully submitted and your Reference id is '||:USERDELETION.REF_NO);
    vAlert:=SHOW_ALERT('ALERT_TO_VERIFY');
    END;
    3. Code against the on-error trigger in the form level--
    DECLARE
    vAlert NUMBER;
    BEGIN
         if ERROR_CODE = 40508 then
    set_alert_property('ERROR_ALERT',ALERT_MESSAGE_TEXT, 'This user deletion request has already submitted of the user named '||'"'||:USERDELETION.FULLNAME||'"');
    vAlert:=SHOW_ALERT('ERROR_ALERT');
    elsif
              ERROR_CODE = 40202 then
    set_alert_property('ERROR_ALERT',ALERT_MESSAGE_TEXT, 'Existing userid must be filled-up !');
    vAlert:=SHOW_ALERT('ERROR_ALERT');
    else
                   message(error_type||to_char(error_text)||': '||error_text);
    end if;
    END;
    If there have any confusion, please ask me.
    Arif

  • Presentation Variable Value not passing when used in Column Formula.

    Hello Gurus:
    Please help me with my requirement.
    We are trying to show a data backout in report, for example.
    For a Product Group Code of 2435 which belongs to Report Line C059 has a Sales Amount of $4,266.90 and in report we want the same Sales Amount of $4,266.90 to be shown as -$4,266.90 (Negative) under a Report Line C080.
    So in a report there should be same Sales Dollars as Positive for C059 (from Source) and Negative Sales Amount for C080 (Condition to be applied in Report).
    Solution I Tried
    I tried to create a Presentation Variable (SQL- Which would fetch me Sales Dollars for Product Group Code 2453) which returns with $4266.90 and then applied it in Answers in Logic (Case when Report Line = C080 then @{Presentation Variable}*-1 Else Sales Dollars END).
    Issue I am facing:
    Presentation Variable is coming as 0 and if i give any Format (Default Value) it shows the same default value in report. I checked the SQL i used and even when I Preview the Variable its showing me $4,266.90, but not in report.
    Please let me know a way to get this Presentation Variable value into my reports.
    Also please let me know if i can achieve this requirement in any other way.

    Thanks for your reply Paul. But there is no Invoiced Amount for Report Line - 'C080' from source. Invoiced amount of C059 should show as -ve Invoiced amount for CO80.
    In a report C059 should show +ve Sales Dollars and C080 should show same amount as -Ve Sales Dollars.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Solution Manager - EarlyWatch Alert shows red flag for managed system.

    Hi Guys,
    I tried to fix EarlyWatch alert report for Managed systems of QA and Dev which showed red flag on SolMan in DSWP. While trying to generate BACK RFC Destination to SolMan for QA and Dev, it messed up the EarlyWatch alert reports of Prod which was successfully working upto this point. And now the red flag appears for Prod system on SolMan in DSWP instead of two bottle sign.
    As for why Dev and QA did not work, I found out it was NONE internal RFC popped whenever I tried to choose the RFC to connect to SolMan while Prod which was working fine before always showed BACK rfc. That's why I tried to fix BACK rfc for Dev and QA.
    Please help me to fix these EWA problems.
    Thanks,
    Modena

    Hi Modena,
    Please see the link below for this specific issue:
    http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=228262728

  • How to see Header values are passed as a part of a Message in BPEL Invoke

    Hi,
    I have passed some session id in the header of a invoke message.
    In Audit trail I am not able to see those header values, its only showing the body of the request passed.
    Is there any way I can see passed Header values also ?
    Regards,
    En

    Refer the below URL for details about seeing the full SOAP message in 11g.
    http://www.albinsblog.com/2012/10/getting-soap-envelope-of.html#.UUrX7TceBBE
    Mark the posting appropriately as "helpful" or "correct answer", if your issue is solved.
    Regards
    Albin I
    [http://www.albinsblog.com/]

  • Values not passing from program to Layout

    Hi Abaper's
    My requirement is I need to set company logo in Invoice ( VF03 ) if a particualar condition satisifies, for this I have set a FLAG in my
    driver program and called the FLAG in my Script Layout.
    Here my issue is, for certain invoices the FLAG set in the program is being called in the Layout and Logo is displayed in invoice copy ( when excuted both in foreground and back ground).
    But in certain invoices, if run in foreground none of the values ( means not only flag but also all the values to be passed to layout)
    is displayed in invoice. It is only displaying the hard coded values in the layout ( showing blank page ).
    and if I run in background all the values are passing to layout except all Global Variables (flags) in the program even though it
    has value in the program.
    Please advice what should be the problem, I have checked with my Functional and it seems to be fine in customization part.
    Karthik
    Edited by: Karthik R on Sep 21, 2010 2:42 PM

    Hi Tamas,
    I have tried it, but still not able to figure out the exact problem....since while running in background or foreground some of the all values including my logo are displayed in invoice but for some invoices none of the values from driver prgram is getting passed to layout while running in forground....but when run in background all values are passing except the FLAG set in the drvier program.
    what should be the reason for this ? for some invoices all the values from driver is passing to layout but for some cases its not passing

  • Unable to detect any parameter in html (webresource) when value is passed from onload method of form

    Unable to detect any parameter in html (webresource) when value is passed from onload method of form
    I am trying out some stuff. For which I created a simple Entity. In the form of the entity I have added a simple web resource (html). And for the onload of the form I am calling the following function
    function HelpDeskActivityOnLoadhandler()
     var customParameters = encodeURIComponent("first=First Value&second=Second Value&third=Third Value");
        Xrm.Utility.openWebResource("tsi_scriptzz",customParameters);
    Here is the code for the  tsi_scriptzz.html
    <html>
     <body>
      <script type="text/javascript">
        var vals = new Array();
        if (location.search != "") {
         vals = location.search.substr(1).split("&");
         for (var i in vals) {
          vals[i] = vals[i].replace(/\+/g, " ").split("=");
      </script>
     </body>
    </html>
    MY PROBLEM IS -> location.search is always coming back with empty string. So, it not getting the parametrs I am passing from the load method of the form.
    Could someone kindly help me.
    Thanks,
    Hasib

    Hello, I tried it myself. I got a new_test.htm file and a new_test.js file. The loadWebResource function is called on the OnLoad event of an Entity.
    function loadWebResource()
    var params = encodeURIComponent('param1=value one&param2=value two&param3=value three');
    Xrm.Utility.openWebResource('new_test.htm', params);
    <html>
    <head>
    <title>Web Resource Parameter Example</title>
    <!-- Use ../ClientGlobalContext.js.aspx if your webresource is in a deeper folder on CRM -->
    <script src="ClientGlobalContext.js.aspx" type="text/javascript"></script>
    <script type="text/javascript">
    document.onreadystatechange = function () {
    if (document.readyState == 'complete') {
    var params = getParams();
    for(var i=0; i<params.length; i++)
    log(params[i].name + ' ' + params[i].value);
    // this functions puts the params in a 'dictionary format'
    // f.e params[0].name = param1 & params[0].value = 'value one'
    // You could customize this function or find some on the internet to retrieve a param fe by name...
    // This is just an example how to get the name and values
    function getParams(){
    var params = [];
    var querystring = Xrm.Page.context.getQueryStringParameters().Data;
    var querystringparts = querystring.split('&');
    for(var i=0; i<querystringparts.length;i++)
    var split = querystringparts[i].split('=');
    params.push({
    name: split[0],
    value: split[1]
    </script>
    </head>
    <body>
    </body>
    </html>
    Hope it helps now. Kind Regards

  • Subroutine parameters ..by default pass by value or pass by ref

    how parameters pass ?  value or ref
    if we use changing in both perform and form...will it become CALL BY REF?
    Message was edited by:
            balaji velpuri

    Hi,
    <u><b>The Parameter Interface</b></u>
    The USING and CHANGING additions in the FORM statement define the formal parameters of a subroutine. The sequence of the additions is fixed. Each addition can be followed by a list of any number of formal parameters. When you call a subroutine, you must fill all formal parameters with the values from the actual parameters. At the end of the subroutine, the formal parameters are passed back to the corresponding actual parameters.
    Within a subroutine, formal parameters behave like dynamic local data. You can use them in the same way as normal local data objects that you would declare with the DATA statement. They mask global data objects with the same name. The value of the parameters at the start of the subroutine is the value passed from the corresponding actual parameter.
    Subroutines can have the following formal parameters:
    <u><b>Parameters Passed by Reference</b></u>
    You list these parameters after USING or CHANGING without the VALUE addition:
    FORM <subr> USING ... <pi> [TYPE <t>|LIKE <f>] ...
    CHANGING ... <pi> [TYPE <t>|LIKE <f>] ...
    The formal parameter occupies no memory of its own. During a subroutine call, only the address of the actual parameter is transferred to the formal parameter. The subroutine works with the field from the calling program. If the value of the formal parameter changes, the contents of the actual parameter in the calling program also change.
    For calling by reference, USING and CHANGING are equivalent. For documentation purposes, you should use USING for input parameters which are not changed in the subroutine, and CHANGING for output parameters which are changed in the subroutine.
    To avoid the value of an actual parameter being changed automatically, you must pass it by value.
    <u><b>Input Parameters That Pass Values</b></u>
    You list these parameters after USING with the VALUE addition:
    FORM <subr> USING ... VALUE(<pi>) [TYPE <t>|LIKE <f>] ...
    The formal parameter occupies its own memory space. When you call the subroutine, the value of the actual parameter is passed to the formal parameter. If the value of the formal parameter changes, this has no effect on the actual parameter.
    <u><b>Output Parameters That Pass Values</b></u>
    You list these parameters after CHANGING with the VALUE addition:
    FORM <subr> CHANGING ... VALUE(<pi>) [TYPE <t>|LIKE <f>] ...
    The formal parameter occupies its own memory space. When you call the subroutine, the value of the actual parameter is passed to the formal parameter. If the subroutine concludes successfully, that is, when the ENDFORM statement occurs, or when the subroutine is terminated through a CHECK or EXIT statement, the current value of the formal parameter is copied into the actual parameter.
    If the subroutine terminates prematurely due to an error message, no value is passed. It only makes sense to terminate a subroutine through an error message in the PAI processing of a screen, that is, in a PAI module, in the AT SELECTION-SCREEN event, or after an interactive list event.
    <u><b>Specifying the Type of Formal Parameters</b></u>
    Formal parameters can have any valid ABAP data type. You can specify the type of a formal parameter, either generically or fully, using the TYPE or LIKE addition. If you specify a generic type, the type of the formal parameter is either partially specified or not specified at all. Any attributes that are not specified are inherited from the corresponding actual parameter when the subroutine is called. If you specify the type fully, all of the technical attributes of the formal parameter are defined with the subroutine definition.
    The following remarks about specifying the types of parameters also apply to the parameters of other procedures (function modules and methods). If you have specified the type of the formal parameters, the system checks that the
    corresponding actual parameters are compatible when the subroutine is called. For internal subroutines, the system checks this in the syntax check. For external subroutines, the check cannot occur until runtime. By specifying the type, you ensure that a subroutine always works with the correct data type. Generic formal parameters allow a large degree of freedom when you call subroutines, since you can pass data of any type. This restricts accordingly the options for processing data in the subroutine, since the operations must be valid for all data types. For example, assigning one data object to another may not even be possible for all data types. If you specify the types of subroutine parameters, you can perform a much wider range of operations, since only the data appropriate to those operations can be passed in the call. If you want to process structured data objects component by component in a subroutine, you must specify the type of the parameter.
    Regards,
    Bhaskar

Maybe you are looking for

  • How can I connect a MacBook Air (new) to a Sony Bravia TV

    How can I connect a MacBook Air (new) to a Sony Bravia TV

  • Problem with the inspection lot

    Dear Gurus Whenever I want to do  pgi the system is throwing this error message Status of inspection lot 100000000016 / partial lot 000000 does not allow good issue.I am using inspection type 10 Regards Sandip Sarkar

  • Mac works very slowly

    My Mac recently works very slowly, it takes forever to text,  to surf the net, even to type this letter. I guess the problem is that because I accidently installed OS X Yosemite 10.10.1  several times. I can c that I have 2 discs Name : Macintosh HD 

  • Bridge doesn't remember my import photos location

    Everytime I install photos into Bridge from my cardreader, I have to insert the location folder of where they are to be saved to which is on my D drive. The next time that I install images from my card reader, it points to the default folder on my C

  • Can you export your files with the Trial Version??

    I've been into the help section, and it says to go to Share and then export ect ect, but when I clicked share, I can't click any of the options (theyre that light grey). I REALLY need to be able to export with this trial version I have, and soon. Ple