Skip to Content
author's profile photo Former Member
Former Member

Problem in a Custom screen

Hi Experts,

I am developing a screen in which I have input outpu fields like a table control

filedname1 fieldname2 .... upto fieldname6.

i/oa............. i/o1

i/ob............. i/o2

i/oc............. i/o3

With the above screen. I have to save the data into a database field. I/oa, b, c needs to save into fieldname1 and i/o1, 2, 3 needs to save into fieldname2. How I have to write the logic

Thanks,

bsv.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2008 at 03:37 AM

    hi bsv.......

    consider you have bound.....

    i/oa , b , c to atribute attr1 attr2 attr3 of the context...

    consider the database fields to be db-f1, db-f2 db-f3.

    then.......

    read the attributes to var1, var2, var3....

    db-f1 = var1.

    insert db.

    db-f1 = var2.

    insert db.

    db-f1 = var3.

    insert db.

    same for other fields......

    ---regards,

    alex b justin

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 25, 2008 at 06:46 AM

    Hi bbsv ,

    create an itab and work area of type your db table.

    then the work area is containing fields wa_tbl_name-field1 , wa_tbl_name-field2, wa_tbl_name-field3 etc.

    Now read the node that contains attribures for i/oa............. i/o1

    then

    wa_tbl_name-field1 = stru_nodename- i/oa

    wa_tbl_name-field2 = stru_nodename- i/o2 etc....

    then append wa_tbl_name to itab.

    repeat the step for i/ob , i/oc .....

    insert tyhe final itab to your db table

    Regards

    Sarath

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 29, 2008 at 03:35 AM

    Please reference the following steps:

    1. Create a Node in the context of your View , input the table name in the field 'Dictionary Structure' and select Cardinality '0..n'.

    1a) Options: Create the node in the controller and then map it into your view.

    2. Add a table control into your view in the tab 'Layout'.

    3. Create a binding by right click the table control. Input the field 'Standard Cell Editor' with 'Input Field' or other editable control and click the button 'Context' to add your defined node in the step 1 or 1a).

    3a) Actually you can modify cell editor of every field, remove it and then add it with defining the binding for the field.

    4. Add an button control into your view, and implement the action Onclick. Please find the sample codes to save data to your table in this forum.

    5. Hints of codes:

    Your attributes should be the list: fieldname1, fieldname2, .. , fieldname6.

    Get one element as a struct by

    DATA: Stru_Flight_List type If_Flightlistview=>Element_Flight_List .

    Get elements as a internal table by

    DATA: ITAB_Flight type If_Flightlistview=>Elements_Flight_List.

    You can get codes by code wizard also.

    Hope it clear!

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.