Dynamic Read

Hi,
I have a dynamic internal table <dyn_tab>.I want to read this table with a key field.
Ex: READ TABLE <dyn_tab> ASSIGNING <dyn_wa> WITH KEY "THE KEY FLD" = <lfs_fld>.
Please suggest how to achieve above( "THE KEY FLD" ).

Hi,
Use tokens. If you know the name of the key field follow this code:
" Lets say the key field is VBELN.
constants c_vbeln(5) type c value 'VBELN'.
READ TABLE <dyn_tab> ASSIGNING <dyn_wa> WITH KEY (c_vbeln)  =  <lfs_fld>.
Br,
Advait

Similar Messages

  • Binary Search in Dynamic Read

    Here is the code
          read table <fs_it_crv> assigning <fs_wa_crv> with key
                                      ('objty') = wa_plfh-objty
                                      ('objid') = wa_plfh-objid
                                      binary search.
    If i use binary search system giving error while activating as
    You cannot use explicit or implicit index operations on tables with
    types "HASHED TABLE" or "ANY TABLE". "" has the type "ANY
    TABLE". It is possible that .
    How could i use Binary search in dynamic read

    Hello,
    how do you create your internal table "<FS_IT_CRV>" ?
    i found this thread [here|Need help regarding Dynamic Read Table statement;.
    You can try the code lines of  David Klotz.
    If you insert a sort statement before read and change read adding binary search it might work.
    SORT <gt_itab> BY (ge_key_field1) (ge_key_field2) (ge_key_field3) .
    * Finally, perform the search
      READ TABLE <gt_itab> ASSIGNING <gs_result>
              WITH KEY (ge_key_field1) = pa_cond1
                       (ge_key_field2) = pa_cond2
                       (ge_key_field3) = pa_cond3 BINARY SEARCH.
    I tried the following code in my own program and it works:
    SORT <wlf_t_data> BY (c_trkorr).
      read table <wlf_t_data> assigning <wlf_header> with key
             (c_trkorr) = 'DRR' binary search.
    Where   <wlf_t_data> is a dynamic table created by method create_dynamic_table of class cl_alv_table_create.
    Cordialement,
    Chaouki

  • Dynamically read data from a txt document

    I try to dynamically read data from a txt document
    in swf
    stop ();
    var pafh=this;
    import flash.events.*;
    var Araray_id:Array =new Array();
    var v_length:Number;
    var myTextLoader:URLLoader = new URLLoader();
    myTextLoader.dataFormat=URLLoaderDataFormat.VARIABLES;
    myTextLoader.addEventListener(Event.COMPLETE, onLoaded);
    function onLoaded(e:Event):void {
            Araray_id = e.target.data.araray_id.split(",");
            trace("Araray_id: "+Araray_id);
            v_length=Araray_id.length;
            trace("v_length: "+v_length);
            for (var i:Number=0;i<v_length;i++){
                pafh["Id_"+i]=new Array();
                trace("pafh[Id_+i]: "+pafh["Id_"+i]);
                var v_help:Object="id_"+i;
                trace("v_help: "+v_help);
                //pafh["Id_"+i]= e.target.data.v_help.split(",");????? Here stops the script
                //pafh["Id_"+i]= e.target.data.(v_help).split(",");????Here stops the script
                //pafh["Id_"+i]= e.target.data.[v_help].split(","); ????Here stops the script
            play();
    myTextLoader.load(new URLRequest("myText1.txt"));
    in text
    araray_id=aa,bb,cc,dd,ee,ff
    &id_0=aa1,aa2,aa3,aa4
    &id_1=bb1,bb2,bb3,bb4,bb5
    &id_2=cc1,cc2,cc3
    &id_3=dd1,dd2,dd3,dd4,dd5,dd6
    &id_4=ee1,ee2
    &id_5=ff1,ff2
    output
    Araray_id: aa,bb,cc,dd,ee,ff
    v_length: 6
    pafh[Id_+i]:
    v_help: id_0
    TypeError: Error #1010: A term is undefined and has no properties.
        at skuskaceatarraybiforas3fromtext_fla::MainTimeline/onLoaded()
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at flash.net::URLLoader/onComplete()
    Can you help me with this problem

    More suggestions.
    1. If you align naming conventions between data and your application - reading data could be practically a one-liner.
    If you write pafh["id_" + i] (with small case i) instead of pafh["Id_" + i] (with capital case I) the function can be just:
    function onLoaded(e:Event):void
              for (var prop:String in e.target.data)
                        pafh[prop] = e.target.data[prop].split(",");
              play();
    2. If changing conventions is not feasible, here is another thing you can do:
    function onLoaded(e:Event):void
              for (var prop:String in e.target.data)
                        pafh[prop.replace(/^\w/, String(prop.match(/^\w/)).toUpperCase())] = e.target.data[prop].split(",");
              play();

  • Need help regarding Dynamic Read Table statement

    Hello
    I know that the syntax for dymanic read table statement is
    READ TABLE  <ITAB> WITH KEY (KEY1) = VALUE1  (KEY2) = VALUE2 .....(KEYN) = VALUEN
    Here is my problem..
    I am dynamically creating an internal table based on parameter table entered by user.
    The key for this table can be determined only at runtime.
    The table entered might have by one field as key field or 10 key fields..
    How can I use the dynamic read in this situation ?
    Thanks for your help in advance,
    Santosh
    Edited by: Santosh Kulkarni on Jan 3, 2010 6:58 AM
    Edited by: Santosh Kulkarni on Jan 3, 2010 7:01 AM

    Hello Santosh,
    please check out the following solution. The program demonstrates how to use the dynamic read statement with three key field conditions. Additional key fields can be added in the same way.
    REPORT z_dynamic_read.
    DATA: gt_itab TYPE REF TO data,
          ge_key_field1 TYPE char30,
          ge_key_field2 TYPE char30,
          ge_key_field3 TYPE char30,
          go_descr_ref TYPE REF TO cl_abap_tabledescr.
    FIELD-SYMBOLS: <gt_itab> TYPE STANDARD TABLE,
                   <gs_key_comp> TYPE abap_keydescr,
                   <gs_result> TYPE ANY.
    PARAMETERS: pa_table TYPE tabname16 DEFAULT 'SPFLI',
                pa_cond1 TYPE string DEFAULT sy-mandt,
                pa_cond2 TYPE string DEFAULT 'LH',
                pa_cond3 TYPE string DEFAULT '0123'.
    START-OF-SELECTION.
    * Create and populate internal table
      CREATE DATA gt_itab TYPE STANDARD TABLE OF (pa_table).
      ASSIGN gt_itab->* TO <gt_itab>.
      SELECT * FROM (pa_table) INTO TABLE <gt_itab>.
    * Get the key components into the fields ge_key_field1, ...
      go_descr_ref ?= cl_abap_typedescr=>describe_by_data_ref( gt_itab ).
      LOOP AT go_descr_ref->key ASSIGNING <gs_key_comp>.
        CASE sy-tabix.
          WHEN 1.
            ge_key_field1 = <gs_key_comp>-name.
          WHEN 2.
            ge_key_field2 = <gs_key_comp>-name.
          WHEN 3.
            ge_key_field3 = <gs_key_comp>-name.
        ENDCASE.
      ENDLOOP.
    * Finally, perform the search
      READ TABLE <gt_itab> ASSIGNING <gs_result>
              WITH KEY (ge_key_field1) = pa_cond1
                       (ge_key_field2) = pa_cond2
                       (ge_key_field3) = pa_cond3.
      IF sy-subrc = 0.
        WRITE / 'Record found.'.
      ELSE.
        WRITE / 'No record found.'.
      ENDIF.
    One note: When an internal table is created dynamically like in my program above, the table key is not the key defined in the DDIC structure -- instead, the default key for the standard table is used (i.e. all non-numeric fields).
    Hope this helps,
    David

  • Dynamically read height and width dimensions of .mov

    Hi there!
    I am wondering if anyone knows of a way to dynamically get the height and width dimensions of a quicktime movie, before streaming it?
    The circumstances are this. I have clients who upload quicktime movies to my server. Right now, I use code to embed movies in a fixed size page, but the movies can vary quite dramatically in terms of their dimensions. For example, if the movie is 400px wide, it looks fine in my page. However, if it is 800px wide, it extends out beyond the borders of my page and looks terrible. I could just make a huuge page, but then the tiny movies look ridiculous
    If I could somehow gets the dimensions of a movie before it starts streaming, i could create a large target page for larger movies, and a small target page for small movies. Basically it comes down to being able to somehow dynamically read the dimenions of the movie.
    Is this even possible? Like my boss keeps telling me, it's all just Math isn't it?
    Thanks!!!

    Hmmm...
    I think the movie dimensions are exposed to JavaScript, but only after the movie has opened. So you would have to load the movie into the plugin, then get the dimensions, then use JavaScript to rewrite the page. Which I don't think is quite what you had in mind; you're wanting to collect this information and deal with it before you write the page.
    Let me see if I have this straight...You are allowing clients to upload movies to your server, and then you're hoping to generate an embedded movie page on the fly in PHP to display the movie just uploaded, correct?
    For a library of movies, you could generate a small database of all the movie dimensions, then just look that data up in the table when you generate the page. The trouble is, I don't know of any way to get the movie dimensions except to get them from QuickTime, and to do that you have to load the movie into either the player or the plugin. You could, for instance, have an AppleScript that looks at each movie and populates the database, but I don't see how you could trigger that to run on upload, and I don't know what kind of server you're using.
    Now here's an idea...If you have some way of arbitrarily reading and parsing the QuickTime file, you can get the dimensions out of the file, but it isn't easy. If you are lucky, the moov atom will include a prfl atom (movie profile) which includes the video dimensions. But the prfl atom is not mandatory, which means you have to look at each trak atom that contains video and examine the size *and position* and accommodate the fact that you may have multiple, overlapping video tracks. But you could get the data by parsing the QT atoms yourself. All the data you need to do that is here:
    http://developer.apple.com/documentation/QuickTime/QTFF/QTFFPreface/chapter1_section1.html
    ...and may God have mercy on your soul!
    Seriously, though, you CAN parse a QT file, and that might be the best (though obviously not the easiest!) way to get the data you want dynamically. QuickTime does help you out by giving you all the offsets for all the atoms, but it can be tricky!
    --Dave Althoff, Jr.

  • Dynamic read statement

    Hi Everyone,
    Here is my problem..
    I am dynamically creating an internal table based on select-option table entered by user.
    The key for this table can be determined only at runtime.
    The table entered might have by one field as key field or 10 key fields..
    How can I use the dynamic read in this situation

    Hi,
    This is the form of read statement upto 10 keyfields,
    You can read some std tables/FM to get the key fields of a table.
    Later you can assign the key fields field symbols  as shown:-
    * Loop to assign fieldnames & values to READ TABLE keyfields
             LOOP AT li_keyfields INTO work_area WHERE keyfield EQ 'X' .
               l_index = l_index + 1.
               CASE l_index.
                 WHEN 1.
                   ASSIGN COMPONENT work_area-fieldname OF STRUCTURE work_area TO <fs_c1>.
                   MOVE work_area-fieldname  TO l_key1.
                 WHEN 2.
                   ASSIGN COMPONENT work_area-fieldname OF STRUCTURE work_area TO <fs_c2>.
                   MOVE work_area-fieldname  TO l_key2.
                 WHEN 3.
                   ASSIGN COMPONENT work_area-field OF STRUCTURE work_area TO <fs_c3>.
                   MOVE work_area-fieldname  TO l_key3.
                 WHEN 10.
                   ASSIGN COMPONENT work_area-fieldname OF STRUCTURE work_area TO <fs_c10>.
                   MOVE work_area-fieldname TO l_key10.
               ENDCASE.
             ENDLOOP.
    READ TABLE <fs_itab> ASSIGNING <fs_wa>
                 WITH KEY (l_key1) = <fs_c1>
                          (l_key2) = <fs_c2>
                          (l_key10) = <fs_c10>.

  • Dynamic reading headers external table

    Hi,
    I have a lot (over 200) of different databases (acces, filemaker, excel, etc) which should be converted to Oracle. An application import (not Oracle) module exists but that application is very slow in importing. I wants to try to speed up this process by loading or quering these files as an external table.
    Evey imported database has a different layout, columns etc. Also the number of columns are very high, about 80. Is there any way to dynamically read the file to be imported to extract the column names and map them as input for the create table for the external file? After that it's more easy to query that external file. In the current situation I have to create the table manually and that takes a lot of time.
    Or does anyone have a suggestion for another import proces with sqlloader, datapump, or....?
    Thanks,
    Paul

    Paul van Rixel wrote:
    Hi,
    I have a lot (over 200) of different databases (acces, filemaker, excel, etc) which should be converted to Oracle. An application import (not Oracle) module exists but that application is very slow in importing. I wants to try to speed up this process by loading or quering these files as an external table.
    Evey imported database has a different layout, columns etc. Also the number of columns are very high, about 80. Is there any way to dynamically read the file to be imported to extract the column names and map them as input for the create table for the external file? After that it's more easy to query that external file. In the current situation I have to create the table manually and that takes a lot of time.
    Or does anyone have a suggestion for another import proces with sqlloader, datapump, or....?
    Thanks,
    PaulThere is no way to dynamically read the file to be imported to extract the column names for an external table - the names must be hard-coded.
    This may be doable in a different way, however, depending on how much work you want to do and pain you're willing to endure to accomplish it.
    The easiest way is probably have a different external table for each layout with the proper definitions.
    Doing this dynamically might be possible but will probably be harder. Dynamic solutions can range from PL/SQL/Java/whatever procedures to read, parse, collect, and insert the data dynamically using data embedded in the files themselves. This will be very hard. Possiblities include using UTL_FILE and possibly pipelined functions which can use UTL_FILE internally defining table output externally.
    Some tools offer GUI interfaces to manual file loading. Apex, for instance, can read and load a file derving column names from the first record. Perhaps this is something like what you want to do
    Good luck!

  • Dynamically Reading Files From Application Server

    Hi Experts,
    Presently I have to write a program which reads files from the application server dynamically. This program will be scheduled in the background with the frequency of half an hour.
    I am Using the function module
    CALL FUNCTION 'SUBST_GET_FILE_LIST'
    EXPORTING
    DIRNAME = '/usr/sap/xxx/xxx/'
    FILENM = 'DATASET'
    PATTERN = '.txt'
    TABLES
    FILE_LIST = IT_FILELIST
    I am facing problem in specifying the parameter FILENM in the function module,
    As I have to read many files from the apps server. How to assign the parameter of function module so it can take the many files generated in the apps server.
    Thanks in Advance,
    Regards,
    Irfan Hussain

    Hi,
    Instead of the above FM, you can use the following code :
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR po_ifile.
    PERFORM get_current_directory  USING 'PO_IFILE'   po_ifile
                                              rov-home_dir rov-curr_dir.
        PERFORM get_filename-of-server TABLES itab_filename
                                           USING  rov-curr_dir rov-gen_name.
        PERFORM help_values_get_with_table_ext TABLES itab_filename
                                           USING  rov-curr_dir
                                                       po_ifile.
    *&      Form  get_current_directory
          text
         -->P_0023   text
         -->P_PO_IFILE  text
         -->P_ROV_HOME_DIR  text
         -->P_ROV_CURR_DI  text
         -->P_CALL  text
         -->P_FUNCTION  text
         -->P_0029   text
         -->P_IMPORTING  text
         -->P_FILE_NAME  text
         -->P_=  text
         -->P_PO_IFILE  text
      FORM get_current_directory  USING _fieldname
                                        _filename
                                        homedir
                                        currdir.
        IF _fieldname <> space.
          PERFORM dunp_value_read USING _fieldname _filename.
        ENDIF.
        IF _filename = space.
          currdir = homedir.
        ELSE.
          rov-work_dir = _filename.
          rov-fdpos = STRLEN( rov-work_dir ).
          DO.
            IF rov-fdpos = 0.
              EXIT.
            ENDIF.
            rov-fdpos = rov-fdpos - 1.
            ASSIGN rov-work_dir+rov-fdpos(1) TO <rov_p>.
            IF <rov_p> = rov-delchar.
              <rov_p> = space.
              EXIT.
            ELSE.
              <rov_p> = space.
            ENDIF.
          ENDDO.
          currdir = rov-work_dir.
        ENDIF.
      ENDFORM.                    " get_current_directory
    *&      Form  get_filename-of-server
          text
         -->P_ITAB_FILENAME  text
         -->P_ROV_CURR_DIR  text
         -->P_ROV_GEN_NAME  text
      FORM get_filename-of-server TABLES nametab STRUCTURE itabfilename
                                  USING  _dirname _genname.
        CALL 'C_DIR_READ_FINISH'             " just to be sure
                               ID 'ERRNO'  FIELD rov-errno
                               ID 'ERRMSG' FIELD rov-errmsg.
        CALL 'C_DIR_READ_START' ID 'DIR'    FIELD _dirname
                                ID 'FILE'   FIELD _genname
                                ID 'ERRNO'  FIELD rov-errno
                                ID 'ERRMSG' FIELD rov-errmsg.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        REFRESH _nametab.
        DO.
          CLEAR _nametab.
          CALL 'C_DIR_READ_NEXT'  ID 'TYPE'   FIELD _nametab-type
                                  ID 'NAME'   FIELD _nametab-name
                                  ID 'LEN'    FIELD _nametab-len
                                  ID 'OWNER'  FIELD _nametab-owner
                                  ID 'MTIME'  FIELD _nametab-mtime
                                  ID 'MODE'   FIELD _nametab-mode
                                  ID 'ERRNO'  FIELD _nametab-errno
                                  ID 'ERRMSG' FIELD _nametab-errmsg.
          _nametab-dirname = _dirname.
          MOVE sy-subrc TO _nametab-subrc.
          CASE sy-subrc.
            WHEN 0.
              IF _nametab-name+0(1) = '.'.
              ELSE.
                APPEND _nametab.
              ENDIF.
            WHEN 1.
              EXIT.
            WHEN OTHERS.                     " SY-SUBRC >= 2
              EXIT.
          ENDCASE.
        ENDDO.
        CALL 'C_DIR_READ_FINISH'             " just to be sure
                               ID 'ERRNO'  FIELD rov-errno
                               ID 'ERRMSG' FIELD rov-errmsg.
      ENDFORM.                    " get_filename-of-server
    *&      Form  help_values_get_with_table_ext
          text
         -->P_ITAB_FILENAME  text
         -->P_ROV_CURR_DIR  text
         -->P_PO_IFILE  text
      FORM help_values_get_with_table_ext  TABLES _filename
                                                 STRUCTURE itab_filename
                                          USING  _currdir
                                                _selfile.
        TYPES: BEGIN OF f4typ_head_struc,
                 tabname LIKE help_info-tabname,
                 fieldname LIKE help_info-fieldname,
                 head_text LIKE shstruc-keyword,
               END OF f4typ_head_struc.
       DATA itab_fields    LIKE TABLE OF help_value        WITH HEADER LINE.
       DATA itab_selvals   LIKE TABLE OF help_vtab         WITH HEADER LINE.
       DATA itab_values    LIKE TABLE OF rlgrap-filename   WITH HEADER LINE.
       DATA itab_header    TYPE TABLE OF f4typ_head_struc  WITH HEADER LINE.
        REFRESH itab_fields.
        REFRESH itab_selvals.
        REFRESH itab_values.
        REFRESH itab_header.
        itab_fields-tabname    = 'PS0192'.
        itab_fields-fieldname  = 'BAA01'.
        itab_fields-selectflag = ' '.
        APPEND itab_fields.
        itab_fields-tabname    = 'RLGRAP'.
        itab_fields-fieldname  = 'FILENAME'.
        itab_fields-selectflag = 'X'.
        APPEND itab_fields.
        LOOP AT _filename.
          itab_values = itab_filename-type.
          APPEND itab_values.
          itab_values = itab_filename-name.
          APPEND itab_values.
        ENDLOOP.
        CALL FUNCTION 'HELP_VALUES_GET_WITH_TABLE_EXT'
           EXPORTING
            CUCOL                         = 0
            CUROW                         = 0
            DISPLAY                       = ' '
            FIELDNAME                     = ' '
            TABNAME                       = ' '
            TITLE_IN_VALUES_LIST          = ' '
            SHOW_ALL_VALUES_AT_FIRST_TIME = ' '
            USE_USER_SHRINKING            = ' '
                titel                         = _currdir
            NO_SCROLL                     = ' '
            NO_CONVERSION                 = ' '
            NO_MARKING_OF_CHECKVALUE      = ' '
           IMPORTING
                index                         = rov-index
                select_value                  = rov-selvalue
             TABLES
                  fields                        = itab_fields
                  select_values                 = itab_selvals
                  valuetab                      = itab_values
            HEADING_TABLE                 =
             EXCEPTIONS
                  field_not_in_ddic             = 1
                  more_then_one_selectfield     = 2
                  no_selectfield                = 3
                  OTHERS                        = 4.
        IF sy-subrc = 0.
          CLEAR itab_filename.
          READ TABLE itab_filename INDEX rov-index.
          IF itab_filename-type+0(3) = 'dir'.
            CONCATENATE _currdir rov-delchar rov-selvalue  rov-delchar
                                                          INTO _selfile.
          ELSE.
            CONCATENATE _currdir rov-delchar rov-selvalue INTO _selfile.
          ENDIF.
        ENDIF.
      ENDFORM.                    " help_values_get_with_table_ext
    Best regards,
    Prashant

  • Dynamically   reading & writing in a file

    Hi all,
    i want to find a particular string from a weblogic server log [*.log] file and write into a separate txt [output.txt] file.
    important : The weblogic server log file is dynamic one.
    The log contains somestring and xml files, those string are writen by logger tool. only i want to retrieve logger tool msgs.
    for eg.
    ####<Sep 21, 2006 10:04:39 AM GMT+05:30> <Debug> <CLA_JMS> <dscp06614> <cgServer> <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'>
    <ServiceHeader>
    <HI_PCK_SYS>ORM</HI_PCK_SYS>
    <HI_PCK_USR>ALC</HI_PCK_USR> <HI_WORKSTRING_ORIGINATOR>SVI</HI_WORKSTRING_ORIGINATOR>
    <HI_WORKSTRING_MSG_ID>hostname-99ba23.10dcea555e2.-7ff8</HI_WORKSTRING_MSG_ID>
    </ServiceHeader>
    ####<Sep 21, 2006 10:04:39 AM GMT+05:30> <Debug> <CLA_JMS> <dscp06614> <cgServer> <ExecuteThread: '22' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-02E4CB44E4DA812720BD> <000000>
    <con:OrderID>1033987</con:OrderID>
    <StateCode>SUCCESS</StateCode>
    from the above content i want to fetch following elements & write into a
    separate file as output.txt
    output.txt
    USER Order_ID SYS ORIGINATOR MSG_ID statecode
    ALC 1033987 ORM SVI 111 success
    ALC 1033989 ORM SVI 112 failure
    Anyone have idea how to get the string from the dynamic log file.
    we can achieve for static file by using :
    BufferedReader inputStream = new BufferedReader(new FileReader("cgServer.log"));
    PrintWriter outputStream = new PrintWriter(new FileWriter("log_output.txt"));
    But how do read the data from a dynamic file and put into static file.
    your suggestions are most welcome.
    Message was edited by: Paulraj_mm
    PaulrajDaniel

    Hi there, I am currently wanting to do the same thing. I would like to know what you ended up doing. Our log files get quite large (we log 8gigs a day), and the weblogic log files are 512MB each. Would scripting be better than java for this task? Our log files also run on multiple mservers on multiple servers, so searching for XML messages is on multiple servers, on multiple mservers is quite a daunting task to do manually!
    Thanks

  • Dynamic read file based off inbound header

    This is all done with BPEL
    1. We want to get a file from a server VIA FTP adapter. So we setup an ftp adpter to get L11*.TXT (Any files beginning with L11)
    1A.So we create this FTP adapter and then we create a receive activity to get this file from the FTP adapter.
    ***********Now mind you we have created our variables that come into play later such as inbound FTP adapter header & outbound FTp adapter header*************
    2. Below this receive we create An assign activity with a copy operation.
    Now for this assign we simply create a copy operation that includes our headers. Specifically we choose why down in the heirachy of Inbound and outbound ftp adter headers the :filename option
    2A. So what we have is an assign with a copy operation from in bound ftp adapter to outbound ftp adapter
    3. Then we have our fist invoke. ********Now mind you ************ BPEL cannot overwrite a file and the customer wants the file name the same as was picked up. Meaning no %seq # or %date or date stamp whatever you perfer.
    So we do this first invoke and attach it to another FTP adpter that gets Sync file . Now this second ftp adpter will use the filename of the originally picked up file to go "pick up" and delete it from destination. We kinda trick the program if you will. So this ensures we dont delete a file that has a replacment behind it. Also ensures no overwriting or %seq # is needed.
    On this invoke we have under adapters section Input header variable: OutboundFtpHeader (Mind you we did a copy on the first assign from inbound to outbound header varibale.)
    We do nothing with any data collected between the first invoke and syncgetftpadapter. We just make it think it is going out picking up a file. And in this perspective we can choose delete after the pick up and inevitably it will "pick up file" At same time now that file is deleted on destination, thus making overwriting and %seq # not needed.
    4.
    We create another assign below our invoke
    this has our inbound header copied to outbound once again
    Specifically :filename
    5.
    This will lead to another invoke which leads to another ftp adapter that drops off the orginal file that was picked up now it can drop it off with that same filename as picked up and no overwriting neccassary because the file was deleted off the destination already.
    Well when you make a Put ftp adapter you must specify a filname and we just want a dummy filename well we thiunk that is a dummy, because we are trying to use the orginal file name as the one to make it when it drops off whatever filename it picked up .
    for example we choose test.txt thinking inbound variable will overwrite it
    but the right file gets transferred but wrong file name attached.
    my guess is that the putftpadapter overwrites any "filename specified" Or inbound header file name. lol you need to have a file name on the put you need one no way around it.
    So i guess what im trying to do is pick up files then have the program dynamically be able to drop off that filename and contents to the destination.
    Icould create three seperate programs for our three L11 files but that is alot of overhead?
    Message was edited by:
    vande

    Hmmm maybe someone can point me to a site that explains how to put catches in. I mean i know how to put them in but i want to make sure im doing this correctly. Also maybe debatching, I have heard of this but i want to understand how exactly it works and how to implment this.
    Ok and one more thing ............ I have a 3 files as noted above that are suppose to move. Disregard my problem with send three and all that for a moment, Now I have stated above that we have a little trick included in this where we put a get on the source to "get" the files off the source cause for some reason it wont overwrite the file. Well on was doing some testing on my box. I got an exact replica of the files that we are doing this project for and i setup a test bpel project on my machine and deployed to our test env. Now I was deploying to our test env before also but the source server was a corporate server up in Canada. Now when i did this it overwrote the file :( so my next guess was hmmm maybe the source server FTP is not setup for our username to be able to overwrite the files???
    I have a simple local FTP server and was looking at the setup, and my question is. There is an option(s) to pick for new user setups
    delete
    write
    read
    ammend
    Would ammend give the right to overwrite ?
    Not 100% sure the source is running the same ftp application as I am locally but it will overwrite a file
    One more thing sorry lol
    To try my catches out i would have to somehow make the file error in the middle os the process?
    I was thinkin of that yesterday I'm like well i put the catch in but how do i know if it will truely work
    Message was edited by:
    vande

  • Dynamic reading from database table

    Hi Experts,
    While reading from a database table the below statement for deletion works:
    DELETE (p_table) FROM <fs_wadbtab>.
    p_table: name of database table which is entered as a selection screen parameter
    <fs_wadbtab> : workarea of line type P_table
    However, the below statement does not work:
    READ (p_table) FROM <fs_wadbtab>.
    My requirement is to read a record from p_table with contents in a dynamic structure.
    Kindly suggest.
    Thanks.

    Just misunderstood you.
    Edited by: Karri Kemppi on Jun 23, 2010 10:00 AM

  • Dynamic internal table and dynamic read statements.

    Hi,
    My Scenario :
    I have two dynamic internal tables.
    I am looping at one internal table and trying to read another table.
    In the read statement how do I mention the key dyamically.
    Example code below :
      LOOP AT <dyn_table> ASSIGNING <dyn_wa>.
    read second  dynamic internal table.
      enloop.
    The key which I want use for reading say it is keyed in the selection criteria....
    Also based on the value I read I want to modify the first internal table field value.
    Remember I dont want to explicity mention the key
    How do I do that?
    Thanks
    Krishna.

    Hi
    U need to use the field-symbol, but u can't use a WHERE option, but u need to use the CHECK statament into the second loop:
    LOOP AT <dyn_table> ASSIGNING <dyn_wa>.
        LOOP AT <DYN_TABLE2> ASSIGNING <DYN_WA2>.
            ASSIGN COMPONENT <COMPONENT> OF STRUCTURE   <DYN_WA2> TO <FS>.
            CHECK <FS> IN (=) .......
                ASSIGN COMPONENT <COMPONENT> OF STRUCTURE   <DYN_WA> TO <FS2>.
                <FS2> = .......
                EXIT.
        ENDLOOP.
    ENDLOOP.
    Max

  • How to Dynamically read Collections?

    Hi,
    I want to read collections dynamically. I have a requirement where I need to take any COMPLEX collection and goto the leaf node and get the results. I'm able to get the attributes using "ALL_TYPES" and "ALL_TYPE_ATTRS" etc but how can I read dynamically?
    for example I've a following simple type declared but is giving error. I hope any proposed solution will work with collection "TYPE T IS TABLE OF R" as well.
    DECLARE
    TYPE R IS RECORD (X VARCHAR2(1), Y VARCHAR2(1));
    VAR R;
    TST VARCHAR2(100);
    BEGIN
    VAR.X := 'I';
    VAR.Y := 'J';
    EXECUTE IMMEDIATE 'SELECT VAR.X FROM DUAL' INTO TST;
    DBMS_OUTPUT.PUT_LINE(TST);
    END;
    Thanks

    So, let suppose I want to read Test6.Test5(1).Test4.Five Dynamically? How can i do that if objects are populated? Here's one way:
    SQL> create type test1 as object (one date);
    Type created.
    SQL> create type test2 as object (two number, three varchar2(10), four test1);
    Type created.
    SQL> create type test3 as table of test2;
    Type created.
    SQL> create type test4 as object (five varchar2(1), six date, seven test3);
    Type created.
    SQL> create type test5 as table of test4;
    Type created.
    SQL> create type test6 as object (eight test5);
    Type created.
    SQL> var cur refcursor
    SQL> declare
      procedure testobj (myobj test6)
      is
        myval   varchar2 (10);
      begin
        open :cur for select x.column_value.getrootelement() || ': ' || x.column_value.extract('*/text()').getstringval() result from xmltable ('*' passing sys_xmlgen (myobj).extract('ROW//*')) x;
      end;
    begin
      testobj (test6 (test5(test4(1,sysdate, test3(test2(5,67,null))))));
    end;
    PL/SQL procedure successfully completed.
    SQL> print cur
    RESULT                                                                                                                           
    EIGHT:                                                                                                                           
    TEST4:                                                                                                                           
    FIVE: 1                                                                                                                          
    SIX: 22/03/2012 18:16:23                                                                                                         
    SEVEN:                                                                                                                           
    TEST2:                                                                                                                           
    TWO: 5                                                                                                                           
    THREE: 67                                                                                                                        
    8 rows selected.

  • How to create dynamic read buffersize in Delphi?

    I am using the dpib32.pas library in Delphi 5, creating a generic send and receive application for a host of instruments over IEEE. In the library I have access to the Receive function Receive(0, dev, buf, 100, STOPend); but it requires a length to be stated for the size of the buffer. This perplexes me a little as the user will not always know how large the data returned will be. I could allow functions for the user to change the buffersize before their calls but I would rather find a way to dynamically increase the buffer or read from it in a loop so this does not have to occur. I've looked at using ibrd() instead but am having a little trouble figuring out how/if I should error trap the receive while the loop is runnin
    g. Has anyone implemented, or can explain, how to handle the buffersize issue when you aren't sure how much data will be returned?

    Thank you both for the immediate replies. I understand where this is going and here is going to be the next question I'll be coming back with so I'll just ask it now. Do I need to worry about any kind of read errors during the loop? Basically... what could possibly go wrong in the loop that I should be aware of for detection? I know for my first attempts at this last week that a stuck loop, even on a Win2k machine, resulted in an unexpected hard reboot on ending the application task. Not sure if that's a GPIB driver issue or what, but my first thought is making sure I can dive out of that loop on any errors to prevent it.

  • How dynamically read mutliple PROVIDER_URL according to deployment.

    Hi,
              I have to deploy my app on different environment for diff. clients.
              e,g client one need to deploy it on two mange servers running on port 80 & 81.
              Second client want to deploy it on single sever say on port 80.
              etc. etc.
              Now i want to dynamically set the following property.
              properties.put(Context.PROVIDER_URL,"")
              Any idea how can i resolve this issue.
              Thanks

    I don't think so, but I'm not sure. This question is better suited
              for the ejb newsgroup.
              Tom, BEA
              Lucky wrote:
              > Hello All,
              >
              > Is there a way to dynamically set provider-url for an MDB rather than setting
              > through deployment descritors.
              >
              > Lucky
              

Maybe you are looking for

  • Printing problems with HP OfficeJet G55

    I have a MacBook running OS X 10.5.4 and I'm having problems printing with my HP OfficeJet G55. I have updated to HP Printer Driver 1.1.1, but after updating, I realized my printer type was not in the list. So that did not fix the problem. I connect

  • HT5225 How do I change my mail settings to receive/send to from iCloud

    It says in this article:  that you can keep your .mac and .me email addresses, even if your systems do not support icloud, as long as you move before 30 June.  "If your contacts or calendars are only available on me.com, you must export your contacts

  • Custom PC with ATI 5670 xfx is not working with APPLE cinema 24"

    I need help using my apple cinema 24" my setup is the following: i7 custom built with ati 5670 xfx (with display port) running windows 7 64 bit ultimate I bought a displayPort to mini-display port cable. When I plug everything in, my apple 24" cinema

  • How does the firewire cable transmit?

    Does anyone know how the firewire cable transmits data? I have not been able to find a detailed explanation. I'm trying to figure out if its possible for the firewire cable to transmit the video but not the audio. When I import into Final Cut 3 from

  • Problems with standby mode in Windows XP

    Every time I try to put my computer in standby mode while in Windows the entire computer shuts down. I can't even manually turn on the computer in Mac until I press the power button mulitple times. Anyone have any suggestions?