How get information from radio button into a textfile,

ok, Here's my code. The point of the system is to write information from the booking form, onto the textfile named "something.txt"
write code;
public void write() {
String fullfile = "something.txt";
try {
BufferedWriter out = new BufferedWriter(new FileWriter(fullfile));
out.write("");
out.write("HOLIDAY BOOKING SYSTE,");
out.write("");
out.write("SECTION 4.0 DESITNATION");
out.write("");
out.write("Holiday Destination: " + list.getSelectedValue());
out.write("Duration of holiday: ");
out.write("");
out.write("SECTION 5.0 TRAVEL RESERVATION DETAILS");
out.write("Airport for depature and return");
out.write("Depature Date: " + txtDateD.getText());
out.write("Depature Time: " + txtTimeD.getText());
out.write("Arrival Date: " + txtDateA.getText());
out.write("Arrival Time: " + txtDateA.getText());
out.write("Holiday Destination: " + txtbookingno.getText());
out.write("Customer Booking Information");
out.close();
} catch (IOException f) {
//end of file writer
The code below is for the radio buttons, The choice is to either pay for an "Economic" ticket, or a "First Class" ticket. If a customer selects the economic ticket radio button, what line of coding do i add to the write method above, to show "Economic ticket"
JRadioButton EconomyButton = new JRadioButton(EconomyString);
EconomyButton.setMnemonic(KeyEvent.VK_C);
EconomyButton.setActionCommand(EconomyString);
constraints.gridx=0;
constraints.gridy=27;
constraints.insets = new Insets (0,0,0,0);
EconomyButton.setFont(new Font("palatino linotype", Font.PLAIN,13));
gridbag.setConstraints(EconomyButton,constraints);
c.add(EconomyButton);
JRadioButton FirstClassButton = new JRadioButton(FirstClassString);
FirstClassButton.setMnemonic(KeyEvent.VK_C);
FirstClassButton.setActionCommand(FirstClassString);
constraints.gridx=1;
constraints.gridy=27;
constraints.insets = new Insets (0,0,0,0);
FirstClassButton.setFont(new Font("palatino linotype", Font.PLAIN,13));
gridbag.setConstraints(FirstClassButton,constraints);
c.add(FirstClassButton);
Also i ran into another slight problem, theres a textbox called "Fine" in another form called "page1", how do i call it's value i.e. what line of code do i place for it in the method above? Help,

Try to use the "[ code][ code]" tags, it makes your code much easier to read! :)
If you want a method, such as write() to be able to get text from a radio button, such as EconomyButton, make sure to declare it higher in your code and public, so you can use the method:EcononomyButton.getText()Also note, you may find it easier if you rename your variables to lower case, such as "economyButton", and your classes upper case.
For more information on ways to get information out of a button you've created, check out the javadocs:
http://www.google.com/search?&q=java+5+jradiobutton
Note, if you scroll down, you'll see a bunch of "Methods Inherited By" stuff. You can use them too!
-FBL
(This is your code, using the code tags)
          /* Write code */
     public void write() {
          String fullfile = "something.txt";
          try {
               BufferedWriter out = new BufferedWriter(new FileWriter(fullfile));
               out.write("");
               out.write("HOLIDAY BOOKING SYSTE,");
               out.write("");
               out.write("SECTION 4.0 DESITNATION");
               out.write("");
               out.write("Holiday Destination: " + list.getSelectedValue());
               out.write("Duration of holiday: ");
               out.write("");
               out.write("SECTION 5.0 TRAVEL RESERVATION DETAILS");
               out.write("Airport for depature and return");
               out.write("Depature Date: " + txtDateD.getText());
               out.write("Depature Time: " + txtTimeD.getText());
               out.write("Arrival Date: " + txtDateA.getText());
               out.write("Arrival Time: " + txtDateA.getText());
               out.write("Holiday Destination: " + txtbookingno.getText());
               out.write("Customer Booking Information");
               out.close();
          catch (IOException f) {
          //end of file writer
                    /* Radio buttons */
     JRadioButton EconomyButton = new JRadioButton(EconomyString);
     EconomyButton.setMnemonic(KeyEvent.VK_C);
     EconomyButton.setActionCommand(EconomyString);
     constraints.gridx=0;
     constraints.gridy=27;
     constraints.insets = new Insets (0,0,0,0);
     EconomyButton.setFont(new Font("palatino linotype", Font.PLAIN,13));
     gridbag.setConstraints(EconomyButton,constraints);
     c.add(EconomyButton);
     JRadioButton FirstClassButton = new JRadioButton(FirstClassString);
     FirstClassButton.setMnemonic(KeyEvent.VK_C);
     FirstClassButton.setActionCommand(FirstClassString);
     constraints.gridx=1;
     constraints.gridy=27;
     constraints.insets = new Insets (0,0,0,0);
     FirstClassButton.setFont(new Font("palatino linotype", Font.PLAIN,13));
     gridbag.setConstraints(FirstClassButton,constraints);
     c.add(FirstClassButton);
     

Similar Messages

  • How to save input from radio buttons into textfiles, Help

    Below is my code. Currently it gets the input from the textbox "Date" and places it into a textfile using "getText"
    How do i get the input from a radio button?
    i think getselected only works on JLists.
    String a = bookNo.getText();
              out = new PrintWriter(new FileOutputStream("" + a +".txt"));
    out.println("Date: " + tDate.getText());
    out.close();
    catch(IOException ex)
    System.out.println("Error");
    Your help is appreciated

    Sorry, here's my code. The point of the system is to write information from the page, onto the textfile named "something.txt"
    public void write() {
    String fullfile = "something.txt";
    try {
    BufferedWriter out = new BufferedWriter(new FileWriter(fullfile));
    out.write("");
    out.write("HOLIDAY BOOKING SYSTE,");
    out.write("");
    out.write("SECTION 4.0 DESITNATION");
    out.write("");
    out.write("Holiday Destination: " + list.getSelectedValue());
    out.write("Duration of holiday: ");
    out.write("");
    out.write("SECTION 5.0 TRAVEL RESERVATION DETAILS");
    out.write("Airport for depature and return");
    out.write("Depature Date: " + txtDateD.getText());
    out.write("Depature Time: " + txtTimeD.getText());
    out.write("Arrival Date: " + txtDateA.getText());
    out.write("Arrival Time: " + txtDateA.getText());
    out.write("Holiday Destination: " + txtbookingno.getText());
    out.write("Customer Booking Information");
    out.close();
    } catch (IOException f) {
    //end of file writer
    The code below is for the radio buttons, The choice is to either pay for an "Economic" ticket, or a "First Class" ticket. If a customer selects the economic ticket radio button, what line of coding do i add to the write method above, to show "Economic ticket"
    Also i ran into another slight problem, theres a textbox called "Fine" in another form called "page1", how do i call it's value i.e. what line of code do i place for it in the method above?

  • Getting values from radio buttons in jsps

    i am doing online quiz. i have a problem with radio buttons
    <input type =radio name="a" value="opone"> x
    <input type =radio name="a" value="optwo"> y
    <input type =radio name="a" value="opthree"> z
    i what to get the values from the radio button
    so i have used
    request.getParameter("a");
    so i am not getting proper output (x or y or z) here
    i got what ever i have selected value ie opone or optwo or opthree here but not xor y or z.
    can u please help me

    <input type =radio name="a" value="x"> x
    <input type =radio name="a" value="y"> y
    <input type =radio name="a" value="z"> z
    There you go. The value is what is actually submitted, what you print outside of the radio button is just visible content.

  • I need help getting information from my jsp into my servlet

    i have a list box in my jsp and it is being populated with some beans that were processed in a servlet. here is the code for the list box in my jsp.
    <SELECT size="5" name="lstAccounts">
    <OPTION value="1" selected><%= AccountNum1 %></OPTION>
    <OPTION value="2"><%= AccountNum2 %></OPTION>
    </SELECT>
    AccountNum1 and AccountNum2 are the name of the beans populating the list box.
    on this current jsp, when i click on a submit button i need to send some info, including which option in the list box is selected to a servlet. here is the code i have in my servlet in the doPost() method. what i'm trying to do is pass the choice that was selected from the list box to servlet below.
    String strAccountNumber;
    strAccountNumber = req.getParameter("lstAccounts");
    req.setAttribute("AccountNumber", strAccountNumber);
    //then forward it to another jsp
    when i load the jsp it shows the correct choice from the lstAccounts list box, but it shows its corresponding value instead of the choice itself. Instead of showing whats actually in the bean AccountNum1 or AccountNum2, it shows either 1 or 2 (the value from the html in my jsp). is there anyway i can put a method on the lstAccounts string in my getParameter() method. something like...
    strAccountNumber = req.getParameter("lstAccounts.getSelectedItem()");
    i hope this made sense. thanks in advance if anyone decides to respond!

    Why not just do this?
    <SELECT size="5" name="lstAccounts">
    <OPTION value=<%=AccountNum1 %> selected><%= AccountNum1 %></OPTION>
    <OPTION value=<%=AccountNum1 %> ><%= AccountNum2 %></OPTION>
    </SELECT>

  • HELP! I need help to understand how to get value on radio buttons!

    hello,
    I realy need the help from anyone that knows how to get value from radio buttons in a JSP.
    I have this :
    <%
    java.util.Vector vLinha = (java.util.Vector) datos.get("ConsNefect");
              java.util.Hashtable ordens;
              java.util.Enumeration eLinha = vLinha.elements();
              String t = "radio";
              String x = "escolha";
              String l = "";
    int i = 0;
              //int esc = 0;
    String fila = "";                         
              boolean bol = true;
    while (eLinha.hasMoreElements())
    ordens = (com.ibm.dse.base.Hashtable) eLinha.nextElement();     
              if (++i%2 == 0)
    fila = "formgriscla";
    else
    fila = "formgrisosc";
    out.println("<tr>");
    out.println("<td class=\"" + fila + "\">");
    out.print("<p class=\"dato2\">");          
              out.print("<a href=" + urls.get("action"));
         out.print("&sequencia=" + (String) ordens.get("sequencia"));                    
         out.print(">");
              out.print((String) ordens.get("descricao"));
         out.print("</a></p></td>");
              out.println("<td class=\"" + fila + "\">");
    out.print("<p class=\"datop\">");          
              out.print((String) ordens.get("datap"));
    out.print("</p>");
    out.println("<td class=\"" + fila + "\">");
    out.print("<p class=\"datop\">");
    out.print((String) ordens.get("erro"));
              out.print("</p>");
              out.println("<td class=\"" + fila + "\">");
              out.print("<p class=\"datop\">");     
              l = (String) ordens.get("sequencia");     
              out.println("<input type=\"" + t + "\" name=\"" + x + "\" value=\"" + l + "\">");          
              out.print("</p></td>");      
              out.println("</tr>");
              //esc++;
    %>
    <!--input type="Hidden" name="escolha" value=<!--%l%>-->
    <!--input type="Hidden" name="escolha" value="<!--%=escolha%>"-->
    </td>
    </tr>
    I don�t know how to take the value... PLEASE HELP ME OUT!
    THANKS TO ALL!,
    Best wishes,
    Alex (portugal)

    You must wrap your contents into a FORM element and, then, using getParameter("escolha"), retrieve your value.

  • Acrobat 9.1  Mac How do you change from Radio buttons to Check boxes?

    I have a DMV Form I Downloaded and had to convert to PS then back to PDF (written originally on PC Acrobat was in XML format).
    So on new form, I am able to add fields. I used the the Forms manager to automatically create the fields. Fields that were made Radio Buttons should have been Check boxes. How do change the Radio buttons to check boxes. There are a lot of them and I don't wish to have to re-key them in.
    Suggestions?

    Well when I click on the box it shows a Check mark in the box. That exactly what I need because in the instructions it requires a Check mark in each of the check boxes. Normally the Med form is sent as a paper copy from DMV every two years.
    Also another Tip. A PDF that has XML Content. (PC Acrobat Version).
    If you want a usable PDF on Mac and get rid of the XML do the following:
    Open the XML Based PDF on Mac Acrobat 9.X .
    Now choose export and save as Postscript File (.ps).
    Now locate and drop on Distiller 9.X.
    When PDF created will be a Pristine exact replica of the XML file except Mac Acrobat can edit and create forms with it.

  • How to get information from my laptop to my ipad

    I`m new on I-pad
    How to get information from my laptop to my ipad
    Saludos
    Josè Montero

    Heres some Apple Support tips on the subject.
    How to transfer and sync content to your computer:
    http://support.apple.com/kb/ht1296
    How to transfer files between your computer and mobile apps:
    http://support.apple.com/kb/PH1693
    How to do file transfers:
    http://support.apple.com/kb/HT4094

  • How to deselect the Radio button from htmlb.table.TableView

    Hi Experts,
    Could you please help me, how to seselect the Radio button from htmlb.table.TableView?
    <hbj:tableView
                                       id="tbvCustomer"
                                       model="mcBean.csModel"
                                       design="ALTERNATING"
                                       headerVisible="TRUE"
                                       footerVisible="TRUE"
                                       navigationMode="BYPAGE"
                                       selectionMode="SINGLESELECT"                               
                                       fillUpEmptyRows="FALSE"
                                       headerText="Searchresults"
                                       visibleRowCount="10"
                                       onNavigate="CustomerSearchNavigate"
                                       visibleFirstRow="<%=mcBean.getCsVisibleFirstRow() %>">
    Problem: After searching and selecting the Customer in the table, then again we are searching for another customer. After that the searched customer is displaying in the Table. By default the table Radio button is selected. Because for first Customer we have selected the Radio button. How we can deselect the FRadio button while searching for another Customer.
    Thanks In Advance.
    Regards,
    Vijay.

    I think it is <2095>.
    In SmartForms, go to your text window. 
    Use the icon on the top left of the text window to switch to the old editor.
    INSERT -> CHARACTERS -> SAP ICONS. 
    Do a FIND on "radio".  It's called ICON_WD_RADIO_BUTTON_EMPTY.

  • How to get information from ODBC sources to Forms Builder environment

    Hi,
    Could anyone help me, to get some examples or more information, that how can I get information from ODBC sources to Forms Builder environment. I have a need to read data for example to LOV.

    If you are on Forms 6i you install the Oracle Client Adaptor from the Forms CD. You then have a way of connecting to ODBC datasources.
    To connect to ODBC at the same time as you are connected to Oracle you can use the EXEC_SQL package to create a second connection via odbc and issue select statements against that datasource.

  • How to get information from Oracle's views

    Hi,
    I need to get information from Oracle's views about:
    * in which table's column is set index
    * what type of index is on this column
    * name of a trigger which exist on a table
    * type of trigger (before, after etc)
    * trigger status (enable, disable)
    Thanks for help.

    Hi..
    One of the best way to know which views to use is doing select * from dict where table_name like 'xxx';
    For example in your case you needed to know about the indexes and triggers so
    SQL> select * from dictionary where table_name like 'DBA_IND%';
    TABLE_NAME                     COMMENTS
    DBA_INDEXES                    Description for all indexes in the database
    *DBA_IND_COLUMNS                COLUMNs comprising INDEXes on all TABLEs and CLUSTERs*
    DBA_IND_EXPRESSIONS            FUNCTIONAL INDEX EXPRESSIONs on all TABLES and CLUSTERS
    DBA_INDEXTYPES                 All indextypes
    DBA_INDEXTYPE_COMMENTS         Comments for user-defined indextypes
    DBA_INDEXTYPE_ARRAYTYPES       All array types specified by the indextype
    DBA_INDEXTYPE_OPERATORS        All indextype operators
    DBA_IND_PARTITIONS
    DBA_IND_SUBPARTITIONS
    DBA_IND_STATISTICS             Optimizer statistics for all indexes in the database
    10 rows selected.
    SQL> select * from dictionary where table_name like 'DBA_TRI%';
    TABLE_NAME                     COMMENTS
    DBA_TRIGGERS                   All triggers in the database
    DBA_TRIGGER_COLS               Column usage in all triggers
    Reading the comments you can know which view to use, then  describe the view and use what you need

  • Get information from an array saved into a text file

    I am trying to get information from an array saved as a text file to extract the information to build an string. This string will go out from the serial port to a device which will listen this message and it will answer the question. All the information sended sequencially it has to be obtained from that array. Every row contain one instruction and this has to be sended one after one.
    Could you tell me if is possible to make this driver? And if you have a similar driver, Where can I get it from?

    The VIs that I would suggest using are found in the String Function Pallet:
    Spreadsheet String To Array
    Array To Spreadsheet String
    The delimiter should be the termination character. These VIs will adapt to a string array.
    For the Spreadsheet String To Array wire an empty string array and use %s as the format. The delimiter should be the termination character of the text file, most likely a end of line (\r\n).
    For the Array To Spreadsheet String the delimiter should be the termination required for your serial device.
    Using a combination of these two VIs should provide you the functions required to make the driver.

  • Please help! How can I validate Radio Buttons and List Menu with PHP.

    Hello everyone, I have been learning PHP step by step and
    making little projects.
    The point is I find it easy to learn by doing "practical
    projects."
    I have been reading the David Powers's Book on PHP Solutions
    and it's really great, however there is nothing mentioned regarding
    Validating Radio buttons. I know the book cannot cover every aspect
    of PHP and maybe someone in here can help.
    I have been learning how to process HTML forms with PHP.
    The problem is every book or tutorial I have read or
    encountered fall short on validation.
    I'm wondering how I can learn to validate Radio Buttons and
    Select List Menu.
    I have managed to create validation for all other fields but
    have no clue as to how I can get validation for Radio Buttons and
    List Menu.
    I would also like an error message echoed when the user does
    not click a button or make a selection and try to submit the form.
    I would appreciate any help.
    Patrick

    It's not that default value is "None." In fact it's not. It
    will only be
    "none" when the form is submitted.
    Also if your submit button is names 'send' then
    $_POST['send'] will only be
    set if the form was submitted.
    Make sure you didn't hit the refresh button on your browser
    which usually
    reposts the information. Also make sure you did not reach the
    form from
    another form with the same button names.
    Otherwise paste the snippet.
    Also you can check what fields are set in the post array by
    adding this to
    the top of (or anywhere on) your page:
    print_r($_POST);
    Cosmo
    "Webethics" <[email protected]> wrote in
    message
    news:[email protected]...
    >
    quote:
    Originally posted by:
    Newsgroup User
    > Off the top of my head this should be no different than
    your radio buttons
    > except that 'productSelection' will always fail the
    !isset check when the
    > form is submitted since the default value is "None", and
    therefore always
    > set. :-)
    >
    > So how about this..?
    > <?php
    > if (isset($_POST['send']) and
    ($_POST['productSelection'] == "None"))
    > {echo "Please select a product.";}
    > ?>
    >
    >
    >
    >
    > "Webethics" <[email protected]> wrote
    in message
    > news:[email protected]...
    > > Another question - how do i applied the code you
    just showed me to
    > > select
    > > menu
    > > or select list?
    > >
    > > This is the list:
    > >
    > > <div class="problemProduct">
    > > <label for="productSelection"><span
    class="product_label">Product
    > > Name.</span></label>
    > > <select name="productSelection" id="products"
    class="selection">
    > > <option value="None">-------------Select a
    product----------</option>
    > > <option value="Everex DVD Burner">Everex DVD
    Burner</option>
    > > <option value="Vidia DVD Burner">Vidia DVD
    Burner</option>
    > > <option value="Excerion Super Drive">Excerion
    Super Drive</option>
    > > <option value="Maxille Optical Multi
    Burner">Maxille Optical Multi
    > > Burner</option>
    > > <option value="Pavilion HD Drives">Pavilion
    HD Drives</option>
    > > </select>
    > > </div>
    > >
    > > I thought I could just change the name is the code
    from operatingSystem
    > > to
    > > productSelection.
    > >
    > > Something like this:
    > >
    > > From this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['operatingSystem']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > To this:
    > >
    > > <?php
    > > if (isset($_POST[send]) and
    !isset($_POST['productSelection']))
    > > {echo "Please select an operating system.";}
    > > ?>
    > >
    > > But this does not work, any ideas?
    > >
    > > Patrick
    > >
    >
    >
    >
    >
    > Hey, I tried this about but as you mentioned, since the
    default product
    > value
    > is "None" an error message appears when the page loads.
    >
    > Is there a way to code this things so that even though
    the default value
    > is
    > "None" there ia no error message untle you hit the
    submit?
    >
    > When I applied the code, it messes up the previous code,
    now the operating
    > system is requiring an entry on page load.
    >
    > When I remove the code from the list menu everything
    goes back to normal.
    >
    > I know this is a little much but I have no other
    alternatives.
    >
    > Patrick
    >

  • How to create a radio button in ALV Reports

    Hi all,
    Best wishes to all..
    Kindly reply me to this question... that is "How to create a radio button in ALV Report"
    Thanks and Regards
    Anjali

    HI
    here is an example :
    PROGRAM ZUS_SDN_BCALV_GRID_DEMO_2.
    Based on: BCALV_GRID_DEMO.
    TYPE-POOLS: icon.
    TYPES: BEGIN OF ty_s_sflight.
    INCLUDE TYPE sflight.
    TYPES: button1    TYPE lvc_emphsz.
    TYPES: button2    TYPE lvc_emphsz.
    TYPES: button3    TYPE lvc_emphsz.
    TYPES: button4    TYPE lvc_emphsz.
    TYPES: END OF ty_s_sflight.
    DATA:
      gt_sflight    TYPE STANDARD TABLE OF ty_s_sflight,
      gt_fcat       TYPE lvc_t_fcat.
    DATA: ok_code LIKE sy-ucomm,
         gt_sflight TYPE TABLE OF sflight,
          g_container TYPE scrfname VALUE 'BCALV_GRID_DEMO_0100_CONT1',
          grid1  TYPE REF TO cl_gui_alv_grid,
          g_custom_container TYPE REF TO cl_gui_custom_container.
          CLASS lcl_eventhandler DEFINITION
    CLASS lcl_eventhandler DEFINITION.
      PUBLIC SECTION.
        CLASS-DATA:
          md_cnt    TYPE i.
        CLASS-METHODS:
          handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
            IMPORTING
              e_row_id
              e_column_id
              es_row_no
              sender.
    ENDCLASS.                    "lcl_eventhandler DEFINITION
          CLASS lcl_eventhandler IMPLEMENTATION
    CLASS lcl_eventhandler IMPLEMENTATION.
      METHOD handle_hotspot_click.
    define local data
        FIELD-SYMBOLS:
          <ls_entry>    TYPE ty_s_sflight,
          <ld_fld>      TYPE ANY.
        READ TABLE gt_sflight ASSIGNING <ls_entry> INDEX es_row_no-row_id.
        CHECK ( <ls_entry> IS ASSIGNED ).
      Set all radio buttons "unselected"
        <ls_entry>-button1 =  icon_wd_radio_button_empty.
        <ls_entry>-button2 =  icon_wd_radio_button_empty.
        <ls_entry>-button3 =  icon_wd_radio_button_empty.
        <ls_entry>-button4 =  icon_wd_radio_button_empty.
        ASSIGN COMPONENT e_column_id-fieldname OF STRUCTURE <ls_entry>
                                                  TO <ld_fld>.
        IF ( <ld_fld> IS ASSIGNED ).
        Set selected radio button "selected".
          <ld_fld> = icon_wd_radio_button.
        ENDIF.
      Force PAI followed by refresh of table display in PBO
        CALL METHOD cl_gui_cfw=>set_new_ok_code
          EXPORTING
            new_code = 'DUMMY'
         IMPORTING
           RC       =
      ENDMETHOD.                    "handle_hotspot_click
    ENDCLASS.                    "lcl_eventhandler IMPLEMENTATION
    START-OF-SELECTION.
          MAIN                                                          *
      PERFORM select_data.
      CALL SCREEN 100.
          MODULE PBO OUTPUT                                             *
    MODULE pbo OUTPUT.
      SET PF-STATUS 'MAIN100'.
      IF g_custom_container IS INITIAL.
        CREATE OBJECT g_custom_container
               EXPORTING container_name = g_container.
        CREATE OBJECT grid1
               EXPORTING i_parent = g_custom_container.
        PERFORM build_fieldcatalog.
        CALL METHOD grid1->set_table_for_first_display
         EXPORTING
           i_structure_name = 'SFLIGHT'
          CHANGING
            it_fieldcatalog  = gt_fcat
            it_outtab        = gt_sflight.
      Set event handler for event TOOLBAR
        SET HANDLER:
          lcl_eventhandler=>handle_hotspot_click FOR grid1.
      else.
        CALL METHOD grid1->refresh_table_display
         EXPORTING
           IS_STABLE      =
           I_SOFT_REFRESH =
          EXCEPTIONS
            FINISHED       = 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.
      ENDIF.
    ENDMODULE.                    "PBO OUTPUT
          MODULE PAI INPUT                                              *
    MODULE pai INPUT.
      to react on oi_custom_events:
      CALL METHOD cl_gui_cfw=>dispatch.
      CASE ok_code.
        WHEN 'EXIT'.
          PERFORM exit_program.
        WHEN OTHERS.
        do nothing
      ENDCASE.
      CLEAR ok_code.
    ENDMODULE.                    "PAI INPUT
          FORM EXIT_PROGRAM                                             *
    FORM exit_program.
    CALL METHOD G_CUSTOM_CONTAINER->FREE.
    CALL METHOD CL_GUI_CFW=>FLUSH.
      LEAVE PROGRAM.
    ENDFORM.                    "EXIT_PROGRAM
    *&      Form  BUILD_FIELDCATALOG
          text
    -->  p1        text
    <--  p2        text
    FORM build_fieldcatalog .
    define local data
      DATA:
        ls_fcat        TYPE lvc_s_fcat,
        ls_hype        TYPE lvc_s_hype.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
        I_BUFFER_ACTIVE              =
          i_structure_name             = 'LVC_S_FCAT'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      DELETE gt_fcat WHERE ( fieldname <> 'EMPHASIZE' ).
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
        EXPORTING
        I_BUFFER_ACTIVE              =
          i_structure_name             = 'SFLIGHT'
        I_CLIENT_NEVER_DISPLAY       = 'X'
        I_BYPASSING_BUFFER           =
        I_INTERNAL_TABNAME           =
        CHANGING
          ct_fieldcat                  = gt_fcat
        EXCEPTIONS
          inconsistent_interface       = 1
          program_error                = 2
          OTHERS                       = 3.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      READ TABLE gt_fcat INTO ls_fcat
           WITH KEY fieldname = 'EMPHASIZE'.
      IF ( syst-subrc = 0 ).
        DELETE gt_fcat INDEX syst-tabix.
      ENDIF.
      ls_fcat-fieldname = 'BUTTON4'.
      ls_fcat-icon    = 'X'.
      ls_fcat-hotspot = 'X'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON3'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON2'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      ls_fcat-fieldname = 'BUTTON1'.
      INSERT ls_fcat INTO gt_fcat INDEX 4.
      LOOP AT gt_fcat INTO ls_fcat.
        ls_fcat-col_pos = syst-tabix.
        MODIFY gt_fcat FROM ls_fcat INDEX syst-tabix.
      ENDLOOP.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  SELECT_DATA
          text
    -->  p1        text
    <--  p2        text
    FORM select_data .
    define local data
      DATA:
        ls_sflight    TYPE ty_s_sflight.
      SELECT * FROM sflight INTO CORRESPONDING FIELDS OF TABLE gt_sflight.
      ls_sflight-button1 = icon_wd_radio_button.
      ls_sflight-button2 = icon_wd_radio_button_empty.
      ls_sflight-button3 = icon_wd_radio_button_empty.
      ls_sflight-button4 = icon_wd_radio_button_empty.
      MODIFY gt_sflight FROM ls_sflight
          TRANSPORTING button1 button2 button3 button4
        WHERE ( carrid IS NOT INITIAL ).
    ENDFORM.                    " SELECT_DATA
    Regards,
    Prasanth
    Reward all helpful answers

  • Is it possible to JSP Application get information from login server?

    Hi,
    Here, we gonna create a aplication using Portal for autentication and autorization.
    We gonna develop JSP pages to navigate into our application and we'll put them into portal.
    My question is, is it possible to the jsp's, created by us, to get information from the user loged on, so it can generate html's for each users?
    If so, how to do that?
    I know i can give access to the JSP's for each user, by creating portal objects for each of them, i'd like to know if the
    thanks everyone!

    No, if Firefox is set to delete browsing history when it closes, that data wouldn't be passed to the Sync server.

  • Can i set my iPhone 4 as a new phone then use iCloud to get information from before restoring the phone?

    Can i set my iPhone 4 as a new phone then use iCloud to get information from before restoring the phone? I've restored my iPhone 4 thru iTunes and now trying to set it up using iCloud but it says 'no back ups available'.
    I was upgrading my OS system thru iTunes but the plug on my macbook came out and battery ran flat half way thru. This jammed my iPhone 4.
    I think it's to do with the OS system. That if i take it to the previous OS system it might work. But since i'm in phone set up mode i can't get into general setting to change it back.
    So can i set it up as a new phone and then use icloud to restore info? Or shld i set it up thru iTunes and then iCloud (but since it jammed half way thru upgrading and i've restored i don't think iTunes has any of my previous info)? Or is there something else i can do?

    No. You can set up as a new device or restore from iCloud or iTunes. It looks like you backed up with iTunes, so you can't restore with iCloud. To backup your device in iCloud, go to Settings > iCloud and activate it

Maybe you are looking for