Web Dynpro callable object without NWDI
Hello Forum,
does anybody know if it is possible to create a web dynpro dc as a callable object without using nwdi? I have written a webdynpro app know I want to use it in a guided procedure where I can provide an input field for the dc and also get an output field from the dc.
Does somebody have a step by step solution?
Regards
Michael
Hi,
You need to have the SCs for local development of Web Dynpro callable object.
Refer the following documents for more details:
<a href="/people/andre.truong/blog/2006/06/26/working-with-the-apis-of-caf-guided-procedures-nwdi-or-local-development with the APIs of CAF Guided Procedures: NWDI or Local Development?</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f7be53bb-0b01-0010-1c96-be3cb6799c1b">How to Get NW04s SP7 Guided Procedure APIs for Local Development</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814">Implementing a Web Dynpro Callable Object</a>
Let me know if this solves your issue.
Thanks,
Dipankar
Similar Messages
-
Web Dynpro Callable Object : use of RFCs
Hi All,
I've to create a callable object using Web dynpro.
In this web dynpro to display a table data populated by calling RFC and we need to select one row of the table and sent it as output parameter.
My question is how we gonna set the getDescription Method in this case for creating the Callable Object?
How we define the execute Method in the Interface Controller.
Where I should bind the Model to Controller (Component Controller / Interface Controller)
Can someone explain how we gonna use RFC in Web dynpro while calling it as Callable Object.
Thanks
SrikantHi,
You need to have the SCs for local development of Web Dynpro callable object.
Refer the following documents for more details:
<a href="/people/andre.truong/blog/2006/06/26/working-with-the-apis-of-caf-guided-procedures-nwdi-or-local-development with the APIs of CAF Guided Procedures: NWDI or Local Development?</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f7be53bb-0b01-0010-1c96-be3cb6799c1b">How to Get NW04s SP7 Guided Procedure APIs for Local Development</a>
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e3f07a7a-0601-0010-ebbd-b9cfb445b814">Implementing a Web Dynpro Callable Object</a>
Let me know if this solves your issue.
Thanks,
Dipankar -
Error testing Web Dynpro Callable Object (GP Interface)
With reference to thread:
Interactive form as Callable object error on testing the object.
FYI, I'm running NW04s, EP 7.0 SPS 13, JDK 1.4.2_14, Unix OS
Hi All,
I have created a Web Dynpro App with a Adobe Form as the frontend. I have included the caf/eu/gp/api as a DC and implemented the IGPWebDynproCO interface. Next I created a Web Dynpro Callable object in GP and ran a test and received the following error:
Result: Technical Exception
Details: Could not create web dynpro callable object component
Output Parameters
Callable object implementation did not return output parameters
Can anyone help me resolve this? Do I have to make a manual entry in the HOST file? If so, what is that entry? Are there alternatives?
Thanks
Kunal.Hi,
For creating WD callable object you need to add following three DC in your WD DC project.
In the Web Dynpro Explorer of the Web Dynpro Perspective, expand the node DC MetaData -> DC Definition, and select Used DCs.
a. To create a DC dependency, open the context menu and choose Add Used DC.
b. Select Local Development -> SAP-EU -> caf/eu/gp/api/wd -> DC MetaData -> Public Parts -> GPWebDynproCO. For Dependency Type, select Build Time, Design Time, and Run Time. Choose weak from the dropdown list.
c. Repeat the previous step to define a dependency to DCs SAP-EU-> caf/eu/gp/api (public part external) and SAP-JEE -> com.sap.security.api.sda (public part default).
You need to do one more thing like bellow.
Select your Web Dynpro project and open its context menu. Choose Properties.
1. Choose Web Dynpro References -> Library References.
2. Add a reference for library caf/eu/gp/api.
I think this will help you.
Thanks
Chandan -
Life cycle of a web dynpro callable object
What is the life cycle of a web dynpro callable object.
Means when that Web dynpro callble object is used in a GP process which method of that component called first and what is the sequence of the method execution in that.
Can anyone please explain me.Sorry ritu there was one mistake in the above two replies.
The actual execution of the methods when a callable objects is get executed is as following
1.component controller's init() method
2. interface's init() method
3.view's init() method.
4.interface's execute() method
5.view's wDoModifyView() method.
If you want to change anything on your view according to the change in the interfac's execute method.
Then you have to do that coding in view's wDoModifyView() method.
with regards
shanto aloor. -
Date type attribute in web dynpro callable object
Hi all,
I am creating a callable object with date type attribute as input parameter in a web dynpro callable object.
date type I have used is java.sql.date.
But when I am exposing that callable object in GP its giving an error:
Technical Exception:
Web dynpro Component cannot be created.
And when i am changing date type as java.util.date then I am not able to asssign that date attribute in my view layout.
Can anyone plese help me.Hi Ritu ,
u have to convert the util date to sql date in the execute method .
do it as showm below in Execute method in the component Controller :
let the Attribute be planEndDate in the Context:
public void execute( com.sap.caf.eu.gp.co.api.IGPExecutionContext executionContext ) {
java.util.Date planEndDate = null;
planEndDate = (java.util.Date) inputStructure.getAttributeAsDate(IContextElement.PLAN_ENDDATE);
java.sql.Date sqlDate = new java.sql.Date(planEndDate.getTime());
wdContext.currentContextElement().setPlanEnddate(sqlDate);
Thanks and Regards -
"Unable to create web dynpro callable object implementation" - GP error
Good day.
I've created a GP process and transported it to the test system. But when I try to start the process I get an error on the screen: Error while processing the item; it cannot be displayed. When I look to the logs I can see the following exception:
Unable to create web dynpro callable object implementation.
java.lang.Exception
at com.sap.caf.eu.gp.ui.co.exec.wd.COExecWD.execute(COExecWD.java:294)
at com.sap.caf.eu.gp.ui.co.exec.wd.wdp.InternalCOExecWD.execute(InternalCOExecWD.java:171)
at com.sap.caf.eu.gp.ui.co.exec.wd.COExecWDInterface.execute(COExecWDInterface.java:122)
at com.sap.caf.eu.gp.ui.co.exec.wd.wdp.InternalCOExecWDInterface.execute(InternalCOExecWDInterface.java:134)
at com.sap.caf.eu.gp.ui.co.exec.wd.wdp.InternalCOExecWDInterface$External.execute(InternalCOExecWDInterface.java:249)
at com.sap.caf.eu.gp.ui.act.container.VContainer.onPlugFromDispatcher(VContainer.java:391)
at com.sap.caf.eu.gp.ui.act.container.wdp.InternalVContainer.wdInvokeEventHandler(InternalVContainer.java:167)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:144)
at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingPortal(ClientSession.java:733)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:668)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.clientserver.session.core.ApplicationHandle.doProcessing(ApplicationHandle.java:73)
at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.sendDataAndProcessActionInternal(AbstractApplicationProxy.java:860)
at com.sap.tc.webdynpro.portal.pb.impl.AbstractApplicationProxy.create(AbstractApplicationProxy.java:220)
at com.sap.portal.pb.PageBuilder.updateApplications(PageBuilder.java:1289)
at com.sap.portal.pb.PageBuilder.createPage(PageBuilder.java:356)
at com.sap.portal.pb.PageBuilder.init(PageBuilder.java:549)
at com.sap.portal.pb.PageBuilder.wdDoApplicationStateChange(PageBuilder.java:303)
at com.sap.portal.pb.wdp.InternalPageBuilder.wdDoApplicationStateChange(InternalPageBuilder.java:197)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.doApplicationStateChange(DelegatingComponent.java:139)
at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doApplicationStateChange(ClientComponent.java:667)
at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.doApplicationStateChange(ClientApplication.java:537)
at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:120)
at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:321)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:713)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:666)
at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:250)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:149)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:386)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:104)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:176)
It doesn't make any sense to me... I would appreciate for any help.Hello
We are facing exact similar issue when we checked the logs.
Could you help us as we are new to GP.
What steps you followed to resolve this error.
Regards
aparna -
Reusing the same web dynpro callable object
I have created a web dynpro callable object and I want to reuse the same callable object in all the actions of that process.
I am getting the current action ID in execute() method of interface controller in WDP callable object.Now I want to generate screens for different actions based on that actionID.
for Ex if(actionID ="1")
fireplug to second scrren.
else
to next screen
But I am not getting where to write this If eles condition to get different scrrens at runtime according to the actionID.
Can anyone please help me.hi ritu,
to get the input and output parameter of the callable object in your view you do the following things.
1.you create the context elements in interface controller.
and assign the values of input parameters of the callable object, to the interface controllers context attribute value. using the following code.
IGPStructure input = executionContext.getInputStructure();
wdcontext.currentContextElement().set..urattribute name=input.getAttributeas..type of the attribut("specify your input parameter");
2.then map the context elements of interface controller to component controller,and then component controller context to view context.
Then we will get the input parameters of the callable object in view.
If you want any further clarification on this please explain your scenario detailly.
with regards
shanto aloor -
MessageArea UI element usage in a Web Dynpro Callable Object
Hi,
I have to use a MessageArea UI element in a view of a web Dynpro callable object,
but when the callable object is showed, this message Area is always empty.
what is the problem?
Can anyone help me?
Regards
LucaYour callable object do have a webdynpro view with a message area as well?
From my understanding when there is 2 view display at once, only 1 message area is required, if both view are having message area, the message will not display.
I found this senario when integrate my webdynpro component with the FPM framework. When my view is having message area, the message derive from message manager will not show at all. However once I remove the messae area the message shows in the FPM application area (example employee search)
What I did is to remove the message area UI element in my view when it hits certain condition.
IWDTransparentContainer rootContainer= (IWDTransparentContainer)view.getElement("RootUIElementContainer");
if(your condition)
rootContainer.removeChild("MessageArea");
Edited by: V. Kong on Nov 7, 2008 1:43 PM -
Web Dynpro Callable Object :"Cannot read callable object description "
Hi All,
I'm getting the following error:
"Cannot read callable object description from component"
and also "Cannot read callable object description from component" in two different Web Dynpros.
The code in the Web Dynpros is similar:
try
IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
WebDynproResourceAccessor resourceAccessor = new WebDynproResourceAccessor(textAccessor);
//ITechnicalDescription techDesc = TechnicalDescriptionFactory.newTechnicalDescription("FRESH_PARAMS","Fresh_Parameters To Be Called",resourceAccessor,locale);
ITechnicalDescription techDesc = TechnicalDescriptionFactory.newTechnicalDescription("FRESH_PARAMS","Fresh",resourceAccessor,locale);
//Pre-Existing Structure for Input
IStructureInfo input = techDesc.getInputStructureInfo();
IAttributeInfo firstName = input.addAttribute("firstName",IAttributeInfo.BASE_STRING);
IAttributeInfo lastName = input.addAttribute("lastName",IAttributeInfo.BASE_STRING);
IAttributeInfo phoneNum = input.addAttribute("phoneNum",IAttributeInfo.BASE_STRING);
IAttributeInfo Place = input.addAttribute("Place",IAttributeInfo.BASE_STRING);
IAttributeInfo Email = input.addAttribute("Email",IAttributeInfo.BASE_STRING);
IAttributeInfo Company = input.addAttribute("Company",IAttributeInfo.BASE_STRING);
//Setting multiplicity
firstName.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
lastName.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
phoneNum.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
Place.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
Email.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
Company.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
//Pre-Existing Structure for Output
IStructureInfo output = techDesc.getOutputStructureInfo();
IStructureInfo userStruct1 = output.addStructure("userStruct1");
userStruct1.addAttribute("firstName",IAttributeInfo.BASE_STRING);
userStruct1.addAttribute("lastName",IAttributeInfo.BASE_STRING);
IStructureInfo userStruct2 = output.addStructure("userStruct2");
userStruct2.addAttribute("phoneNum",IAttributeInfo.BASE_STRING);
userStruct2.addAttribute("Place",IAttributeInfo.BASE_STRING);
userStruct2.addAttribute("Email",IAttributeInfo.BASE_STRING);
userStruct2.addAttribute("Company",IAttributeInfo.BASE_STRING);
return techDesc;
catch (InvocationException ex)
ex.printStackTrace();
return null;
Can someone tell me where I'm going wrong.
Thanks
SrikantHi Zornista Yankulova
I'm getting this error:
" Cannot read callable object description from component: Failed to create delegate for custom controller com.infosys.creator.wdpco.COGetDocTypeInterface. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)"
Where the places i can go wrong??
Please let me know.
My code is like this?
public com.sap.caf.eu.gp.co.api.ITechnicalDescription getDescription( java.util.Locale locale )
//@@begin getDescription()
try
IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
WebDynproResourceAccessor resourceAccessor = new WebDynproResourceAccessor(textAccessor);
//ITechnicalDescription techDesc = TechnicalDescriptionFactory.newTechnicalDescription("FRESH_PARAMS","Fresh_Parameters To Be Called",resourceAccessor,locale);
ITechnicalDescription techDesc = TechnicalDescriptionFactory.newTechnicalDescription("FRESH_PARAMS","Fresh",resourceAccessor,locale);
//Pre-Existing Structure for Input
IStructureInfo input = techDesc.getInputStructureInfo();
IAttributeInfo firstName = input.addAttribute("firstName",IAttributeInfo.BASE_STRING);
IAttributeInfo lastName = input.addAttribute("lastName",IAttributeInfo.BASE_STRING);
IAttributeInfo phoneNum = input.addAttribute("phoneNum",IAttributeInfo.BASE_STRING);
IAttributeInfo Place = input.addAttribute("Place",IAttributeInfo.BASE_STRING);
IAttributeInfo Email = input.addAttribute("Email",IAttributeInfo.BASE_STRING);
IAttributeInfo Company = input.addAttribute("Company",IAttributeInfo.BASE_STRING);
//Setting multiplicity
firstName.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
lastName.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
phoneNum.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
Place.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
Email.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
Company.setMultiplicity(IAttributeInfo.MULITIPLICITY_1_1);
//Pre-Existing Structure for Output
IStructureInfo output = techDesc.getOutputStructureInfo();
IStructureInfo userStruct1 = output.addStructure("userStruct1");
userStruct1.addAttribute("firstName",IAttributeInfo.BASE_STRING);
userStruct1.addAttribute("lastName",IAttributeInfo.BASE_STRING);
IStructureInfo userStruct2 = output.addStructure("userStruct2");
userStruct2.addAttribute("phoneNum",IAttributeInfo.BASE_STRING);
userStruct2.addAttribute("Place",IAttributeInfo.BASE_STRING);
userStruct2.addAttribute("Email",IAttributeInfo.BASE_STRING);
userStruct2.addAttribute("Company",IAttributeInfo.BASE_STRING);
return techDesc;
catch (InvocationException ex)
ex.printStackTrace();
return null;
//@@end
//@@begin javadoc:execute()
/** Declared method. */
//@@end
public void execute( com.sap.caf.eu.gp.co.api.IExecutionContext executionContext )
//@@begin execute()
try
IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
WebDynproResourceAccessor resourceAccessor = new WebDynproResourceAccessor(textAccessor);
this.executionContext = executionContext;
//Input
IStructure input = executionContext.getInputStructure();
String firstName = (String)input.getAttribute("firstName");
String lastName = (String)input.getAttribute("lastName");
String phoneNum = (String)input.getAttribute("phoneNum");
String Email= (String)input.getAttribute("Email");
String Place = (String)input.getAttribute("Place");
String Company = (String)input.getAttribute("Company");
wdContext.nodeInput().currentInputElement().setFirstName(firstName);
wdContext.nodeInput().currentInputElement().setLastName(lastName);
wdContext.nodeInput().currentInputElement().setPhoneNum(phoneNum);
wdContext.nodeInput().currentInputElement().setEmail(Email);
wdContext.nodeInput().currentInputElement().setPlace(Place);
wdContext.nodeInput().currentInputElement().setCompany(Company);
//Output
IStructure output = executionContext.getOutputStructure();
String f = wdContext.nodeInput().currentInputElement().getFirstName();
String l = wdContext.nodeInput().currentInputElement().getLastName();
String pn = wdContext.nodeInput().currentInputElement().getPhoneNum();
String e = wdContext.nodeInput().currentInputElement().getEmail();
String p = wdContext.nodeInput().currentInputElement().getPlace();
String c = wdContext.nodeInput().currentInputElement().getCompany();
output.setAttributeValue("firstName",f);
output.setAttributeValue("lastName",l);
output.setAttributeValue("phoneNum",pn);
output.setAttributeValue("Email",e);
output.setAttributeValue("Place",p);
output.setAttributeValue("Company",c);
catch(Exception ex)
ex.printStackTrace();
//@@end
//@@begin javadoc:complete()
/** Declared method. */
//@@end
public void complete( )
//@@begin complete()
try
IWDTextAccessor textAccessor = wdComponentAPI.getTextAccessor();
WebDynproResourceAccessor resourceAccessor = new WebDynproResourceAccessor(textAccessor);
IStructure output = executionContext.getOutputStructure();
IStructure user1 = output.addStructure("userStruct1");
IStructure user2 = output.addStructure("userStruct2");
String f = wdContext.nodeInput().currentInputElement().getFirstName();
String l = wdContext.nodeInput().currentInputElement().getLastName();
String pn = wdContext.nodeInput().currentInputElement().getPhoneNum();
String e = wdContext.nodeInput().currentInputElement().getEmail();
String p = wdContext.nodeInput().currentInputElement().getPlace();
String c = wdContext.nodeInput().currentInputElement().getCompany();
user1.setAttributeValue("firstName",f);
user1.setAttributeValue("lastName",l);
user2.setAttributeValue("phoneNum",pn);
user2.setAttributeValue("Email",e);
user2.setAttributeValue("Place",p);
user2.setAttributeValue("Company",c);
executionContext.addResultState("Success");
executionContext.processingComplete();
catch(InvocationException e)
e.printStackTrace();
catch(EngineException ex)
ex.printStackTrace();
//@@end
* The following code section can be used for any Java code that is
* not to be visible to other controllers/views or that contains constructs
* currently not supported directly by Web Dynpro (such as inner classes or
* member variables etc.). </p>
* Note: The content of this section is in no way managed/controlled
* by the Web Dynpro Designtime or the Web Dynpro Runtime.
//@@begin others
private IExecutionContext executionContext;
//@@end
Thanks
Srikant -
Reusability of web dynpro callable object
Hi,
I want to use same webdynpro callable object inside another callable object including some extra input and output parameter.
So that I dont have to write the same code again in another callable object.
is it possible?Hi Ritu ,
Yes ofcourse we can use the same Callable object in another CO.
I dont think below mentioned is the better way to do .
while setting the input parameters and output parameters in the description method and execute method use if condition based on the status.
follow the same procedure in the description and execute method.
if (Status =="some value"){
set the Extra input parameters.
//below dont use else
normal input parameters for the callable object.
in the same way do it for the output parameters.
Note :here status can be anything.
for eg :
an employee open a leave form , here the status will be new.
when the employee submits the form to the higher authority, the status is "Submitted to higher Authority".
so the above scenario both the higher Authority can use same callable object. the difference is the higher authority CO have some additional fields such as "Remarks".
here based on the status we can use the same callable object. -
Web DynPro - HttpServletResponse object equivalent
All,
I was just wondering what is the equivalent of HTTPServletResponse object in Web DynPro.
Any ideas...........
Thanks in Advance
JJHi JJ,
first, welcome on the SDN forum!
About your question:
There is no direct equivalent. Be aware that the WD rendering is up to the WD runtime, and the client can, but does not have to be a web browser. So presenting WD within a browser is only one possibility (even the one most time used), and for that the response object in general is encapsulated.
Anyhow, you have the possibility to reach the underlying HTTP objects, see for example Session in WebDynPro or Portal request object. or Portal Session Object in WebDynpro
Hope it helps
Detlev
PS: Please consider rewarding points for helpful answers on SDN. Thanks in advance! -
Build Web Dynpro project EAR without Developer Studio
Is it possible to build Web Dynpro project EAR file without Developer Studio? All possible solutions are welcome (console, scripts, java etc.) I want to integrate the project into CI Server and try to find way for automatic build.
Thanks.Yes. Sure. But as i can see, during generation of EAR there are some files like (Project)App.xml, (Project)Component.xml that regenerated each time i create EAR from Developer Studio. I don't know the logic of creation of these files. Is there standard ant build script from SAP which i can use?
Edited by: Artem Pasko on Dec 26, 2007 2:02 PM -
HTTP form post from Web Dynpro Java Application without opening new window
Hi Experts,
We are trying to submit form data to an external URL from Web Dynpro Java application. We are achieving this with the following piece of code.
try
strPrintContent="<html>"+
"<head>"+
"<script type=\"text/javascript\">"+
"function myfunc () "+
"{"+
"var frm = document.getElementById(\"paymentForm\");"+
"frm.submit();"+
"}"+
"</script>"+
"</head>"+
"<body onLoad=myfunc()>"+
"<form id=paymentForm method=post action=\""+merchantURLPart+"\">"+
"<INPUT type=hidden name=username value="+userName+">"+
"<INPUT type=hidden name=pass value="+passWord+">"+
"<INPUT type=hidden name=senderid value="+senderID+">"+
"<INPUT type=hidden name=dest_mobileno value="+mobile+">"+
"<INPUT type=hidden name=message value='"+msg+"'>"+
"<INPUT type=hidden name=response value="+response+">"+
"</form>"+
"</body>"+
"</html>";
IWDWebResource webResource = WDWebResource.getWebResource(strPrintContent.getBytes(),WDWebResourceType.HTML);
IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(webResource.getAbsoluteURL(),"WBSEDCL");
window.show();
catch(Exception e)
wdComponentAPI.getMessageManager().reportException("Error : "+e.toString(),false);
But it opens another window. We dont need that. We have to stay on the same window. Please suggest what can be done.Hi,
You can create a HTML file with the request post parameters and the external URL something like this:
public java.lang.String GetRedirecturl( )
// External URL
String html = "<html><head></head><body onload=\"load()\"> " +
"<form id=\"form1\" action=\"https://www.abc.com/xyz.jsp\" method=\"POST\">" +
// Post Parameters
"<INPUT TYPE=\"HIDDEN\" NAME=\"Param1\"VALUE=\""+Param1Value+"\">"+
"<input name=\"sap-wd-resumeurl\" type=\"hidden\"/>" +
"</form> " +
"" +
"<script>" +
"function load(){" +
"var loc = window.location.search.substring(1);" +
"var queryString = loc.split(\"sap-wd-resumeurl=\");" +
"if(queryString.length > 0)" +
"{" +
"var resumeURL = queryString[1].split(\"&\");" +
"if(resumeURL.length >= 0)" +
"{" +
" document.forms['form1'].elements['sap-wd-resumeurl'].value= unescape(resumeURL[0])" +
"}" +
"}" +
"document.getElementById('form1').submit();" +
"}" +
"</script>" +
"</body> </html>";
String redirectUrl = "";
byte[] byteArrayHtmlData = null;
try {
byteArrayHtmlData = html.getBytes("UTF-8");
} catch (UnsupportedEncodingException e) {
wdComponentAPI.getMessageManager().reportException("Internal error occurred. Please try after some time",true);
IWDResource htmlResource = WDResourceFactory.createCachedResource(new ByteArrayInputStream(byteArrayHtmlData), "Redirect.html", WDWebResourceType.HTML, true);
redirectUrl = htmlResource.getUrl(WDFileDownloadBehaviour.AUTO.ordinal());
return redirectUrl;
Hope this will be helpful.
Regards,
Anurag -
Problem in Web service callable object!!
Hi,
I have created a function module in R/3, and made it RFC enabled.Now i am trying to use this webservice in creating CO for web service.Now when i test it, i am getting this error:
Web service method http://<hostname>.<fully qualified domain name>.com:8001/sap/bc/soap/wsdl11?services=ZADDITION&sap-client=400&sap-user=<user ID>&sap-password=<Password>
invocation failed: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<hostname>.<fully qualified domainname>.com:8001/sap/bc/soap/rfc"; nested exception is:
com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<hostname>.<fully qualified domain name>.com:8001/sap/bc/soap/rfc"
What can be the reason??
any help will be highly apprecaiated!!
Thanks & Regards
AmeyaHi,
Yes i am getting error Could not find logical destination interfaces, check the <b>WSIL URL</b> inserted in visual admin.
Look.,
1)my function module name is ZADDITION,(RFC enabled)
2)IN transaction WSADMIN, i got the URL as
default_host/sap/bc/srt/rfc/sap/ZADDITION
in visual Admin i put this url
http://<host><fully qualified domain name>:8001/sap/bc/srt/rfc/sap/ZADDITION?sap-client=800&wsdl=1.1,
please tell me this host name is R/3 server or the portal server?
IN visual admin i put the above stated url,inserted SID,client,language, Basic Authentication,given UIDPW,
Then in Design time i was able to fine Logical destination name : Exposing,
then i clicked on search. but nothing happened
What can be the problem..is there any problem in my url??
please guide me, i think we have almost solved this..You have helpd me a lot..
Regards,
Ameya -
Starting Process by Using Web Service callable object
HI,
I have created Web service CO for starting a predefined process (let call it Process2).
I am using this Web Service CO in another process i.e. Process1 (Main Process).
When execution of Process1 reaches to action where Web service CO is Attached. It's Initiating the Process2.
My Problem Is Process2 is initiated by some "Guest" User instead of processor of that action.
Plz help ASAP.NO answers, so closing this thread
Maybe you are looking for
-
Special character Validation: error
HI Guys, I wrote a validation to restict the use of special chracters. Its a formula based validation, both REAL TIME and BATCH, on the Node. HasCharacters(Custom.EPMA_Alias, ["]). However, when I go to put an Alias on a member, it tells me there is
-
Problem with Fetching Million Records from Table COEP into an Internal Tabl
Hi Everyone ! Hope things are going well. Table : COEP has 6 million records. I am trying to get records based on certain criteria, that is, there are atleast 5 conditions in the WHERE clause. I've noticed it takes about 15 minutes to populate
-
can any1 provide me the link to download SAP net weaver application server ABAP trial version which is compatible with Windows 8& 8.1,Plz ..
-
How to stop a sound from loading ? my_sound.unload or something ?
I want the sound to stop loading when I press the stop button, I have: var my_sound:Sound = new Sound(_root); my_sound.onLoad = function() { my_sound.start(); preload_btn.onRelease = function() { my_sound.loadSound("some_sound.mp3", false); stop_btn.
-
What drive is in my unibody 17" macbook pro?
NVidia MCP79 AHCI: Vendor: NVidia Product: MCP79 AHCI Speed: 3 Gigabit Description: AHCI Version 1.20 Supported ST9320421ASG: Capacity: 298.09 GB Model: ST9320421ASG Revision: AP81 Serial Number: 5TJ*JW Native Command Queuing: Yes Queue Depth: 32 Rem