How can I set the data binding between Web Dynpro & Database table

Dear friend,
I am a beginner of Web Dynpro. I want to develop my simple project like these:
1. Create my own database table via Dictionary Project such as TAB_USER and have 3 fields: USER_ID, USER_NAME, USER_POSITION and I have already deployed & archived it.
2. Create my own Web Dynpro Project, and create the input fields as User ID, User name, User position and icon 'Save' on the selection screen and I have deployed it already.
For the process, I want to input data at the screen and save the data in the table, please give me the guide line like these:
1. How can I set the data binding between Web Dynpro and Database table ?
2.  Are there any nescessary steps that I will concern for this case?
Sorry if my question is simple, I had try  to find solution myself, but it not found
Thanks in advances,
SeMs

Hi,
You can write your own connection class for establishing the connection with DB.
Ex:
public class  ConnectionClass {
static Connection con = null;
public static Connection getConnection() {
try{
Context ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("jdbc/TSPAGE");
con = ds.getConnection();
return con;
}catch(Exception e){
return null;
You can place the above class file in src folder and you can use this class in webdynpro.
You can have another UserInfo class for reading and writing the data into the DB .
Regards, Anilkumar
PS : Refer
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/java/simple java bean generator for database.pdf
Message was edited by: Anilkumar Vippagunta

Similar Messages

  • How can we do the data migration between Oracle Applications and SAP R/3.

    Hi All,
    How can we do the data migration between Oracle Applications and SAP R/3 system.What are all the possible ways to move bulk data from Oracle Apps to SAP r/3 system.
    Provide any 3rd party tools which supports data migration and also pls rpovide the SAP's own data migration tools with supports the above feature.
    Awaiting for best possible solution.
    Thanks in advance.
    Regards
    Dharmaraju

    the 3rd party tool is ETL , you can use ETL tool and the prepare the load files then you can use LSMW method to upload the data to SAP.

  • How can i set the date time year to my i pod

    how can i set the date time year to my i pod touch

    Hello Theodora,
    You can do this via your iPod's Settings application.
    B-rock

  • How can i export the data to excel which has 2 tables with same number of columns & column names?

    Hi everyone, again landed up with a problem.
    After trying a lot to do it myself, finally decided to post here..
    I have created a form in form builder 6i, in which on clicking a button the data gets exported to excel sheet.
    It is working fine with a single table. The problem now is that i am unable to do the same with 2 tables.
    Because both the tables have same number of columns & column names.
    Below are 2 tables with column names:
    Table-1 (MONTHLY_PART_1)
    Table-2 (MONTHLY_PART_2)
    SL_NO
    SL_NO
    COMP
    COMP
    DUE_DATE
    DUE_DATE
    U-1
    U-1
    U-2
    U-2
    U-4
    U-4
    U-20
    U-20
    U-25
    U-25
    Since both the tables have same column names, I'm getting the following error :
    Error 402 at line 103, column 4
      alias required in SELECT list of cursor to avoid duplicate column names.
    So How can i export the data to excel which has 2 tables with same number of columns & column names?
    Should i paste the code? Should i post this query in 'SQL and PL/SQL' Forum?
    Help me with this please.
    Thank You.

    You'll have to *alias* your columns, not prefix it with the table names:
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id, b.id, a.val1, b.val1, a.val2, b.val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
      for rData in cData loop
    ERROR at line 18:
    ORA-06550: line 18, column 3:
    PLS-00402: alias required in SELECT list of cursor to avoid duplicate column names
    ORA-06550: line 18, column 3:
    PL/SQL: Statement ignored
    $[CHE_TEST@asterix1_impl] r
      1  declare
      2    cursor cData is
      3      with data as (
      4        select 1 id, 'test1' val1, 'a' val2 from dual
      5        union all
      6        select 1 id, '1test' val1, 'b' val2 from dual
      7        union all
      8        select 2 id, 'test2' val1, 'a' val2 from dual
      9        union all
    10        select 2 id, '2test' val1, 'b' val2 from dual
    11      )
    12      select a.id a_id, b.id b_id, a.val1 a_val1, b.val1 b_val1, a.val2 a_val2, b.val2 b_val2
    13      from data a, data b
    14      where a.id = b.id
    15      and a.val2 = 'a'
    16      and b.val2 = 'b';
    17  begin
    18    for rData in cData loop
    19      null;
    20    end loop;
    21* end;
    PL/SQL procedure successfully completed.
    cheers

  • How can I set the date today as default value in a parameter?

    Hi,
    I have in my report a date parameter and I want to set as default value the date today.
    How can I do this?
    Thanks in advance

    If you are using a datatemplate , you can have a beforereport trigger that will have a package call.
    In the package spec, define a date variable and also define the function beforereporttrigger that retruns boolean.
    In the body, define the beforereporttrigger function with
    begin
    select sysdate into specvariable from dual
    return(true);
    end;
    You can then use the variable in the datatemplate as :variable.
    Hope this helps.
    - Vasu -

  • How can I set the date of my PC using Java?

    Which class has the function to set system date and time.
    Thanks in advance.

    but the following sentence
    Process p=Runtime.getRuntime().exec("date
    11-03-2002");
    always throw IOExecption error
    java.io.IOException: CreatePreocess:date 11-03-2002
    error=0
    and why?
    How to settle it?
    'date' is an internal command which means you need a shell to run it. Depending on the OS this will either be 'cmd' or 'command'. If you search the forums with the following keywords you will find examples on how to use this: "exec", "Runtime", "cmd" or "command"

  • How can I set the date field to auto populate the current date?

    I have many forms to create where the current date dictates a specific change in options or conditions for the form filler to follow. I cannot see any way to handle that issue. Is it possible to simply set the current date as a default?
    jcytrny

    Sorry, we currently do not support having today's date show up in a date field by default
    Randy

  • How can I get the data array from SQL Server Database?

    Hi,
    I can write a data array(2D)into a table of my SQL Server Database. The data array was writen to a column with image type. I know a data array is transformed a binary string when writing into database, but I dont know how to get the data array when I fetch the binary string from database.
    My question is:
    How to transform the binary string into data array? which vi's should I use? I have tried unflatten from string but failed.
    Any response is appriciated.
    Red

    happyxh0518 wrote:
    > I can write a data array(2D)into a table of my SQL Server Database.
    > The data array was writen to a column with image type. I know a data
    > array is transformed a binary string when writing into database, but I
    > dont know how to get the data array when I fetch the binary string
    > from database.
    >
    > My question is:
    > How to transform the binary string into data array? which vi's should
    > I use? I have tried unflatten from string but failed.
    In order to use Unflatten from string you first need to Flatten it
    before writing it. Also depending on the database driver, the returned
    data may actually not be binary but Hexadecimal encoded ASCII which you
    would first have to decode to binray.
    Rolf Kalbermatter
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How can I set the Lock Model and data structure ?

    Hi ,
    I just have two questions about JE:
    1) Is there some method for me to set the lock mode level , such as record lock, page lock and database lock in JE?
    2) I learned that there are Btree and Hash,etc , data structures , How can I set the data structure when using JE ?
    Thanks in advance !
    Chris

    I think you're confusing our DB (C-based product) with JE. JE does not have lock mode levels, page locks (it does not have pages), or database locks. JE only has the BTREE method, it does not have the HASH method. For JE, please be sure to reference the JE doc page:
    http://www.oracle.com/technology/documentation/berkeley-db/je/index.html
    --mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can you set the ctxsvr time interval ?

    I would like to know how can i set the time
    inteval between each update of the Intermadia
    indexes.
    Thanks.

    stop and restart ctxsrv on specified intervals.
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Lombar vincent ([email protected]):
    I'd like to use the ctxsrv utility, because i want automatic index rebuild.
    But Is it possible to set the time interval
    between each update?<HR></BLOCKQUOTE>
    null

  • How can I set the insert date to auto update in Pages 5.2.2

    how can I set the insert date to auto update in Pages 5.2.2
    I am attempting to have the date in header auto update in a Pages file.
    I can insert it, but where is the AUTO UPDATE selection
    OS10.9.4
    thank you

    Apple never included the auto-update feature for dates in Pages v5.2.2. You would have to single-click the date, and deliberately update it.
    If you have Pages ’09 v4.3 in /Applications/iWork '09, then it will allow you to configure auto-update of the date field. Right-click on the date, set the format, and click the selection for automatically update on open.

  • How can i set the space between two button?

    Hello,
    I have
    <mx:HBox>
    <mx:Button label="one" />
    <mx:Button label="two" />
    </mx:HBox>
    how can i set the distance between this two compotents?
    Thanks

    quote:
    Originally posted by:
    robinbouc77
    Hi,
    you can use horizontalGap property on HBox to change the
    space between your buttons. I think the default value is 6. You can
    also use <mx:Spacer/>, but changing the gap on HBox is
    probably the cleanest way ;)
    C U
    perfect!!! works fine

  • I just bought my apple tv and it says that it can't set the date and time? How do i fix this?

    I just bought my apple tv and it says that it can't set the date and time? How do i fix this?

    Welcome to the Apple Community.
    A number of users have encountered this problem, for existing users the problem has largely been resolved by restarting the Apple TV. However since you are a new user it would be wise to check that your settings are correct to begin with. Ensure the router allows access over port 123 (TCP) and that you are using the DNS settings provided by the ISP and not your own.

  • How can we give the Data Format (File Type ) in Runtime

    Hi all,
    How can we give the Data Format (File Type ) in Runtime for the following method,
    cl_gui_frontend_services=>gui_download.
    Thanks in advance
    Sri

    There is a filetype parameter which you can set
    CALL METHOD cl_gui_frontend_services=>gui_download
      EXPORTING
    *    BIN_FILESIZE              =
        filename                  =
    *    FILETYPE                  = 'ASC'
    *    APPEND                    = SPACE
    *    WRITE_FIELD_SEPARATOR     = SPACE
    *    HEADER                    = '00'
    *    TRUNC_TRAILING_BLANKS     = SPACE
    *    WRITE_LF                  = 'X'
    *    COL_SELECT                = SPACE
    *    COL_SELECT_MASK           = SPACE
    *    DAT_MODE                  = SPACE
    *    CONFIRM_OVERWRITE         = SPACE
    *    NO_AUTH_CHECK             = SPACE
    *    CODEPAGE                  = SPACE
    *    IGNORE_CERR               = ABAP_TRUE
    *    REPLACEMENT               = '#'
    *    WRITE_BOM                 = SPACE
    *    TRUNC_TRAILING_BLANKS_EOL = 'X'
    *  IMPORTING
    *    FILELENGTH                =
      changing
        data_tab                  =
    *  EXCEPTIONS
    *    FILE_WRITE_ERROR          = 1
    *    NO_BATCH                  = 2
    *    GUI_REFUSE_FILETRANSFER   = 3
    *    INVALID_TYPE              = 4
    *    NO_AUTHORITY              = 5
    *    UNKNOWN_ERROR             = 6
    *    HEADER_NOT_ALLOWED        = 7
    *    SEPARATOR_NOT_ALLOWED     = 8
    *    FILESIZE_NOT_ALLOWED      = 9
    *    HEADER_TOO_LONG           = 10
    *    DP_ERROR_CREATE           = 11
    *    DP_ERROR_SEND             = 12
    *    DP_ERROR_WRITE            = 13
    *    UNKNOWN_DP_ERROR          = 14
    *    ACCESS_DENIED             = 15
    *    DP_OUT_OF_MEMORY          = 16
    *    DISK_FULL                 = 17
    *    DP_TIMEOUT                = 18
    *    FILE_NOT_FOUND            = 19
    *    DATAPROVIDER_EXCEPTION    = 20
    *    CONTROL_FLUSH_ERROR       = 21
    *    NOT_SUPPORTED_BY_GUI      = 22
    *    ERROR_NO_GUI              = 23
    *    others                    = 24

  • How can we acess the data of one component into othr compnent in webdynpro?

    How can we acess the data of one component into other component in webdynpro....
    I need an Field input from one webdynpro component(comp1) which is away from the line of process to the other component(comp2) we need that data........I mean i need the field info of comp1 where we doesn't navigate through the Comp1 in the portal & directly access the component comp2.........kindly share your ideas.....and possible ways .........
    any doughts do post.....
    thanks in advance!

    Hi Reddy,
    You can do it in multiple ways. One way would be to try transfer the parameters through URL & the other would be to work with the concept of interface nodes. Please try go through these 2 threads ( [Thread 1|Call view of another WDA Component and pass the value to it; & [Thread 2|navigation from one program to another; )where I have explained about working with Interface node in detail. You can refer to this [thread |receving parameters between two standard webdynpro applications;to see as to how you can do the same via parameters in URL.  Hope it would help resolve your problem.
    Regards,
    Uday

Maybe you are looking for