10-01-2008 11:08 AM
Hello experts,
In selection screen there is input field... when user type into field & enter then automatically display data of related regarding same.....in front of input field....
How I can do this ?
Thanks & R,
Rahul S.
10-01-2008 11:13 AM
Hi Rahul,
Just go to Screen PAI and fetch the value from input filed to text field and clear input field.
The text field is initial/disable at starting.
Thanks
Sanket
10-01-2008 11:16 AM
if ur doing this in module pool use PAI module to write ur code
or if its a simple report program write ur code under event
at selection screen
10-01-2008 11:18 AM
Hi Rahul,
You first understand the concept of Events in ABAP. As per your requirement go through the Event [At Selection-screen Output|http://help.sap.com/saphelp_nw04/helpdata/EN/79/34a234d9b511d1950e0000e8353423/frameset.htm] . Try to understand it. You have to look into the Screen table and its attributes. This will solve.
Regards,
Swapna.
10-01-2008 11:18 AM
hi,
If it is report write ur code under
AT SELECTION-SCREEN OUTPUT.
Rgds.,
subash
10-01-2008 11:19 AM
Hi,
Do like this
PARAMETERS: p_bukrs LIKE bsis-bukrs OBLIGATORY DEFAULT 'SEPV'.
SELECTION-SCREEN COMMENT 45(30) ws_comp. " Co.Name
now :
AT SELECTION-SCREEN ON p_bukrs. " Company code
----
PERFORM wl01_bukrs_text USING p_bukrs
CHANGING ws_comp w_country w_rc.
IF w_rc <> 0.
MESSAGE w405 WITH p_bukrs.
SET CURSOR FIELD 'P_BUKRS'.
ENDIF.
subroutine
----
Screen literal - Company name *
----
FORM wl01_bukrs_text USING in_bukrs
CHANGING ot_text ot_land1 ot_subrc.
IF in_bukrs <> t001-bukrs. " Same Company code
CLEAR ot_text. " Initialise
SELECT SINGLE bukrs butxt land1 FROM t001 CLIENT SPECIFIED
INTO (t001-bukrs, t001-butxt, t001-land1)
WHERE mandt = sy-mandt
AND bukrs = in_bukrs.
ot_subrc = sy-subrc.
IF sy-subrc <> 0. " Unsuccessful
CLEAR ot_text. " Not found
ELSE.
ot_text = t001-butxt. " Text
ot_land1 = t001-land1. " Country
ENDIF.
ELSE.
ot_text = t001-butxt. " Text
ot_land1 = t001-land1. " Country
ENDIF.
ENDFORM. " wl01_bukrs_text
regards,
Advait