cancel
Showing results for 
Search instead for 
Did you mean: 

Need to populate text view based on search help.

Former Member
0 Kudos

Hi All,

There are 2 UI elements. One is input field having F4 help and other is a text view. Intially texview UI element will be in Invisible mode. On selecting the values making use of F4 help, the corresponding value should be populated

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Lekha,

on F4, its showing both customer code and customer name in a pop-up. If it is returning only customer code, then customer name should not come right.. But its showing both code and name.

In SH both code and name are export paramaters only.

Former Member
0 Kudos

Hi,

were you able to capture that F4 help is my question. if is retuning both the values then

I gess in the inputfield you are getng the code rgiht..

In f4 event, set teh customer name to the selected value of f4 help..i guess ths information is there with that F4 helop code..

set_attribute of if_wD_conetx_node then set the customer name..

Answers (5)

Answers (5)

Former Member
0 Kudos

Lekha,

I created two context nodes. One I binded to Input field(Customer Code) and the other I binded to Text View(Customer name).

I used SH for Input field. On clicking of F4, in a pop-up I got all the Customer Codes and Customer Names.

On selecting Customer Code, only the code is getting populated. Customer Name is not getting displayed on the Text View.

Regards,

Yugesh A

Former Member
0 Kudos

yes, this is what I'm trying to say..Is this a Standard SH one more thing....Are you able to catch this F4 help...

I guess you SH is returning only the code not name...

TRy to create your own SHt hat retuns both..

Former Member
0 Kudos

Hello Lekha,

In the input field, on pressing F4, I will get customer code and customer name. On selecting a particular Customer Code in the input field, then the corresponding name sholud get populated in text view.

Input Field--Customer Code.

Text View-Customer Name

Regards,

Yugesh A

Former Member
0 Kudos

HI,

Then have you created 2 context attributes for name and code...

bind the name to the text view..

if the event is OVS, or your own SH then you can be able to catch those values otherqise not..

Now, F4 is trgered, inside the method itself you can set the visibility of teh textview and also the value..

Former Member
0 Kudos

Hi Priya,

Yess. That is what my requirement is..

Regards,

Yugesh A

Former Member
0 Kudos

HI,

is the F4 you are geting from any OVS or SH...If yes, then you can get the event to hold it..

AS i have said, you can bind the same context attribute to both teh input field and textview...automatically teh value is shown in textview..

intiailly for visibility of textview, create a attribute for wdui_visibility and bind to the visible property of teh text attribute..default value for this attribute as 01 (none) only when the input field f4 help selection you want to dispaly it right,.,.

In the modfyview, just set the value as 02 (viisble) by using the SET_ATTRIBUTE method...

Is this clear...

Edited by: Lekha on Dec 9, 2009 11:43 AM

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

write the code in wddomodify view

read the attribute

lo_el_user_role->get_attribute(

EXPORTING

name = `ROLE`

IMPORTING

value = lv_role)."customer no.

make the text view visbile if f4 help is selected .

create an attribute and bind it to visible property of text view UI elememt.

if lv_role is not initial i.e input field data is not initial make the text view visible.

read the data from DB where you get customer name.

lo_el_user_role->set_attribute(

EXPORTING

name = `TEXTVIEW`

value = ABAP_TRUE ).

lo_el_user_role->set_attribute(

EXPORTING

name = `cust`

value = lv_custname. "set the cust name to text view here.

Priya

Edited by: Chaitanya Priya Puvvada on Dec 9, 2009 7:16 AM

Edited by: Chaitanya Priya Puvvada on Dec 9, 2009 7:17 AM

Former Member
0 Kudos

the corresponmdign values of the input field should be shownin the textview....

is this what you requried,,,

As you have already bound some attribute to the input field, you can bind the same to the textview..

wehn a entry is shown in inputfield the same is shown in textview..

is this your requirement...

Chaitanya_Priya
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

On selecting the values making use of F4 help, the corresponding value should be populated

once you select the F4 help from input field , the text view should be enabled and the corresponding values should be populated in text view also.

is that what you wanted.

Priya