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

input text box

Hi,

I have a input text box on my screen. i want to save all the contents that is typed by the used in this input text box in the ztable..on the click of sav ebutton on my screen how can i do it..?

what should be the field type in the database table which will store this information..?

Thanks

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:49 AM

    hi neha

    u can create a PARAMETER (plz chk da sap abap documentation for sytax) of any data type so whtever data u need to input through the input box u can enter dat and da same can b accesed as variable to get the data, which u can put into database ( this in case you are using list reports.. otherwise chk the post given below which is for modul pool program )

    Edited by: Ashwinee on Dec 23, 2008 12:23 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:51 AM

    Hi,

    Define field type char in ur ztable .

    Put length of ur field is 10 for example

    Define same length input text field in screen and then click on save

    In PAI

    when 'SAVE'

    Use INSERT command

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:55 AM

    Hi Neha ,

    First of all map that field on the screen to the field of the database .

    then goto Pf-status of the screen and activate ur save button .

    then in the PAI on sy-ucomm = 'SAVE'

    write the code to insert into the database .

    Thnks

    Sahil

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:56 AM

    Hi

    you need to declare one variable having same name as your input text field in the dynpro , and assign one FCode for the button you have pasted there , and the field type of DB depends on the input type may char ,

    now check the sy-ucomm syst variable when you click on the save button corresponding fcode will be assigned to the syucomm check it and write code to update the db table with the variable value that you have declared in your program

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 06:57 AM

    Hi,

    First, declare the push button/icon for saving with pfcode 'SAVE'.

    Let us consider the data is stored in input field and consider ztable name as zval and fieldname as field1.

    case sy-ucomm.

    when 'SAVE'

    zval-field1 = v_val1.

    endcase.

    This is only a code skeleton. Hope it helps.

    Saipriya

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 23, 2008 at 09:14 AM

    HI,

    1) Give the name of that button as "SAVE" in the "Application Toolbar" of the GUI status of that screen.

    2) folow below code

    case sy-ucomm.

    when 'SAVE'.

    if p_text is not initial.

    wa_ztab-text = p_text.

    insert ztab from wa_ztab. "(if you want fill the remainng fields of that table as well)

    endif

    endcase.

    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.