cancel
Showing results for 
Search instead for 
Did you mean: 

displaying "no records found" in the view

Former Member
0 Kudos

hi

I have created an application in web dynpro by using ABAP as backend.

Now I am giving some input parameters to the BAPI from the first screen.

Now my problem is that if there are no values in the backend i have to display "no records found" in the first screen itself without going to the next screen.

I am using a fireplug to go to the next screen from first screen, now If no records are found then it should not go to the next screen and display the error in the first screen itself.

Can anyone help me in this issue.

thanks and regards

gopi krishna

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

closing the thread

Former Member
0 Kudos

Gopi,

After your input in the first screen,you are going to execute the model and invalidate the node.

Probably invalidating you are firing outbound plug to Next screen.

Solution.

1.you should have a staus field to say empty output or you have to check the output from babi if it is empty.

2.Fire the outbound plug only if its not empty.

Former Member
0 Kudos

hi Baskaran

Thanks for your response

can you please give me the code part for that, if you can provide.

And where do I have to implement that code.

thanks and regards

gopi

Yashpal
Active Contributor
0 Kudos

create a method in component controller which return boolean value write code in it that execute RFC check the output if it is null then return false else true.

call that method in ur view which may have any button on the event of that button call this method by the event handler method bind to the action .check the value returned by the RFC executor method and go for ur logic of fireing plug or not .

Thanks,

Yashpal

Former Member
0 Kudos

hi Yashpal

thanks for the response.

I am havving custom controller, and as I am new to this Webdynpro I am not aware of the syntax for coding.

Can you please send me any code sample.

thanks and regards

gopi krishna

Yashpal
Active Contributor
0 Kudos

Link :

example for RFC execution from a webdynpro Appln:

<a href="http:///www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/355b9c90-0201-0010-d">http:///www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/355b9c90-0201-0010-d</a>

Former Member
0 Kudos

hi Yashpal

That link is not working

rgds

gopi krishna

Yashpal
Active Contributor
0 Kudos

in search write executing RFC webdynpro .....

then look for a pdf document .creating webdynpro application accessing ABAp functions..

link

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/355b9c90-0201-0010-d2a8-89f...

Former Member
0 Kudos

HI Gopi,

First of all i would suggest you to read Inside WebDynpro for java by Chris Whealy.

This will geive you good basics for your tutorials and day to day work.

Coming back to your request.

In the Output we have a boolean to indicate if there were an error occurred in RFC system.

we also have a ErrorMessageChild node of cardinality 0...n

So that there may be more errors could be displayed.

So after the

wdContext.nodeOutput().invalidate();

if (wdContext.currentOutputElement().getEb_Error_Found()) {

InfoFromBapiNode.getErrorMessages(

wdContext.nodeEtb_Error_Message(),

manager);

errorFound = true;

}

so before firing outbound plug i am checking

if !(errorFound){ //if there is no error found

wdThis.fireNextScreenplug();

}

If you do not have such error handling structure ,you can directly check before firing outbound plug as

if !(wdContext.nodeOutput.isEmpty()){ //nodeOutput is not empty

wdThis.fireNextScreenplug();

}