Insert value in WWWDATA  table for sending picture in body of email

Hi
.Requrement: Send image in the body of the email.
I am using cl class to sending email and Function module WWW_GET_MIME_OBJECT requre values from table  WWWDATA and WWWPARAMS.
I have image file need to be used in email body for the same i want to entry in the table  wwwdata and wwwparams so that they can be used to fetch url detail.
I am not able to insert value in wwwdata. Anybody having idea about it.
Thanks & Regards,
Ravi Grover
Edited by: Ravi Grover on Jul 27, 2011 12:34 PM

To display the image in other systems you will have to store the image in SMWO(SAP Web Repository)
Then call the function WWW_GET_MIME_OBJECT .
Please check this link to [Upload|http://abap-explorer.blogspot.com/2008/10/how-to-display-picture-in-screen.html] data in SMWO.
Regards
Mishra

Similar Messages

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Facing problem with the code for sending an .xls attachment via email, a field value contains leading zeros but excel automatically removes these from display i.e. (00444 with be displayed as 444).kindly guide .

    Hi Chhayank,
    the problem is not the exported xls. If you have a look inside with Notepad or something like that, you will see that your leading zeros are exported correct.Excel-settings occurs this problem, it is all about how to open the document. If you use the import-assistant you will have no problems because there are options available how to handle the different columns.
    Another solution might be to get familiar with ABAP2XLS-Project. I got in my mind, that there is a method implemented, that will help you solving this problem. But that is not a five minute job
    ~Florian

  • HT1688 I cannot send pictures by message or email anymore, just quit working, but can send to my husbands iphone

    I have not been able to send pictures in messages or email lately, unless I send it to my husband's Iphone.  I never have had a problem before. 

    Hello there, Pablo639.
    The following Knowledge Base article offers up some great steps for troubleshooting mail issues on your Mac:
    OS X Mail: Troubleshooting sending and receiving email messages
    http://support.apple.com/kb/TS3276
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro.

  • SQL Server 2012 Management Studio: Creating a Database and a dbo Table. Inserting VALUES into the table. How to insert 8 Values for future use in XQuery?

    Hi all,
    In my SQL Server 2012 Management Studio (SSMS2012), I tried to create a Database (MacLochainnsDB) and a dbo Table (marvel). then I wanted insert 8 VALUES into the Table by using the following code:
    USE master
    IF EXISTS
    (SELECT 1
    FROM sys.databases
    WHERE name = 'MacLochlainnsDB')
    DROP DATABASE MacLochlainnsDB
    GO
    CREATE DATABASE MacLochlainnsDB
    GO
    CREATE TABLE [dbo].[marvel] (
    [avenger_name] [char] (30) NULL)
    INSERT INTO marvel
    (avenger_name)
    VALUES
    ('Hulk', 1),
    ('Iron Man', 2),
    ('Black Widow', 3),
    ('Thor', 4),
    ('Captain America', 5),
    ('Hawkeye', 6),
    ('Winter Soldier', 7),
    ('Iron Patriot', 8)
    I got the following error Message:
    Msg 110, Level 15, State 1, Line 5
    There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
    How can I correct this problem?
    Please kindly help and advise.
    Thanks in advance,
    Scott Chang
    P. S.
    The reason I tried to create the Database, dbo Table, and then to insert the VALUES is to learn the following thing:
    You can query the entire node tree with the following xquery statement because it looks for the occurrence of any node with the /* search string:
    DECLARE @x xml;
    SET @x = N'<marvel>
    <avenger_name>Captain America</avenger_name>
    </marvel>';
    SELECT @x.query('/*');
    You can query the avenger_name elements from the marvel_xml table with the following syntax:
    SELECT xml_table.query('/marvel/avenger_name')
    FROM marvel_xml;
    It returns the following set of avenger_name elements:
    <avenger_name>Hulk</avenger_name>
    <avenger_name>Iron Man</avenger_name>
    <avenger_name>Black Widow</avenger_name>
    <avenger_name>Thor</avenger_name>
    <avenger_name>Captain America</avenger_name>
    <avenger_name>Hawkeye</avenger_name>
    <avenger_name>Winter Soldier</avenger_name>
    <avenger_name>Iron Patriot</avenger_name>
    You can query the fourth avenger_name element from the marvel_xml table with the following xquery statement:
    SELECT xml_table.query('/marvel[4]/avenger_name')
    FROM marvel_xml;
    It returns the following avenger_name element:
    <avenger_name>Thor</avenger_name>

    Hi Scott,
    The master database records all the system-level information for a SQL Server system, so best practise would be not to create any user-defined
    object within it.
    To change your default database(master by default) of your login to another, follow the next steps so that next time when connected you don't have to use "USE dbname" to switch database.
    Open SQL Server Management Studio
    --> Go to Object explorer(the left panel by default layout)
    --> Extend "Security"
    --> Extend "Logins"
    --> Right click on your login, click "propertites"
    --> Choose the "Default database" at the bottom of the pop-up window.
    --or simply by T-SQL
    Exec sp_defaultdb @loginame='yourLogin', @defdb='youDB'
    Regarding your question, you can reference the below.
    SELECT * FROM master.sys.all_objects where name ='Marvel'
    --OR
    SELECT OBJECT_ID('master.dbo.Marvel') --if non empty result returns, the object exists
    --usually the OBJECT_ID is used if a if statement as below
    IF OBJECT_ID('master.dbo.Marvel') IS NOT NULL
    PRINT ('TABLE EXISTS') --Or some other logic
    What is the sys.all_objects? See
    here.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • To insert N number of values in a table for backup

    Hello experts,
    I need to insert N number of values in a table using
    SQL or PL/SQL. Please help me to do this.
    i have tried this. but not working
    CREATE PROCEDURE P1
    AS
    -- start loop & repeat N times
    INSERT INTO [T1]
        ([Value])
    VALES
        (:value)
    INSERT INTO [T2]
        ([valueID])
    VALUES
        (:IDENTITY)
    -- END LOOP
    END;

    >almost i got the answer.
    Then is it not time to close the thread as mark it Answered ?
    Or, your "almost" requires more ...!
    Regards
    Girish Sharma

  • Need to insert values into a table from a XML file

    Hi,
    I'm an Oracle 9i/10g DBA with quite a few years experience, but I'm new to XML and dealing with it in database terms. I've been given a project that entails pulling XML values out of a file (or 100's of them) and storing them in the database so that they are searchable by end-users. The project is classified as secret so I'm unable to upload the specific XML or any info relating to the structire of the XML or the table I will use to insert the values into - sorry!! So, I've created an XML file with a similar structure to help people understand my predicament.
    The end-users only need to search on a subset of the total amount of columns from the table I'll insert data into, although the XML file has a lot more, so I dont need to store the other values - but I will need to store the name of the XML file (or a pointer to it so I know what XML file a particular set of values belong to) in another column of the table along with its associated values.
    I've been using the XMLTABLE function with some degree of success, although I had better succes using the XMLSEQUENCE function. However, I found out this is deprecated in 10g and replaced with XMLTABLE, so I guess it's better if I use this in case we ever need to upgrade to 11g.
    The main problem I've been having is that some elements in the XML files have multiple values for the one record when all the other records are the same. In terms of storing this in the database, I guess it would mean inserting multiple rows in the table for each element where the value differs. Here is a dumbed down XML file similar to what I've got along with the other SQL I've used:
    +<?xml version="1.0" encoding="UTF-8"?>+
    +<House>+
    +<Warehouse>+
    +<WarehouseId>1</WarehouseId>+
    +<WarehouseName>+
    +<Town>Southlake</Town>+
    +<State>Texas</State>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>25000</Area>+
    +<Docks>2</Docks>+
    +<DockType>Rear load</DockType>+
    +<WaterAccess>true</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Street</Parking>+
    +<VClearance>10</VClearance>+
    +</Warehouse>+
    +<Warehouse>+
    +<WarehouseId>2</WarehouseId>+
    +<WarehouseName>+
    +<Town>Poole</Town>+
    +<State>Dorset</State>+
    +</WarehouseName>+
    +<WarehouseName>+
    +<Town>Solihull</Town>+
    +<County>West Midlands</State>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>40000</Area>+
    +<Docks>5</Docks>+
    +<DockType>Rear load</DockType>+
    +<WaterAccess>true</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Bay</Parking>+
    +<VClearance>10</VClearance>+
    +</Warehouse>+
    +<Warehouse>+
    +<WarehouseId>3</WarehouseId>+
    +<WarehouseName>+
    +<Town>Fleet</Town>+
    +<County>Hampshire</County>+
    +</WarehouseName>+
    +<Building>Owned</Building>+
    +<Area>10000</Area>+
    +<Docks>1</Docks>+
    +<DockType>Side load</DockType>+
    +<WaterAccess>false</WaterAccess>+
    +<RailAccess>N</RailAccess>+
    +<Parking>Bay</Parking>+
    +<VClearance>20</VClearance>+
    +</Warehouse>+
    +</House>+
    CREATE TABLE xmltest OF XMLTYPE;
    INSERT INTO xmltest
    VALUES(xmltype(bfilename('XML_DIR', 'test.xml'), nls_charset_id('AL32UTF8')));
    Consequently, I need to...
    1) Retrieve the results from the XML file for all 3 warehouses where multiple values for the same sub-element are shown as 2 rowsthe result set. (I am guessing there will be 4 rows returned as warehouse sub-2 has 2 different elements for <WarehouseName>.
    2) Build a case statement into the query so that regardless of the sub-element name (i.e State or County), it is returned into the 1 column, for instance County.
    So, if I run a query similar to the following...
    select y.WarehouseId, y.Town, y.County, y.Area
    from xmltest x, xmltable('/House/Warehouse' .......
    I would like to get results back like this...
    ID Town County Area
    1 Southlake Texas 25000
    2 Poole Dorset 40000
    2 Solihull West Midlands 40000
    3 Fleet hampshire 10000
    Sorry for the non-formatting but I hope this all makessense to someone out there with what I'm trying to do.
    I appreciate any help whatsoever because, as i said before, I'm totally new to XML and trying to read the vast amount of information there is out there on XML is all a bit daunting.
    Many thanks in advance,
    Shaun.

    Hi again,
    Thanks for keeping the post open for me. I've had a look at the post illustrating the XFileHandler package, and tried to alter it to make it fit with my XML files. To help explain things, my XML file looks like this:
    <?xml version="1.0"?>
    <!DOCTYPE  CMF_Doc SYSTEM "CMF_Doc.dtd">
    <House>
        <Warehouse>
        <WarehouseId>1</WarehouseId>
        <WarehouseName>
           <Town>Southlake</Town>
           <State>Texas</State>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>25000</Area>
        <Docks>2</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Street</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>House
        <WarehouseId>2</WarehouseId>
        <WarehouseName>
           <Town>Poole</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Solihull</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>40000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>3</WarehouseId>
        <WarehouseName>
           <Town>Fleet</Town>
           <County>Hampshire</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>
    <?xml version="1.0" encoding="UTF-8"?>
    <House>
        <Warehouse>
        <WarehouseId>4</WarehouseId>
        <WarehouseName>
           <Town>Dallas</Town>
           <State>Texas</State>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>25000</Area>
        <Docks>2</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Street</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>5</WarehouseId>
        <WarehouseName>
           <Town>Dorchester</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Solihull</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>40000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>6</WarehouseId>
        <WarehouseName>
           <Town>Farnborough</Town>
           <County>Hampshire</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>
    <?xml version="1.0" encoding="UTF-8"?>
    <House>
        <Warehouse>
        <WarehouseId>7</WarehouseId>
        <WarehouseName>
           <Town>Southlake</Town>
           <State>Texas</State>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>25000</Area>
        <Docks>2</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Street</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>8</WarehouseId>
        <WarehouseName>
           <Town>Bournemouth</Town>
           <State>Dorset</State>
        </WarehouseName>
        <WarehouseName>
           <Town>Shirley</Town>
           <County>West Midlands</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>30000</Area>
        <Docks>5</Docks>
        <DockType>Rear load</DockType>
        <WaterAccess>true</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>10</VClearance>
      </Warehouse>
      <Warehouse>
        <WarehouseId>9</WarehouseId>
        <WarehouseName>
           <Town>Clapham</Town>
           <County>London</County>
        </WarehouseName>
        <Building>Owned</Building>
        <Area>10000</Area>
        <Docks>1</Docks>
        <DockType>Side load</DockType>
        <WaterAccess>false</WaterAccess>
        <RailAccess>N</RailAccess>
        <Parking>Bay</Parking>
        <VClearance>20</VClearance>
      </Warehouse>
    </House>And the XFilehandler package looks like this (I'm just trying to do a simple select only on WarehouseId & WaterAccess for the time being to keep things simple):
    create or replace package XFileHandler as
      TYPE TRECORD IS RECORD (
        WID     NUMBER(2)
      , WACCESS VARCHAR2(5)
      type TRecordTable is table of TRecord;
      function getRows (p_directory in varchar2, p_filename in varchar2) return TRecordTable pipelined;
    end;
    create or replace package body XFileHandler is
      function getRows (p_directory in varchar2, p_filename in varchar2)
       return TRecordTable pipelined
      is
        nb_rec          number := 1;
        tmp_xml        clob;
        tmp_file         clob;
        rec               TRecord;
      begin
        DBMS_LOB.CREATETEMPORARY(TMP_FILE, TRUE);
        tmp_file := dbms_xslprocessor.read2clob(p_directory, p_filename);
        LOOP
          tmp_xml := regexp_substr(tmp_file, '<\?xml[^?]+\?>\s*<([^>]+)>.*?</\1>', 1, nb_rec, 'n');
          exit when length(tmp_xml) = 0;
          --dbms_output.put_line(tmp_rec);
          nb_rec := nb_rec + 1;
        select y.WID, y.WACCESS
        into rec.WID, rec.WACCESS
        from xmltable('/House' passing xmltype(tmp_xml)
                      columns WID NUMBER(2) PATH 'Warehouse/WarehouseId',
                                  WACCESS VARCHAR2(5) PATH 'WaterAccess') y;
          pipe row ( rec );
        end loop;
        dbms_lob.freetemporary(tmp_file);
        return;
      end;
    end;Now, when I run the query:
    select * from table(XFileHandler.getRows('XML_DIR', 'XFileHandler_test.xml'));I get the error: ORA-00600: internal error code, arguments: [17285], [0x5CFE8DC8], [4], [0x45ABE1C8], [], [], [], []
    I had a look in the dump file for anything obvious, but nothing really stands out. Is there anything obvious in my code that I'm missing or something else which you may think could be causing this error, e.g in the regular expression regexp_substr?
    Many thanks,
    Shaun.

  • Inserting values in a table

    I have a table "xyz" with two columns.
    code id
    1
    1
    2
    3
    4
    5
    6
    The columns id is null and has no constraints.
    I need now to insert values in id just like
    code id
    1       1
    1       2
    2       3
    3       4
    4       5
    5       6
    6       7How to do that?
    Thanks

    Hey guys,
    Thanks for the reply.
    I create a cursor as
    declare
    j number :=1;
    begin
    for i in (select code from a order by code) loop
    insert into a (id) values(j);
    j:=j+1;
    end loop;
    end;but this insert values as:
    SQL> select * from a;
          CODE         ID
             1
             1
             2
             3
             4
             5
             6
                        1
                        2
                        3
                        4
          CODE         ID
                        5
                        6
                        714 rows selected.

  • Inserting values into multiple tables in one jsf page with single commit op

    hi all,
    i have two tables ,
    one is parent table and other is child record.
    record details:
    table1:(parent table)
    emplid (primary key)
    empl_name
    table 2:(child table)
    empl id ( Foreign key)
    empl_name ( Foreign key)
    contact_no (primary key)
    my senario is , i need insert values into both parent and child table in one save option.
    and both the tables will be in one jsf page.
    is this possible to do?
    thanks all,
    regards,
    M vijayalakshmi

    hi,
    i feel my question is not clear.
    let me explain my question clearly.
    1. i have two records
    *1. emp_names*
    attributes of this table is 1.emplid
    2.emp_name.
    emplid is a primary key.
    2. emp_contact
    attributes of this table is 1.emplid
    2. contact_no
    In this table emplid is forigen key from emp_name table
    contact_no is primary key.
    and my senerio is,
    for one emplid there are many contact no.
    in database diagram i have created these two entities. and from that i have generated two views objects.
    now in jsf page ,
    i shd have all fields from both the records.
    wn ever i click on add button , i shd be able to insert one complete row of data to both the tables.
    means,
    emplid
    empl_name
    contact_no.
    and if i click on commit button data shd be insert in both the tables.
    so how to achive this?
    am very beginner to the jdeveloper tool.
    regards,
    m vijayalakshmi.

  • Insert values to one table based on a value inserted into another table

    Hi,
    I've got a form based off a report which creates a new project. I've added an additional process to this form to insert four new values into another table as soon as the new project is created and the PK for that project is generated. This was working last week (of course!) and now seems to not work at all. It's complaining that the PK I was getting from my first insert was null. Here is one the the statements in my process I'm trying to run:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    The complaint I get that it's getting null where :P45_PROJECT_SEQ should be.
    Thoughts?
    Thanks,
    Jon

    Hi Andy,
    Thanks for the tip. Those two values didn't match and I updated them so they do and I'm still getting a "cannot insert NULL..." error.
    When I turn on debug I see that I'm getting the PK and I see the value. Here's my debug output:
    0.24: ...Process "Get PK": PLSQL (AFTER_SUBMIT) declare function get_pk return varchar2 is begin for c1 in (select PROJECT_SEQ.nextval next_val from dual) loop return c1.next_val; end loop; end; begin :P45_PROJECT_SEQ := get_pk; end;
    0.25: ...Session State: Saved Item "P45_PROJECT_SEQ" New Value="252"
    0.25: ...Process "Process Row of PROJECT": DML_PROCESS_ROW (AFTER_SUBMIT) #OWNER#:PROJECT:P45_PROJECT_SEQ:PROJECT_SEQ|IUD
    0.26: ...Session State: Save "P45_PROJECT_SEQ" - saving same value: "252"
    0.26: ...Process "reset page": CLEAR_CACHE_FOR_PAGES (AFTER_SUBMIT) 45
    0.27: Nulling cache for application "120" page: 45
    0.27: ...Process "Add Week Groups": PLSQL (AFTER_SUBMIT) insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER); insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY') +
    0.28: Encountered unhandled exception in process type PLSQL
    0.28: Show ERROR page...
    0.28: Performing rollback...
    I notice that when it runs my process "Add Week Groups" it's not displaying all of the SQL. But the SQL is fine, it's right here:
    insert into week_group values(week_group_seq.nextval, (SELECT trunc(NEXT_DAY(SYSDATE, 'FRIDAY')) FROM dual), 0, '', :P45_PROJECT_SEQ, sysdate, :APP_USER);
    Hmmm....what about the "reset page" action in the last of the 0.26 lines?
    Thanks,
    Jon

  • How to Insert values in virsa_cc_config table?- Post Installation of RAR5.3

    Hi Experts,
    We checked in the debugger that the values 105,106 &107 are not added in the virsa_cc_config table.
    Where to add the values in the table? In J2ee database or in server database (which is oracle for us)? When we searched in oracle data base this table doesnot exist.
    So we believe it has to be inserted in J2EE database. If yes, can somebody help us how to check and insert the values in the respective table in J2ee database
    Thanks and Best Regards,
    Srihari.K

    Dear Sri,
    Yes this table resides in database where GRC is installed.
    To insert these lines, you need to login into GRC server-
    if it is windows goto -
    sqlplus /nolog
    connect /as sysdba
    run this command
    INSERT INTO SAPSR3DB.VIRSA_CC_CONFIG (CNFGPARAM, CNFGSEQ, CNFGVALUE) VALUES
    ('105', 0, 'http')
    INSERT INTO SAPSR3DB.VIRSA_CC_CONFIG  VALUES ('106', 0, '<port number>', 'J2EE Engine Port')
    INSERT INTO SAPSR3DB.VIRSA_CC_CONFIG  VALUES (107, 0,'http://<fully qualified hostname>:<port number>/webdynpro/dispatcher/sap.com/grc~ccappcomp/BgJobStart','BgJobStart URL')
    Commit;
    Put your hostname and port accordingly and run.
    Let me know if it works.
    Regards,
    Sabita

  • Insert value in a table through forms

    hello friends,
    I have table "log" with following fields.
    SQL> desc log;
    Name Null? Type
    IN_HR NUMBER
    IN_MIN NUMBER
    OUT_HR NUMBER
    OUT_MIN NUMBER
    DAYHR NUMBER
    DAYMIN NUMBER
    LOGUSER VARCHAR2(20)
    I created one form "user_activity" with two buttons named "IN" and "OUT"..
    when i press "IN" button i want to store follwing in LOG table..
    LOGUSER----> This should store the global variable value derived from another form called "login_main"...Actually i called "user_activity" form from "login_main" with global variable..this global variable have the username who is currently logged in...But my problem is i cant insert this value..
    NOTE: pls tell me how can i check this global variable is hold value or not...
    IN_HR---> This is successfully updated in log table..
    in_min--> This is successfully updated in log table..
    Pls help me how to store this global variable value into log table... my actual code is follows..I write this code in "when-button-pressed"trigger of "IN" Button..
    <code>
    declare
         name varchar2(30);
    begin
         name:=:global.username;
         insert into log(loguser)values(name);
    commit;
    :CUSTOMER.IN_TIME:=to_char(sysdate,'hh24:mi:ss');
    update log set in_hr=round(to_number(to_char(sysdate,'HH24'))),
    in_min=round(to_number(to_char(sysdate,'mi')))
    where loguser=name;
    commit;
    end;
    <\code>

    Hello,
    please don't open multiple threads for the same question. It only adds confusion to those willing to help you, and you won't get quicker answers when posting questions more then once.
    Also, mostly solutions to problems are version dependend, so the very first thing you should do is to provide the involved versions (database, forms, java, OS; remember that oracle products have 5 digit version numbers; 10g is not a version number, 10.2.0.5 is; also "Windows" has a lot of flavors; "Windows 3.11" is also "Windows", so don't say just "Windows"). Even if you think a solution isn't version dependend provide the involved versions. It isn't much effort on your side and saves us a question roundtrip when it is needed anyway.
    after that you didn't give us much to work with except a - sorry but I don't have any other word for this - ill data model where you seem to want to reinvent the date datatype and some code which seem to compile (no I didn't try it). Oh, and the fact that "it didn't work". Did you debug your code? How do you populate your global variable? Did you inspect your global variable before the insert? Also what should be stored in your global? is it the current logged on oracle user? You could simply use user to get this and forget about the global
    Oh, and before I forget it:
    please, don't reinvent the date datatype, and fix your data model.
    loguser varchar2(20)
    in_date date
    out_date date
    insert into log(loguser, in_date) values (user, sysdate);
    commit;no muss, no fuss and about 20% of the amount of code you wrote.
    cheers

  • RFC to insert values to a table.

    Hello ABAP Experts-
    I am pretty new to ABAP devlopment. Recently, I got access where I can develop ABAP program.
    Can any one give me steps in writing a program to insert values to Ztable. I want to use this ABAP program in File to RFC scenarion in XI.
    I really appreciate your help.
    Thanks,
    Raj.

    Hi...
    check this code.
    DATA : wa1 type Ztable.
    Here it_tab and wa_tab are your internal table and work area.
    loop at it_tab into wa_tab.
    move wa_tab-vbeln to wa1-vbeln.
    insert Ztable from wa1.
    Please get back to me if you have any concerns.
    Thank you.
    Regards,
    Lokeswari.

  • To insert values in same table

    hi,
      based on date difference  i want insert the data  in same table
    eg: if date diff is 2
      i want insert 2 rows in a same table
    how to resolve this
    Edited by: hareeshKR on Oct 1, 2011 9:10 AM

    Hi,
    Please explain further what is your goal, what table are trying to add?
    Because inserting data in a table is not supported.
    Thanks.
    Clint

  • XML Parser to insert values into a Table??

    Hi All,
    Bare with me I am new to xml technology, but apparently there's request to parse a xml file and store data in a oracle table.
    Appreciate if someone can help me to resolve this please??
    I am using Oracle 10g.
    This is the xml file which I need to parse.
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <PBOOKS>
    <BOOK>
    <KEY>0061319821</KEY>
    <ISBN>0-061-31982-1</ISBN>
    <![CDATA[<TTL>All Our Kin</TTL>]]>
    <![CDATA[<SUBTTL>Strategies For Survival In A Black Community</SUBTTL>]]>
    <![CDATA[<PAGES>192</PAGES>]]>
    </BOOK>
    </PBOOKS>
    I have a Oracle Table ( table name: Perseu ) to hold the values of this file:
    These are the fields:
    Key, ISBN, TTL, SUBTTL, Pages

    Due to the somewhat strange structure of the XML (Elements embedded inside the CDATA sections, do you have any idea why this is being done ?) the best I can come up with is
    SQL> drop table test
      2  /
    Table dropped.
    SQL> create table test of XMLType
      2  /
    Table created.
    SQL> insert into test values ( XMLTYPE(
      2  '<PBOOKS>
      3     <BOOK>
      4             <KEY>0061319821</KEY>
      5             <ISBN>0-061-31982-1</ISBN><![CDATA[<TTL>All Our Kin</TTL>]]><![CDATA[<SUBTTL>Strategies For Survival In A Black Community</S
    UBTTL>]]><![CDATA[<PAGES>192</PAGES>]]></BOOK>
      6  </PBOOKS>'))
      7  /
    1 row created.
    SQL> select BOOK, ISBN,
      2         extractValue(CDATA,'/CDATA/TTL') TTL,
      3         extractValue(CDATA,'/CDATA/SUBTTL') SUBTL,
      4         extractValue(CDATA,'/CDATA/PAGES') PAGES
      5    from (
      6           select extractValue(value(BOOK),'/BOOK/KEY') BOOK,
      7                  extractValue(value(BOOK),'/BOOK/ISBN') ISBN,
      8                  xmlType('<CDATA>' || extractValue(value(BOOK),'BOOK/text()') || '</CDATA>') CDATA
      9             from test,
    10                  table(xmlsequence(extract(object_value,'/PBOOKS/BOOK'))) book
    11         )
    12  /
    BOOK
    ISBN
    TTL
    SUBTL
    PAGES
    0061319821
    0-061-31982-1
    All Our Kin
    BOOK
    ISBN
    TTL
    SUBTL
    PAGES
    Strategies For Survival In A Black Community
    192
    SQL>
    SQL>
    SQL>

Maybe you are looking for

  • Mac Book Pro-- no content in half of sent e-mails?

    Mac Book Pro--why do half of my recipients receive no content in my e-mails?

  • Input Tax code from logical partner LS but not from indiv vendor partner LI

    Hi, Find that tax code at vendor invoice is being taken from logical partner (LS) , but not from the individual vendor partner number (LI) . Bothe the partners are maintained in WE20 , OBCA , OBCD & OMRY. Like to know the reason / setting to pick up

  • Existent components disabled for maintenance, EPM 11.1.2.2 11.1.2.3

    I'm trying to do a maintenance release installation of EPM 11.1.2.3 on top of 11.1.2.2 and am getting "ERROR: There are existent components that are disabled for maintenance install.  Please, review the reasons why the components are disabled, resolv

  • 8K Database Block Size in 11.5.2

    The Release Notes for 11.5.2 state the minimum database block size is 8K. However, this was not a requirement for 11.5.1 and instead patch 1301168 was created for customers with a database block size less than 8K. In 11.5.2 is it MANDATORY that the d

  • Files opened in random order

    Hi Why the heck when you open a bunch of files in iPhoto, Photoshop, or whatever, do you get them in random order instead, like in Classic, in their name order? And it's a different order each time. It can be very itching when you want to apply certa