Button wont trigger output in textarea

I am doing something wrong here and cant figure out why my second set of buttons will not give output in my textarea. I would appreciate it if anyone could help shed some light on why its not working...
      public void actionPerformed(ActionEvent e)//creates the action event
      if(e.getSource() == calculateBtn)
      if (loanSlctBx.getSelectedItem().equals("7 years at 5.35%"))//array used to selcted term and APR bassed on the Combo Box
                                apr=b[0];//tells to store the 1st value to the varible
                                term=a[0];
                           else if (loanSlctBx.getSelectedItem().equals("15 years at 5.5%"))
                                apr=b[1];
                                term=a[1];//tells to store the 2nd value to the varible
                           else if (loanSlctBx.getSelectedItem().equals("30 years at 5.75%"))
                                apr=b[2];//tells to store the 3rd value to the varible
                                term=a[2];
                 // Makes all the calculation needed for the output
                amnt = Double.parseDouble(amntFld.getText());
                amntFld.setText(currencyComposition(amnt)); // Formats the value to use a US currencey composistion
                mTerm = term*12; //sets the mTerm variable
                mApr = (apr / 100) / 12; //sets the mApr with the monthly interest
                 pay = amnt * (mApr / (1 - Math.pow((1 + mApr), -mTerm)));//sets the pay varible with the results
                double newAmnt = amnt;//sets new variable for new loan amount
               //Loop to run the calulations thorughout the life of the loan
                for (int i=0; i<mTerm;i++)
                      if (i==36||i==72||i==108||i==144||i==180||i==216||i==252||i==288||i==326||i==360)
                           try
                                Thread.sleep(500);//sleep timer
                           catch (InterruptedException e1)
                      //Prints the output for the calculations in the JTextAera one line at a time
                      payFld.append(i+1 +"                        "+currencyComposition(pay)+"                       "+currencyComposition(newAmnt*mApr)+"                    "+currencyComposition(pay-(newAmnt*(mApr))) +"         "+currencyComposition(newAmnt)+"\n");
                      newAmnt -= pay-(newAmnt*(mApr));
      if(e.getSource() == calculateBtn2)
          if (e.getActionCommand().equals(calculateBtn2.getActionCommand()))
               String amnt2 = amntFld2.getText();
               String term2 = termFld2.getText();
               String apr2 = aprFld2.getText();
          else if (e.getActionCommand().equals(resetBtn.getActionCommand())) // Resets all fields
               amntFld2.setText(null);
               aprFld2.setText(null);
               termFld2.setText(null);
              payFld.setText(null);
            // Makes all the calculation needed for the output
            //amnt2 = Double.parseDouble(amntFld2.getText());
            //amntFld2.setText(currencyComposition(amnt2)); // Formats the value to use a US currencey composistion
            mTerm2 = term2*12; //sets the mTerm variable
            mApr2 = (apr2 / 100) / 12; //sets the mApr with the monthly interest
             pay = amnt2 * (mApr2 / (1 - Math.pow((1 + mApr2), -mTerm2)));//sets the pay varible with the results
            double newAmnt2 = amnt2;//sets new variable for new loan amount
          //Loop to run the calulations thorughout the life of the loan
            for (int i=0; i<mTerm2;i++)
                      if (i==36||i==72||i==108||i==144||i==180||i==216||i==252||i==288||i==326||i==360)
                           try
                                Thread.sleep(500);//sleep timer
                           catch (InterruptedException e1)
                      //Prints the output for the calculations in the JTextAera one line at a time
                      payFld.append(i+1 +"                        "+currencyComposition(pay)+"                       "+currencyComposition(newAmnt2*mApr2)+"                    "+currencyComposition(pay-(newAmnt2*(mApr2))) +"         "+currencyComposition(newAmnt2)+"\n");
                      newAmnt2 -= pay2-(newAmnt2*(mApr2));
                     // Formats the numeric values to readable currency
                     private String currencyComposition(double input) {
                             DecimalFormat df = new DecimalFormat("$###,###,###.00");
                             df.setMaximumFractionDigits(2);
                             String formattedString = df.format(input);
                             return formattedString;
      }

Does your code compile? I ask because in your "if (e.getActionCommand().equals(calculateBtn2.getActionCommand()))" block you declare a String variable amnt2 inside an if block but then use it outside the block to initialise newAmnt2.
This could work, I guess, if there were an instance variable amnt2 but that would be confusing. Actually if you are looking for light get rid of any variables of the form thingN, newThingN etc. Make the names descriptive: each variable descriptive of what it is a variable for.
To address your question (why the field doesn't change when you click the button): insert some System.out.println()s to check what code is actually being executed. Ie right at the start of actionPerformed(), again after the "if(e.getSource() == calculateBtn2)" etc. Basically everywhere you think the code should be getting to.
Also if "e.getSource() == calculateBtn2" is true won't the actionCommand of e and calculateBtn2 be the same? If so I don't really understand the intent of the code that checks them for equality.

Similar Messages

  • Node_Double_Click wont Trigger ALV TREE

    Hi Sdn Community,
    My class has a event that is triggered by (at least was supposed to be) Node_Double_Click. ( I even tried Item_Double_Click event, and mark 'X' in item_selection parameter when creating my instance of CL_GUI_ALV_TREE but that event wont trigger too.)
    I already have set the handler (SET HANDLER me->event_name for r_alvtree) just right off the creating of the object (CL_GUI_ALV_TREE).
    Then I Sot the Method to be Event Handler, giving the name of the class 'CL_GUI_ALV_TREE' and Node_Double_Click for the event (in detalied vision options).
    Obs: As U can notice, I'm using Class Builder...
    Still have I missed something?
    When tring to use another method, like Header_Click, it work's fine...

    Hello Jose
    I assume you have not registered the event with the tree instance.
    Have a look at the following sample report. The crucial parts are marked using $ADDED$:
    <b>(1) Register event with tree instance:</b>
    [code] "Register event for NODE_DOUBLE_CLICK
      l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
      APPEND l_event TO lt_events.[/code]
    <b>(2) Set handler vor event:</b>
    [code]  SET HANDLER l_event_receiver->handle_node_double_click
                                                            FOR tree1.[/code]
    (3) Define and implement event handler method:
    [code]    METHODS handle_node_double_click
          FOR EVENT node_double_click OF cl_gui_alv_tree
            IMPORTING node_key.
    ENDCLASS.                    "lcl_tree_event_receiver DEFINITION
          CLASS lcl_tree_event_receiver IMPLEMENTATION
    CLASS lcl_tree_event_receiver IMPLEMENTATION.
      METHOD handle_node_double_click.
        MESSAGE node_key TYPE 'I'.
      ENDMETHOD.                    "handle_node_double_click[/code]
    The sample report is a modified version of BCALV_TREE_DEMO. For raising the event NODE_DOUBLE_CLICK you have to double-click on the folders in the hierarchy part of the ALV.
    [code]&----
    *& Report  ZUS_SDN_BCALV_TREE_DEMO_4_ROOT       *
    REPORT  bcalv_tree_demo.
    CLASS cl_gui_column_tree DEFINITION LOAD.
    CLASS cl_gui_cfw DEFINITION LOAD.
    DATA tree1  TYPE REF TO cl_gui_alv_tree.
    DATA mr_toolbar TYPE REF TO cl_gui_toolbar.
    INCLUDE <icon>.
    INCLUDE zus_sdn_tb_event_receiver_4.
    *include bcalv_toolbar_event_receiver.
    INCLUDE zus_sdn_tree_event_receiver_4.
    *include bcalv_tree_event_receiver.
    DATA: toolbar_event_receiver TYPE REF TO lcl_toolbar_event_receiver.
    DATA: gt_sflight      TYPE sflight OCCURS 0,      "Output-Table
          gt_fieldcatalog TYPE lvc_t_fcat, "Fieldcatalog
          ok_code LIKE sy-ucomm.           "OK-Code
    PARAMETERS:
      p_root    AS CHECKBOX.  " $ADDED
    START-OF-SELECTION.
    END-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  PBO  OUTPUT
          process before output
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      IF tree1 IS INITIAL.
        PERFORM init_tree.
      ENDIF.
      CALL METHOD cl_gui_cfw=>flush.
    ENDMODULE.                             " PBO  OUTPUT
    *&      Module  PAI  INPUT
          process after input
    MODULE pai INPUT.
      CASE ok_code.
        WHEN 'EXIT' OR 'BACK' OR 'CANC'.
          PERFORM exit_program.
        WHEN OTHERS.
          CALL METHOD cl_gui_cfw=>dispatch.
      ENDCASE.
      CLEAR ok_code.
      CALL METHOD cl_gui_cfw=>flush.
    ENDMODULE.                             " PAI  INPUT
    *&      Form  build_fieldcatalog
          build fieldcatalog for structure sflight
    FORM build_fieldcatalog.
    get fieldcatalog
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
          i_structure_name = 'SFLIGHT'
        CHANGING
          ct_fieldcat      = gt_fieldcatalog.
      SORT gt_fieldcatalog BY scrtext_l.
    change fieldcatalog
      DATA: ls_fieldcatalog TYPE lvc_s_fcat.
      LOOP AT gt_fieldcatalog INTO ls_fieldcatalog.
        CASE ls_fieldcatalog-fieldname.
          WHEN 'CARRID' OR 'CONNID' OR 'FLDATE'.
            ls_fieldcatalog-no_out = 'X'.
            ls_fieldcatalog-key    = ''.
          WHEN 'PRICE' OR 'SEATSOCC' OR 'SEATSMAX' OR 'PAYMENTSUM'.
            ls_fieldcatalog-do_sum = 'X'.
        ENDCASE.
        MODIFY gt_fieldcatalog FROM ls_fieldcatalog.
      ENDLOOP.
    ENDFORM.                               " build_fieldcatalog
    *&      Form  build_hierarchy_header
          build hierarchy-header-information
         -->P_L_HIERARCHY_HEADER  strucxture for hierarchy-header
    FORM build_hierarchy_header CHANGING
                                   p_hierarchy_header TYPE treev_hhdr.
      p_hierarchy_header-heading = 'Hierarchy Header'.          "#EC NOTEXT
      p_hierarchy_header-tooltip =
                             'This is the Hierarchy Header !'.  "#EC NOTEXT
      p_hierarchy_header-width = 30.
      p_hierarchy_header-width_pix = ''.
    ENDFORM.                               " build_hierarchy_header
    *&      Form  exit_program
          free object and leave program
    FORM exit_program.
      CALL METHOD tree1->free.
      LEAVE PROGRAM.
    ENDFORM.                               " exit_program
    *&      Form  build_header
          build table for html_header
    -->  p1        text
    <--  p2        text
    FORM build_comment USING
          pt_list_commentary TYPE slis_t_listheader
          p_logo             TYPE sdydo_value.
      DATA: ls_line TYPE slis_listheader.
    LIST HEADING LINE: TYPE H
      CLEAR ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'ALV-tree-demo: flight-overview'.          "#EC NOTEXT
      APPEND ls_line TO pt_list_commentary.
    STATUS LINE: TYPE S
      CLEAR ls_line.
      ls_line-typ  = 'S'.
      ls_line-key  = 'valid until'.                             "#EC NOTEXT
      ls_line-info = 'January 29 1999'.                         "#EC NOTEXT
      APPEND ls_line TO pt_list_commentary.
      ls_line-key  = 'time'.
      ls_line-info = '2.00 pm'.                                 "#EC NOTEXT
      APPEND ls_line TO pt_list_commentary.
    ACTION LINE: TYPE A
      CLEAR ls_line.
      ls_line-typ  = 'A'.
    LS_LINE-KEY:  NOT USED FOR THIS TYPE
      ls_line-info = 'actual data'.                             "#EC NOTEXT
      APPEND ls_line TO pt_list_commentary.
      p_logo = 'ENJOYSAP_LOGO'.
    ENDFORM.                    "build_comment
    *&      Form  create_hierarchy
          text
    -->  p1        text
    <--  p2        text
    FORM create_hierarchy.
      DATA: ls_sflight TYPE sflight,
            lt_sflight TYPE sflight OCCURS 0.
    get data
      SELECT * FROM sflight INTO TABLE lt_sflight
                            UP TO 200 ROWS .                "#EC CI_NOWHERE
      SORT lt_sflight BY carrid connid fldate.
    add data to tree
      DATA: l_carrid_key TYPE lvc_nkey,
            l_connid_key TYPE lvc_nkey,
            l_last_key TYPE lvc_nkey.
      DATA: l_root_key  TYPE lvc_nkey.  " $ADDED
      IF ( p_root = 'X' ).
        CLEAR: ls_sflight.
        PERFORM add_root_node USING    ls_sflight
                                CHANGING l_root_key.
      ELSE.
        l_root_key = ''.
      ENDIF.  " $ADDED
      LOOP AT lt_sflight INTO ls_sflight.
        ON CHANGE OF ls_sflight-carrid.
          PERFORM add_carrid_line USING    ls_sflight
                                           l_root_key  " ''
                                  CHANGING l_carrid_key.
        ENDON.
        ON CHANGE OF ls_sflight-connid.
          PERFORM add_connid_line USING    ls_sflight
                                           l_carrid_key
                                  CHANGING l_connid_key.
        ENDON.
        PERFORM add_complete_line USING  ls_sflight
                                         l_connid_key
                                CHANGING l_last_key.
      ENDLOOP.
    calculate totals
      CALL METHOD tree1->update_calculations.
    this method must be called to send the data to the frontend
      CALL METHOD tree1->frontend_update.
    ENDFORM.                               " create_hierarchy
    *&      Form  add_root_node
          add root node
         -->P_LS_SFLIGHT  sflight
         -->P_RELEATKEY   relatkey
        <-->p_node_key    new node-key
    FORM add_root_node  USING     ps_sflight TYPE sflight
                                   p_relat_key TYPE lvc_nkey
                         CHANGING  p_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_sflight TYPE sflight.
    set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@3P@'.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      APPEND ls_item_layout TO lt_item_layout.
    add node
      l_node_text =  'Root = All Airlines'.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD tree1->add_node
        EXPORTING
          i_relat_node_key = p_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_sflight
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = p_node_key.
    ENDFORM.                               " add_root_node
    *&      Form  add_carrid_line
          add hierarchy-level 1 to tree
         -->P_LS_SFLIGHT  sflight
         -->P_RELEATKEY   relatkey
        <-->p_node_key    new node-key
    FORM add_carrid_line USING     ps_sflight TYPE sflight
                                   p_relat_key TYPE lvc_nkey
                         CHANGING  p_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_sflight TYPE sflight.
    set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@3P@'.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensifd_critical.
      APPEND ls_item_layout TO lt_item_layout.
    add node
      l_node_text =  ps_sflight-carrid.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD tree1->add_node
        EXPORTING
          i_relat_node_key = p_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_sflight
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = p_node_key.
    ENDFORM.                               " add_carrid_line
    *&      Form  add_connid_line
          add hierarchy-level 2 to tree
         -->P_LS_SFLIGHT  sflight
         -->P_RELEATKEY   relatkey
        <-->p_node_key    new node-key
    FORM add_connid_line USING     ps_sflight TYPE sflight
                                   p_relat_key TYPE lvc_nkey
                         CHANGING  p_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value,
            ls_sflight TYPE sflight.
    set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-t_image = '@3Y@'.
      ls_item_layout-style   =
                            cl_gui_column_tree=>style_intensified.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      APPEND ls_item_layout TO lt_item_layout.
    add node
      l_node_text =  ps_sflight-connid.
      CALL METHOD tree1->add_node
        EXPORTING
          i_relat_node_key = p_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = ls_sflight
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = p_node_key.
    ENDFORM.                               " add_connid_line
    *&      Form  add_cmplete_line
          add hierarchy-level 3 to tree
         -->P_LS_SFLIGHT  sflight
         -->P_RELEATKEY   relatkey
        <-->p_node_key    new node-key
    FORM add_complete_line USING   ps_sflight TYPE sflight
                                   p_relat_key TYPE lvc_nkey
                         CHANGING  p_node_key TYPE lvc_nkey.
      DATA: l_node_text TYPE lvc_value.
    set item-layout
      DATA: lt_item_layout TYPE lvc_t_layi,
            ls_item_layout TYPE lvc_s_layi.
      ls_item_layout-fieldname = tree1->c_hierarchy_column_name.
      ls_item_layout-class   = cl_gui_column_tree=>item_class_checkbox.
      ls_item_layout-editable = 'X'.
      APPEND ls_item_layout TO lt_item_layout.
      CLEAR ls_item_layout.
      ls_item_layout-fieldname = 'PLANETYPE'.
      ls_item_layout-alignment = cl_gui_column_tree=>align_right.
      APPEND ls_item_layout TO lt_item_layout.
      l_node_text =  ps_sflight-fldate.
      DATA: ls_node TYPE lvc_s_layn.
      ls_node-n_image   = space.
      ls_node-exp_image = space.
      CALL METHOD tree1->add_node
        EXPORTING
          i_relat_node_key = p_relat_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          is_outtab_line   = ps_sflight
          i_node_text      = l_node_text
          is_node_layout   = ls_node
          it_item_layout   = lt_item_layout
        IMPORTING
          e_new_node_key   = p_node_key.
    ENDFORM.                               " add_complete_line
    *&      Form  register_events
          text
    -->  p1        text
    <--  p2        text
    FORM register_events.
    define the events which will be passed to the backend
      DATA: lt_events TYPE cntl_simple_events,
            l_event TYPE cntl_simple_event.
    define the events which will be passed to the backend
      l_event-eventid = cl_gui_column_tree=>eventid_expand_no_children.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_checkbox_change.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_context_men_req.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_node_context_menu_req.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_context_menu_req.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_header_click.
      APPEND l_event TO lt_events.
      l_event-eventid = cl_gui_column_tree=>eventid_item_keypress.
      APPEND l_event TO lt_events.
      "$ADDED$ Register event for NODE_DOUBLE_CLICK
      l_event-eventid = cl_gui_column_tree=>eventid_node_double_click.
      APPEND l_event TO lt_events.
      "$ADDED$
      CALL METHOD tree1->set_registered_events
        EXPORTING
          events                    = lt_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
    set Handler
      DATA: l_event_receiver TYPE REF TO lcl_tree_event_receiver.
      CREATE OBJECT l_event_receiver.
    "$ADDED$
      SET HANDLER l_event_receiver->handle_node_double_click
                                                            FOR tree1.
    "$ADDED$
      SET HANDLER l_event_receiver->handle_node_ctmenu_request
                                                            FOR tree1.
      SET HANDLER l_event_receiver->handle_node_ctmenu_selected
                                                            FOR tree1.
      SET HANDLER l_event_receiver->handle_item_ctmenu_request
                                                            FOR tree1.
      SET HANDLER l_event_receiver->handle_item_ctmenu_selected
                                                            FOR tree1.
    ENDFORM.                               " register_events
    *&      Form  change_toolbar
          text
    -->  p1        text
    <--  p2        text
    FORM change_toolbar.
    get toolbar control
      CALL METHOD tree1->get_toolbar_object
        IMPORTING
          er_toolbar = mr_toolbar.
      CHECK NOT mr_toolbar IS INITIAL.
    add seperator to toolbar
      CALL METHOD mr_toolbar->add_button
        EXPORTING
          fcode     = ''
          icon      = ''
          butn_type = cntb_btype_sep
          text      = ''
          quickinfo = 'This is a Seperator'.                    "#EC NOTEXT
    add Standard Button to toolbar (for Delete Subtree)
      CALL METHOD mr_toolbar->add_button
        EXPORTING
          fcode     = 'DELETE'
          icon      = '@18@'
          butn_type = cntb_btype_button
          text      = ''
          quickinfo = 'Delete subtree'.                         "#EC NOTEXT
    add Dropdown Button to toolbar (for Insert Line)
      CALL METHOD mr_toolbar->add_button
        EXPORTING
          fcode     = 'INSERT_LC'
          icon      = '@17@'
          butn_type = cntb_btype_dropdown
          text      = ''
          quickinfo = 'Insert Line'.                            "#EC NOTEXT
    set event-handler for toolbar-control
      CREATE OBJECT toolbar_event_receiver.
      SET HANDLER toolbar_event_receiver->on_function_selected
                                                          FOR mr_toolbar.
      SET HANDLER toolbar_event_receiver->on_toolbar_dropdown
                                                          FOR mr_toolbar.
    ENDFORM.                               " change_toolbar
    *&      Form  init_tree
          text
    -->  p1        text
    <--  p2        text
    FORM init_tree.
    create fieldcatalog for structure sflight
      PERFORM build_fieldcatalog.
    create container for alv-tree
      DATA: l_tree_container_name(30) TYPE c,
            l_custom_container TYPE REF TO cl_gui_custom_container.
      l_tree_container_name = 'TREE1'.
      IF sy-batch IS INITIAL.
        CREATE OBJECT l_custom_container
          EXPORTING
                container_name = l_tree_container_name
          EXCEPTIONS
                cntl_error                  = 1
                cntl_system_error           = 2
                create_error                = 3
                lifetime_error              = 4
                lifetime_dynpro_dynpro_link = 5.
        IF sy-subrc <> 0.
          MESSAGE x208(00) WITH 'ERROR'.                        "#EC NOTEXT
        ENDIF.
      ENDIF.
    create tree control
      CREATE OBJECT tree1
        EXPORTING
            parent              = l_custom_container
            node_selection_mode = cl_gui_column_tree=>node_sel_mode_single
            item_selection      = 'X'
            no_html_header      = ''
            no_toolbar          = ''
        EXCEPTIONS
            cntl_error                   = 1
            cntl_system_error            = 2
            create_error                 = 3
            lifetime_error               = 4
            illegal_node_selection_mode  = 5
            failed                       = 6
            illegal_column_name          = 7.
      IF sy-subrc <> 0.
        MESSAGE x208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
    create Hierarchy-header
      DATA l_hierarchy_header TYPE treev_hhdr.
      PERFORM build_hierarchy_header CHANGING l_hierarchy_header.
    create info-table for html-header
      DATA: lt_list_commentary TYPE slis_t_listheader,
            l_logo             TYPE sdydo_value.
      PERFORM build_comment USING
                     lt_list_commentary
                     l_logo.
    repid for saving variants
      DATA: ls_variant TYPE disvariant.
      ls_variant-report = sy-repid.
    create emty tree-control
      CALL METHOD tree1->set_table_for_first_display
        EXPORTING
          is_hierarchy_header = l_hierarchy_header
          it_list_commentary  = lt_list_commentary
          i_logo              = l_logo
          i_background_id     = 'ALV_BACKGROUND'
          i_save              = 'A'
          is_variant          = ls_variant
        CHANGING
          it_outtab           = gt_sflight "table must be emty !!
          it_fieldcatalog     = gt_fieldcatalog.
    create hierarchy
      PERFORM create_hierarchy.
    add own functioncodes to the toolbar
      PERFORM change_toolbar.
    register events
      PERFORM register_events.
    adjust column_width
    call method tree1->COLUMN_OPTIMIZE.
    ENDFORM.                    " init_tree[/code]
    Regards
      Uwe

  • Trigger output function in quotation

    Hello,
    There is a button on the header of the quotation called "trigger output", what is this function means?
    At the moment, when I click it, it shows"  no manual print functions found".
    It looks like there is some customizing is missing, can somebody give me some hints?
    Thanks!

    Hi David,
    thanks to your response anyway, but do you mean I need to do the customizing for the action profile??
    Many thanks
    PS. no need to send it to my mailbox
    Edited by: Holger Gnoth on Jul 10, 2008 2:09 PM

  • How can I open the windows file directory in "WHEN-BUTTON-PRESSED" trigger

    Dear All,
    How can I open the windows file directory in “WHEN-BUTTON-PRESSED” trigger?

    Blessan Joseph,
    The solution is dependent on your Forms version and if your applications is traditional Client/Server (CS) (Forms 6i and lower) or web deployed (Forms 6i and higher). For CS, you would use the Get_File_Name() built-in as Faa demonstrated. For Web, you will need to use the WebUtil library function Client_Get_File_Name() as Sarah (OGIR) demonstrated. Both of these functions will return the full path to a file. Note: WebUtil is an external library so it requires you to perform some configuration on your developer client as well as on the Application Server. WebUtil is included with Forms 9i and higher, but you must download it for Forms 6i.
    My requirement is user should able to select windows directory for the output.Do you really need to allow the user to write to a file in the Windows directory? This is very dangerous and you should not allow users or programs to write to the Windows directory. Users should only be able to write files to "User" directories (\My Documents\<Directory name>).
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • How do I use a push button digital trigger with my 6034E DAQ board?

    I am only a Lab View toddler.
    I am currently using a push button, wired to PFIO/TRIG1 and DGND, with a anolog trigger. However noise is causing my program to be triggered. I was told that a digital trigger would help to reduce the random triggering. How do I create a push button digital trigger?
    Thanks

    implement a schmitt trigger.
    Struggling with Labview wrote in message
    <[email protected]>...
    >I am only a Lab View toddler.
    >I am currently using a push button, wired to PFIO/TRIG1 and DGND, with
    >a anolog trigger. However noise is causing my program to be triggered.
    >I was told that a digital trigger would help to reduce the random
    >triggering. How do I create a push button digital trigger?
    >Thanks

  • How can I call my chart in Forms6i on When Button Press Trigger?

    Hi Friends,
    I have make a chart in Graphic Builder 6i and save on path C:\graph\test.ogd
    Now I want to run this Chart from Form6i on When Button Press trigger.
    I have call my report in forms using this command on When Button Press trigger.
    Run_Product(reports,'C:\Cheema\Qdir_store\reports\pmms\sec_backlog',asynchronous,runtime,filesystem,TO_CHAR(NULL));
    So tell me How can I call my chart in Forms6i?
    Please reply me on urgent.
    Thanks,
    Shahzad

    Just to recall after a long break of couple of years..... Pls check out if not wrong.
    First of all you need to embeed the chart object on your layout window and make it visible = FALSE. This is a design time work. In the button press event, show the chart object by setting the visible property = TRUE.
    Note, i could not paste u the sample code as i don't have forms installation on my PC. The above states is a logic you can apply.

  • I Drop My Ipod Alot And Now It Wont Charge It Wont Show My Notifications Even Doe They Are On My Home Button Wont Work Just A few Times But Thats It.and when on my vine i doesnt let me hear my vines idk why

    PLEASEE HELP I Drop My Ipod Alot And Now It Wont Charge It Wont Show My Notifications Even Doe They Are On My Home Button Wont Work Just A few Times But Thats It.and when on my vine i doesnt let me hear my vines idk why

    You broke it, you will need to get it serviced or replaced. The drop voided your warranty so you would have to do an out-of-warranty replacement with Apple.
    Please don't type in headline style, i.e. capitalizing every word.

  • ALV GRID - to include user defined buttons in the output

    Hi,
    Currently I am working on ALV grid output.
    Along with the standard buttons, I need to include my own push buttons.
    When I try to include it using pf-status like this,
    passing parameter  in alv
    I_callback_pf_status_set = G_status
    FORM STANDARD_02 USING EXTAB USING SLIS_T_EXTAB
    set pf-status 'PF_STATUS' EXCLUDING EXTAB.
    ENDFORM
    I have included Confirm and exit buttons
    In the output it shows only the button which I created .
    I want to get both standard buttons which gets displayed when using REUSE_ALV_GRID_DISPLAY and the newly created one .
    Plz help me to resolve this .
    I am just passing my own internal table values to the grid .
    Thanks in advance.
    Regards,
    Uma

    hi
    good
    create ur own GUI status in ur program using SET PF-STATUS '--'. now give that program name and pf status name while u r copying that standard status ie.,of ALV grid Go to transaction SE41 (Menu painter). In the initial screen give the program name SAPLKKBL In the status give STANDARD Then go to the menu bar.in that follow this menu User Interface>Copy--->Status. Then a pop up will appear to give ur program name and the status name.
    thanks
    mrutyun^

  • Menu button wont work! pleeeease help!

    my i pod mini's menu button wont work.
    i'll push it and it doesn't respond.
    and i cant reset it because i need to use the menu button.
    also...the backlight will come on at random times lyk even when im not using it. and it beeps sometimes too. just really loud beeps, not through the headphones but the actual i pod.
    i dont know whats going on.
    and i need to use my menu button.
    please help me. i need answers!
    please and thank you.
    <333 a L e x x<br>
    windows   Windows XP  

    Very likely it is a hardware issue (exactly same as mine). I am afraid to say that you need to send it for repairing. You will get a replacement if your iPod mini still under the warranty

  • Ticker bean and WHEN-BUTTON-PRESSED trigger

    Hi,
    In Forms 6i, I use the Ticker bean. The problem with it, is that it appears on all canevas of my form.
    But if the bean is "stopped" (i.e. the clock is stopped), it works fine and it does not appear on the next canevas I show.
    However, I must have a button for the "stop" and another one that shows my next canevas. If I put the two code lines in the same WHEN-BUTTON-PRESSED trigger of a unique button, the ticker bean is still visible in the new canevas.
    Any help is appreciated.
    Regards,
    Olivier.

    Olivier,
    I think I remember having heard of this before. The reason for this could be that the ticker bean uses AWT classes, which are heavyweight. All you can try is to call
    synchronize;
    between starting and stopping the ticker if using one button only. If this doesn't help, then I don't know of any other solution that could work.
    Frank

  • Trigger output on Inbound Delivery Type

    Hello,
    I'd like to know if it's possible to trigger output on Inbound Delivery Item in SAP ERP. Reason I ask is that we want to trigger a label printout for every delivery item during goods receipt of the inbound delivery.
    I know I can trigger output on Inbound Delivery Header, but not sure how to get a printout per delivery item.
    Can anyone let me know if it's possible, and if so, how to set this up?
    Regards,
    Oliver

    Hi,
    I am not experienced in printing, and at first glance this does look difficult...
    Because in customizing you have two separate paths...
    The path given above from Warren, and then it splits:
    - Maintain Output Determination for Outbound Deliveries
      - Assign Output Determination Procedure
    - Maintain Output Determination for Inbound Deliveries
      - Assign Output Determination Procedure
    Now the difference in these two paths is that:
    - if you select the first one, you get a pop-up giving you a choice to "Assign Deliveries (header)" and "Assign delivery items",
    - if you select the second one, there is no further selection, you only see delivery types, and this is also filtered, only inbound deliviery types are shown.
    So it seems not possible.
    BUT: if you select the "Assign delivery item" option in the first path, you see ALL item types; also for inbound. So test it there, hope it works. (I suppose now that you know how to print, have all the determination, etc - yes, you wrote that you know it for outbound).
    Brgds
    Juergen

  • Amended PO attempt to trigger output and Failed

    Hi,
    In the application monitor out put errro's, i have the above said error "Output error in purchase order 65000XXXXX for output medium MAI  "
    and in the out put log i am able to see below log.
    Search Result: 1 Document Output  Status  Changed  Repeated  Manual  Generat.on  Generat.at  Changed on  Changed at  Medium  Actions 
    Incorrectly processed        27.04.2009  09:42:06  27.04.2009  09:42:07  Mail     
    Output Log  Message Type  Message  Documentation 
    Information  Date: 27.04.2009 Time: 09:42:06  
    Information  Name of the Smart Form: ZEBP_PO  
    Information  Processing class: CL_PD_PO_PROCESSING_BBP  
    Information  Processing method: PROCESS_BBP_PO_MAI  
    Error  Status does not allow output (held?)  
    Error  Document not sent to
    Error  Action could not be successfully executed 
    Amended PO should not trigger output and not triggered. but the question is why it attempt to trigger output and failed
    Can any one please let me know where i can see why system attempt for output and failed
    Regards,
    Jai

    Resolved

  • Frm-40735 when-button-pressed trigger raised unhandled  exception ora-03114

    hi everybody,
    i am using oracle 10g release 2 in my test server and 10g release 1 in production server with forms in 10g running through the oracle 10g application server with no problem with our production server.
    but the same form when i try to use through the same application server for my
    with my test database server which is oracle 10g release 2 is giving me
    frm exceptions and disconnecting the session.
    like i get frm-40735 when-button-pressed trigger raised unhandled exception
    ora-03114. then frm-40655 sql error forced rollback;clear form and reenter transaction. then when i try to exit it shows ora-24324 service handle not initialized.
    The same thing when i try with my production server i dont get any exception handle error or forced rollback error.
    i am not facing any problem as such to connect to my test database(release 2)
    through sql plus client or TOAD OR ENTERPRISE MANAGER THEY ARE ALL FINE. IT IS ONLY WHEN I GO THROUGH THE APPLICATION SERVER TO ACCESS MY FORMS I GET THIS ERROR. BUT MY PRODUCTION IS RUNNING THE SAME WAY WITH NO ERRORS.
    any suggestions welcome as i have to bring release 2 in the production next month
    thanks and regards
    manish

    ORA-03114 not connected to ORACLE
    Cause: A call to Oracle was attempted when no connection was established. Usually this happens because a user-written program has not logged on. It may happen if communication trouble causes a disconnection. In addition, this message could occur when ALTER SYSTEM KILL SESSION or ALTER SYSTEM DISCONNECT SESSION were issued with the IMMEDIATE qualifier because, in those cases, the client's connection to the database is terminated without waiting for the client to issue a request.
    Action: Try again. If the message recurs and the program is user written, check the program.
    zaibi.

  • FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561

    I m working on Fusion Middleware forms 11g with windows plateform. I want to launch an exe (like notepad.exe) from my form on button click, which i m doing using the webutil dde.app_begin. My form is deployed on server, and i want to launch this application from client. The server is on linux. Now when i press the button it gives me error "FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-106561". Here is my code:
    DECLARE
    AppID    PLS_INTEGER;
    BEGIN
    AppID := DDE.App_Begin('notepad.exe',DDE.App_Mode_Normal);
    END;
    Any help will be highly appreciable. Also, please tell me for any possibility, if i can call this exe from server, which is on linux.
    Regards,
    Sharjeel

    Any one there pls help me in this. I seen all the forums and threads, for this, but could'nt find any solutions.
    Any help will be highly appreciable.
    Regards,
    Sharjeel

  • FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-04063

    Hi experts,
    This problem as titled happened to me recently, and i found no way out.
    I collected the FRD information, what i can get is:
    GMDRCDSG, 11, Prog Unit, Entry, 361120504, /XGMDSRCHGMD_BASIC_SEARCH_PKG/INIT_GROUP
    Unhandled Exception ORA-04063
    State Delta:
    Error Message: FRM-40735: WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-04063.
    ON-ERROR Trigger Fired:
    Form: GMDRCDSGORA-04063 means some database object is broken, but this information does not specify exactly which
    object it is . I thought it is caused by GMD_BASIC_SEARCH_PKG, which is programmed in GMDSRCH.pll.
    So i recompiled the pld file, but didn't work.
    The further action i took is to find out all the invalid package/package body in database, and recompile them.
    Unfortunately, this also didn't work.
    Any help is greatly appreciated, thanks in advance:)
    Ted

    Could anybody help? Please.
    Thanks,
    Ted

Maybe you are looking for

  • Internal error occurs in background job scheduling

    Hi Experts, We are facing an error message "Internal error occurs in background job scheduling" while trying to execute a custom report(Z report) in background in SA38. Please find the following observation on our side on this message. 1) This messag

  • Rounded corners causes faulty justification

    This problem is best described by downloading "Faulty Justification", a CS4 document available here: i http://www.mediafire.com/?jrgmsxdm0mn The page was layed out InDesign CS and converted to CS4. There was never a problem with it in CS. This is the

  • Slideshow transitions

    Does anyone know if third-party plug-ins are available for iPhoto slideshow transitions? Or, is there a way to edit the characteristics of an existing transition? I was disappointed in the dissolve transition in iPhoto 5, in that the image brightness

  • OBJECTS_OBJREF_NOT_ASSIGNED in Solution manager 7.1 sp10

    Hi, I go ABAP dump every 5 and 10 minutes "OBJECTS_OBJREF_NOT_ASSIGNED" in our Solution Manager (7.1 SP10) It said

  • SOA 11g Fault Management Framework Issue

    Hi, I am using soa 11.1.1.3. I have a composite with bpel process. Bpel process invokes a external web service. I add fault-bindings.xml and fault policy to catch remote fault. When I turn off web service, bpel process has the remote fault but the fa