Is it possible to fire an event when radio buttons are clicked in a report?

Hi All,
I have got a requirement. In the selection screen i have certain input fields and three radio buttons. When radio buttons are clicked i have to grey out certain input fields. Is it possible to fire an event when i write program through se38??
Thanks
Rakesh

Hi Rakesh,
Check this code.
SELECTION-SCREEN BEGIN OF BLOCK FINPUT WITH FRAME TITLE TEXT-001.
PARAMETERS  : FILENAME(132) TYPE C LOWER CASE  NO-DISPLAY,
              FDLOAD RADIOBUTTON GROUP RAD1
              USER-COMMAND R1 ,
              FUPLOAD RADIOBUTTON GROUP RAD1 .
SELECTION-SCREEN END OF BLOCK FINPUT.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-002.
PARAMETERS : FUNAME(132) TYPE C LOWER CASE MODIF ID AA.
SELECTION-SCREEN PUSHBUTTON /33(30) ACTION USER-COMMAND
                 BTNACT MODIF ID AA VISIBLE LENGTH 8 .
SELECTION-SCREEN PUSHBUTTON 43(30) CANCEL USER-COMMAND
                 BTNCAN MODIF ID AA VISIBLE LENGTH 8  .
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS : FDNAME(132) TYPE C LOWER CASE MODIF ID BB.
SELECTION-SCREEN PUSHBUTTON /33(30) ACTIONS USER-COMMAND
                 BTNACT1 MODIF ID BB VISIBLE LENGTH 8.
SELECTION-SCREEN PUSHBUTTON 43(30) CANCELS USER-COMMAND
                 BTNCAN1 MODIF ID BB VISIBLE LENGTH 8.
SELECTION-SCREEN END OF BLOCK B2.
DATA : ACTNAME(8) TYPE C,SCRGRUP(2) TYPE C.
INITIALIZATION.
ACTIONS = 'Download'.
CANCEL = 'Cancel'.
ACTION = 'Upload'.
CANCELS = 'Cancel'.
ACTNAME = 'Download'.
SCRGRUP = 'AA'.
AT SELECTION-SCREEN ON RADIOBUTTON GROUP RAD1.
IF FUPLOAD = 'X'.
     MOVE 'Upload' TO ACTION.
     MOVE 'Upload' TO ACTNAME.
ELSEIF FDLOAD = 'X'.
     MOVE 'Download' TO ACTION.
     MOVE 'Download' TO ACTNAME.
ENDIF.
AT SELECTION-SCREEN.
IF SY-UCOMM = 'R1'.
    IF ACTION = 'Download'.
      SCRGRUP = 'AA'.
     MESSAGE S007(ZMESSAGE).
    ELSEIF ACTION = 'Upload'.
      SCRGRUP = 'BB'.
     MESSAGE S008(ZMESSAGE).
   ENDIF.
ELSEIF SY-UCOMM = 'BTNCAN' OR SY-UCOMM = 'BTNCAN1'.
  LEAVE PROGRAM.
ENDIF.
*AT USER-COMMAND.
CASE SY-UCOMM.
   WHEN 'ACTIONS'.
     LOOP AT SCREEN.
       IF SCREEN-NAME = 'FUNAME'.
       ENDIF.
     ENDLOOP.
ENDCASE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR FUNAME.
  PERFORM call_filedialog CHANGING FUNAME.
PERFORM call_filedialog CHANGING FUNAME.
AT SELECTION-SCREEN OUTPUT.
LOOP AT SCREEN.
IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Download' .
  SCREEN-ACTIVE = 0.
  MODIFY SCREEN.
ENDIF.
IF SCREEN-GROUP1 = SCRGRUP AND ACTNAME = 'Upload'.
  SCREEN-ACTIVE = 0.
  MODIFY SCREEN.
ENDIF.
ENDLOOP.
FORM call_filedialog CHANGING fname.
  DATA: li_filetable TYPE STANDARD TABLE OF file_table,
    lv_return TYPE i,
    lw_filetable TYPE file_table.
  CALL FUNCTION 'TMP_GUI_FILE_OPEN_DIALOG'
    TABLES
      file_table = li_filetable
    EXCEPTIONS
      cntl_error = 1
      OTHERS     = 2.
  IF sy-subrc <> 0.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
            WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  ENDIF.
  READ TABLE li_filetable INDEX 1 INTO lw_filetable.
  fname = lw_filetable-filename.
ENDFORM.                    "call_filedialog
Reward Points, if useful.
Regards,
Manoj Kumar

Similar Messages

  • Chaning color when radio button is clicked

    I am trying to change the background color when a radio button is clicked. The blue button is the only that I have added an actionListener, but when it is clicked, I get a runtime error. Any suggestions?
    [import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Radio
         public static void main(String[] args)
              JFrame frame = new JFrame("Radio");
              Container pane = frame.getContentPane();
              JPanel radioPanel = new JPanel();
              radioPanel.setLayout(new GridLayout(3,1));
              JRadioButton blue = new JRadioButton("Blue", false);
              blue.setActionCommand("blue");
              JRadioButton red = new JRadioButton("Red", false);
              JRadioButton green = new JRadioButton("Green", false);
              Radio2 listener = new Radio2(blue, red, green, radioPanel);
              blue.addActionListener(listener);
              blue.setBackground(Color.BLUE);
         blue.setContentAreaFilled(false);
    ButtonGroup bg = new ButtonGroup();
              bg.add(blue);
              bg.add(red);
              bg.add(green);
              radioPanel.add(blue);
              radioPanel.add(red);
              radioPanel.add(green);
              radioPanel.setBorder(BorderFactory.createTitledBorder(
    BorderFactory.createEtchedBorder(), "Change Color?"));
              frame.add(radioPanel);
              frame.setSize(200,200);
              frame.setVisible(true);
         class Radio2 implements ActionListener
              private JRadioButton blue, red, green;
              private JPanel radioPanel;
              public Radio2(JRadioButton blue, JRadioButton red, JRadioButton green, JPanel radioPanel)
                   blue = blue;
                   red = red;
                   green = green;
                   radioPanel = radioPanel;
              public void actionPerformed(ActionEvent e)
                   if(e.getActionCommand().equals("blue"))
                        radioPanel.setBackground(Color.blue);
                        System.out.println(e.getActionCommand());
    ]

    I am trying to change the background color when a
    radio button is clicked. The blue button is the only
    that I have added an actionListener, but when it is
    clicked, I get a runtime error. Any suggestions?
    [import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public class Radio
         public static void main(String[] args)
              JFrame frame = new JFrame("Radio");
              Container pane = frame.getContentPane();
              JPanel radioPanel = new JPanel();
              radioPanel.setLayout(new GridLayout(3,1));
    JRadioButton blue = new JRadioButton("Blue",
    ", false);
              blue.setActionCommand("blue");
              JRadioButton red = new JRadioButton("Red", false);
    JRadioButton green = new JRadioButton("Green",
    ", false);
    Radio2 listener = new Radio2(blue, red, green,
    n, radioPanel);
              blue.addActionListener(listener);
              blue.setBackground(Color.BLUE);
         blue.setContentAreaFilled(false);
    ButtonGroup bg = new ButtonGroup();
              bg.add(blue);
              bg.add(red);
              bg.add(green);
              radioPanel.add(blue);
              radioPanel.add(red);
              radioPanel.add(green);
              radioPanel.setBorder(BorderFactory.createTitledBorde
    r(
    BorderFactory.createEtchedBorder(),
    edBorder(), "Change Color?"));
              frame.add(radioPanel);
              frame.setSize(200,200);
              frame.setVisible(true);
         class Radio2 implements ActionListener
              private JRadioButton blue, red, green;
              private JPanel radioPanel;
    public Radio2(JRadioButton blue, JRadioButton red,
    d, JRadioButton green, JPanel radioPanel)
                   blue = blue;
                   red = red;
                   green = green;
                   radioPanel = radioPanel;
              public void actionPerformed(ActionEvent e)
                   if(e.getActionCommand().equals("blue"))
                        radioPanel.setBackground(Color.blue);
                        System.out.println(e.getActionCommand());
    ]Do me a favor, please. When you post code, put it inside code tags (the button you see above the text area.)
    Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to Capture the event when minimized button is clicked of a JFrame?

    Hi All,
    In my SWING application, I want to do something when the minimized button is clicked. But not able to understand how to do that.
    My basic requirement is like that, if I minimize the JFrame, it should be minimized to system tray with an icon. Again when the icon is clicked, the frame should be maximized in the Windows.
    Also, how to make my JFrame visible/invisible. If I close it, then the process will got killed... that I don't want to happen. Should I us setVisible(true/false) for the frame... Please suggest...
    Thanks,
    Ujjal

    There could be some mistake in my basic understanding... Anyway this is what I wrote...
    import java.io.*;
    import java.awt.*;
    import javax.swing.*;
    public class WindowIconify extends JApplet
         JFrame jf;
         JPanel jp;
         public void run()
              jf = new JFrame("test");
              jf.setSize(200,200);
              jp = new JPanel();
              jp.setBackground(Color.BLACK);
              jf.add(jp);
              jf.setVisible(true);
         public boolean handleEvent(Event event)
              if ( event.id == Event.WINDOW_ICONIFY)
                   System.out.print("iconifying");
              return true;
         public static void main(String args[])
              WindowIconify wi = new WindowIconify();
              wi.run();
    }

  • URGENT:Expected behaviour when two buttons are clicked on a page?

    Hello,
    I have developed a search page. In the search results region, I have option to delete and update a record. What is the expected behaviour if I first click on the delete icon of one record and then click on the update icon of another record?
    I am getting an error page starting with the following line : oracle.apps.fnd.framework.OAException: java.lang.NullPointerException.
    Could anyone guide me about how I can correct this situation?
    In Dev guide, I saw the section 'PPR Event Queuing'. They have mentioned the below lines in this section :
    Note: To disable this feature, set the value of the profile FND_PPR_EVENT_QUEUE_DISABLED to Y. In this
    case, when a PPR event fires, all subsequent events on the page are ignored.
    Is it possible to set the profile FND_PPR_EVENT_QUEUE_DISABLED to Y in the PR of the search page? Or should I set the profile value through front end for the responsibility for which I'll be adding this search page?
    Thanks,
    Anju

    I had looked through the error message but I couldnt find anything related to the coding I have done.
    I have pasted the entire error message below:
    Exception Details.
    oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
         at oracle.apps.fnd.framework.webui.OAPageBean.releaseRootApplicationModule(OAPageBean.java:5448)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseApplicationModule(OAPageContextImpl.java:2491)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseRootApplicationModule(OAPageContextImpl.java:2439)
         at oracle.apps.fnd.framework.webui.OAPageBean.performReleaseApplicationModules(OAPageBean.java:4151)
         at oracle.apps.fnd.framework.webui.OAPageBean.finalizeRequest(OAPageBean.java:3926)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:552)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.lang.NullPointerException
         at com.evermind.server.http.EvermindHttpServletRequest.getSession(EvermindHttpServletRequest.java:2343)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.deleteValue(OAHttpSessionCookieImpl.java:825)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.releaseApplicationModule(OAHttpSessionCookieImpl.java:526)
         at oracle.jbo.common.ampool.SessionCookieImpl.releaseApplicationModule(SessionCookieImpl.java:584)
         at oracle.apps.fnd.framework.webui.OAPageBean.releaseRootApplicationModule(OAPageBean.java:5439)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseApplicationModule(OAPageContextImpl.java:2491)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseRootApplicationModule(OAPageContextImpl.java:2439)
         at oracle.apps.fnd.framework.webui.OAPageBean.performReleaseApplicationModules(OAPageBean.java:4151)
         at oracle.apps.fnd.framework.webui.OAPageBean.finalizeRequest(OAPageBean.java:3926)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:552)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.lang.NullPointerException
         at com.evermind.server.http.EvermindHttpServletRequest.getSession(EvermindHttpServletRequest.java:2343)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.deleteValue(OAHttpSessionCookieImpl.java:825)
         at oracle.apps.fnd.framework.webui.OAHttpSessionCookieImpl.releaseApplicationModule(OAHttpSessionCookieImpl.java:526)
         at oracle.jbo.common.ampool.SessionCookieImpl.releaseApplicationModule(SessionCookieImpl.java:584)
         at oracle.apps.fnd.framework.webui.OAPageBean.releaseRootApplicationModule(OAPageBean.java:5439)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseApplicationModule(OAPageContextImpl.java:2491)
         at oracle.apps.fnd.framework.webui.OAPageContextImpl.performReleaseRootApplicationModule(OAPageContextImpl.java:2439)
         at oracle.apps.fnd.framework.webui.OAPageBean.performReleaseApplicationModules(OAPageBean.java:4151)
         at oracle.apps.fnd.framework.webui.OAPageBean.finalizeRequest(OAPageBean.java:3926)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:552)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)

  • Scripting for when all buttons are clicked

    Im quite new to flash well at least the scripting part of it.
    I'm much more of a designer and I'm having big problems I know that
    it is prob very simple but I am totally useless at it! Can some1
    please just point me in the right direction thank you xxx

    If you're testing in flash you should see some trace outputs
    in the output panel. If you don't then there's something not
    working right.
    When you press each of your buttons, you want the main
    timeline to go to a different frame right? You need to set those
    frame targets in the code.
    example for but_bat:
    {button:but_bat, gotoFrame:2},
    this sets things up so that when but_bat is pressed, the
    timeline goes to frame 2.
    You will need to set the others for their correct frame
    targets. Just change the numbers for gotoFrame:
    number here
    Is what you want to happen when
    all of the buttons have been clicked that a congratulations
    sign movieclip is played? (You haven't said what you wanted it to
    do at that point, so I'm afraid I couldn't know that ;-) ) At the
    moment I've set the script up so that it checks... but all it does
    is trace an output:'I would normally want to do something special
    from this point' where whatever you want to have happen when
    they're all pressed would be requested by actionscript. If you tell
    me what that is, I can tell you the code to do it.

  • Adobe Pro fires validation event when new page is created

    Adobe Pro fires validation event when a new page is created on many fields.
    When testing in Livecycle, I can add a new page fine, but with Adobe Pro a large list of errors appears and the fields are highlighted in red.
    The errors don't happen in other versions of Adobe.
    These are valid errors if the user tried to submit a field that is required and has not been entered yet, but the error happens when the page is initially created (added).

    I was able to get my role processor to work.
    EventHandlers.xml
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <eventhandlers xmlns="http://www.oracle.com/schema/oim/platform/kernel"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.oracle.com/schema/oim/platform/kernelorchestration-handlers.xsd">
    <action-handler class="oim11g.code.eventhandler.RoleProcessor" entity-type="Role" operation="ANY" name="RoleProcessor" order="9999" stage="postprocess" sync="TRUE"/>
    </eventhandlers>
    >
    plugin.xml
    >
    <?xml version="1.0" encoding="UTF-8"?>
    <oimplugins xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <plugins pluginpoint="oracle.iam.platform.kernel.spi.EventHandler">
    <plugin pluginclass="oim11g.code.eventhandler.RoleProcessor" version="1.0" name="RoleProcessor"/>
    </plugins>
    </oimplugins >
    >
    Code:
    >
    public EventResult execute(long l, long l2, Orchestration orchestration) {
    String operation=orchestration.getOperation().trim().toString();
    HashMap<String, Serializable> parameters = orchestration.getParameters();
    System.out.println("<---------- Calling " + getClass().getName() + ": Operation[" + operation + "] Execute ---------->");
    System.out.println("<---------- Ending " + getClass().getName() + " Operation[" + operation + "] Execute ---------->");
    return new EventResult();
    >
    When i modified one of my roles, it output the following:
    >
    <---------- Calling oim11g.code.eventhandler.RoleProcessor: Operation[MODIFY] Execute ---------->
    <---------- Ending oim11g.code.eventhandler.RoleProcessor Operation[MODIFY] Execute ---------->
    >
    Hope this helps.
    -Kevin

  • Fire an event when loosing focus on "dateFrom" EditText

    Hello,
    im trying to fire an event when im "going out" dateFrom (EditText). I used the following code which is not working. Have You and different way to do it ??
    im main goal is to format the text in the EditText to the propriet one when the user will focus on other element.
    If pVal.EventType = BoEventTypes.et_LOST_FOCUS Then
    If pVal.ItemUID = "dateFrom" Then
    oAppObj.MessageBox("", 1, "OK")
    End If
    End If
    Thanks

    Hi Adele
    when im "going out" nothing happend. Im using this event  in my oAppObj_ItemEvent Sub,maybe here is my mistake ?? but i dont think so !!
    One more think:
    Im trying to work on the Employee Info and when i update some fields ( exp. startDate = 09/09/06  - dd/mm/yy) im getting an error ( the starting date is befor the birth date =21/01/70 dd-mm-yy) !!! is it a 2K year problem ??
    All this it looks so strange ... im using B1 2004A and VB.Net

  • Is there a possibility to clear ONLY the COMPLETED downloads when a button is clicked in firefox?

    is there any way (natively, or by using an extension) to clear ONLY the COMPLETED downloads when a button is clicked in firefox. it should not clear the paused, failed or cancelled downloads. - similar to the functionality in INTERNET DOWNLOAD MANAGER software by TONEC. i have searched lots but could not find such a function. :(

    Along the lines of cor-el's last post, if you want to delete most of the downloads, you can select the entire list using Ctrl+a then Ctrl+click the ones you want to exclude from the selection.
    In some cases, Firefox supports "places queries" to drill down on specific kinds of history. However, I didn't see one for downloads documented in the MDN article, so I'm not sure whether there is a way to query just for successfully completed downloads.
    https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Places_query_URIs

  • Load text or txt file into a table when a button is clicked by the user

    Can anyone please help me,
    I have a form where a user comes and uploads a text file(Unicode UTF-8) and clicks a button(Upload) ,
    when the button is clicked - it should load the text file data into the database table for the corresponding columns.
    Note: in text file columns are sapreted by tab(\t)
    & First row of text file contains column names.
    & Table name should be that text file name
    Can anyone please suggest me a possible solution or an approach.
    Thanks,
    Rathore
    Edited by: Rathore on May 14, 2010 1:49 AM

    Hi Legends and experts
    please reply give me some solutions

  • Load CSV file into a table when a button is clicked by the user

    Hello,
    Can anyone please help me out with this issue, I have a form where in a user comes and uploads a CSV file and clicks a button, when the button is clicked - it should load the CSV file data into the database table for the corresponding columns.
    Can anyone please suggest me a possible solution or an approach.
    Thanks,
    Orton
    Edited by: orton607 on May 5, 2010 2:00 PM

    thanks fro replying.
    I have tried your changes but its not working. One more question is that I am having one column which contains commas, when I tried to load the file its failing. I think its the problem with commas. So I have changed the code to use the replace function for that column, then also its not working. Can anyone please suggest a possible approach. Below is my source code for your reference.
    DECLARE
    v_blob_data BLOB;
    v_blob_len NUMBER;
    v_position NUMBER;
    v_raw_chunk RAW(10000);
    v_char CHAR(1);
    c_chunk_len NUMBER := 1;
    v_line VARCHAR2 (32767):= NULL;
    v_data_array wwv_flow_global.vc_arr2;
    v_rows NUMBER;
    v_sr_no NUMBER := 1;
    l_cnt BINARY_INTEGER := 0;
    l_stepid NUMBER := 10;
    BEGIN
    delete from sample_tbl;
    -- Read data from wwv_flow_files</span>
    select blob_content into v_blob_data from wwv_flow_files
    where last_updated = (select max(last_updated) from wwv_flow_files where UPDATED_BY = :APP_USER)
    and id = (select max(id) from wwv_flow_files where updated_by = :APP_USER);
    v_blob_len := dbms_lob.getlength(v_blob_data);
    v_position := 1;
    -- Read and convert binary to char</span>
    WHILE ( v_position <= v_blob_len ) LOOP
    v_raw_chunk := dbms_lob.substr(v_blob_data,c_chunk_len,v_position);
    v_char := chr(hex_to_decimal(rawtohex(v_raw_chunk)));
    v_line := v_line || v_char;
    v_position := v_position + c_chunk_len;
    -- When a whole line is retrieved </span>
    IF v_char = CHR(10) THEN
    -- Convert comma to : to use wwv_flow_utilities </span>
    v_line := REPLACE (v_line, ',', ':');
    -- Convert each column separated by : into array of data </span>
    v_data_array := wwv_flow_utilities.string_to_table (v_line);
    -- Insert data into target table </span>
    EXECUTE IMMEDIATE 'insert into sample_tbl(col1..col12)
    values (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11,:12)'
    USING
    v_sr_no,
    v_data_array(1),
    v_data_array(2),
    v_data_array(3),
    v_data_array(4),
    v_data_array(5),
    v_data_array(6),
    v_data_array(7),
    v_data_array(8),
    REPLACE(v_data_array(9), ':', ','),
    to_date(v_data_array(10),'MM/DD/YYYY'),
    v_data_array(11);
    -- Clear out
    v_line := NULL;
    v_sr_no := v_sr_no + 1;
    l_cnt := l_cnt + SQL%ROWCOUNT;
    END IF;
    END LOOP;
    COMMIT;
    l_stepid := 20;
    IF l_cnt = 0 THEN
    apex_application.g_print_success_message := apex_application.g_print_success_message || ' Please select a file to upload ' ;
    ELSE
    apex_application.g_print_success_message := apex_application.g_print_success_message || 'File uploaded and processed ' || l_cnt || ' record(s) successfully.';
    END IF;
    l_stepid := 30;
    EXCEPTION WHEN OTHERS THEN
    ROLLBACK;
    apex_application.g_print_success_message := apex_application.g_print_success_message || 'Failed to upload the file. '||REGEXP_REPLACE(SQLERRM,'[('')(<)(>)(,)(;)(:)(")('')]{1,}', '') ;
    END;
    Below is the function which I am using to convert hex to decimal
    create or replace function hex_to_decimal( p_hex_str in varchar2 ) return number
    is
    v_dec number;
    v_hex varchar2(16) := '0123456789ABCDEF';
    begin
    v_dec := 0;
    for indx in 1 .. length(p_hex_str)
    loop
    v_dec := v_dec * 16 + instr(v_hex,upper(substr(p_hex_str,indx,1)))-1;
    end loop;
    return v_dec;
    end hex_to_decimal;
    thanks,
    Orton

  • Creating a plot on a java Frame when a button is clicked

    hi
    I want to create a plot in a java application in a frame when a button is clicked.I mean to say a
    a plot between two single dimensional arrays one as x-axis and the other as y-axis. Can u please suggest me with an example
    Thank u

    JFreeChart

  • Error: Show Details cannot be executed when multiple items are selected in a report filter field or in a slicer

    I have connected TABULAR Model to Excel, and in the pivot the filter is on multiple dimensions. When doing the drillthrough action it gives error - Error: Show Details cannot be executed when multiple items are selected in a report filter field or in a slicer
    Is there any workaround to this error?  so that drillthrough can be done even with multiple selection.

    Hi Vikas,
    The reason behind the error message requires the knowledge on what happens at the backend. When you perform a drill-through action, a query is sent to Analysis Services. This query is expressed in a query language called Multi-Dimensional Expression (MDX).
    Since the MDX language doesnot support drill-through command against a set (collection of tuples) an error is persisted. 
    For now, there is no workaround as it is a limitation of the underlying language that is generating the query.
    When multiple items are selected you lose the ability to drill-down on individual metrics. To resolve you must either:
    1. Select a single Item.
    2. Select all items.
    Hope this helps!
    Please mark as Answer if this helps! Thanks, Rajasekhar.

  • How to Create a Dynamic http address that opens the Explorer Window for a List Item When a Button Is Clicked--Currently Trying to Make this Work with Javascript

    I have created a button (via Content Editor) that uses JavaScript to open the Attachments folder of a list item in the Explorer Window in SharePoint 2010. The purpose is to have drag and drop functionality for each list item, having multiple attachments.
    The button works but opens the "Attachments" folder containing all of the other folders for each list item (one folder per item). It seems that when you add an attachment to a list item, SharePoint numbers the folder based on the item's ID. What
    I'm trying to do is take the JavaScript I have and have it run when a button is clicked in a custom form. When it runs, I'm trying to get it to open the "specific" folder for the list item. I have had success creating a hyperlink in the list that
    does this; however, the link WILL NOT work until I use the Content Editor created button that runs JavaScript, that prompts me to click OK to my profile certificate, and then opens the Attachment folder. After that occurs, I can use my hyperlinks without issue
    because I'm no longer prompted to click OK for my cert.
    So I'm trying to take the JavaScript I have and place it in a list item form (custom form) and have it run when a form button is clicked. The problem is I have very little knowledge of JavaScript (did I mention little?) and
    "don't know how to take the "http:" address I have in the script and append to it the list item ID, according to the record I have open."
    So that for any record I open, the script will grab the corresponding record ID (or list item ID) and append it.
    Here's the script I'm working with (which I didn't create but am grateful for):
    <style>
    .httpFolder {behavior:url(#default#httpFolder);}
    </style>
    <script text = "javascript">
       function fnOpenFolderView(){
       oDAV.navigateFrame("https://server/collection/site/subsite/Lists/Sublist/Attachments","_self");
    </script>
    <div id = "oDAV" class = "httpFolder"/>
    <input type = "button" value = "Open Attachment Folder" onclick = "fnOpenFolderView()"/>
    The above script, in the Content Editor, creates a button that opens the Attachments folder for the corresponding SharePoint list.
    JackSki123

    Hello Thriggle,
    Thank you for pointing that out. I appended your "GetUrlKeyValue" to the end and it worked. That said, I noticed it doesn't run as smoothly as when I simply click on the Content Editor button I created that resides on the SharePoint List
    ASPX page (not the form). The Content Editor button has the same code, minus the "GetUrlKeyValue". I click it; I get prompted to choose my cert; it opens right up.
    Now go to the ASPX Display form where I dump the code in a table cell. Button appears in cell; I click it; wait; wait; I get prompted for cert; it opens. Do I need some sort of "throttle" for the JavaScript? For instance, I thought before running
    JavaScript, you reference the library first. This code doesn't do that. I'm wondering if there's something more I need to make this run smoothly. Thank you both for getting me this far. 
    JackSki123

  • How to get a form to appear on the same page when a button is clicked?

    Hi,
    I have a report on a page with a create button. When a user clicks the create button, a form should appear on another region in the same page....how do i go about doing this?
    I know how to do this if the form is on a different page, but i'd like the form to appear on the same page as the report and only when the button is clicked.
    Thanks.

    Hi,
    I did the following, but it didnt work....
    1) Created a hidden item on the page, and in the Default Value field, I set the value to N.
    2) Created a button in the report with the following values under "Optional URL Redirect":
    Target is a: Page in this application
    Page: 4
    Set these items: P1_SHOW_FORM
    With these values: Y
    3) Created a form of HTML text type with the following values under "Conditional Display":
    Condition Type: Request=Expression 1
    Expression 1: P1_SHOW_FORM='Y'
    What have I done wrong or have i missed something?
    Thanks.

  • Access Bidder Tab Details when PUBLISH button is clicked

    Hi All,
    I've few requirements to enhance the functionality of PUBLISH button in Rfx Creation.
    One fo them is to trigger notification mails to all bidders when RFx is re-PUBLISHed by clicking PUBLISH button.
    I need to fetch all the bidder list from Bidder Tab whenever PUBLISH is clicked.
    Need to know where / which method has all these details so that I can enhance it.
    I know that PUBLISH is in the toolbar for FPM_OIF_COMPONENT.
    View - CNR_VIEW
    RFx Bidder tab details will get from the component /SAPSRM/WDC_UI_DO_BIDDER.
    I want to access the bidders when PUBLISH button is clicked.
    I want to which method is executed when PUBLISH button is clicked.
    Tried with CL_ABAP_DEBUGGER and CL_WDR_ACTION but not getting the ecaxt component which is calling.
    Is there any other way to debug?
    Thanks in Advance
    Rgrds,
    Sravan

    A bit late, but method /SAPSRM/IF_FPM_OVRIDE_EVT_OIF~OVERRIDE_EVENT_OIF from /SAPSRM/CL_FPM_OVRIDE_OIF is extremely useful trying to debug where the info comes from.
    Basically, there are several mappers classes that access to pdo layer somehow. It is always the same process more or less, but you have to know which classes are involved.
    You can usually get a class that is accesible from your wd component. If no BAdIs or no other way of doing some z modification, it is always posible to directly enhance such class...
    Hope this helps
    Regards

Maybe you are looking for

  • How do I set 23 in Apple Display luminance to 100 lux

    Hi, We have a new Imac G5 and a new 23in Apple display that we need to have match our existing CRT monitors. We use an Eye One Display 2 to calibrate our monitors to 100 lux. But we have not found a way to do this with the Imac or the Apple Display s

  • Can a PDF be "embedded" into another PDF, and still be its own layer?

    HI. I work with a software company that manipulate PDFs files, placing PDFs into other PDFs resulting in a combined file. what my question is, is the finished combined PDF file simply 1 big PDFs full of individual elements, or are the elements still

  • Help Please file association with Cloud PS

    I am on a PC - Windows 7 I recently upgraded fro PS 5.5 to Creative Cloud PS 14.0.2 x64 I went in to associate my file types to open with the new version of PS I go into the proper sub directory (CC) and find the .exe file When I click on it it assoc

  • CSV file reporting

    Hello, What is the best way to create a csv file with test results? Should I use scripting avalaible in TestStand or implement it in LabVIEW? Is there an example somewhere? I downloaded a few examples from earlier years but I cannot get them to work

  • Preview Does Not Match Render

    I am trying to replace one of the credits in a pre-built roll. I have the original credits captured from HDCAM 1080 23.98 psf 10 bit uncompressed on v1. On v2 I have a black square that covers up the line I want to change. And on line 3 I am going to