cancel
Showing results for 
Search instead for 
Did you mean: 

Search engine faillure

Former Member
0 Kudos

Hi,

I have made a search engine with input fields

In the back-end the Bapi is working. on the portal only 1 of the three input fields are working. What could it be?

Regards

Sven

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please give us more information.

Armin

Answers (1)

Answers (1)

Former Member
0 Kudos

Y_Tf_Employeelist_Input.First_Name =input field

Y_Tf_Employeelist_Input.Last_Name = Inputfield

Y_Tf_Employeelist_Input.Perno = input fioeld and is working

Y_Tf_Employeelist_Input.Output.Employee_List1 is table result

code on iview

public void onActionSearch(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionSearch(ServerEvent)

wdThis.wdGetProcesStartController().executeY_Tf_Employeelist_Input();

//@@end

}

Code Controller

//@@begin javadoc:wdDoInit()

/** Hook method called to initialize controller. */

//@@end

public void wdDoInit()

{

//@@begin wdDoInit()

Y_Tf_Employeelist_Input input = new Y_Tf_Employeelist_Input();

wdContext.nodeY_Tf_Employeelist_Input().bind(input);

//@@end

}

//@@begin javadoc:executeY_Tf_Employeelist_Input()

/** Declared method. */

//@@end

public void executeY_Tf_Employeelist_Input( )

{

//@@begin executeY_Tf_Employeelist_Input()

try

{

wdContext.currentY_Tf_Employeelist_InputElement().modelObject().execute();

wdContext.nodeOutput().invalidate();

}

catch (Exception ex)

{

ex.printStackTrace();

}

//@@end

}

Former Member
0 Kudos

Thanks. How are the input fields bound to the context? What exactly does not work?

Armin

Former Member
0 Kudos

the value is Y_Tf_Employeelist_Input.Pernr

Former Member
0 Kudos

I don't get results back from the back-end... while on the backe-nd it is working.

Former Member
0 Kudos

S,

Check that "supplyingRelationRole" set correctly for both node Output and Employee_List1.

VS

Former Member
0 Kudos

what do you mean?

Former Member
0 Kudos

In context designer select corresponding node, then open properties for it and check property supplyingRelationRole. It should not be empty.

VS

Former Member
0 Kudos

They are not empty...

Former Member
0 Kudos

I have 3 inputfields.... 1 of them gives me results (perno) and the other two don't work, both have entries

Former Member
0 Kudos

Please change temporary error handling in executeY_Tf_Employeelist_Input:


public void executeY_Tf_Employeelist_Input( )
{
//@@begin executeY_Tf_Employeelist_Input()
/**/
try
{
  wdContext.currentY_Tf_Employeelist_InputElement().modelObject().execute();
  wdContext.nodeOutput().invalidate();
}
catch (Exception ex)
{
  wdComponentAPI.getMessageManager().reportException
  (
    new WDNonFatalException(ex), false
  );
}

VS

Former Member
0 Kudos

I did, but still the same...

Former Member
0 Kudos

But do you see any error message on screen?

VS

Former Member
0 Kudos

No there is no message... is it the Bapi then?

Former Member
0 Kudos

How do you trigger the search action? Do you have a separate button or do you press ENTER inside the input fields? If this is the case, did you assign the search action to every input field's "onEnter" event?

Armin

Former Member
0 Kudos

Ok, then try this variation:


public void executeY_Tf_Employeelist_Input( )
{
//@@begin executeY_Tf_Employeelist_Input()
/**/
final IWDMessageManager msgs = wdComponentAPI.getMessageManager();
try
{
  
  msgs.reportSuccess("Call BAPI with " +
    "first-name=" + wdContext.currentY_Tf_Employeelist_InputElement().getFirst_Name() + ", " +
    "last-name=" + wdContext.currentY_Tf_Employeelist_InputElement().getLast_Name() + ", " +
    "number=" + wdContext.currentY_Tf_Employeelist_InputElement().getPerno()
  );
  wdContext.currentY_Tf_Employeelist_InputElement().modelObject().execute();
  wdContext.nodeOutput().invalidate();
  
  if ( wdContext.nodeOutput().size() < 1 )
    msgs.reportWarning("Empty output");
  else
    msgs.reportWarning("Rows selected: " + wdContext.currentOutputElement().nodeEmployee_List1().size() );
}
catch (Exception ex)
{
  msgs.reportException( new WDNonFatalException(ex), false );
}

and tell what you see on screen.

VS

Former Member
0 Kudos

i FOUND THE SOLLUTION... STRANGELY ENOUGH YOU HAVE TO TYPE IN EVERYTHING WITH CAPITAL LETTERS

Former Member
0 Kudos

THANKS FOR YOUR HELP