cancel
Showing results for 
Search instead for 
Did you mean: 

Help on value help.

Former Member
0 Kudos

Hi,

I have 2 textbox with value help option. 1st text box has value help i successfully displayed the records as per your tips. In the second text box i hav another value help which displays the records based on the 1st text box. both retrieves records using different bapi's.

both bapi has key fields to compare. that is the first textbox element. for example emp id in first textbox. and department in the second textbox. the second value help should show only the records relevant to particulare emp id which is selected in the emp id value help. i hav two different custom controller. Help me out in this Lohi. i could't able map the value help attribute field to custom controller value attribute.

The only option is passing value of empid to second bapi. that can be done as follows.

.......bind(new bapi's)

//pass the parameter to bapi

input.setDeptid( <get 1st textbox value which is

selected from value help> ) remember the codes are in doInit(). i am unable to retrieve the value attribute of the view. the codes are done in second custom controller with respective to second textbox.

awaiting for your reply,

regards,

Ganesh.D

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Ganesh,

If you are using OVS for value help,u must have implemented the applyResult method in ur listener.At that particular time u will be having selected key.From there only u can get the value & query for other value help.In case you are using EVS u can set the property as calculated for attribute related to 2nd value help.In that case u don't have to do much things.as soon as u select value in 1st value help ,2nd query will be triggered by webdynpro runtime.I hope this will help you.

regards

Sumit

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

If you are calling two BAPIs in the same controller your code is like this.

After executing the first BAPI.

Ur retriving the input texe value .

String hi = wdContext.Current<Z_BZPI_INputNode()>.getEmpID();

This for getting value from first input field.

Other wise u need get them out put node.

String out = wdContext.current<OutputNode>.getEmpID();

This any of these strings to pass second BAPI input.

Second_BAPI_input one = new Second_BAPI_input();

one.setEmpID(hi);

execeute second BAPI.

If this input attribute is in diffrent Views mapp the input attribute where ever do u need.

Thanks

Lohi.

Former Member
0 Kudos

Hi Lohi,

Remeber it is in value help. the first bapi executes and displays list of records successfully in value help. upon click the particular record in value help it return the key to the textbox. when the user click second input field value help it should retrieve the records corresponding to first input field value. i have doubt that

string hi = wdContext.Current<Z_BZPI_INputNode()>.getEmpID();

returns the input field value or it focuses to the last record as current record. the first input fields value is assigned to value attribute(EX empid). not model node attribute. i mean to say value attribute is not mapped to any model node or anything just it is assigned to input field box.

regards,

Ganesh.D

Former Member
0 Kudos

Hi,

Let me know when first BAPI executes the records will be displayed in value help.

Here I am not getting "Value help"

and the first BAPI is executed by using the first BAPI input( u said the first input field value )

Am i Correct?

and After displaying the records

upon click the particular record in value help it return the key to the textbox

In this case When you click the record in the value help then getting the what ever do u need. I mean to say to display the records using Output node.

When you click the record get the value what ever do u need like this.

String one= wdContext.current<outputNode()>.getkey value();

And set to your attribute value.

wdContext.currentContextElement().setEmpId(one);

this attribute is not in your context declare it in Controller and map where ever you need.

This might helps you.

thanks

Lohi.

Former Member
0 Kudos

Hi,

Thanks for your replies. Actualy the problem is, both first and second value help was in doinit() method of the view. I moved the second value help code into domodify(), reason is since it is a dynamic change so i just thinked and i moved it to domodify method of the view. There is setted the value of the first valuehelp's context as per lohi. now it is working fine.

thanks,

regards,

Ganesh.D