Application Development and Automation 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: 
Read only

dynamic field display

Former Member
0 Likes
625

hi all,

I am two fields in my selection-screen.

when i enter value in one field, it should automatically display another field before processing selection screen.

please give me the solution.

regards,

balaaji.

6 REPLIES 6
Read only

Former Member
0 Likes
589

after this event

AT SELECTION-SCREEN ON VALUE-REQUEST

use the FM

F4IF_INT_TABLE_VALUE_REQUEST.

u need to create a search help on the first field and then when u press enter u get the value in the next field.

pk

Read only

0 Likes
589

hi prasanth,

thanks a lot for your response.

let me clarify, in that function module what values i have to pass.

regards,

balaaji.

Read only

0 Likes
589

hi prasanth,

i created elementary search help for the first field.

its working fine.

but, its not populating the value immediatley.

after execution only its populating the value.

regards,

balaaji.

Read only

0 Likes
589

check out this example.

AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_DOC.

CHECK NOT SO_DOC IS INITIAL.

SELECT BSART FROM EKKO INTO TABLE I_TYP

WHERE EBELN IN SO_DOC.

SORT I_TYP BY BSART.

DELETE ADJACENT DUPLICATES FROM I_TYP.

CLEAR:VALUE_TAB,FIELD_TAB,RETURN_TAB.

REFRESH:VALUE_TAB,FIELD_TAB,RETURN_TAB.

FIELD_TAB-FIELDNAME = 'BSART'.

FIELD_TAB-TABNAME = 'EKKO'.

APPEND FIELD_TAB.

LOOP AT I_TYP.

VALUE_TAB-BSART = I_TYP-BSART.

APPEND VALUE_TAB.

ENDLOOP.

CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'

EXPORTING

RETFIELD = FIELD_TAB-FIELDNAME

TABLES

VALUE_TAB = VALUE_TAB

FIELD_TAB = FIELD_TAB

RETURN_TAB = RETURN_TAB

EXCEPTIONS

PARAMETER_ERROR = 1

NO_VALUES_FOUND = 2

OTHERS = 3.

Read only

0 Likes
589

hi prasanth,

i am really aprreciate your response.

but let me tell my problem clearly.

i am having two vendor fields.

when i enter legacy vendor, it should populate standard vendor number.

legacy vendor number i made elementary search help and attached it.

that is working fine. when i entered leagcy vendor number, its not dispalying the sap vendor.

how can i do that.

regards,

balaaji.

Read only

0 Likes
589

Hello Balaja,

you can fill fields in Selection-Screen depending on a just entered value in AT SELECTION-SCREEN OUTPUT event. Usually the user has to press enter to get into this event.


AT SELECTION-SCREEN OUTPUT.
	SELECT SINGLE 	something
		FROM    somewhere_source
		INTO	pa_field2
		WHERE	WHATEVER = pa_field1.		

AT SELECTION-SCREEN OUTPUT will not be performed when using F4. To automatically fill also the dependend fields when using F4 I prefer to build up a DDIC structure containing the fields I want to display on the selection-screen. Within the DDIC structure I can assign Search helps to the fields. This works well for search helps with more than one exporting parameter.

Regards Rudi