CL_GUI_FRONTEND_SERVICES in select loop

Hi all,
I have a problem using CL_GUI_FRONTEND_SERVICES=>FILE_EXIST within a select loop. I want to loop through a databasetable with filenames and if the file exists, do some stuff with it. The method works good, but when the loop is executed and the next SELECT is executed I get a short dump:
DBIF_RSQL_INVALID_CURSOR
CX_SY_OPEN_SQL_DB
Invalid interruption of a database selection.
This is my code:
SELECT file FROM files  INTO l_file.
               WHERE EXTID = p_extid AND UNAME = sy-uname.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_EXIST
                EXPORTING
                  FILE                 = l_strfloc
                  RECEIVING
                  RESULT               = l_result.
ENDSELECT.

Better select data into table.
then use
LOOP AT ITAB.
   CALL GUI_FRONT END SERVICES.
ENDLOOP.
OTHER WISE......you cannot interfere the Prsentation (Desktop) Servier Logic with the DATA BASE LOGIC ....SELECT ENDSELECT.
Vijay

Similar Messages

  • For r in (select) loop: execution plan question

    Hi there,
    I have a procedure which does the following (on Oracle 11.1.0.7):
    begin
      for r in (select col1,max(col2) as col2 from tab@remote_db group by col1 ) loop
        update tab2
           set col_a = r.co1
           where col_b = r.col2;
        commit;
      end loop;
    end;The subselect from the remote table delivers about 4000 rows.
    When executing fast, the procedure runs about 20 seconds, the trace shows that the select is executed 1 time, fetches 49 times. The update executes 4000 times.
    When executing slow, the procedure runs about 20 minutes (!), the trace shows that the select is executed 1 times, fetches 4000 times. The update executes 4000 times.
    This happens without changing the code, from the same client (sqlplus on the server, same version as database).
    Can anyone probably give me a clue how I could track down the plsql execution steps like the optimizer trace that let you see why a certain sqlplan was not taken or what might cause that change in behavior?
    I cannot produce that behavior at will - most times the procedure runs fast.
    thanks,
    Heimo

    Hi again,
    regarding the "faulty test" and what is fastest: user tested both versions and came up with the for-loop to satisfy him best. I would, of course, utilize event 10046 and tkprof and a repeatable dataset to have solid data. Sorry for not setting enough emphasis on my real question, which is described in the following.
    But, and that is what is really causing awkward feelings for me: when doing plain sql, I can use events 10046, 10053 and learn from the tracefiles why a decision was taken (now that is making me feel good, actually). But when it comes to plsql, I have not yet such a handy toolset that helps me understand what influences the plsql-engine to go this or that way.
    Thus, I valued the posts pointing to dbms_trace and plsql_optimization_level as helpful answers.
    Because of that I learned about the views %_PLSQL_OBJECT_SETTINGS and remembered to check for other plsql-initora settings.
    I also verified that neither the 10046 nor the 10053 trace files contain any reference to plsql-parameters/settings, and that the 10053 trace only shows the subselect and update, but no info if it would "bulkify" or not.
    Meanwhile I did start to utilize dbms_trace (which causes the statement to go the unbulkifyed by the way) and maybe I can learn from that output or from following posts?
    best regards
    Heimo

  • Select loop

    Hi Folks,
    I try to download all the Reports to a file with the following code.
    But it selects only 1 record and then it stops with a runtime error.
    REPORT  Z_DOWNLOAD_REPORTS                                          .
    tables trdir.
    DATA : BEGIN OF ITAB OCCURS 0,
    F(72) TYPE C,
    END OF ITAB.
    select *
    from trdir
    where name like 'BA%'.
      READ REPORT trdir-name INTO ITAB.
      CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
      FILENAME = 'C:\PRG.TXT'
      TABLES
      DATA_TAB = ITAB.
    endselect.
    Thank you very much for the help.
    Joerg

    Hi,
    your code has 2 errors. First of all the GUI_DOWNLOAD probably performs a commit work or something which in turn crash your program. Second since you are giving the same file name your file will be overwriten.
    Do something like this.
    data : begin of lt_name occurs 0,
              name like trdir-name,
              end of lt_name.
    data: filename type string.
    select name
    from trdir into table lt_name
    where name like 'BA%'.
    loop at lt_name.
    READ REPORT lt_name-name INTO ITAB.
    filename = lt_name-name.
    condense filename no-gaps.
    concatenate ''C:\' filename '.txt' into filename.
    condense filename no-gaps.
    CALL FUNCTION 'GUI_DOWNLOAD'
    EXPORTING
    FILENAME = filename
    TABLES
    DATA_TAB = ITAB.
    endloop.
    Regards
    Kostas
    Message was edited by:
            Kostas Tsioubris

  • Folder Selection loops end

    Hi All,
    I have this script to relink images to new name and path.
    When I run this script select folder dialogue display again and again (match with doc links length). I mean if document has 15 links select folder dialogue display 15 times.
    Can anybody please help me to resolve it. See below my Code:
    var updatedLinks = myInddLinks[i].name.replace ("oldtext", "newtext");
    var myFolder = Folder.selectDialog("Select the links folder", "");
    var getLinks = Folder(myFolder).getFiles (updatedLinks);
    if (getLinks.length == 1)
    myInddLinks[i].relink(getLinks[0]);
    Thanks,
    Mon

    Sorry guys to bother you.
    I have resolved this problem myself.
    Thanks anyway.
    Mon

  • Auto selection of file from folder during uploading??

    Hi all friends,
    Iam facing with one problem I am developing one uploading software for that i have used swing and servlet.Now my problem is i want to give auto selection of file from one folder means user just copy the files from any computer on network and paste it in predefind folder.And when they click on upload button it should start uploading of file one by one and after completion of uploading it move that file into another folder one by one.Now my software doing it perfectly but if user copy and paste any file in that predifined folder from network computer during uploading then they have to click upload button again after completion of first queue of files(for example if user first copy 10 files and start uploading and inbetween uploading of that 10 files if user copy another 10 files from network computer then they have to click on upload button again after completion of uploading of first 10 files).But my user requirement is they want to click on upload button once only at the time of starting my application and my application automatically select the file one by one from folder and send it to destination.Means if they copy the file from network machine inbetween uploading or any other user from network send file in that folder then my application should select those file automatically and start uploading means they don't want to click on upload button again.Can any one plz guide how I can slove this problem.Below r my codes:-
    Upload.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
    try {
    suspendflag=true;
    Resume.setEnabled(false);
    Suspend.setEnabled(false);
    dest=frame.m_txtURL.getText();
    File ff=new File("d:\\DTMS\\Upload");
    File[] files = ff.listFiles();
    fileList = new Vector();
    if(files == null)
    textArea.append("There is no file");
    return;
    else
    for (int j = 0 ; j< files.length ; j++)
    fileList.add(files[j]);
    java.util.Collections.sort(fileList, new FileComp());//sorting by size
    new Thread(new Runnable() {
    public void run(){
    for (int k = 0; k < fileList.size(); k++)//loop for queue {
    File fname = (File)fileList.get(k);
    String str=fname.getName();
    log("Destination:" +" "+ dest);
    log("Uploading Progress\nPlease Wait....");
    result=doPost(fname,dest);//method for read file & send to servlet
    String str2="Transfer apparently failed.";
    String str3=result;
    if(str2.equals(str3)){
    Error(result);
    else if(suspendflag==true){
    File newfile =new File("d:\\DTMS\\Archives\\"+str);
    fname.renameTo(newfile);
    log("File" +" "+ str+" "+"Upload Completed !");
    else if(suspendflag==false){
    Error("** Transfer Suspended**");
    }).start();
    }catch(Exception exp)
    Error("Error : " + exp.toString());
    Regards
    Bikash

    Hi Chandan,
                        All the multiselection files are stored in it_tab( i:e file_table in method). you need to loop the every record to upload the data for selected files. please check the code Below...
    DATA: file_str1 type string.
    data: it_tab TYPE STANDARD TABLE OF file_table,
           wa_tab TYPE file_table,
           lw_file LIKE LINE OF it_tab,
           gd_subrc TYPE i.
    SELECTION-SCREEN begin of block blk with frame title text-100.
    SELECTION-SCREEN SKIP 2.
    parameters : p_file like rlgrap-filename .
    SELECTION-SCREEN end of block blk.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
    CALL METHOD cl_gui_frontend_services=>file_open_dialog
    EXPORTING
    window_title = 'Select only Text File'
    default_filename = '.azt'
    multiselection = 'X'
    CHANGING
    file_table = it_tab
    rc = gd_subrc.
    *READ TABLE it_tab INTO lw_file INDEX 1.
    *p_file = lw_file-FILENAME.
    Start-of-Selection.
    loop at it_tab INTO wa_tab.
       file_str1 = wa_tab-FILENAME.
    CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
         filename                      = file_str1
    *    filename                      = '\\10.10.1.92\Volume_1\_projekte\Zeiterfassung-SAP\test.azt'
       tables
         data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDLOOP.

  • Loops in Library Lag Behind Playback

    Hi, I'm a Logic Express newbie.
    Things seem to be working pretty well, but whenever I play a composition and try to select Loops in the Library for previewing in realtime, the loops each take about 5 seconds to start playing. When I have nothing playing, the loops play instantly.
    Is this normal behavior? In Soundtrack and GarageBand I can instantly preview loops while playing my composition. Is there some sync setting I need to adjust?
    Thanks in advance!

    Yes, I guess it does snap to the next bar. But it doesn't make much sense (and is pretty disappointing) considering it breaks the ability to preview dozens or hundreds of loops in realtime, an ability that lesser apps (based on the same Logic engine) like GarageBand and Soundtrack have had since their inception.
    I'm going to log a feature request with Apple and hold off on purchasing upgrades to Logic Express (including Logic Studio which I was considering) until this is addressed, because I edit compositions that contain many loops and this issue is not present in less expensive apps like GB.
    Thanks for the reply.

  • Problem previewing loops in the loop browser in Logic 8

    Loops are only audible when the sequencer is not playing.
    When the sequencer is playing, the selected loop shows it's playing in the loop browser window, but I cannot hear it.
    ANY ANSWERS?
    NOTE:
    All my outputs in logic (including the loop browse strip) are routed to SPDIF OUT as I have a DynAudio digital speaker system.
    Thanks in advance,
    Hennie

    I have found if you wait long enough, you will hear the file begin to play. Sometimes the delay can several seconds. Not acceptable IMO.

  • ERROR while debugging a SELECT..ENDSELECT

    Hello All,
    We get an error while we go into the select..endselect loop during debugging. Because of this if we try to do some research on existing program with Select-endselect..it fails in the second pass of this loop.
    This problem was not there earlier, but after we upgraded from 4.6 to 4.7 this problem is bugging us..every day. Does any one have a clue why ?
    Thanks!!
    Regards,
    Vishal

    Hi,
      debugging a SELECT...ENDSELECT statements brings to a LUW commit work if no other work processes are available for debug.
    See OSS notes 675, 2104.
    From OSS note 675 **********************************
    Cause and prerequisites
    Chain of causes:
          1. There is a statement in one of the Select loops, that leads to a database Commit (or Rollback).
          2. A database Commit causes the database to lose the cursor.
          3. The system cannot automatically continue within Select loop after loss of cursor.
    Following statements lead to a database Commit:
        * All statements that cause a change of screen (CALL SCREEN, CALL DIALOG, CALL TRANSACTION, SUBMIT, I/W-Message)
        * BREAK-POINT/ Debugging
          . if no debug process free
          . always after regeneration (in order to release generation lock).
        * WAIT Here a work process is released and a Commit is executed.
        * COMMIT WORK/ROLLBACK WORK
    From OSS note 2104 **********************************
    Solution
    The "COMMITWORK" message appears in the ABAP debugger when programs
    orscreensrequireregeneration,or when not enough free capacity
    is available inthesystem (or else the debugger blocks a system
    process).
    Normallyonly one work process is released for debugging. This
    isgenerally insufficient ina developmentsystem, as processes
    can be blocked for other reasonstoo(background processing,
    CPI-C connections,andso on).
    The number of work processes made available for debugging can
    be configured using the profileparameter
                      rdisp/wpdbug_max_no
    Forexample:
                    rdisp/wpdbug_max_no = 10
    setsthe maximum number of work processes made available for
    debuggingto 10. It may be necessary to generally increase the
    numberofwork processesatthis time (parameter rdisp/wp_no_dia).
    In all other known cases, an error in the application program is
    involved.
    Regards, Manuel

  • Loop at screen - not all fields are available

    Hi all,
    I want to set some fields on the screen invisible.
    When I do the loop at screen in PBO not all fields from the screen are available.
    Just four fields are available. In the screen there are about 20 fields.
    I try to use the chain. field xyz. endchain... But it was not the problem.
    Any ideas?
    regards

    Try this ,May be  Help ful
    { SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(10)  FOR FIELD r_cars.
    PARAMETERS : r_cars RADIOBUTTON GROUP rgb USER-COMMAND usd .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_toyota .
    PARAMETERS : r_toyota RADIOBUTTON GROUP rgb1 DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_ford .
    PARAMETERS : r_ford RADIOBUTTON GROUP rgb1 .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 2(10)  FOR FIELD r_bus .
    PARAMETERS : r_bus RADIOBUTTON GROUP rgb DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_volvo .
    PARAMETERS : r_volvo RADIOBUTTON GROUP rgb2 .
    SELECTION-SCREEN END OF LINE.
    SELECTION-SCREEN BEGIN OF LINE.
    SELECTION-SCREEN COMMENT 20(10)  FOR FIELD r_merced .
    PARAMETERS : r_merced RADIOBUTTON GROUP rgb2  DEFAULT 'X'.
    SELECTION-SCREEN END OF LINE.
    AT SELECTION-SCREEN OUTPUT.  " AT SELECTION-SCREEN OUTPUT
      IF r_cars = 'X'.                                 " If R_CURS radiobutton is selected
        LOOP AT SCREEN .                       " Looping at screen
          IF screen-name CS 'R_VOLVO' OR
             screen-name CS 'R_MERCED'.
            screen-active = 0.                     " Hiding the R_VOLVO and R_MERCED
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSE.
        LOOP AT SCREEN .
          IF screen-name CS 'R_TOYOTA' OR
             screen-name CS 'R_FORD'.
            screen-active = 0.
          ENDIF.
          MODIFY SCREEN.
        ENDLOOP.
      ENDIF. }

  • Apple Loops Utility does not work at all for imported file

    I have imported an MP3 into Logic Pro 8, which converts it to an AIFF file, and am trying to configure the project to sync to that tracks tempo. From what I understand, I do this by opening it in the ALU and having it add tempo information to the file.
    My problem is that when I open the file in the ALU, and I have version 2.0.1, literally almost NOTHING works. I can hit the play/stop/jump to start buttons and they work. However, the volume control does nothing. Likewise, the Tempo slider as well as the transpose dropdown don't do anything.
    On the Transients tab, the Transient Division dropdown and Sensitivity slider are grayed out. Since I've never used this tool before, I would assume that this is how I get the utility to detect the beats in the song. The waveform view just shows the song waveform, with no markers as it does if I open an Apple Loop.
    If I switch to the Tags tab, ever single checkbox is grayed out. Finally, if I go to the file menu, all Save options are grayed out.
    My first thought, is of course, that I'm just an idiot and that I don't know what I'm doing. However, in searching the forum, I found this post from a year ago where someone is complaining about what seems to be the exact same problem, and they did not receive a single response.
    http://discussions.apple.com/thread.jspa?messageID=8516386&#8516386
    Any ideas on either how to get ALU to work or to get my project to sync to the MP3 without requiring the ALU?
    Thanks!
    Mark

    In case you are importing a whole track you won't get the results you are expecting with ALU....
    Under *File Type* in the Tags tab select Looping so that the Transients Division and the rest of the settings be active.
    Hope this helps
    A

  • Apple Loops Questions

    1) Where does Logic store user-created loops that I've added to the library?
    2) What is the easiest/best way to convert a regular .aiff or .wav file into an apple loop?
    3) I'm getting a lot of artifacts when I use loops I created--even when the loop is being played back at the same tempo as the original! Is this normal? You'd think that if the original cut was 120 BPM, and I turn it into an Apple loop, and stick it into another project at 120 BPM, there should be no artifacts, right?
    4) Sometimes when I click "add to loop library" Logic won't let me select "looping" as an option. This is after I've already analyzed the cut in Apple Loops Utility. What's up with that?
    Any help, insight or guidance would be appreciated.
    Thank you!

    zgogor wrote:
    1/ apple loops folder / check them ....
    I see folders for all Apple's loops and jam packs, but nothing for my loops.
    Edit: Found them They are at:
    ~/Library/Audio/Apple Loops/User Loops
    Before I was checking the root /Library, which is why I couldn't find them.
    2/ apple loop utility application / check it ...
    I have been using it, but considering the strange behavior I'm getting (see question #3 and #4) I think I might be missing a step or doing it wrong. Right now I open an audio selection in Apple Loops Utility, fill in the tags, mess around with the transient sensitivity, then "save." So why can't I add it as a loop after that?
    3/ no of course.
    Any idea what I might be doing wrong?
    4/ add to appleloop library doesn't mean it is converted, check appleloop utilty first then add them to the Lib
    I did use the loop utility first. I mentioned that in my original post.
    Message was edited by: Zachary Conlyn
    Message was edited by: Zachary Conlyn

  • No loops in '08

    This may be a dumb question but here goes anyway. I open Garageband on my new MacBook and there are no loops in it. I click on a loop and a dialog box pops saying the selected loop is not currently installed on my computer and would i like to install the complete set of loops. It then gives three options: download now, download later or install from dvd. I choose download now and software update opens up as though the download will come from there. When software update opens up i currently only have the option of updating either numbers, keynote or remote desktop client. Nothing about garageband. Kind of hard to play around in garageband without loops.
    Bought a new Macbook about a month ago and so far i've had problems with iMovie, and i'm still having issues with Garageband and iTunes. What gives?

    You should have a DVD - Macs come with software disks for everything that's pre-installed. It's probably called something like "System Restore 2" or so.
    (And no reason to rant at people that are trying to help. This is by far the most frequently asked question here, and you can get an answer by even superficially scanning the forum. HT very patiently posts his link several times a day when the next user opens a new thread with the same old question.)

  • Find Remix Jam Pack loops not labeled by Genre in loop browser?

    I've got all four Apple Jam Packs installed.
    The World and Symphony jam packs are great, as I can locate the loops in the loop browser by Genre.
    But the Rhythym and Remix jam packs don't seem to be labeled by Genre.
    How can I identify them? There are way too many to just look and see what seems to be new or find them by trial and error.
    Even the EXS24 instruments had to be moved to separate folders by hand to separate them from the other Garage Band instruments (but I could separate them from the others by date, so I figured out a way).
    Frustrating to have installed a new product, and be unable to find it!

    Hi Les,
    I haven't used the loop browser much in Logic, but I know that it is very similar to the one in Garageband. If it's pretty much the same browser, then there will be a way to filter your search by "packages." For example, you can select the Remix jam pack and select loops just from it's collection.
    I'm not on my Logic computer, so I'll test this later...
    X

  • Database selection with invalid cursor !

    hi experts,
        When  execute SAP BW processchar, it occur some system error: (sm21)
    Database selection with invalid cursor
    The database interface was called by a cursor (in a FETCH or CLOSE
    cursor operation) that is not flagged as opened. This can occur if a
    COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
    opened cursors), followed by another attempt to access the cursor (for
    example, the next time the loop is executed).
    this error occur when apply bw support package 19.
    sap notes 1118584 Solution is: Import Support Package 17 . but my support package is 19.
    how can i solve this error?
    thanks,
    xwu.

    I am only assuming things, but it might be worth to look closely if you were experiencing an ORA- error during the execution. This could have caused a rollback and thus closed the cursor. Please check the job log, the workprocess trace (dev_wX file) and the system log SM21 and ST22 as well.
    Besides that check the oracle alertlog and the usertrace destination.
    Best regards, Michael

  • Database selection with invalid cursor with MaxDB database

    Hi Experts,
    I encountered the this error:
    "Database selection with invalid cursor
    The database interface was called by a cursor (in a FETCH or CLOSE
    cursor operation) that is not flagged as opened. This can occur if a
    COMMIT or ROLLBACK was executed within a SELECT loop (which closes all
    opened cursors), followed by another attempt to access the cursor (for
    example, the next time the loop is executed)."
    We are using bw support package 19 early this month. Previously is working fine but this problem occured from the last 2 days.
    We are using MaxDB database.
    Really appreciate any speedy responds.

    Hi,
    We finally resolved the issue.
    The solution:
    We check the RFC connection test in SM59. There are connection error.
    There is an error that related J2EE_ADMIN user.
    SO we reset the J2EE_ADMIN id in SU01.
    The problem goes away.
    Many thanks

Maybe you are looking for