Recording midlet with save function

Im making a midlet that records audio and saves it to phone's file system. I get the application to run in emulator but when in phone (Sony Ericsson V800) i immediately get error Cannot create a DataSource for: null. Here is the code i'm trying to get to work: (i tried to change the file:///test.wav to file:///e:/test.wav but it didn't help. Also i got a version of this code without the save function but it doesn't work in phone either, it just says error.
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import javax.microedition.media.*;
import javax.microedition.media.control.RecordControl;
public class SaveCapturedAudioMIDlet extends MIDlet
implements CommandListener {
// the display items
private Display display = null;
private Alert alert = null;
private Command exitCommand = null;
// players and controls
private Player capturePlayer = null;
private Player playbackPlayer = null;
private RecordControl rControl = null;
private boolean error = false;
public SaveCapturedAudioMIDlet() {
// create the display
display = Display.getDisplay(this);
alert = new Alert("Message");
alert.setTimeout(Alert.FOREVER);
alert.setString("Capturing for 10 seconds. Say something intelligent!");
exitCommand = new Command("Exit", Command.EXIT, 1);
alert.addCommand(exitCommand);
alert.setCommandListener(this);
try {
// create the capture player
capturePlayer = Manager.createPlayer("capture://audio");
if (capturePlayer != null) {
// if created, realize it
capturePlayer.realize();
// and grab the RecordControl
rControl = (RecordControl)capturePlayer.getControl(
"javax.microedition.media.control.RecordControl");
// set the alert as the current item
display.setCurrent(alert);
// if it is null throw exception
if(rControl == null) throw new Exception("No RecordControl available");
// and set the destination for this captured data
rControl.setRecordLocation("file:///test.wav");
} else {
throw new Exception("Capture Audio Player is not available");
} catch(Exception e) {
error(e);
public void startApp() {
if(error) return;
try {
// first start the corresponding recording player
capturePlayer.start();
// and then start the RecordControl
rControl.startRecord();
// now record for 10 seconds
Thread.sleep(10000);
// stop recording after time is up
rControl.stopRecord();
// commit the recording
rControl.commit();
// stop the Player instance
capturePlayer.stop();
// and close it to release the microphone
capturePlayer.close();
// finally, create a Player instance to playback
// check your device documentation to find out the root.
// The following will work on devices that have the root
// specified as shown
playbackPlayer = Manager.createPlayer("file:///test.wav");
// and start it
playbackPlayer.start();
} catch(Exception e) {
error(e);
public void pauseApp() {
public void destroyApp(boolean unconditional) {
if(capturePlayer != null) capturePlayer.close();
if(playbackPlayer != null) playbackPlayer.close();
public void commandAction(Command cmd, Displayable disp) {
if(cmd == exitCommand) {
destroyApp(true);
notifyDestroyed();
// general purpose error method, displays on screen as well to output
private void error(Exception e) {
alert.setString(e.getMessage());
alert.setTitle("Error");
display.setCurrent(alert);
e.printStackTrace();
error = true;
}

see this:
http://www.hcilab.org/documents/tutorials/AudioTest/index.html
I think the problem is the url passed to player "file:///test.wav"
I think you must read the file from the filesystem with jsr 75 api (Fileconnection etc.) and then make a byte stream in order to pass it to the Manager.createPlayer().

Similar Messages

  • Paint program with save function

    Anyone know a way to make a paint program in flash 8 with
    save function?
    The paint area should be quite large so the current jpg
    saving methods don't seem to work.
    Any solutions for this?

    You probably have to specify what exactly is the problem. Are
    you referring to the data size that has to be transfered to a
    server?

  • Problem with SaveAs function using random paths.

    The Setup:
    Part 1) I have a folder-level script that allows me to perform a SaveAs function from within forms. I do this as a way to save the document quietly in the background. The effect is that the file is overwritten by a copy of itself. The script is:
    var mySaveAs = app.trustedFunction( function(oDoc,cPath,cFlName)
        app.beginPriv();
        cPath = cPath.replace(/([^\/])$/, "$1/");
        try{
            oDoc.saveAs(cPath + cFlName);
        }catch(e){
            app.alert("Error During Save");
        app.endPriv();
    Part 2) From within my documents, I perform the save by calling the function below:
    function runSave()
    {if(typeof(mySaveAs) == "function") {
        var pathArray = this.path.split("/");
        var myFileName = pathArray[pathArray.length-1];
        var cPath = this.path.slice(0,myFileName);
        mySaveAs(this, cPath, myFileName);
    } else {
        app.alert("Missing Save Function\n" + "Please contact forms administrator");
    Part 3) I have several large forms that utilize an autosave to call the save function according to a time interval of 5 minutes, using:
    app.setInterval(runSave(), 300000);
    The Problem:
    Part 1) The autosave feature works fine and it works silently in the background. However, I start to experience problems when I have two forms open at the same time. If, for example, I have a form from one folder open, and open a form from a second folder, the save feature will sometimes save the active document to it's original folder (as intended, overwriting itself and creating an autosave) or sometimes save to the second document's original folder. This leaves me with an updated (autosaved) copy of the document in the wrong folder, and a non-updated copy in the original folder. This seems to vary depending on which document I opened last and/or which document is currently active. Though I can't seem to find the right combination.
    It's as thought the "this.path" is getting confused.
    Part 2) Worse still, if the two documents have the same name, as is often the case with these forms, any incorrect filing when saving causes an overwrite of the second document and loss of data.
    Part 3) To makes things maddening, this also happens at times when no second folder or second document is open. Instead, the misfiling saves the single, active document to a recently accessed folder. For example, I'll open a local folder and open a Word doc, close the doc and the folder, go to a different folder in a different root (a networked folder), open the form, and it autosaves to the local machine in the folder with the Word doc. So now not only do I have a non-updated copy in my correct folder, I have no idea where the updated copy was actually saved to until I come across it some time later.
    Part 4) Again, worse still, the previously accessed folder might happen to be one that contains a document with the same name, and that document gets overwritten by the autosave. I'll have no idea that the form has been overwritten until I happen to open it some time later and see that it contains data from a totally different form.
    What is going on and how do I stop it?
    Adobe Acrobat X Pro on a PC.

    Thank you, that is helpful to understand. I'd like to keep it as 3 parameters, as all my documents currently output 3 to the trusted function. And I'd still like to keep the error catch, but I'm not sure why the previous trusted function from the tutorial is no longer working, so I just want to run this by you:
    safeSaveAs = app.trustPropagatorFunction(function(theDoc,thePath,theFileName){
        app.beginPriv();
        var fullPath = (thePath + theFileName);  
        try {
            theDoc.saveAs({cPath:fullPath});
        } catch(e) {
            app.alert("Error During Save");
        app.endPriv();
    myTrustedSaveAs = app.trustedFunction(function(theDoc,thePath,theFileName){
            app.beginPriv();
            safeSaveAs(theDoc,thePath,theFileName);
            app.endPriv();

  • Help with "save" function??

    We are creating a fillable .pdf form for our company supervisors to use in the field as a daily report. My goal is to have a single Acrobat form that can be stored on their computer or on our FTP site that they can access to fill out a daily report. The issue we are having is that as soon as they start typing, the "save" button becomes active and if they are not super diligent they can end up overwriting the blank form. I need this to be bulletproof so we can get consistent reports each day.
    How can I set the form up so that there is no option to accidentally save a filled out form over our blank "template" form?
    Is there a way to add a button to the form and save it in a specific format while diabling any "save" functionality?
    Please help. Any input would be greatly appreciated.
    Thank you.

    Have you tried making the form Read-Only? Not sure that will do it, but worth a try. Actually I am not sure why the save is an issue, as long as they save to a new file name in the end. A filled out form can sometimes save time in terms of having name and such already filled in.

  • Problem with Save functionality for a Screen - Field

    Hi Experts,
    I  have included a custom field with list box option to an infotype. The new filed  displays the values based on the values selected in the standard field which has a list box option.
    Now if we enter the transaction in change mode and change the standard field value without pressing ENTER and click SAVE button, it gets saved with an improper value in the custom field. The reason being the custom field values with drop down list is retreived only after we press enter (POV is triggered) after selecting a standard field.
    Options tried:
    I have included an error message (in PAI)  to stop the values being saved, but the screen beomes disabled.
    I have done my validation only on the custom field as there is no other possibility to validate any other fields on the screen (all are standard). Here the error message pops up and the field is in the enable mode, but it does not retrieve the possible values for the custom field based on my earlier selection for the standard field.( Because as POV does not get triggered in this case)
    Ex.  Std field value = USA
           Custom field   =  United States of America
    I changed the value in Standard field to = UK and click SAVE - It get saved
    Now how to stop it from SAVING and let it know that there is an error in the custom field and it needs to select the right value from the list ie - United Kingdom.
    Lakshmi

    Perhaps a solution is to save the code value, not the text for the code, and only display the text.  In this way, the database would have UK and when you re-entered the screen, a PBO module could obtain the text for UK for display.
    Or, if you must store the text value instead of the code (seems redundant...you can look up the text anytime), an enhancement to the save to database logic to obtain the correct value from the current value of the code and save that to the database....

  • 'Save' function inactive in user defined PF for CL_SALV*

    Hello,
    I've implemented OOPS ALV using CL_SALV* classes and defined a PF Status with 'Save' functionality copied from the Standard PF Status SALV_TABLE_STANDARD of the function group SALV_METADATA_STATUS.
    However, the said SAVE function button is not active on execution of the report. I've checked the activation/visibility of the function using methods get_function(), is_active() and is_visible () but everything seems fine.
    Please help.
    Thanks,
    Shalabh Jain

    I don' think anything wrong with SALV Class.  I tried the same by copying standard GUI Status "SALV_TABLE_STANDARD" to a Z GUI Status and it worked perfectly.  I followed below steps
    - Copy standard GUI status "SALV_TABLE_STANDARD" to "ZSALV_TABLE_STANDARD"
    - Changed the Function code of SAVE button to "SAVE"
    - Activated GUI Status.
    - Attached the GUI status to the Z program
    - Call method SET_SCREEN_STATUS
    DATA : lv_sypfkey  TYPE sypfkey.
        lv_sypfkey = 'ZSALV_TABLE_STANDARD'.
        TRY.
            lr_table->set_screen_status(
              EXPORTING
                report        = sy-repid
                pfstatus      = lv_sypfkey
                set_functions = lr_table->c_functions_all ).
          ENDTRY.
    Regards, Vinod

  • I have a site I do business with. They do not authorize passwords unless a dealer. I do no have on an auto save function, as I want to type my passwords in ea

    I have a site I do business with. They do not authorize passwords unless you are a dealer. I do not have passwords on an auto save function, as I want to type my passwords in each time for security. My password for this site will only work a short WHILE, AND THEN it will not be recognized by the site and I cannot get in.
    Then I must contact the company to reset or clear it manually on their end so it can be reset. They always give me the SAME SETUP PASSWORD to use. I use it, then I RESET PASSWORD on my end. The computer seems to remember my user NAME AT least on my computer as it comes up once I start typing the username in. They SAY IT is a settings issue on my end. I do not have this problem on any other site even THOSE WITH higher SECURITY. I need to FIX the issue OR may LOSE ACCESS To the site as is very aggravating for them and they say other have had the problem but usually with chrome but never constantly.I am not that computer literate ,but my husband is an IT Security professor and textbook writer but says doesn't really know Firefox. I do not really want to store passwords on computer as have been hacked several times. He and I do not understand some of the terms mentioned. since it is not a problem with other sites it should be fixable. Please me help using terms I or my husband can understand without having to give Firefox all my passwords. I would be happy to set up something different just for this one site if I need to but need easy instructions. Have cleared the cookies before but it still happens. What setting do I need to change or set to fix this? the other questions that come up seem very different and do not apply. FF 22 now but happened w other FF versions.

    I'm having a little trouble understanding the part about your password having to be reset. Why is that happening??
    Let's start with Firefox's settings:
    (1) You can configure the password manager feature on this tab:
    orange Firefox button (or Tools menu) > Options > Security
    There is a checkbox to enable/disable the feature.
    There also is a "Saved Passwords" button to review and remove any passwords you do not want Firefox to keep.
    That tab also has a feature to set a Master Password so that no one can use your saved passwords without knowing the Master Password. You may need to exit Firefox in order for Firefox to ask for that again.
    Related articles:
    * [[Password manager - Remember, delete and change saved passwords in Firefox]]
    * [[Use a Master Password to protect stored logins and passwords]]
    (2) Site-specific permissions
    If you want to use the password manager for other sites but NOT a particular site, you can configure that in the Permissions Manager.
    In a new tab, type or paste '''about:permissions''' in the address bar and press Enter.
    After the page loads, use the search box in the upper left corner to narrow down the list to the site you want to configure. Highlight the site on the left side, and on the right side, choose Block under Store Passwords.
    (3) Form autocomplete suggestions
    Separate from passwords, Firefox remembers entries you've made into forms (in most cases) and lists the matching ones below the form field in a drop-down.
    To clear a suggestion, press the down arrow key to highlight it and press the Delete key.
    To turn off this feature, see this article: [[Control whether Firefox automatically fills in forms with your information]].
    To review and selectively edit or delete form history entries, you need an add-on. For example, you could try this one: https://addons.mozilla.org/firefox/addon/form-history-control/

  • Can you record sounds and save as a ringtone with the IPhone4?

    I'm new to the IPhone. All other phones I' ve used in the past I could save sounds and use them as a ringtone. I just can't seem to figure it out with the I4. Can it be done?

    You can record sounds with the Voice Memos app, then sync them to your computer by selecting "Include voice memos" on the Music tab of y0ur iTunes sync settings and syncing your phone.  Once synced to your computer they will appear in a Voice Memos playlist that iTunes creates on the left sidebar.  Then you have to convert it to a ringtone using iTunes as shown here: Create free ringtones with iTunes 10.  After this is done, you can check the ringtone in your iTunes library, then check Sync Tones on the Tones tab of your iTunes sync settings and sync.  Custom ringtones will appear in Settings>Sounds>Ringtone at the top of the list.

  • The Versions and Auto Save functions do they work with Office 2011?

    I recently installed LION on my Apple Pro. However the VERSIONS and AUTO SAVE functions do not seem to work with OFFICE 2011 Word and Excel. Does anyone know why?
    Gabriel

    Waiting for Microsoft to update them

  • Recording message with isight

    Other than having a conference or chat with a friend is it possible to record a message and send it by email.I know you can record and save chats but as a one on one with my isight to record a message i don't see a function being highlighted.iChat version 5.
    Cheers
    James

    ABBY RE wrote:
    Other than having a conference or chat with a friend is it possible to record a message and send it by email.I know you can record and save chats but as a one on one with my isight to record a message i don't see a function being highlighted.iChat version 5.
    Cheers
    James
    (1) In addition to Defcom's XLNT Photo Booth suggestion , QuickTime X that is part of Snow Leopard can record videos:
      http://www.apple.com/macosx/what-is-macosx/quicktime.html
    After you have recorded, you can save the file and attach it to an email.
    (2) If you have iLife, iMovie can also record the video and then "Share" it to a "tiny" size that is appropriate for emailing.
    Neither method offers the one-click email button Photo Booth that has.
    EZ Jim
    Mac Pro Quad Core (Early 2009) 2.93Ghz w/Mac OS X (10.6.1)  MacBook Pro (13 inch, Mid 2009) 2.26GHz (10.6.1)
    G5DP1.8GHz (10.5.8) G4 PowerBook 1.67GHz (10.4.11) iBookSE 366MHz (10.3.9) LED Cinema Display External iSight

  • Create, Update & Save Functions

    Hi All,
    This is my code for the requirement to print sales order in ALV Grid Format using OOPS concept.
    Please tell me how i should add select button to the ALV Grid in the first column.
    Also when i click on CREATE button a new blank line should be added to the alv grid.
    when i click on UPDATE button the selected row should become editable & when i click on save then my Ztable should be update with the new values and all the changes made.
    The Ztable has fields as of the IT_FIANL table.
    I have gone through many links regarding this topic but cant implement it in my code.
    REPORT  z12darp_shad_so_alv_oops
            MESSAGE-ID z12darp1.
    *Class definition for handling double click
    CLASS event_class DEFINITION DEFERRED.
    *Class definition for ALV toolbar
    CLASS lcl_alv_toolbar   DEFINITION DEFERRED.
    *AUTHOR: Darpana. Ahire
    *DATE: 28/11/2008
    *DESCRIPTION: To printsales order as Interactive ALV using OOPS concept.
    *&               D A T A   D E C L R A T I O N
    type-pools: icon.
    INCLUDE z12darp_alv_oops.
    data: ok_code_2008 like sy-ucomm.
    *&  Include           Z12DARP_ALV_OOPS
    *Author: Darpana. Ahire
    *Date: 28/11/2008
    *Description: ALV Grid Using OOPS concept.
    tables: z12Darp_final.
    types: begin of ty_vbak,
             vbeln   type   vbeln_va,
             erdat   type   erdat,
             vkorg   type   vkorg,
             spart   type   spart,
          end of ty_vbak.
    types: begin of ty_vbap,
             vbeln   type   vbeln_va,
             posnr   type   posnr_va,
             matnr   type   matnr,
             netpr   type   netpr,
             netwr   type   netwr_ap,
           end of ty_vbap.
    types: begin of ty_final,
             vbeln   type   vbeln_va,
             erdat   type   erdat,
             vkorg   type   vkorg,
             spart   type   spart,
             posnr   type   posnr_va,
             matnr   type   matnr,
             netpr   type   netpr,
             netwr   type   netwr_ap,
           end of ty_final.
    data: wa_vbak   type   ty_vbak,
          wa_vbap   type   ty_vbap,
          wa_final  type   ty_final.
    data: it_vbak   type   standard table of   ty_vbak,
          it_vbap   type   standard table of   ty_vbap,
          it_final  type   standard table of   ty_final.
    data: v_vbeln   type   vbeln_va.
    data: cust   type   ref to     cl_gui_custom_container,
          alv    type   ref to     cl_gui_alv_grid,
          event_receiver TYPE REF TO event_class.
    data: wa_fcat       type    lvc_s_fcat,
          it_fcat       type    lvc_t_fcat,
          wa_layout     type    lvc_s_layo.
    *Declaration for toolbar buttons
    DATA : ty_toolbar TYPE stb_button.
    data: c_alv_toolbar    TYPE REF TO lcl_alv_toolbar.      "Alv toolbar
    *&               S E L E C T I O N     S C R E E N
    SELECT-OPTIONS: ss_vbeln FOR v_vbeln.
    *&                 I N I T I A L I Z A T I O N
    INITIALIZATION.
      PERFORM initial.
    *&               A T   S E L E C T I O N - S C R E E N
    AT SELECTION-SCREEN.
      PERFORM at_sel_scr.
    *&            S T A R T - O F - S E L E C T I O N
    START-OF-SELECTION.
      PERFORM sel_records.
      PERFORM join_tables.
      PERFORM alv_output.
    * CLASS lcl_event_receiver DEFINITION
    CLASS event_class DEFINITION.
    *Handling double click
      PUBLIC SECTION.
      METHODS:
        handle_double_click
        FOR EVENT double_click OF cl_gui_alv_grid
        IMPORTING e_row e_column.
    ENDCLASS. "lcl_event_receiver DEFINITION
    * CLASS lcl_event_receiver IMPLEMENTATION
    CLASS event_class IMPLEMENTATION.
    METHOD handle_double_click.
      case e_column.
        when 'MATNR'.
          read table it_final into wa_final index e_row-index.
          set parameter id 'MAT' field wa_final-matnr.
          call transaction 'MM03' and skip first screen.
       endcase.
    ENDMETHOD.           "handle_double_click
    endclass.
    *       CLASS lcl_alv_toolbar DEFINITION
    *       ALV event handler
    CLASS lcl_alv_toolbar DEFINITION.
      PUBLIC SECTION.
    *Event for toolbar
        on_toolbar
           FOR EVENT toolbar
           OF  cl_gui_alv_grid
           IMPORTING e_object e_interactive,
      handle_user_command
            for event user_command of cl_gui_alv_grid
                importing e_ucomm.
    endclass.
    *       CLASS lcl_alv_toolbar IMPLEMENTATION
    *       ALV event handler
    CLASS lcl_alv_toolbar IMPLEMENTATION.
    METHOD on_toolbar.
    *   Add customized toolbar buttons.
    *   variable for Toolbar Button
        clear ty_toolbar.
        ty_toolbar-icon      =  icon_create.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'CREATE'.
        APPEND ty_toolbar TO e_object->mt_toolbar.
        clear ty_toolbar.
        ty_toolbar-icon      =  icon_change.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'UPDATE'.
        APPEND ty_toolbar TO e_object->mt_toolbar.
        clear ty_toolbar.
        ty_toolbar-icon      =  icon_system_save.
        ty_toolbar-butn_type = 0.
        ty_toolbar-text = 'SAVE'.
        APPEND ty_toolbar TO e_object->mt_toolbar.
    ENDMETHOD.                    "on_toolbar
    method handle_user_command.
    case e_ucomm.
        when 'CREATE'.
        when 'UPDATE'.
    endcase.
    endmethod.                           "handle_user_command
    ENDCLASS.            "lcl_event_receiver IMPLEMENTATION
    *&      Module  STATUS_2008  OUTPUT
    *       text
    MODULE status_2008 OUTPUT.
      SET PF-STATUS 'MENU1'.
      SET TITLEBAR 'TITLE1'.
    ENDMODULE.                 " STATUS_2008  OUTPUT
    *&      Module  alv_display  OUTPUT
    *       text
    MODULE alv_display OUTPUT.
      IF cust IS INITIAL.
    *    Creating object of container
        CREATE OBJECT cust
        EXPORTING
          container_name              = 'CUSTOM'.
    *    Creating object of alv
        CREATE OBJECT alv
          EXPORTING
            i_parent          = cust.
    ** create ALV event handler
    *  CREATE OBJECT c_alv_toolbar
    *    EXPORTING
    *      io_alv_grid = alv.
    create object c_alv_toolbar.
    * Register event handler
      SET HANDLER c_alv_toolbar->on_toolbar FOR alv.
      set handler c_alv_toolbar->handle_user_command for alv.
    *    alv layout
        PERFORM alv_layout.
    *    alv field catalogue
        PERFORM fieldcatalog_display.
    *    Displaying the ALV grid
        CALL METHOD alv->set_table_for_first_display(
          EXPORTING
            is_layout                     = wa_layout
          CHANGING
            it_outtab                     = it_final
            it_fieldcatalog               = it_fcat ).
    *Create object of the event class and setting handler for double click
        CREATE OBJECT event_receiver.
        SET HANDLER event_receiver->handle_double_click FOR alv.
    ENDIF.
    ENDMODULE.                 " alv_display  OUTPUT
    *&      Module  USER_COMMAND_2008  INPUT
    *       text
    module USER_COMMAND_2008 input.
      case ok_code_2008.
        when 'EXT'.
          leave program.
        when 'BCK'.
          leave to screen 0.
        when 'UP'.
          leave program.
      endcase.
    endmodule.                 " USER_COMMAND_2008  INPUT
    *&                E N D   O F   M A I N   P R O G R A M
    *&      Form  initial
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM initial .
      CLEAR: wa_vbak,
             wa_vbap,
             wa_final.
      REFRESH: it_vbak,
               it_vbap,
               it_final.
    ENDFORM.                    " initial
    *&      Form  at_sel_scr
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM at_sel_scr .
      SELECT vbeln
        INTO TABLE it_vbak
        FROM vbak
        WHERE vbeln IN ss_vbeln.
      IF sy-subrc <> 0.
        MESSAGE e000.
      ENDIF.
    ENDFORM.                    " at_sel_scr
    *&      Form  sel_records
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM sel_records .
      SELECT vbeln
             erdat
             vkorg
             spart
      INTO TABLE it_vbak
      FROM vbak
      WHERE vbeln IN ss_vbeln.
      IF sy-subrc <> 0.
        MESSAGE e000.
      ENDIF.
      SELECT vbeln
             posnr
             matnr
             netpr
             netwr
      INTO TABLE it_vbap
      FROM vbap
      FOR ALL ENTRIES IN it_vbak
      WHERE vbeln = it_vbak-vbeln.
      IF sy-subrc <> 0.
        MESSAGE e000.
      ENDIF.
    ENDFORM.                    " sel_records
    *&      Form  join_tables
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM join_tables .
      SORT it_vbak BY vbeln.
      SORT it_vbap BY vbeln posnr.
      LOOP AT it_vbap INTO wa_vbap.
        READ TABLE it_vbak INTO wa_vbak WITH KEY vbeln = wa_vbap-vbeln
        BINARY SEARCH.
        wa_final-vbeln = wa_vbak-vbeln.
        wa_final-erdat = wa_vbak-erdat.
        wa_final-vkorg = wa_vbak-vkorg.
        wa_final-spart = wa_vbak-spart.
        wa_final-posnr = wa_vbap-posnr.
        wa_final-matnr = wa_vbap-matnr.
        wa_final-netpr = wa_vbap-netpr.
        wa_final-netwr = wa_vbap-netwr.
        APPEND wa_final TO it_final.
        CLEAR wa_final.
      ENDLOOP.
    ENDFORM.                    " join_tables
    *&      Form  alv_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_output .
      CALL SCREEN 2008.
    ENDFORM.                    " alv_output
    *&      Form  alv_layout
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_layout .
      wa_layout-grid_title = 'SALES ORDER'.
      wa_layout-zebra = 'X'.
    ENDFORM.                    " alv_layout
    *&      Form  fieldcatalog_display
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fieldcatalog_display .
    *  IT_FINAL-VBELN.                    SALES ORDER NUMBER
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='2'.
      wa_fcat-fieldname ='VBELN'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = 'X'.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='SALES ORDER NO.'.
      wa_fcat-outputlen   = 15.
      wa_fcat-ref_table ='VBAK'.
      APPEND wa_fcat TO it_fcat.
    *  IT_FINAL-POSNR.                    SALES ITEM NUMBER
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='3'.
      wa_fcat-fieldname ='POSNR'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = 'X'.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='SALES ITEM NO'.
      wa_fcat-outputlen   = 15.
      wa_fcat-ref_table ='VBAP'.
      APPEND wa_fcat TO it_fcat.
    *  IT_FINAL-ERDAT.                    DATE ON WHICH DOCUMENT WAS CREATED
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='4'.
      wa_fcat-fieldname ='ERDAT'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = ' '.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='DATE OF CREATION'.
      wa_fcat-outputlen   = 10.
      wa_fcat-ref_table ='VBAK'.
      APPEND wa_fcat TO it_fcat.
    *  IT_FINAL-VKORG.                    SALES ORGANIZATION
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='5'.
      wa_fcat-fieldname ='VKORG'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = ' '.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='SALES ORG'.
      wa_fcat-outputlen   = 10.
      wa_fcat-ref_table ='VBAK'.
      APPEND wa_fcat TO it_fcat.
    *  IT_FINAL-SPART.                    DIVISION
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='6'.
      wa_fcat-fieldname ='SPART'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = ' '.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='DIVISION'.
      wa_fcat-outputlen   = 10.
      wa_fcat-ref_table ='VBAK'.
      APPEND wa_fcat TO it_fcat.
    *  IT_FINAL-MATNR.                    MATERIAL NUMBER
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='7'.
      wa_fcat-fieldname ='MATNR'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = ' '.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='MATERIAL NUMBER'.
      wa_fcat-outputlen   = 20.
      wa_fcat-ref_table ='VBAP'.
      APPEND wa_fcat TO it_fcat.
    *  IT_FINAL-NETPR.                    NET PRICE
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='8'.
      wa_fcat-fieldname ='NETPR'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = ' '.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='NET PRICE'.
      wa_fcat-outputlen   = 15.
      wa_fcat-ref_table ='VBAP'.
      APPEND wa_fcat TO it_fcat.
    *  IT_FINAL-NETWR.                    NAET VALUE
      CLEAR wa_fcat.
      wa_fcat-col_pos  ='9'.
      wa_fcat-fieldname ='NETWR'.
      wa_fcat-tabname  ='IT_FINAL'.
      wa_fcat-key      = ' '.
      wa_fcat-just     = 'L'.
      wa_fcat-hotspot  = ' '.
      wa_fcat-lzero    ='X'.
      wa_fcat-seltext ='NET VALUE'.
      wa_fcat-outputlen   = 15.
      wa_fcat-ref_table ='VBAP'.
      APPEND wa_fcat TO it_fcat.
    ENDFORM.                    " fieldcatalog_display
    Regards,
    Darpana.
    Edited by: Darpana Ahire on Dec 3, 2008 7:10 AM
    Edited by: Matt on Dec 4, 2008 12:04 PM - added  tags

    im99_chs wrote:
    I have created a package with some functions in it.Keep in mind that these functions requires PL/SQL code to be executed. Thus it needs a context switch from the SQL engine (executing your view code) to the PL/SQL engine (to do the function call).
    This may work fine for smaller data sets. But it does not scale well as context switches are expensive operations with inherent latency. The more switches there are, the bigger the execution time chunk required for context switching.
    The ideal is to rather use SQL to perform the work of the function. SQL code can implement if-then-else logic via the DECODE() SQL function and SQL CASE command. Analytical functions can be used for complex aggregation and calculation.
    If a user define (PL/SQL) function is needed, then ensure that the function is as fast as possible (minimal moving parts), and consider defining it as a deterministic function if the same input always produces the same output.

  • How can I convert string to the record store with multiple records in it?

    Hi Everyone,
    How can I convert the string to the record store, with multiple records? I mean I have a string like as below:
    "SecA: [Y,Y,Y,N][good,good,bad,bad] SecB: [Y,Y,N][good,good,cant say] SecC: [Y,N][true,false]"
    now I want to create a record store with three records in it for each i.e. SecA, SecB, SecC. So that I can retrieve them easily using enumerateRecord.
    Please guide me and give me some links or suggestions to achieve the above thing.
    Best Regards

    Hi,
    I'd not use multiple records for this case. Managing more records needs more and redundant effort.
    Just use single record. Create ByteArrayOutputStream->DataOutputStream and put multiple strings via writeUTF() (plus any other data like number of records at the beginning...), then save the byte array to the record...
    It's easier, it's faster (runtime), it's better manageable...
    Rada

  • Why doesn't Apple supply a simple audio recording app with the iPad? (Garage Band is not simple app)

    I am going to be teaching an integrated media production course in the spring semester (creating an online college newspaper) and I want the students to use mini iPads to create images, videos and sound clips.   Images and video, no problem.   Easy to move to our iMacs in the lab for editing and inclusion in a college newspaper web site.   On the other hand, audio is a mess.   Sure, I can have them shoot video, import the video into Final Cut on the iMacs and then use Final Cut like an audio editor, but that is pretty lame.   They could download Garage Band but that would require all the students to have iTunes accounts, which is a real pain.   And moving audio recording made with Garage Band to the iMac is a real drag and way too much work.   Why the **** can't Apple include a simple audio memo program in the basic iPad app setup?   This is really old school stuff that was on computers way back when.   Using Garage Band for that simple function is like swatting flies with a sledge hammer. 
    Mike Nielsen
    Media Arts
    Wesley College

    Make finding a simple audio recorder the students first assignment. Have them give presentation.  Have file a news story to the 'paper'.
    Google is your friend.
    ipad audio recording app  free
    http://howto.cnet.com/8301-11310_39-57349000-285/five-free-voice-recording-ipad- apps-compared/
    ipad audio recording app
    http://www.appolicious.com/curated-apps/7909-best-ipad-audio-recording-apps-jan- 2013

  • I can edit on Premiere Pro 6 files, but after a dozen keystrokes, the space bar and cursor keys stop working while the save function works

    I can edit on Premiere Pro 6 files, but after a dozen keystrokes, the space bar and cursor keys stop working while the save function, render workspace function, export file are still operational. How can I fix it so I may complete my assignment?
    Besides DaVinci Resolve, Adobe Creative Suite 6 is the only software on the machine. I am using Windows 7 Professional 64-bit Operating System on AMD FX 6100 six-Core Processor at 3.31gHz and 32 GB RAM memory. There are two SLI-bridged GTX680 NVidia cards.
    The software was very stable for the last six months, working with 720P proxy files from 2.5K masters (Blackmagic Design Camera). I am working on a feature-length project that exceeds 1000 edits. I have broken the file into 2 one hour segments.
    I have deactivated the software before reinstalling the entire OS from scratch. PP6 was very stable for 48 hours. Then the freezing space bar returns. After a dozen strokes into the project, same problem.  I have made cache files store next to originals, I have deleted preview files if they were corrupted and causing instability. Am I missing something?
    I have Microsoft Security Essentials for virus protection. I double checked the memory for damage/defect. Nothing says that the motherboard or other components are damaged.
    I am in film competition overseas and need to have deliverables in less than a month's time.  I lost the last two weeks troubleshooting and this crisis came at an inopportune moment of the project.
    Any assistance would be greatly appreciated.

    Still getting software freezes but found a way to mitigate for the mean time.
    Upon launching Adobe Premiere Pro, hit CTRL-ALT-DEL to launch TaskManager as well.
    You will want to highlight Adobe QT32 Server.exe
    Right click and select "End Process Tree"
    You will get considerable stability in the program, long enough to get timing of cuts done. Be sure to save often.
    If the program freezes, do not hit Save. You definitely want to avoid saving the corruption into your TimeLine
    CTRL-ALT-DEL to relaunch the TaskManager and highlight Adobe Premiere Pro.exe
    Right-click to "End Process"
    No need to reboot the whole system; just launch Premiere Pro again and continue with the session. Note that your work reverted to Last Save.
    Hope this helps until the bug is fixed.

  • Multiple image upload with save to database problem

    I am developing some backend work for a client, and we recently used the Multiple image upload with save to database wizard without a problem. A few days later, we noticed that we could only upload a single file at a time - it seems that the coding is no longer able to access the flash part of this and is using the javasript function instead. I know the web hosting company has made some changes on the server, and I did some reearch and it seems that  there could be an issue with Flash 10, but has anyone else experienced anything like this? Any help is greatly appreciated.
    Thanks.
    Jeremy

    Thank you for the responses. I have already updated awhile ago, so I am wondering what happened. Not sure if during the server update, some files were replaced (unless I totally forgot to update to 1.0.1 on this site). So I reinstalled 1.0.1, deleted the includes folder from the server and uploaded my includes folder and it now works again.
    Again, thanks for the help.
    Jeremy

Maybe you are looking for

  • Custom bios MSI GE70 0nd

    Hello. I use Win7. I have GE70-0ND and BIOS: e1756ims.10f I need the bios which has two functions: 1. Enable encrypt the HDD. Almost all laptops have this function but GE70-0ND has not. 2. Control fan speed for CPU and GPU. Svet: do you have such a b

  • I was informed i need to purchase standard 11 or standard 12 (?) in order to make word files converted from pdf editable. how do i do this?

    i was informed i need to purchase standard 11 or standard 12 from adobe in order to make files converted from pdf to word using the recently bought and installed adobe pdf exporter file. how/where do i do this?

  • Multiple pages in Tab to use as frames

    Hi. I created a page using tabs, with a different menu (navigation bar) into each tab. I want these navigations bar show different pages in the rigth frame, within the same tab. While frames are not supported I'll use links to another page (probably

  • Send Plan to Vendor Automatically

    Dear Sir Ours is a production unit (assembly line) we use lot of components. So I want to know is it possible to send plan directly to Vendor by E-mail from SAP. Thanks & Regards Vishal

  • Mysterious crash when website initialises

    We are running CF8 Enterprise over the top of cf7. Windows and SQL server. When we deploy a new site it will crash with a 500 error usually complaining about he first database query in the page. After this point the website runs fine. If the website