Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

input text box

Former Member
0 Kudos

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

6 REPLIES 6

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

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.