‎2008 May 12 8:32 AM
Hi everyone,
here i am making a program where i have to use screen with 2 text input box,
i have to give int values to textbox1 and it should display the values into another text box when i click on button1,
so can you help me how i can get input of the text box and display that result on another text box.
thank you,
regards,
jagrut bharatkumar shukla
‎2008 May 12 8:36 AM
Hi,
Use the Function Module 'F4IF_INT_TABLE_VALUE_REQUEST' to Achieve your Requirement.
Check the following Sample Code
DATA : v_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS : s_plant1 FOR
zaw_pol_plan-plant MODIF ID chg NO-EXTENSION NO INTERVALS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_plant1-low .
SELECT werks INTO TABLE i_t001w
FROM t001w.
IF sy-subrc EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = ws_repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = i_t001w
return_tab = v_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
s_plant1-low = v_return-fieldval.
Regards,
Raj.
‎2008 May 12 8:36 AM
Hi,
Use the Function Module 'F4IF_INT_TABLE_VALUE_REQUEST' to Achieve your Requirement.
Check the following Sample Code
DATA : v_return LIKE ddshretval OCCURS 0 WITH HEADER LINE.
SELECT-OPTIONS : s_plant1 FOR
zaw_pol_plan-plant MODIF ID chg NO-EXTENSION NO INTERVALS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_plant1-low .
SELECT werks INTO TABLE i_t001w
FROM t001w.
IF sy-subrc EQ 0.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'WERKS'
dynpprog = ws_repid
dynpnr = sy-dynnr
value_org = 'S'
TABLES
value_tab = i_t001w
return_tab = v_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
s_plant1-low = v_return-fieldval.
Regards,
Raj.
‎2008 May 12 8:37 AM
IN the PBO of screen give the input i mean default value to the first textinput.
and then while selecting the button right.
Hope you have given F-code to that push button after pressing that you need to display the value of first input field needs to get papulate in second one right.
WRITE THE CODE IN PAI of your screen.
CASE SY-UCOMM.
WHEN 'DISPL' " YOUR FUNCTION CODE OF PUSH BUTTON
TEXT2 = TEXT1.
ENDCASE.
hope it will help you.
Regards,
Madan.
‎2008 May 12 8:59 AM
thank you for your valuable reply,
but still i need without any itab or table ,
i want to input manually and what are the attributes helps us to change the input text values or text of text field
thank you,
regards,
jagrut bharatkuamar shukla
‎2008 May 12 9:13 AM
try:
SELECTION-SCREEN: BEGIN OF LINE,
PUSHBUTTON 2(10) push USER-COMMAND fcode ,
POSITION 16.
PARAMETERS: zint TYPE i, zval(20).
SELECTION-SCREEN:
END OF LINE.
INITIALIZATION.
push = 'PUSH'.
AT SELECTION-SCREEN.
LOOP AT SCREEN.
if sy-ucomm = 'FCODE'.
IF zint = 1.
zval = '1234'.
endif.
ENDIF.
plz reward points if dis helps