2009 Feb 02 5:32 AM
Hi frieds,
I have a problem. I m making module pool program. In have a a text field.
In this text field i need to give some default letters like 'MH/12345/______'.
When we run the screen this default letters should be defaultly display
and insteed of the blank place(_____)user input some value.
When user will press save button this text filed will save on database table along with default letters.
Thanks in advance.
Swapnika
2009 Feb 02 5:37 AM
Hi.
do this
parameters: text(15).
initialization.
text = 'MH/12345/'.
2009 Feb 02 5:40 AM
2009 Feb 02 5:47 AM
and for saving record and showing push button add the following code
PARAMETERS: text(15).
INITIALIZATION.
text = 'MH/12345/'.
SELECTION-SCREEN PUSHBUTTON 65(15) but1 USER-COMMAND save VISIBLE LENGTH 3.
AT SELECTION-SCREEN.
CASE sy-ucomm.
WHEN 'SAVE'.
ztab-fieldname = text.
ENDCASE.
2009 Feb 02 5:51 AM
2009 Feb 02 5:39 AM
Hi,
See the below example:
DATA: str(10) type c VALUE 'MH/12345/',
str1 type string.
PARAMETER: file TYPE string DEFAULT str.
When 'SAVE'.
do ur things.
Hope this helps u.
Thanks.
2009 Feb 02 6:30 AM
Hello ,
Use PBO event to pass the default value to your screen field.
screen field = 'XYZ' .(eg)
Praveen
2009 Feb 02 6:35 AM
Hi panse,
data: text type i.
INITIALIZATION.
text = 'MH/12345/'.
PBO
ztab-fieldname = text.
Hope it will help you.
Thanks
Arun
2009 Feb 02 6:42 AM
Hi,
You can write like:
data: text(15) type c.
Then in the Initialization Event,you can give the default value to this text declared.
Initialization.
text = 'MH/12345/'.
Hope it helps you
Regrds
Mansi