Problems getting data into a SET Column

I am having a problem with the SET Column storing multiple days of the week.  When I submit the form, a link that says function.implode shows up at the top of the page and enters NULL in my Column.  Any ideas why?  I also had a lot of server side validation that was in this code.  I removed all of it thinking that might be the problem, but the same thing is happening either way.
Here is the code:
mysql_select_db($database_connRegister, $connRegister);
$query_getusers = "SELECT * FROM users";
$getusers = mysql_query($query_getusers, $connRegister) or die(mysql_error());
$row_getusers = mysql_fetch_assoc($getusers);
$totalRows_getusers = mysql_num_rows($getusers);
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "sign_form")) {
if (isset($_POST['days_to_play'])) {
  $_POST['days_to_play'] = implode(',', $_POST['days_to_play']);
} else {
  $_POST['days_to_play'] = 'Monday';
  $insertSQL = sprintf("INSERT INTO users (user_name, password, first_name, last_name, address, city, `state`, zip, phone_number, member_since, email, days_to_play, handicap, home_course, play_in_tournaments, casual_compet, hear_about_us, confirm_pass, site_city, text) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($_POST['user_name'], "text"),
                       GetSQLValueString($_POST['password2'], "text"),
                       GetSQLValueString($_POST['first_name'], "text"),
                       GetSQLValueString($_POST['last_name'], "text"),
                       GetSQLValueString($_POST['address'], "text"),
                       GetSQLValueString($_POST['city'], "text"),
                       GetSQLValueString($_POST['state'], "text"),
                       GetSQLValueString($_POST['zip'], "int"),
                       GetSQLValueString($_POST['phone_number'], "text"),
                       GetSQLValueString($_POST['member_since'], "defined", 'NOW()'),
                       GetSQLValueString($_POST['email'], "text"),
                       GetSQLValueString($_POST['days_to_play'], "text"),
                       GetSQLValueString($_POST['handicap'], "int"),
                       GetSQLValueString($_POST['home_course'], "text"),
                       GetSQLValueString($_POST['play_in_tournaments'], "text"),
                       GetSQLValueString($_POST['casual_compet'], "text"),
                       GetSQLValueString($_POST['hear_about_us'], "text"),
                       GetSQLValueString($_POST['confirm_pass'], "text"),
                       GetSQLValueString($_POST['site_city'], "text"),
                       GetSQLValueString($_POST['text'], "text"));
  mysql_select_db($database_connRegister, $connRegister);
  $Result1 = mysql_query($insertSQL, $connRegister) or die(mysql_error());
  $insertGoTo = "golferstats.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  header(sprintf("Location: %s", $insertGoTo));

Yes, I had actually already caught my mistake before you sent this.  It is
working now.  I have 2 more unrelated questions that can't seem to find in
your book.
#1 - I have an updated page separate from the user input page and I want it
to populate the days_to_play record when they open update so they can edit
these days if they want.  I can't get it to show what is already selected.
#2 - I have quotes that appear on the page and it works fine and selects
them randomly when the page is accessed, but I want to add a picture(s).
How can I add pictures to a database table and get them to display randomly
with the text I already have?
Thanks for your help.  I am enjoying the book!

Similar Messages

  • Is there a way to Insert Data into a Lookup Column Type on a SharePoint List Destination in SSIS?

    Greetings.
    I have successfully worked out inserting SQL data (2008 R2) into my 2010 SharePoint list (New, Update, Delete) by creating an SSIS Data Flow Task as outlined here:
    http://fsugeiger.blogspot.com/2010/01/synchronise-sql-table-with-sharepoint.html
    However, the problem I am running into is inserting data into the SharePoint Columns that are "Lookup" column types. I verified that all of the values I am copying from SQL into the SharePoint lookup column exist in the customn list it is pointing to. It
    is important to have this column be a lookup column as it links to another custom list that has many more columns of related information.
    I have read and re-read the SharePoint SSIS Adapters 2011.docx from
    http://sqlsrvintegrationsrv.codeplex.com/ and the only section that seems to apply is this:
    "Looking Up Values in a SharePoint List
    If you have to look up a value in a SharePoint list, you can use the Lookup transformation in your data flow, and use the SharePoint List source to load the lookup table. You may have to add a Derived Column transformation or a Script component that splits
    data in the lookup column on the ";#" delimiter to separate the ID value from the description.
    If you are replacing values in your data with the values that you look up in the list, then loading the changed data back into SharePoint, you only have to include the ID from the lookup column. SharePoint ignores the description if you include it."
    I am not sure if the above statement means that I should be passing the assocaited ID's other than the actual data into the SharePoint List destination. If that is the case, that will not really work as the lookup contains hundreds of rows. Not too mention
    I have several of these lookup column types pointing to several different lists.
    Any guidance in how I can put data into a SharePoint Lookup column type via Data Flow Task would be so much appreaciated.
    Thank you.
    My errors are:
    Error: 0x0 at Data Flow Task, SharePoint List Destination: Error on row ID="1": 0x1 - Unspecified error, such as too many items being updated at once (batch), or an invalid core field value.
    Error: 0xC0047062 at Data Flow Task, SharePoint List Destination [1903]: Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.PipelineProcessException: Errors detected in this component - see SSIS Errors at Microsoft.Samples.SqlServer.SSIS.SharePointListAdapters.SharePointListDestination.ProcessInput(Int32
    inputID, PipelineBuffer buffer) at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper100 wrapper, Int32 inputID, IDTSBuffer100 pDTSBuffer, IntPtr bufferWirePacket)
    Error: 0xC0047022 at Data Flow Task, SSIS.Pipeline: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The ProcessInput method on component "SharePoint List Destination" (1903) failed with error code 0x80131500 while processing input "Component Input" (1912). The identified
    component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will

    I have found a solution to my problem and thought I would share it here in case there are others who are struggling with the above scenario. If you have a better way, I would love to hear about it since my way is a bit tedious.
    In a nutshell, in order to have an SSIS package put data from an OLE DB Source into a SharePoint List Destination Lookup Column, you need to pass the ID of the value that is being looked up, not the value that is in the “master” OLE DB source.
    Rough explanation, OLE DB Source value for column “Approp” is “4005” --> SQL matches “4005” with the ID in the new lookup table (“4005” = ID “5” as defined in the SharePoint lookup list) --> “5” gets passed into SharePoint List destination lookup
    column --> SharePoint displays “4005” and successfully links to the lookup list.
    Funny thing (not really), the error(s) outlined in my original post are not related in getting data into a SharePoint Lookup column as I am now successful in getting data into the system but I am still getting the same above error(s). I think it has to do
    with the ID column in the SharePoint list destination. What I can’t seem to figure out is why since I am not linking any data to that ID column (at least on new records). I am however linking it on Update and Delete and the errors mentioned above disappear
    and things work well.
    There are three tasks that need to get done in order to get data from SQL into a SharePoint lookup column assuming you have already set up your SharePoint lookup lists:
    1. Create new lookup table(s) in SQL that has the IDs from the SharePoint Lookup list and the values coming from the “master” OLD DB Source. You can see the ID column in SharePoint by toggling it on in a view.
    2. Create a SQL command that JOINs all the databases and tables so that the ID is passed and not the value into the SharePoint lookup column
    3. Change the “Data access mode” to “SQL Command” instead of the “Table or view” in the OLE DB Source and paste your command into the “SQL command text:” area.
    Other helpful info is that you may also need to add additional columns in the new lookup tables in SQL for the scenarios when the data is not unique. You can see this two times in my SQL command example for Units and JobTitles:
    SELECT
    pps.SSNm,
    pps.file_updated,
    pps.Employee_id,
    /* pps.CheckDistNm,*/
    Check_Distribution_id = COALESCE( d.ID, 0 ),
    pps.Job_nbr,
    pps.SeqNm,
    pps.action_eff_dt,
    Fund_id = COALESCE( f.id, 0 ),
    Appropriation_id = COALESCE( ap.id, 0 ),
    ActionCode_id = COALESCE( ac.id, 0 ),
    SpecNumber_id = COALESCE( jt.ID, 0 ),
    pps.Employee_id,
    /* pps.Fund,
    pps.Approp,
    pps.Unit,*/
    Unit_id = COALESCE( u.ID, 0 ),
    PosNm,
    PosCode,
    pps.LastName,
    pps.FirstName,
    pps.MI
    FROM
    x_PPS.aReportVw.pps_screens_active AS pps
    LEFT OUTER JOIN dbo.DistributionNumbers AS d ON
    pps.CheckDistNm = d.Check_Distribution
    LEFT OUTER JOIN dbo.Units AS u ON
    pps.Fund = u.Fund AND
    pps.Approp = u.Approp AND
    pps.Unit = u.Unit
    LEFT OUTER JOIN dbo.Appropriations AS ap ON
    pps.Approp = ap.Approp
    LEFT OUTER JOIN dbo.Funds AS f ON
    pps.Fund = f.Fund
    LEFT OUTER JOIN dbo.ActionCodes AS ac ON
    pps.ActionCode = ac.ActionCode
    LEFT OUTER JOIN dbo.JobTitles AS jt ON
    pps.SpecNm = jt.SpecNumber AND
    pps.JurisClass = jt.JurisClass

  • How to insert more than 32k xml data into oracle clob column

    how to insert more than 32k xml data into oracle clob column.
    xml data is coming from java front end
    if we cannot use clob than what are the different options available

    Are you facing any issue with my code?
    String lateral size error will come when you try to insert the full xml in string format.
    public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
      boolean isUpdated = true;
      Connection connection = null;
      try {
      connection = ConnectionManager.getConnection ();
      //connection.setAutoCommit ( false );
      PreparedStatement PREPARE_STATEMENT = null;
      String sqlQuery = "UPDATE " + tableName + " SET " + columnName + "  = ?  WHERE ID =" + id;
      PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
      // converting string to reader stream
      Reader reader = new StringReader ( strContents );
      PREPARE_STATEMENT.setClob ( 1, reader );
      // return false after updating the clob data to DB
      isUpdated = PREPARE_STATEMENT.execute ();
      PREPARE_STATEMENT.close ();
      } catch ( SQLException e ) {
      e.printStackTrace ();
      finally{
      return isUpdated;
    Try this JAVA code.

  • Getting data into an applet

    I am creating an applet to draw graphs.
    I have only made standalone applets before.
    My data will come from a database.
    The user will have the data selected for them, when they select the applet page, the data to be drawn will already have been selected.
    i.e. I only need to give data across in the initialisation stage of the applet.
    What is the standard way to get data into an applet?
    By a giving a file path, by direct contact with the DB, with direct contact with another servlet or by giving the data in the HTML page the Applet is contained in.
    (The data will come from the same server as the applet)
    Maybe somone can point me to a tutorial on this?

    I am currently developing some graph applets, too. At first I implemented direct database access via JDBC, but found out, that this ain't suitable, because you can get in serious trouble with customers who don't want to open database tcp ports in their internal firewall system which - from a security point of view - is a good decision.
    So I gathered information about other methods to get data across the network. RMI needs own ports just like JDBC. Direct access to port 80 would be a good, so one could use Java's network capabilities. But this needs lots of coding on both ends (server and client-applet) and so takes time and is error prone.
    Using SOAP leads to fat applets and so I gave XML-RPC a try. In my case I have an XML-RPC server written in PHP (using the PEAR module see: http://pear.php.net ) and in my applet I use the XML-RPC library from the Apache Group (see: http://ws.apache.org/xmlrpc/ ). This works just fine!
    Pros:
    - small library code in applet (less than 200 KB)
    - only needs one network port. standard is 80 (http) which is almost everywhere available
    - applet code is independent from server code and architecture, as almost every language has some XML-RPC module (other than RMI being a Java-only solution)
    - free of charge & open source
    - reliable
    Cons:
    - based on XML it can slow down things a bit when lots of data has to be sent over a slow network link - but that's more of a general problem in network application development
    - other than SOAP/RMI you can not transmit/access whole objects but only data of primitive types (int, boolean, string, ..), so you have to wrap and unwrap your data
    By now I am very pleased with the decision I made earlier this year. :)

  • Loading data into a CLOB column

    I need to find out how to load about ten sentences of data into a clob column for a table in the database. I have a pl/sql procedure that loads data from an xml file into various tables in the the database. Recently, we added a column (test_dummy) to one of the tables and defined it as a CLOB. There is a corresponding node (detail_info) in the XML file that maps to this column. I need to figure out how to incorporate this in the pl/sql procedure so that the data in the XML file for the node (detail_info) is loaded into "test_dummy". Any ideas?

    Take it one at a time. Use 'extract' function to extract an XML snippet from a given XML. The question couldn't be more vague. Maybe an example would help?
    Rahul

  • Not getting data into 3rd int table

    Hi all,
             here i ve data in 2 internal tables. this data i want store into 3rd internal table, here am adding with inner join but am not getting data into 3rd one.
    plz check my logic.
      REPORT  ZEXCHANGE_RETES                         .
    TABLES : tcurr,           " Exchange Rates
             /msg/rabr.       " Account (Posting Headers)
    DATA : l_date type datum.
    TYPES : begin of t_tcurr,
            kurst like tcurr-kurst,  " Exchange Rate type
            fcurr like tcurr-fcurr,   " From Currrency
            gdatu like tcurr-gdatu,   " Date as of which
        end of t_tcurr.
    TYPES : begin of t_rabr,
            OW_WHGNR like /msg/rabr-OW_WHGNR,
            bil_dat like /msg/rabr-bil_dat,
            abrnr like /msg/rabr-abrnr,
           end of t_rabr.
    TYPES : begin of t_output,
            kurst like tcurr-kurst,
            fcurr like tcurr-fcurr,
            gdatu like tcurr-gdatu,
            OW_WHGNR like /msg/rabr-OW_WHGNR,
            bil_dat like /msg/rabr-bil_dat,
            abrnr like /msg/rabr-abrnr,
           end of t_output.
    DATA : it_output TYPE STANDARD TABLE OF t_output WITH HEADER LINE,
            wa_output TYPE t_output.
    DATA : it_rabr TYPE STANDARD TABLE OF t_rabr WITH HEADER LINE,
            wa_rabr TYPE t_rabr.
    DATA : it_tcurr TYPE STANDARD TABLE OF t_tcurr WITH HEADER LINE,
            wa_tcurr TYPE t_tcurr.
    getting data into 1st itab
    SELECT kurst fcurr gdatu
              from tcurr into table it_tcurr
              where kurst EQ 'M'.
              SORT it_tcurr by  fcurr GDATU DESCENDING.
              delete adjacent duplicates from it_tcurr comparing fcurr.
    getting data into 2nd itab
       SELECT * FROM /msg/rabr into CORRESPONDING FIELDS OF TABLE it_rabr.
        SORT it_rabr BY OW_WHGNR bil_dat abrnr.
    getting data into 3rd itab
    SELECT t~kurst
            t~fcurr
            t~gdatu
            r~OW_WHGNR
            r~bil_dat
            r~abrnr
            FROM tcurr as t INNER JOIN
            /msg/rabr as r on tfcurr EQ rOW_WHGNR into table it_output
            WHERE rabrnr BETWEEN '00000000000000800251' AND '00000000000000800300' AND rbil_dat < wa_tcurr-gdatu.
    printing output
    LOOP at it_output into wa_output.
    WRITE: /10 wa_output-kurst,
             15 wa_output-fcurr,
             25 wa_output-gdatu,
             50 wa_output-OW_WHGNR,
             60 wa_output-bil_dat,
             80 wa_output-abrnr.
    ENDLOOP.
    here am not getting data into 3rd i tab.
      Thanks & Regards,
    sudharsan.

    Hi,
    The select command is the most fundamental function of writing ABAP programs allowing the retrieval of data from SAP database tables.
    Try filling the 3rd internal table with Loop ... Endloop.
    Loop at t_tcurr.
    Read table t_rabr with key field1 = t_tcurr-field1.
    If sy-subrc  = 0.
    Move t_tcurr-field1 = itab_final-field1.
    Move t_tcurr-field2 = itab_final-field2.
    Move  t_rabr -field3 = itab_final-field3.
    Move  t_rabr -field4 = itab_final-field4.
    Append itab_final.
    Endloop.
    Hope this helps you.
    Regards,
    Ruthra

  • Problem in getting data into database with standard direct input program

    HI All,
    I am having problem which is not updating the records in MM01 or MM02 with standard direct input program. i have data in internal table. from that table i am trying to upload into database by using background job MRP_MATERIAL_MASTER_DATA_LOAD.
    when i execute my program it is showing message job is started. then i go into sm37 and seethe job status by executing. there also i am seeing job completed succesfully.
    but if i go to mm03 and find the materials are updated or created there i couldn't find the material numbers which are from internal table.
    So if ny one help me it wil be great.
    Thanks in Advance
    Venkat N

    Hi Anil,
    Thanks for your answer, but i am facing problem is i have material no and denominator and Actual UOM and nominator field values in the flat file.....
    by using RMDATIND direct input program with MRP_MATERIAL_UPLOAD as job name for background job while uploading data into database.
    here i am not getting data in to database, but when i execute the job in sm37 it is showing that message job processing successfully completed...this is my status..
    if u can help me in this it will be gr8ful..
    Thanks,
    Venkat N

  • Problems getting data out of Mocha and into After Effects

    Hi.  I'm using After Effect CS4.  I brought a video clip into Mocha and tracked it.  I've tried copying the data to clipboard and also went back and saved as a text file since I could't paste into After Effects.
    Haven't figured out how to make either method work.
    At first, I'd created a Null Object in AFX and added the COrner Pin Effect, but the paste option is greyed out - doesn't matter if I select the layer or the Corner Pin effect.
    Next I created a solid since I'd seen that mentioned on some threads, but Paste is still greyed out.
    Tried exporting the tracking data as a file from mocha next and have the corner pin data sitting on my desktop as a txt file - but still not sure how to get that into After Effects CS4 - tried this with a null and a solid, but not working.
    Thanks for any suggestions.

    Also - It pastes unmoving data as well into the Postion, Scale, and Rotation of the solid as well as the Corner Pin Effect.
    Yes, AE's corner pin does the same. It's how it is supposed to work. You need to choose the RG Warp compliant variant to only get corner pin data. The rest is too vague. Wee need exact info on what you are doing. Tracks appearing to be static is simply an issue where coordinates are introduced twice and somehow self-compensate, which for all intents and purposes could relate to the previously described issue....
    Mylenium

  • Excel download problem :--- Header data duplicating in unexpected  columns

    Guys, 
       I   am  able  to  download  the  data onto  Excel  with   Header  data  but  the Header data duplicating in unexpected  columns RHS  upto  all  the  line item columns  below....Below  is  partial   excerpt... 
    Please help....
    DATA:
           BEGIN OF excel_wa,
                posnr               TYPE  vbap-posnr,           "Line Item
                matnr               TYPE  vbap-matnr,           "Mat#
                pmatn               TYPE  vbap-pmatn,           "Pric Mat
                zansicat            TYPE  zmarall-zansicat,     "AnsiCat#
                zansigrd            TYPE  zmarall-zansigrd,     "Grade
                zcurrvaltnarea      TYPE  zco002-zcurrvaltnarea,"Val Area
                zcurrcstusd         TYPE  zco002-zcurrcstusd,   "Cost$
                zzbrndnm            TYPE  mara-zzbrndnm,        "Brand
                zqedscgrp           TYPE  zglbprc-zqedscgrp, "QE Disc Grp
                mstav               TYPE  mara-mstav,        "Status
                prodh               TYPE  vbap-prodh,        "Prod Heir
                kwmeng              TYPE  vbap-kwmeng,       "Qty
                lprc                TYPE  konv-kbetr,  "List Price ZBP1
                sprc                TYPE  konv-kbetr,  "Std Pric ZNAA,ZNAX
                netpr               TYPE  vbap-netpr,  "Quot price
                mrgn                TYPE  konv-kbetr,  "margin%
           END   OF excel_wa,
           BEGIN OF sema_wa,
            posnr            LIKE ws-xxlt VALUE 'STRDFT',
            matnr            LIKE ws-xxlt VALUE 'STRDFT',
            pmatn            LIKE ws-xxlt VALUE 'STRDFT',
            zansicat         LIKE ws-xxlt VALUE 'STRDFT',
            zansigrd         LIKE ws-xxlt VALUE 'STRDFT',
            zcurrvaltnarea   LIKE ws-xxlt VALUE 'STRDFT',
            zcurrcstusd      LIKE ws-xxlt VALUE 'STRDFT',
            zzbrndnm         LIKE ws-xxlt VALUE 'STRDFT',
            zqedscgrp        LIKE ws-xxlt VALUE 'STRDFT',
            mstav            LIKE ws-xxlt VALUE 'STRDFT',
            prodh            LIKE ws-xxlt VALUE 'STRDFT',
            kwmeng           LIKE ws-xxlt VALUE 'N00ADD',
            lprc             LIKE ws-xxlt VALUE 'N02ADD',
            sprc             LIKE ws-xxlt VALUE 'N03ADD',
            netpr            LIKE ws-xxlt VALUE 'N02ADD',
            mrgn             LIKE ws-xxlt VALUE 'N00ADD',
          END OF sema_wa,
          BEGIN OF clhd_wa,
            posnr            LIKE ws-xxlt VALUE 'LineItem#',
            matnr            LIKE ws-xxlt VALUE 'Mat#',
            pmatn            LIKE ws-xxlt VALUE 'VC Mat#',
            zansicat         LIKE ws-xxlt VALUE 'AnsiCat',
            zansigrd         LIKE ws-xxlt VALUE 'Grade',
            zcurrvaltnarea   LIKE ws-xxlt VALUE 'ValnArea',
            zcurrcstusd      LIKE ws-xxlt VALUE 'Currency',
            zzbrndnm         LIKE ws-xxlt VALUE 'Brand',
            zqedscgrp        LIKE ws-xxlt VALUE 'QE disc',
            mstav            LIKE ws-xxlt VALUE 'Status',
            prodh            LIKE ws-xxlt VALUE 'Prod Heir',
            kwmeng           LIKE ws-xxlt VALUE 'Qty',
            lprc             LIKE ws-xxlt VALUE 'List Pric',
            sprc             LIKE ws-xxlt VALUE 'St.Disc',
            netpr            LIKE ws-xxlt VALUE 'Quote Price',
            mrgn             LIKE ws-xxlt VALUE 'Margin%',
         END OF clhd_wa,
         BEGIN OF hdtxt1_wa,
            vbeln      LIKE ws-xxlt VALUE 'Quotation#',
            kunnr      LIKE ws-xxlt VALUE 'Quote Date',
            kvgr3      LIKE ws-xxlt VALUE 'Rep Date',
            pltyp      LIKE ws-xxlt VALUE 'Pric List Typ & Currency',
            waers      LIKE ws-xxlt VALUE 'Sold To',
            knuma      LIKE ws-xxlt VALUE 'Ship To',
            datab      LIKE ws-xxlt VALUE 'Top Parent',
            datbi      LIKE ws-xxlt VALUE 'Sales Org/Sales Dist/CPA',
            note       LIKE ws-xxlt VALUE 'Net Sales',
         END OF hdtxt1_wa,
         BEGIN OF hdtxt2_wa,
            vbeln      LIKE ws-xxlt VALUE '',"Quotation#',
            kunnr      LIKE ws-xxlt VALUE '',"Quote Date',
            kvgr3      LIKE ws-xxlt VALUE '',"Rep Date',
            pltyp      LIKE ws-xxlt VALUE '',"Pric List Typ & Currency',
            waers      LIKE ws-xxlt VALUE '',"Sold To',
            knuma      LIKE ws-xxlt VALUE '',"Ship To',
            datab      LIKE ws-xxlt VALUE '',"Top Parent',
            datbi      LIKE ws-xxlt VALUE '',"Sales Org/Sales Dist/CPA',
            note       LIKE ws-xxlt VALUE '',"Net Sales',
         END OF hdtxt2_wa.
    DATA:
          ivbap      LIKE  STANDARD TABLE OF ivbap_wa,
          imat       LIKE  STANDARD TABLE OF mat_wa,
          icurr      LIKE  STANDARD TABLE OF curr_wa,
          ikonv      LIKE  STANDARD TABLE OF konv_wa,
          ivbpa      LIKE  STANDARD TABLE OF ivbpa_wa,
          ikna1      LIKE  STANDARD TABLE OF kna1_wa,
          iresult    LIKE  STANDARD TABLE OF result_wa,
    *Excel tables
          iexcel     LIKE  STANDARD TABLE OF excel_wa,
          isema_wa   LIKE  gxxlt_s,
          it_sema    LIKE  STANDARD TABLE OF gxxlt_s,
          ihkey_wa   LIKE  gxxlt_h,
          it_hkey    LIKE  STANDARD TABLE OF gxxlt_h,
          iotxt_wa   LIKE  gxxlt_o,
          it_otext   LIKE  STANDARD TABLE OF gxxlt_o,
          iptxt_wa   LIKE  gxxlt_p,
          it_ptext   LIKE  STANDARD TABLE OF gxxlt_p,
          ivkey_wa   LIKE  gxxlt_v,
          it_vkey    LIKE  STANDARD TABLE OF gxxlt_v.
    *Field-Symbols
    FIELD-SYMBOLS:
          <vbap>  LIKE   ivbap_wa,
          <vbpa>  LIKE   ivbpa_wa,
          <mat>   LIKE   mat_wa,
          <sema_wa>,
          <clhd_wa>,
          <hdtxt1_wa>,
          <hdtxt2_wa>.
    *Constants
    CONSTANTS:
          c_auart   TYPE  vbak-auart  VALUE  'AG', "AG = Quotn
          c_parvw1  TYPE  vbpa-parvw  VALUE  'AG',
          c_parvw2  TYPE  vbpa-parvw  VALUE  'WE',
          c_parvw3  TYPE  vbpa-parvw  VALUE  'ZT',
          c_kappl   TYPE  konv-kappl  VALUE  'V',
          c_kschl1  TYPE  konv-kschl  VALUE  'ZBP1',
          c_kschl2  TYPE  konv-kschl  VALUE  'ZNAX',
          c_kschl3  TYPE  konv-kschl  VALUE  'ZNAA',
          c_psize   TYPE  i           VALUE  65535.
    *&      SELECTION-SCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK a WITH FRAME TITLE  text-001.
    SELECT-OPTIONS:
        s_vbeln  FOR  ws-vbeln NO INTERVALS NO-EXTENSION OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK a.
    *&      AT SELECTION-SCREEN.
    AT SELECTION-SCREEN.
      PERFORM validate_screen_entries.
    START-OF-SELECTION.
      PERFORM gather_quot_data.
      PERFORM gather_mat_data.
      PERFORM gather_ansi_data.
      PERFORM gather_customer_data.
      PERFORM gather_price_data.
      PERFORM process_consolidate_data.
    TOP-OF-PAGE.
      PERFORM write_header_data.
      PERFORM write_column_heading.
    END-OF-SELECTION.
      SET PF-STATUS 'XLS'.
      PERFORM display_output.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'XLS'.
          LOOP AT iresult INTO result_wa.
            CLEAR excel_wa.
            excel_wa-posnr       = result_wa-posnr.
            excel_wa-matnr       = result_wa-matnr.
            excel_wa-pmatn       = result_wa-pmatn.
            excel_wa-zansicat    = result_wa-zansicat.
            excel_wa-zansigrd    = result_wa-zansigrd.
            excel_wa-zcurrvaltnarea = result_wa-zcurrvaltnarea.
            excel_wa-zcurrcstusd = result_wa-zcurrcstusd.
            excel_wa-zzbrndnm    = result_wa-zzbrndnm.
            excel_wa-zqedscgrp   = result_wa-zqedscgrp.
            excel_wa-mstav       = result_wa-mstav.
            excel_wa-prodh       = result_wa-prodh.
            excel_wa-kwmeng      = result_wa-kwmeng.
            excel_wa-lprc        = result_wa-lprc.
            excel_wa-sprc        = result_wa-sprc.
            excel_wa-netpr       = result_wa-netpr.
            excel_wa-mrgn        = result_wa-mrgn.
            APPEND excel_wa TO iexcel.
          ENDLOOP.
          PERFORM set_up_xxl_structures.
          PERFORM download_xxl.
        WHEN OTHERS.
      ENDCASE.
      FREE: ivbpa, imat, ikna1, ivbap, ikonv, iresult, ws.
    *&      Form  set_up_xxl_structures
          text
    FORM set_up_xxl_structures.
      REFRESH: it_otext, it_sema, it_hkey, it_vkey.
      CLEAR:   result_wa, ivbpa_wa, it_otext, ws.
      MOVE  sy-repid  TO ws-title-repid.
      MOVE 'Section'  TO ws-title-reppart.
      WRITE sy-uzeit  TO ws-title-uzeit USING EDIT MASK '__:__'.
      MOVE  ws-title  TO ws-xxl-title.
      READ TABLE iresult INTO result_wa
                         WITH KEY vbeln = s_vbeln-low.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'AG'.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-soldto.
      CLEAR ivbpa_wa.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'WE'.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-shipto.
      CLEAR ivbpa_wa.
      READ  TABLE  ivbpa INTO ivbpa_wa
                         WITH KEY vbeln = s_vbeln-low
                                  parvw = 'ZT'.
      IF   ivbpa_wa-kunnr EQ space.
        CLEAR ivbpa_wa.
        READ  TABLE  ivbpa INTO ivbpa_wa
                           WITH KEY vbeln = s_vbeln-low
                                    parvw = 'AG'.
      ENDIF.
      CONCATENATE ivbpa_wa-kunnr '/'
                  ivbpa_wa-name1 INTO ws-tparent.
      DO.
        CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
        ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt1_wa TO <hdtxt1_wa>.
        ASSIGN COMPONENT sy-index OF STRUCTURE hdtxt2_wa TO <hdtxt2_wa>.
        IF sy-subrc <> 0.
          EXIT.
        ENDIF.
        CASE <hdtxt1_wa>.
          WHEN 'Quotation#'.
            <hdtxt2_wa> = 'Quotation#'.
          WHEN 'Quote Date'.
            <hdtxt2_wa> = 'Quote Date'.
          WHEN 'Rep Date'.
            <hdtxt2_wa> = 'Rep Date'.
          WHEN 'Pric List Typ & Currency'.
            <hdtxt2_wa> = 'Pric List Typ & Currency'.
          WHEN 'Sold To'.
            <hdtxt2_wa> = 'Sold To'.
          WHEN 'Ship To'.
            <hdtxt2_wa> = 'Ship To'.
          WHEN 'Top Parent'.
            <hdtxt2_wa> = 'Top Parent'.
          WHEN 'Sales Org/Sales Dist/CPA'.
            <hdtxt2_wa> = 'Sales Org/Sales Dist/CPA'.
          WHEN 'Net Sales'.
            <hdtxt2_wa> = 'Net Sales'.
        ENDCASE.
        MOVE : 1           TO ihkey_wa-col_no,
               sy-index    TO ihkey_wa-row_no,
               <hdtxt2_wa> TO ihkey_wa-col_name.
        APPEND ihkey_wa TO it_hkey.
        CLEAR ihkey_wa.
        CASE <hdtxt1_wa>.
          WHEN 'Quotation#'.
            <hdtxt2_wa> = result_wa-vbeln.
          WHEN 'Quote Date'.
            WRITE result_wa-erdat TO ws-dat1.
            <hdtxt2_wa> = ws-dat1.
          WHEN 'Rep Date'.
            WRITE result_wa-repdt TO ws-dat2.
            <hdtxt2_wa> = ws-dat2.
          WHEN 'Pric List Typ & Currency'.
            CONCATENATE result_wa-pltyp '/'
                        result_wa-waers INTO <hdtxt2_wa>.
          WHEN 'Sold To'.
            <hdtxt2_wa> = ws-soldto.
          WHEN 'Ship To'.
            <hdtxt2_wa> = ws-shipto.
          WHEN 'Top Parent'.
            <hdtxt2_wa> = ws-tparent.
          WHEN 'Sales Org/Sales Dist/CPA'.
            CONCATENATE result_wa-vkorg  '/'
                        result_wa-bzirk  '/'
                        ivbpa_wa-kvgr3
                        INTO <hdtxt2_wa>.
          WHEN 'Net Sales'.
            <hdtxt2_wa> = result_wa-netwr.
        ENDCASE.
        MOVE : 2           TO ihkey_wa-col_no,
               sy-index    TO ihkey_wa-row_no,
               <hdtxt2_wa> TO ihkey_wa-col_name.
        APPEND ihkey_wa TO it_hkey.
      ENDDO.
      DO.
        CLEAR: isema_wa, ihkey_wa, iotxt_wa, iptxt_wa, ivkey_wa.
        ASSIGN COMPONENT sy-index OF STRUCTURE sema_wa TO <sema_wa>.
        IF sy-subrc NE 0.
          ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
          IF sy-subrc EQ 0.
            MESSAGE e193 WITH 'OFIL Structures out of synch-Contact IT'.
          ENDIF.
          EXIT.
        ENDIF.
        ASSIGN COMPONENT sy-index OF STRUCTURE clhd_wa TO <clhd_wa>.
        IF NOT <sema_wa> EQ 'NOSHOW'.
          ADD 1 TO ws-xxl-tabix.
          MOVE: ws-xxl-tabix   TO isema_wa-col_no,
                <sema_wa>(3)   TO isema_wa-col_typ,
                <sema_wa>+3(3) TO isema_wa-col_ops,
                ws-xxl-tabix   TO isema_wa-col_src.
          APPEND isema_wa TO it_sema.
          IF ws-xxl-tabix LE ws-xxl-vrtkeys.
            MOVE: ws-xxl-tabix TO ivkey_wa-col_no,
                  <clhd_wa>    TO ivkey_wa-col_name.
            APPEND ivkey_wa TO it_vkey.
          ELSE.
            ADD 1 TO ws-xxl-attcols.
            MOVE: ws-xxl-attcols TO ihkey_wa-col_no,
                  10             TO ihkey_wa-row_no,
                  <clhd_wa>      TO ihkey_wa-col_name.
            APPEND ihkey_wa TO it_hkey.
          ENDIF.
        ENDIF.
      ENDDO.
    ENDFORM.                    " set_up_xxl_structures
    *&      Form  download_xxl
          text
         -->P_IHQEXCEL  text
    FORM download_xxl.  "TABLES  iexcel STRUCTURE excel_wa.
      DESCRIBE TABLE iexcel LINES ws-xxl-count.
      ws-xxl-from = 1.
      ws-xxl-to = c_psize.
      DO.
        IF ws-xxl-from GT ws-xxl-count.
          EXIT.
        ENDIF.
        IF ws-xxl-to GT ws-xxl-count.
          MOVE ws-xxl-count TO ws-xxl-to.
        ENDIF.
        ADD 1 TO ws-xxl-suffix.
        MOVE ws-xxl-suffix TO: ws-xxl-name+6(2),
                               ws-xxl-title+36(2).
        CALL FUNCTION 'XXL_FULL_API'
             EXPORTING
                  n_vrt_keys       = ws-xxl-vrtkeys
                  n_att_cols       = ws-xxl-attcols
                  n_hrz_keys       = ws-xxl-hrzkeys
                  data_starting_at = ws-xxl-from
                  data_ending_at   = ws-xxl-to
                  filename         = ws-xxl-name
                  header_1         = space
                  sema_type        = 'X'
                  so_title         = ws-xxl-title
             TABLES
                  data             = iexcel
                  hkey             = it_hkey
                  online_text      = it_otext
                  print_text       = it_ptext
                  sema             = it_sema
                  vkey             = it_vkey
             EXCEPTIONS
                  data_too_big     = 1
                  file_open_error  = 2
                  file_write_error = 3
                  inv_winsys       = 4
                  inv_xxl          = 5.
        CASE sy-subrc.
          WHEN 1.
            MESSAGE e193 WITH 'dim_mismatch_data'.
          WHEN 2.
            MESSAGE e193 WITH 'file_open_error'.
          WHEN 3.
            MESSAGE e193 WITH 'file_write_error'.
          WHEN 4.
            MESSAGE e193 WITH 'inv_winsys'.
          WHEN 5.
            MESSAGE e193 WITH 'inv_xxl'.
        ENDCASE.
        ADD c_psize TO: ws-xxl-from,
                                ws-xxl-to.
      ENDDO.
    ENDFORM.                    " download_xxl

    Hello Friend,
    You can use GUI_DOWNLOAD FM to get the excel header if that's the only specific requirement.
    [Download Excel including header |Download Excel including header;
    Hope this helps.
    BR,
    Suhas

  • Problem inserting data into database (increment problem)

    I have a servlet page that gets various data from a bean and executes multiple SQL statements to store this data. Beacuase i want to insert data into a number of tables that are related with a one to many relationship I am not using the auto increment function in mySQL. Instead i have created a counter bean that increments each time the servlet is involked. I am using this counter to set the primary key ID in the quesiton table that i insert data into and I am alos inserting it into another table as a foreign key which relates a number or records in the outcomes table to one record in the question table. I am havin a few problems getting it to work.
    Firstly the bean counter works but when the tomcat server is shutdown the counter is reset which will cause conflicts in the database no doubt and secondly even though i have not shut my server down i seem to be getting the following error saying there is a duplicate key even though there is no data in the database.
    Here is the exception.
    javax.servlet.ServletException: Duplicate entry '4' for key 1     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
    org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:469)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.sql.SQLException: Duplicate entry '4' for key 1
    com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
    com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)     com.mysql.jdbc.ServerPreparedStatement.serverExecute(ServerPreparedStatement.java:1366)     com.mysql.jdbc.ServerPreparedStatement.executeInternal(ServerPreparedStatement.java:952)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1974)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1897)     com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1758)     org.apache.jsp.authoring.question_005fmanager.process_005fquestion_jsp._jspService(process_005fquestion_jsp.java:140)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    My code is here
    // gets the feedback string parameters
         if(request.getParameterValues("feedbackBox") != null)
                   String[] feedbackList = request.getParameterValues("feedbackBox");
                   questionData.feedback = feedbackList;
         //gets the session username variable
         String insertQuestion1__username = null;
         if(session.getValue("MM_Username") != null){ insertQuestion1__username = (String)session.getValue("MM_Username");}
         //Creates a new mySQL date
         java.sql.Date currentDate = new java.sql.Date((new java.util.Date()).getTime());
         //goes thorugh each element of the scores array and calculates maxScore 
         questionData.maxScore = 0;
         for (int i = 0; i < questionData.scores.length; i++) {
                   questionData.maxScore = questionData.maxScore + questionData.scores;
         //increments count;
         synchronized(page) {
    appCounter.increaseCount();
         int counter = appCounter.count;
         Driver DriverinsertQuestion = (Driver)Class.forName(MM_connQuestion_DRIVER).newInstance();
         Connection ConninsertQuestion1 = DriverManager.getConnection(MM_connQuestion_STRING,MM_connQuestion_USERNAME,MM_connQuestion_PASSWORD);
         questionData.numOutcomes = questionData.choices.length;
         while (counter != 0)
              int questionID = counter;
              PreparedStatement insertQuestion1 = ConninsertQuestion1.prepareStatement("INSERT INTO Question.question (Question_ID, Topic_ID, Description, Image, Author, Created_Date, Max_Score, Question_Type) VALUES (" + questionID + ", '" + questionData.topicID + "', '" + questionData.questionText + "', '" + questionData.questionImage + "', '" insertQuestion1__username "', '" + currentDate + "', " + questionData.maxScore + ", '" + questionData.questionType + "') ");
              insertQuestion1.executeUpdate();          
         Driver DriverinsertQuestion2 = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertQuestion2 = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         PreparedStatement insertQuestion2 = ConninsertQuestion2.prepareStatement("INSERT INTO Answer.question (Question_ID, Question_Description, Question_Type, Topic, Number_Outcomes, Question_Wording) VALUES ('" counter "', '" questionData.questionLabel "', '" questionData.questionType "', '" questionData.questionType "', '" questionData.topicID "', '" questionData.numOutcomes "', '" questionData.questionText "' ) ");
         insertQuestion2.executeUpdate();
         Driver DriverinsertOutcomes = (Driver)Class.forName(MM_connAnswer_DRIVER).newInstance();
         Connection ConninsertOutcomes = DriverManager.getConnection(MM_connAnswer_STRING,MM_connAnswer_USERNAME,MM_connAnswer_PASSWORD);
         for (int i=0; i < questionData.numOutcomes; i ++)
         PreparedStatement insertOutcomes = ConninsertOutcomes.prepareStatement("INSERT INTO Answer.outcome (Question_ID, Outcome_Number, Outcome_Text, Score, Feedback) VALUES ( '" counter "', '" i "', '" +questionData.choices[i]+ "', '" +questionData.scores[i]+ "', '" +questionData.feedback[i]+ "' ) ");
         insertOutcomes.executeUpdate();
    Does anyone know where i am going wrong or how to fix this problem. I would like to know wheter i am doing this the right way. Is thjis the most practical way to use a counter bean or is there a better safer way to do it.
    Suggestions would be mcuh appreciated
    Thanks

    hi Narendran,
        i declared itab as follows
    DATA:      tb_final TYPE STANDARD TABLE OF ztable,
                       wa_final TYPE ztable.    "work area
    i am populating tb_final as follows:
                 wa_final-vkorg = wa_ycostctr_kunwe-vkorg.
                  wa_final-vtweg = wa_ycostctr_kunwe-vtweg.
                  wa_final-spart = wa_ycostctr_kunwe-spart.
                  wa_final-kunwe = wa_ycostctr_kunwe-kunwe.
                  wa_final-kondm = wa_ycostctr_kunwe-kondm.
                  wa_final-kschl = wa_ycostctr_2-kschl.
                  wa_final-hkont = wa_ycostctr_2-saknr.
                  wa_final-kostl = wa_ycostctr_kunwe-kostl.
            APPEND wa_final TO tb_final.
                  CLEAR wa_final.
    here i am not populating Mandt field.
    finally in tb_final am not getting the proper data .
    kindly help me.
    Thanks,
    Praveena

  • Getting Data INTO XML

    I'm trying to create a class to build an XML file from data that I'm setting inside the class. I'm using a ContentHandler to put the data into a SAXParser. Now I need to use a transformer to put the data into XML. My problem is, it's calling for an InputSource as a SAXSource and I'm not sure how to get the data from the ContentHandler to an InputSource. Can anyone help me with this? I've tried the tutorial and it wasn't much help.
    Linda Shaffer

    You are sending a stream of SAX events to your ContentHandler? By which I mean, you are calling its startElement() method and so on? If so, then here's some code that I use to transform that virtual XML via XSLT:TransformerHandler handler = // a TransformerHandler using that XSLT
    handler.setResult(new StreamResult(whereverYourOutputGoes));
    SAXParserFactory spf = SAXParserFactory.newInstance();
    XMLReader reader = spf.newSAXParser().getXMLReader();
    reader.setContentHandler(handler);
    reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler);
    reader.setFeature("http://xml.org/sax/features/namespaces", true);
    reader.setFeature("http://xml.org/sax/features/namespace-prefixes", false);That's all. The TransformerHandler object is the one on which you should be calling startDocument() and so on; as soon as you call endDocument(), the transformation and output will take place.
    If you aren't transforming, just outputting, then use an identity TransformerHandler.

  • How to download data into  two different columns 2003 excel format in ole

    Hi ALL
    when we download data into excel using ole with delimiter it works fine in 2007 but when we check this with 2003 format
    both fields come in only one column .Can any one suggest  
      CONCATENATE WA_ALL-PERNR LV_ICNUM INTO WA_PERNR SEPARATED BY W_DELI   IN CHARACTER MODE.

    If you're already using OLE, you can fill in value for each cell separately instead of using a delimiter. Something like this fragment:
    FORM fill_cell USING p_row p_col p_value.
      CALL METHOD OF obj_excel 'CELLS' = obj_cell
        EXPORTING
        #1 = p_row
        #2 = p_col.
      SET PROPERTY OF obj_cell 'VALUE' = p_value.
    ENDFORM.                    "fill_cell

  • Function module to get data into internal table from Excel file sheets

    Hi,
    I have to upload customers from excel file.
    we are donloading customer data excel file sheets.
    Customer data in 1 sheet, tax data the other sheet of same excel file, Customer master-Credit data in other sheet of same excel file.
    so i have 3-4 sheet in one excel file.
    now my requirement is to get the data from excel file into internal table.
    is there any function module.
    Thanks & Regards

    I am sending you the idea with an example how you can upload data from an EXCEL file into an internal table. I am not sure if you can take data from different sheet in the same EXCEL file. I think that this is not possible (try it )
    Upload the data into an internal table, like the way that I am describing in the above:
      DATA: L_MAX_COL_NB TYPE I.
      DATA: l_file_name LIKE RLGRAP-FILENAME.
    Just to be sure that is the correct type for the FM.
      l_file_name = P_FILE_NAME.
      L_MAX_COL_NB = 58.  "Maximum nb of colums that the FM can read.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                FILENAME                = l_file_name
                I_BEGIN_COL             = 1
                I_BEGIN_ROW             = 2
                I_END_COL               = L_MAX_COL_NB
                I_END_ROW               = 9999
           TABLES
                INTERN                  = PT_EXCEL
           EXCEPTIONS
                INCONSISTENT_PARAMETERS = 1
                UPLOAD_OLE              = 2
                OTHERS                  = 3.
      IF SY-SUBRC <> 0.
      ENDIF.
    Now you should upload the data into your own itab. The Function Module will return to you all the an itab
    from all fields and columns. Define the structure of the uploading file into SE11 - Data Dictionary. Then read the fieldcatalog of this structure. In the code that I am sending to you, I am insearting an empty line into the internal table and then I am assigning this line into a corresponding field-symbol. Then I am able to change the working area - so and the line of the itab. Propably you could you the statement APPEND INITIAL LINE TO (your_table_name) ASSIGNING <your_field_symbol>, but the example was written in an old SAP version.
      FIELD-SYMBOLS:
                     <F_REC> LIKE WA_UPLOAD_FILE,      "working are of the uploading file
                     <F_FIELD> TYPE ANY.
      DATA: COLUMN_INT TYPE I,
            C_FIELDNAME(30) TYPE C.
      PERFORM GET_FIELDCATOLG TABLES FIELDCAT
                               USING 'ZECO_CHARALAMBOUS_FILE'.
      LOOP AT PT_EXCEL.
        AT NEW ROW.
          ASSIGN WA_UPLOAD_FILE TO <F_REC>.
        ENDAT.
        COLUMN_INT = PT_EXCEL-COL.
        READ TABLE FIELDCAT INTO WA_FIELDCAT INDEX COLUMN_INT.
        CONCATENATE '<F_REC>-' WA_FIELDCAT-FIELDNAME INTO C_FIELDNAME.
        ASSIGN (C_FIELDNAME) TO <F_FIELD>.
        <F_FIELD> = PT_EXCEL-VALUE.
        AT END OF ROW.
          APPEND WA_UPLOAD_FILE TO GT_UPLOAD_FILE.
          CLEAR WA_UPLOAD_FILE.
        ENDAT.
      ENDLOOP.
    With Regards
    George
    Edited by: giorgos michaelaris on Mar 4, 2010 3:44 PM

  • Problem inserting date into MS SQL Server

    I am trying insert date into MS SQL Server database. First I used Statement and when I insert the date only date used to be inserted properly and the time used to be always 12:00:00 AM. I tried PreparedStatement and when I insert I get an error message:
    SQL Error: [Microsoft][ODBC SQL Server Driver]Optional feature not implemented
    I have attached the code.
    GregorianCalendar cal = new GregorianCalendar();
    java.util.Date dtm = (java.util.Date)cal.getTime();
    SimpleDateFormat formatOb = new SimpleDateFormat("dd/MM/yy hh:mm:ss");
    String date= (String)formatOb.format(dtm);
    dateCreated = new java.sql.Date(formatOb.parse(date).getTime());
    PreparedStatement psmt = con.prepareStatement("INSERT INTO Resume (ResumeName, Summary, Skills, OtherInformation, Interests, Memberships, Languages, Category, DateCreated, SupervisorName) VALUES(?,?,?,?,?,?,?,?,?,?)");
    psmt.setString(1, name);
    psmt.setString(2, summary);
    psmt.setString(3, skills);
    psmt.setString(4, info);
    psmt.setString(5, interest);
    psmt.setString(6, member);
    psmt.setString(7, language);
    psmt.setString(8, category);
    psmt.setDate(9, dateCreated);
    psmt.setString(10, loginName);
    psmt.executeUpdate();
    Any suggestions will be really helpful.

    Thanks,
    I changed the field in the database of DateCreated to timestamp, but when I insert the some binary data is inserted into the database. something like 0000000000000017D.
    I installed jtds-0.8.1 driver from source forge. but when try to connect to the database I get an error as:
    Connection refused: connect
    Error: Connection refused: connect
    I have attached the code for setting the driver and url also.
    private String driver = "net.sourceforge.jtds.jdbc.Driver";
    private String url = "jdbc:jtds:sqlserver://TEKKATTE:1433/placement;TDS=7.0";

  • Getting data into a standard eBS form from a custom form

    To automatically enter (existing) customer information into a standard eBS form, we've created a custom query forms. This form queries for a customer and places the customer information into some global variables. This works fine.
    Now, this query forms gets called using the zoom button of eBS.
    First, the custom form got called with call_form. This worked, but after returning from the queryform, the toolbar was not as it was (missing some extra buttons, ect).
    We fixed this issue by using (as stated in the developer guide) fnd_function.execute. This restored the correct toolbar, but no data gets returned into the eBS form. With some testing, it seems our custom code in the custom.pll stops working after the call to fnd_function.execute. When I diagnose the global values, they contain the right information. Can somebody suggest a way to let our custom code continue with processing after a call to fnd_function.execute?

    Is there somebody with some insights into this problem?

Maybe you are looking for

  • How to integrate two plantfloor systems

    Can anybody help me that how to Integrate two plant floor systems

  • Audio won't copy

    I just upgraded to 10.4.4 and I am having trouble bacing up and copying .aiff files. I get error messages stating that the file does not exist or the file name id too long. This happens intermitently when I try to back up to external fire wire drives

  • ?  Lion 10.7

    This is the first time on any Apple Support  Communities I have  Lion 10.7 and Safari 6.05 .   I cannot move the page of Safari at all.  Cannot move it to see the desktop(minor) but cannot move it to see the red,yellow ,green buttons  at the top left

  • Screensaver problem w/iPhoto.

    This is very strange. I go to System Preferences, Desktop & ScreenSaver and choose an iPhoto album to run as a screensaver. Some of the albums display the correct pictures, while other albums display pictures that are not in the selected album. I hav

  • Intercompany Billing - pricing procedure

    Hi, Can somebody please explain to me what is the exact pricing procedure in intercompany billing, where would IV condition type fit in and what sort of pricing procedure to use. If somebody can send screenshots of the steps, it would be of immense h