Upload Release strategy into T16FW table

Hi Guys
I am trying to uplad data into T16FW table for release strategy but this program is not working , I would be thankful if anyone correct it please.
*& Report  Z_UPLOAD                                    *
REPORT ZUPLOAD.
INCLUDES                                            *
*INCLUDE ole2incl.
*&   TYPES                                            *
TYPES: BEGIN OF ty_t16fw,
       frggr TYPE T16fw-FRGGR,
       frgco TYPE T16fw-frgco,
       WERKS TYPE T16fw-werks,
       otype TYPE T16fw-otype,
       objid TYPE T16fw-objid,
       END of ty_t16fw.
TYPES: BEGIN OF ty_titles,
       title(20) TYPE c,
       field(20) TYPE c,
       END OF ty_titles.
*&   INTERNAL TABLES                                  *
DATA: t_t16fw TYPE STANDARD TABLE OF ty_t16fw,
      t_titles TYPE STANDARD TABLE OF ty_titles.
*&   FIELD-SYMBOLS                                    *
FIELD-SYMBOLS: <fs_t16fw> LIKE LINE OF t_t16fw,
               <fs_titles> LIKE LINE OF t_titles,
               <fs> TYPE ANY.
*&   VARIABLES                                        *
DATA: w_tabix TYPE sy-tabix,
      w_titles TYPE sy-tabix,
      w_line TYPE sy-tabix,
      w_field TYPE string,
      filename TYPE string,
      path TYPE string,
      fullpath TYPE string.
DATA: data_titles TYPE REF TO data.
*DATA: e_sheet TYPE ole2_object,
     e_activesheet TYPE ole2_object,
     e_newsheet TYPE ole2_object,
     e_appl TYPE ole2_object,
     e_work TYPE ole2_object,
     e_cell TYPE ole2_object,
     e_color TYPE ole2_object,
     e_bold TYPE ole2_object.
*&   SELECTION-SCREEN                                 *
SELECTION-SCREEN BEGIN OF BLOCK b1.
PARAMETERS: p_file TYPE rlgrap-filename,
p_objid TYPE t16fw-objid. "no-extension no intervals OBLIGATORY,
SELECTION-SCREEN END OF BLOCK b1.
*&  START-OF-SELECTION                                *
START-OF-SELECTION.
  PERFORM get_titles.
  PERFORM get_data.
*& AT SELECTION-SCREEN                                *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
  CALL METHOD cl_gui_frontend_services=>file_save_dialog
    EXPORTING
      window_title      = 'Select archivo'
      default_extension = 'xls'
      file_filter       = '*.xls'
    CHANGING
      filename          = filename
      path              = path
      fullpath          = fullpath.
  IF sy-subrc EQ 0.
    p_file = fullpath.
  ENDIF.
*&      Form  get_titles                              *
FORM get_titles.
  CREATE DATA data_titles TYPE ty_titles.
  ASSIGN data_titles->* TO <fs_titles>.
  <fs_titles>-title = 'Grp'.
  <fs_titles>-field = 'FRGGR'.
  APPEND <fs_titles> TO t_titles.
  <fs_titles>-title = 'Code'.
  <fs_titles>-field = 'FRGCO'.
  APPEND <fs_titles> TO t_titles.
  <fs_titles>-title = 'Plnt'.
  <fs_titles>-field = 'WERKS'.
  APPEND <fs_titles> TO t_titles.
  <fs_titles>-title = 'Ob'.
  <fs_titles>-field = 'OTYPE'.
  APPEND <fs_titles> TO t_titles.
  <fs_titles>-title = 'AGENT ID'.
  <fs_titles>-field = 'objid'.
ENDFORM.                    "get_titles
*&      Form  get_data                                *
FORM get_data.
  SELECT frggr frgco werks otype objid
  INTO TABLE t_t16fw
  FROM t16fw
  WHERE OBJID EQ 'GAIW'.
objid eq p_objid.
ENDFORM.                    " get_data
Regards
Chris

Hi paedro,
I think coresponding events are triggered by SAP automatically when you release/create a PR. What you need to do is just do Event Type Linkage of those events with your Workflow .
For this you can use transaction SWETYPV
Also see
Please check the configuration for Release groups (Path SPRO->Materials Management->Purchasing->Purchase Requisition->Release Procedure->Procedure with Classification->Set up Procedure with Classification->Release Groups). In this, you should check 'OverReqRel'.
Check if you are using workflow template WS20000077 (Workflow for overall release of requisition) with object type 'BUS2105'.
Workflow template WS00000038 (Workflow for requisition release) with object type 'BUS2009', is used for releasing at the item level.
regards,
Hareesha k

Similar Messages

  • Upload excel data into Internal table

    Hi,
    I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.
    Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.
    I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.
    Please advise if you know any alternate procedure to upload excel data into internal table.
    Thanks,
    Kumar.

    Moderator message - Cross post locked
    Rob

  • Help Required:How Upload Excel file Into Oracle Table Using PLSQL Procedure

    Please Help , Urgent Help Needed.
    Requirement is to Upload Excel file Into Oracle Table Using PLSQL Procedure/Package.
    Case's are :
    1. Excel File is On Users/ Client PC.
    2. Application is on Remote Server(Oracle Forms D2k).
    3. User Is Using Application Using Terminal Server LogIn.
    4. So If User Will Use to GET_FILE_NAME() function of D2K to Get Excel File , D2k Will Try to pick File from That Remote Server(Bcs User Logind from Terminal Server Option).
    5. Cannot Use Util_File Package Or Oracle Directory to Place That File on Server.
    6. we are Using Oracle 8.7
    So Need Some PL/SQL Package or Fuction/ Procedure to Upload Excel file on User's Pc to Oracle Table.
    Please Guide me wd some Code. or with Some Pl/SQL Package, or With SOme Hint. Or any Link ....
    Jus help to Sort This Issue ........
    you can also write me on :
    [email protected], [email protected]

    TEXT_IO is a PL/SQL package available only in Forms (you'll want to post in the Forms forum for more information). It is not available in a stored procedure in the database (where the equivalent package is UTL_FILE).
    If the Terminal Server machine and the database machine do not have access to the file system on the client machine, no application running on either machine will have access to the file. Barring exceptional setups (like the FTP server on the client machine), your applications are not going to have more access to the client machine than the operating system does.
    If you map the client drives from the Terminal Server box, there is the potential for your Forms application to access those files. If you want the files to be accessible to a stored procedure in the database, you'll need to move the files somewhere the database can access them.
    Justin

  • Mass upload of data into Custom table

    Hello all,
                I made search in SDN and could not find the best solution to my problem and hence posting .
               What is the best way for Mass upload of data into Custom database table ?
               I think LSMW would not be a viable option as it would take longer time .
               Locking of the table also needs to be taken care.
               PLease let me know if you have a alternative to this and the best way to do this .
    Comradely,
    K.Sibi

    Hi Sibi,
    See Lock objects are required when we enter the data through screen level, or multiple users should not enter the data at same time.
    Create one Lock object in SE11, It automatically creates FM.
    DEQUEUE_EYTEST2                Release lock on object EYTEST2
    ENQUEUE_EYTEST2                Request lock for object EYTEST2
    Call these FM in your program.
    EX: Refer this links
    1 http://help.sap.com/saphelp_nw70/helpdata/en/41/7af4c8a79e11d1950f0000e82de14a/content.htm
    2 http://wiki.sdn.sap.com/wiki/display/Snippets/lockingandunlockingofthe+tables
    Rgds
    Aeda

  • Problem to upload the data into internal table record length more than 6000

    Hi all
            I stuck with this problem from past 3 days. I have to upload the data from excel sheet. iam making it tab delimited and trying to upload from gui_upload. but in the structure of file, we have, one field of 4000 characters, and other fields of 255 characters.
    how can i upload this into internal table . From excel sheet or from tab delimeted or any other format? or any special function module is there?  while iam doing this its truncating the datat 255 characters and not uploading the other fields also...
    can any one of you help me out. ASAP
    thnks in advance

    from one of the forum iam just pasting code which it is used in lsmw, try the same logic in ur code hope it can work.
    you have to create multiple lines with do...enddo loop., like this:
    (assuming excel_long_text-text is 924 characters long, 7 lines X 132 char)
    __GLOBAL_DATA__
    data: offset type i,
    text_132(132) type c.
    __BEGIN_OF_RECORD__ Before Using Conversion Rules
    Rule : Default Settings Modified
    Code: /sapdmc/ltxtl = init_/sapdmc/ltxtl.
    CLEAR offset.
    DO 7 TIMES.
    text_132 = excel_long_text-text+offset(132).
    offset = offset + 132.
    __END_OF_RECORD__ After Using Conversion Rules
    Rule : Default Settings Modified
    Code: transfer_record.
    ENDDO.
    also check this
    COMMIT_TEXT
    To load long text into SAP
    READ_TEXT
    To load long text into SAP

  • Error while uploading a textfile into internal table.

    Hello,
    i am uploading a textfile into an internal table and i have used the 'CALL METHOD cl_gui_frontend_services=>gui_upload' for uploading of the file into the internal table. But instead i am getting sumthing lyke 
    CTTL#1001#BANK-0014393-PP-LHR#|#2000#112312#CCL00#29.08.2006#|Cash In </b>. I have the following internal table,
    [code]
    begin of ls_cashrec,
         bukrs type char30,        " company code
         cjnr type char30,         " cash journal number
         cjtranstxt type char30,   " business transaction
         cjamount type wrbtr,      " amount
         dzuonr type char30,       " assignment
         prctr type char6,         " profit center
         budat type sy-datum,      " posting date
         cjpostext type char30,    " text
      end of ls_cashrec.
    and
    DATA:
      gt_cashrec TYPE STANDARD TABLE OF ls_cashrec.
    where am i wrong ?
    Regard and Thanks,
    Shehryar

    Hi again,
    1. The best thing is that the
       data format in text file is
       YYYYMMDD  (8 characters only)
    (Then in that case, we can directly
      declare our field in internal table type sy-datum.
    2. Other wise,
       we have to declare the field in internal table
       as character format and length
       (based upon the text file field length,
       including DOTS / etc)
      Then we have to finally convert in YYYYMMDD
      format in to other field,
      which we will finally use as sy-datum field.
    regards,
    amit m.

  • Getting Issue while uploading CSV file into internal table

    Hi,
    CSV file Data format as below
         a             b               c              d           e               f
    2.01E14     29-Sep-08     13:44:19     2.01E14     SELL     T+1
    actual values of column   A is 201000000000000
                     and  columen D is 201000000035690
    I am uploading above said CSV file into internal table using
    the below coding:
    TYPES: BEGIN OF TY_INTERN.
            INCLUDE STRUCTURE  KCDE_CELLS.
    TYPES: END OF TY_INTERN.
    CALL FUNCTION 'KCD_CSV_FILE_TO_INTERN_CONVERT'
        EXPORTING
          I_FILENAME      = P_FILE
          I_SEPARATOR     = ','
        TABLES
          E_INTERN        = T_INTERN
        EXCEPTIONS
          UPLOAD_CSV      = 1
          UPLOAD_FILETYPE = 2
          OTHERS          = 3.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    am getting all columns data into internal table,
    getting problem is columan A & D. am getting values into internal table for both; 2.01E+14. How to get actual values without modifying the csv file format.
    waiting for your reply...
    thanks & regards,
    abhi

    Hi Saurabh,
    Thanks for your reply.
    even i can't double click on those columns.
    b'se the program needs be executed in background there can lot of csv file in one folder. No manual interaction on those csv files.
    regards,
    abhi

  • Want to upload company logo into ICON table

    hi
    i want to upload my company logo into ICON table
    how i can upload it .
    thanks in advanced.

    Hi,
    refer
    Create and Add Icons to table ICON?
    Or
    Logo Upload: Problem with the Format
    Hope this solves your purpose.
    Award points if it helps.
    -Gaurang

  • To upload a data into SAP Table with the help of RFC function in BODS

    Hi,
    Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services.
    I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my database table.
    In the data services how can i filled the table of RFC function, i am using this function in query transform of data services but it gives me error.
    I am also follow link http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsDataServicesTipsand+Tricks
    but it did not help me.
    Thanks,
    Abhishek

    Hi Abhishek,
    Did you import the function module in the SAP datastore first? When you open the SAP datastore, the function should be listed in the 'functions' section. If not, import it. Make sure your function is remote executable.
    Once the function is there, you can use it in a transformation. In 'Schema Out' right-click on 'Query' (top level) and choose 'New Function Call'. You can then select a datastore and a function in the datastore. The wizard will show you which output parameters are available. I believe you have to add at least one and can select as many as you like.
    After confirming your selection the function and the output parameters appear in Schema Out. You can then right-click on the function and choose 'Modify function call'. A popup will appear where you can specify the input parameters.
    I hope this helps.
    Jan.

  • Upload .txt file into Database Table

    Hi,
    I was wondering if someone could please point me in the right direction. I've been looking around the forum but can't find anything to help me achieve the following.
    I would like to be able to upload a .txt file using a webpage. Then store the information inside this file into database tables.
    eg. contents of mytextfile.txt:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    joe
    9 somestreet, elsewhere
    999 888 777 666
    peter
    214 nearby lane, overhere
    555 555 555 555
    I would like to insert this data into a table.
    eg. table name = CONTACTS
    userid = primary key (using sequence)
    username = (line 1 - richard, joe, peter)
    address = (line 2)
    phone_no = (line 3)
    As you can see the records will appear 1 at a time and will have a blank line between records. Is there anyway for me to upload a file like this and have it placed into tables?
    I have seen http://otn.oracle.com/products/database/htmldb/howtos/howto_file_upload.html but this seems to be for uploading a whole file and downloading the same file, rather than extracting data from the file.
    I hope I have managed to explain my problem.
    Many thanks,
    Richard.

    Richard,
    HTML DB allows you to upload CSV files via the Data Workshop. That data would then be parsed and inserted into a specific table. Alternatively, if you have your data in an Excel spreadsheet, and it is less than 32k, you can copy & paste the data directly into HTML DB's Data Workshop, which will then parse and import it into the Oracle database.
    The one obstacle you may have to overcome is converting your data from the format you outlined to CSV format. Specifically, you would have to make this:
    richard
    10 anywhere street, anytown, somewhere
    111 222 333 444
    Look something like this:
    "richard","10 anywhere street, anytown, somewhere","111 222 333 444"
    Hope this helps,
    - Scott -

  • Uploading excel file into internal table

    Hi,
    Any function module is there to upload an excel file into internal table in CRM 7.0 system?
    Thanks.

    Hi Ginger,
    If u have access to ECC R/3 make use FM 'TEXT_CONVERT_XLS_TO_SAP' source code which is existing to convert to Excel to Internal table.  It will work in CRM also.
    As of Now I don't have access to SAP S/m. Mean while u can try as above said.
    Regards,
    Lokesh B

  • Uploading CSV file into internal table

    Hi,
    I want to upload a CSV file into internal table.The flat file is having values as below:
    'AAAAA','2003-10-11 07:52:37','167','Argentina',NULL,NULL,NULL,NULL,NULL,'MX1',NULL,NULL,'AAAA BBBB',NULL,NULL,NULL,'1',NULL,NULL,'AR ',NULL,NULL,NULL,'ARGENT','M1V','MX1',NULL,NULL,'F','F','F','F','F',NULL,'1',NULL,'MX','MMI ',NULL
    'jklhg','2004-06-25 08:01:57','456','hjllajsdk','MANAGUA   ',NULL,NULL,'265-5139','266-5136 al 38','MX1',NULL,NULL,'hjgkid GRÖBER','sdfsdf dfs asdfsdf 380 ad ased,','200 as ads, sfd sfd abajao y 50 m al sdf',NULL,'1',NULL,NULL,'NI ',NULL,NULL,NULL,'sdfdfg','M1V','dds',NULL,NULL,
    Here I can not even split at ',' because some of the values are having value like NULL and some have values with comma too,
    The delimiter is a quote and the separator is a comma here.
    Can anyone help on this?
    Thanks.
    Edited by: Ginger on Jun 29, 2009 9:08 AM

    As long as there can be a comma in a text literal you are right that the spilt command doesn't help. However there is one possibility how to attack this under one assumption:
    - A comma outside a text delimiter is always considered a separator
    - A comma inside a text delimiter is always considered a comma as part of the text
    You have to read you file line by line and then travel along the line string character by character and setting a flag or counter for the text delimiters:
    e.g.
    "Text","Text1, Text2",NULL,NULL,"Text"
    String Index  1: EQ " => lv_delimiter = 'X'
    String Index  2: EQ T => text literal (because lv_delimiter = 'X')
    String Index  3: EQ e => text literal (because lv_delimiter = 'X')
    String Index  4: EQ x => text literal (because lv_delimiter = 'X')
    String Index  5: EQ t => text literal (because lv_delimiter = 'X')
    String Index  6: EQ " => lv_delimiter = ' ' (because it was 'X' before)
    String Index  7: EQ , => This is a separator because lv_delimiter = ' '
    String Index  8: EQ " => lv_delimiter = 'X' (because it was ' ' before)
    String Index  9: EQ T => text literal (because lv_delimiter = 'X')
    String Index 10: EQ e => text literal (because lv_delimiter = 'X')
    String Index 11: EQ x => text literal (because lv_delimiter = 'X')
    String Index 12: EQ t => text literal (because lv_delimiter = 'X')
    String Index 13: EQ 1 => text literal (because lv_delimiter = 'X')
    String Index 14: EQ , => text literal (because lv_delimiter = 'X')
    String Index 15: EQ T => text literal (because lv_delimiter = 'X')
    Whenever you hit a 'real' separator (lv_delimiter = ' ') you pass the value of the string before that up to the previous separator into the next structure field.
    This is not an easy way to do it, but if you might have commas in your text literal and NULL values I gues it is probably the only way to go.
    Hope that helps,
    Michael

  • How do I upload XML files into sap table?

    Dear all,
    I found some methods that upload xml into SAP,
    but there doesn’t work under 4.6c.
    Can someone tell me how to upload XML files into
    sap under 4.6c?
    THX!

    hi,
    You can convert XML to abap using transformations. Simple transformations is a proprietary SAP programming language that describes the transformation of ABAP data to XML (serialization) and from XML to ABAP data (deserialization).
    goto SE80->workbench->edit object(or other objects)->in object selection chose more tab and then choose the transformation radio button and write a name and click create new.
    Here you enter your transformation like
    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:sap="http://www.sap.com/sapxsl"
    >
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
      <xsl:copy-of select="."/>
    </xsl:template>
    </xsl:transform>
    You can use this transfomation in your program using call transformation. You can find more info on call transformation in help.
    Hope this helps.
    Regards,
    Richa

  • Bdc upload file data into internal table problem with gui_upload fm

    Hello experts,
    my coding is like this ..
    data : begin of itab occurs 0 .
    field1 like mara-matnr,
    field2......
    etc,
    end of itab.
    data: file1 type string.
    parameter :file like rlgrap-filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR file.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
    static = 'X'
    mask = space
    field_name = 'FILE'
    CHANGING
    file_name = file.
    START-OF-SELECTION.
    FILE1 = FILE . "HERE I AM PASSING INTO STRING
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    filename = FILE1
    FILETYPE = 'ASC'
    has_field_separator = 'X'
    TABLES
    data_tab = itab. " here the data is not populating from the file , it is giving the error like speified table not found.
    HERE i am getting the message like "specified table name not recgonised" . the data is not populating into the itab from the file.
    file structure is same as the internal table.
    I stored the file as .txt( ie in notepad).
    my file is like this..
    10000 200 323 sunndarrr.......
    i had a problem with this bdc , i am getting like "specified table name not recgonised" in the fm gui_upload while debugging.
    when i am using the ws_upload it is working fine.
    please guide me where i have done the mistake.
    thank you so much for all the replies.

    Hi,
    Have a look on the following code.
    TABLES: kna1.
    DATA: BEGIN OF itab1 OCCURS 0,
          str(255),
          END OF itab1.
    DATA: itab2 TYPE kna1 OCCURS 0 WITH HEADER LINE.
    CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
        filename                = 'D:\ABAP EVE\ffile1.txt'
        filetype                = 'ASC'
      TABLES
        data_tab                = itab1
      EXCEPTIONS
        conversion_error        = 1
        file_open_error         = 2
        file_read_error         = 3
        invalid_type            = 4
        no_batch                = 5
        unknown_error           = 6
        invalid_table_width     = 7
        gui_refuse_filetransfer = 8
        customer_error          = 9
        no_authority            = 10
        OTHERS                  = 11.
    IF sy-subrc <> 0.
      WRITE:/ 'sorry'.
    ELSE.
      LOOP AT itab1.
        SPLIT itab1-str AT ',' INTO itab2-kunnr itab2-name1.
        APPEND itab2.
      ENDLOOP.
      IF sy-subrc = 0.
        LOOP AT itab2.
          WRITE:/ itab2-kunnr,itab2-name1.
          INSERT INTO kna1 VALUES itab2.
        ENDLOOP.
        IF sy-subrc = 0.
          WRITE:/ 'inserted'.
        ELSE.
          WRITE:/ 'not inserted'.
        ENDIF.
      ELSE.
        WRITE:/ 'fail'.
      ENDIF.
    ENDIF.
    Flat file:
    10001,Sadney
    10003,Yogesh
    20005,Madan
    1.U need to define internal table with one field of max size
    2.upload the flat file data into that internal table
    3.split that internal table data into another internal table(having fields)
    <REMOVED BY MODERATOR>
    thanks,
    Chandu
    Edited by: Alvaro Tejada Galindo on Apr 30, 2008 12:17 PM

  • Uploading word doc into Internal Table

    Hi,
    Could you please let me know how to upload <b>A WORD DOC</b> into an Internal Table.
    The function WS_Upload is to upload a text file with extension DAT and not to upload .DOC.
    Please let me know the possibilities.
    Thanks
    Arun

    Hi Y Arun
    You may have to go for OLE, please check the link below:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/technologies/an easy reference for ole automation.article
    Regards
    Ashish Jain

Maybe you are looking for

  • XI 3.0 -    XML - IDOC inbound scenario  via ftp  UTF-8 character encoding

    Hi Everyone, I'm having difficulties with a particular scenario. I receive via the ftp adapter xml files which have a header indicating UTF-8 coding. In SXMB_MONI, i see the cyrillic characters and after mapping the target message payload as well hav

  • Problem in extracting data from source system

    HI    I am comparing source system and data in bW for a particular datasource.In this process in source system transaction RSA3 when i am trying to extract data its not showing the exact count.I couldnt able to understand the setting options like Dat

  • [Solved] Internet speed problems

    Hello. I noticed that my firefox is taking a long time "looking up" sites, even google, so that sites that have to do multiple lookups load extremely slowly. In windows it works fine. I thought it was a dns problem so i tried using opendns 208.67.222

  • Maintaining my current E Mail adress when joining ...

    I have just joined BT after many years with Tiscali now sadly Talk Talk? I have had nothing but internet access problems since Talk Talk took over Tiscali. I cannot get the problem solved by Talk Talk so have now joined BT hopefully for the better. T

  • Help! I need iPhoto to *STOP* opening...

    Every time I plug in a card reader with a CF card in it, iPhoto opens. I don't USE iPhoto, and I don't have the time to wait for it to load, then close it. I looked through preferences, but didnt see anything. did i miss something? thanks in advance.