How to call PDF file in Web Dynpro Appl?
How to call PDF file in Web Dynpro Appl?
Hi Gobinath,
1. Create a value attribute of type byte called pdfSource.
2. Insert an UI element called Interactive Form in your layout
3. Set the source property of this Interactive From UI element to the context pdfSource.
4. Insert a button which would open your pdf file.
public void onActionsubmit(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
//@@begin onActionsubmit(ServerEvent)
IPrivate<viewname>.IContextElement contextElement = wdContext.currentContextElement();
byte[] bytes = contextElement.getPdfSource();
try
File file = new File("C:
temp
example.pdf");
FileOutputStream os = new FileOutputStream(file);
os.write(bytes);
os.close();
catch (IOException e)
// do something
e.printStackTrace();
//@@end
Warm Regards,
Murtuza
Similar Messages
-
How call PDF file in Web dynpro screen?
i have one labal,one input box and one search button also...Just i clk search button mns...that PDK file will come..for printing purpose...
How i will call that PDF file? please give details...hi...this is my error...
Failed to process request. Please contact your system administrator.
[Hide]
Error Summary
While processing the current request, an exception occured which could not be handled by the application or the framework.
If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
Root Cause
The initial exception that caused the request to fail, was:
com.sap.tc.webdynpro.services.sal.deployment.api.WDDeploymentException: Failed to get deployable object part for application 'webdynpro.pdf' of deployable object 'local/LoginProject1'.
at com.sap.tc.webdynpro.serverimpl.core.deployment.AbstractDeployableObject.getApplication(AbstractDeployableObject.java:158)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.getApplicationDeployableObjectPart(RequestManager.java:381)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.initTask(RequestManager.java:317)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:143)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
... 17 more
See full exception chain for details.
System Environment
Client
Web Dynpro Client Type HTML Client
Server
Web Dynpro Runtime Vendor: SAP, build ID: 7.0009.20060804145649.0000 (release=645_VAL_REL, buildtime=2006-08-05:15:08:24[UTC], changelist=413534, host=pwdfm101), build date: Mon Oct 30 16:29:02 IST 2006
J2EE Engine No information available
Java VM Java HotSpot(TM) Server VM, version:1.4.2_09-b05, vendor: Sun Microsystems Inc.
Operating system Windows XP, version: 5.1, architecture: x86
Session & Other
Session Locale en_US
Time of Failure Thu Sep 27 16:48:55 IST 2007 (Java Time: 1190891935798)
Web Dynpro Code Generation Infos
Detailed Error Information
Detailed Exception Chain
com.sap.tc.webdynpro.services.sal.core.DispatcherException: The requested deployable object 'local/LoginProject1' and application 'webdynpro.pdf' are not deployed on the server. Please check the used URL for typos.
at com.sap.tc.webdynpro.clientserver.session.RequestManager.getApplicationDeployableObjectPart(RequestManager.java:383)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.initTask(RequestManager.java:317)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:143)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:46)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
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:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.tc.webdynpro.services.sal.deployment.api.WDDeploymentException: Failed to get deployable object part for application 'webdynpro.pdf' of deployable object 'local/LoginProject1'.
at com.sap.tc.webdynpro.serverimpl.core.deployment.AbstractDeployableObject.getApplication(AbstractDeployableObject.java:158)
at com.sap.tc.webdynpro.clientserver.session.RequestManager.getApplicationDeployableObjectPart(RequestManager.java:381)
... 20 more -
How to call DOC file using web.show_documents
Hi friends ,
If I use the built-ins web.show_documents for open the *.doc file
I am getting the following error
ORA-06550: line 5, column 2:
PLS-00201: identifier 'README.DOC' must be declared
ORA-06550: line 5, column 2:
PL/SQL: Statement ignored
DAD name: WebDB
PROCEDURE : readme.doc
URL : http://132.148.160.3:80/WebDB/readme.doc?
PARAMETERS :
===========
ENVIRONMENT:
============
SERVER_PORT=80
SERVER_SOFTWARE=Oracle WebDb Listener 2.1
SERVER_NAME=132.148.160.3
GATEWAY_INTERFACE=CGI/1.1
SERVER_PROTOCOL=HTTP/1.0
REMOTE_HOST=132.148.160.251
REMOTE_ADDR=132.148.160.251
REQUEST_METHOD=GET
QUERY_STRING=
SCRIPT_NAME=
PATH_INFO=/WebDB/readme.doc
HTTP_ACCEPT=*/*
HTTP_ACCEPT_LANGUAGE=en-us
HTTP_ACCEPT_ENCODING=gzip, deflate
HTTP_USER_AGENT=Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)
HTTP_HOST=132.148.160.3
HTTP_CONNECTION=Keep-Alive
Please advice How to call Doc file in web.
Thanx
nullThe syntax to execute web.show_document:
web.show_document('http://server_ip_or_server_name/virtual_path/filename.doc')
The virtual path has been defined in Apache (if you run on web with Apache) or has been defined in Internet Inoformation Server (if you are runing with Internet Information Server.)
null -
How to browse local file using web dynpro
hi everyone
How can I browse local file using Web Dynpro?And read file names into Context or array. I have tried the following code but its not working
String resourcePath = WDURLGenerator.getResourcePath();
String depObjResourcePath = WDURLGenerator.getResourcePath(Test);
WDDeployableObjectPart appPart = WDDeployableObject.getPart(Test, TestApp, WDDeployableObjectPart.APPLICATION);
help required urgently
Thanks & Regards
Jaspreet KaurReply in
how to browse local file using web dynpro
Regards,
Ashwani Kr Sharma -
How to make color screen in Web dynpro appl?
How to make color screen in Web dynpro appl?
Hi Gobi..
<u><b>Go thorugh the follwing links</b></u>
https://www.sdn.sap.com/sdn/collaboration.sdn?contenttype=url&content=https%3A//forums.sdn.sap.com/forum.jspa%3FforumID%3D52
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/business_packages/a1-8-4/nw04stack09themes.zip
<u><b>Tutorial</b></u>
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/documents/a1-8-4/how%20to%20edit%20web%20dynpro%20themes.pdf
<u><b>Setting the Theme</b></u>
http://help.sap.com/saphelp_nw2004s/helpdata/en/1e/535d420447e054e10000000a155106/content.htm
<u><b>Configuration</b></u>
http://help.sap.com/saphelp_nw70/helpdata/en/43/8a1a8ece230c8ce10000000a11466f/content.htm
Regards,
GS
Message was edited by:
Sathishkumar GS
Message was edited by:
Sathishkumar GS -
How to create PDF from a web dynpro screen
Hi all,
I am in the process of creating my first web dynpro application for parking a document, the new requirement is when the user parks the document, a PDF of the web dynpro screen should also be generated. Can you please tell me how can I achieve that.
Thanks,
RajatA PDF generated from the screen? There is no SAP delivered functionality to do this. I might suggest that you just use the browser print and print to a PDF generated virtual printer. Otherwise you would have to design an Adobe Form (and run it within WDA using the InteractiveForm) that matched the interface of the WDA screen. There is no automatic generation. You would have to design and maintain each independently.
-
CE 7.1 - How to call CAF services from Web Dynpro
Hi,
whats the suggested way to call caf services from web dynpro?
Of course I can use the Web Service model. But can I call caf directly?
I read something about caf web dynpro model, but I cannot find it in nwds 7.1. On some older tutorial it was in context menu of caf project, but it seems to be removed.
best regards
tomHi ,
The standard way is to use the web service model.
You have to expose the the services as web service and then you can use the wsdl url in the Adaptive web service model option.
The above option will be available when you click the Model in the webdynpro application and the click create new model.
Hope it helps you.
Regards,
Srinivasan Subbiah -
How to call custom themes for Web Dynpro ABAP Application?
Hi,
I need to change the appearance of Web Dynpro ABAP application. So far I followed below steps,
1. Created theme folder u2018testngou2019 (SE80->MIME Repositoty -> SAP->PUBLIC->BC->UR->nw5->themes -> u2018testngou2019 ).
2. used program BSP_UPDATE_MIMEREPOS to dowmloaod content of u2018sap_tradeshowu2019 (SE80->MIME Repositoty -> SAP->PUBLIC->BC->UR->nw5->themes -> sap_tradeshowu2019) to desktop.
3. Modified the themes using Eclipse Theme Editor.
4. used program BSP_UPDATE_MIMEREPOS to upload modified themes to MIME repository u2018testngou2019 (SE80->MIME Repositoty -> SAP->PUBLIC->BC->UR->nw5->themes -> u2018testngou2019) .
My current URL is like http://server.name:XXXX/sap/bc/webdynpro/sap/hrrcf_a_startpage_int_cand?sap-client=XXX.
Now I want to know how custom themes called for Web Dynpro ABAP Application.
Is my approach correct?
...NaddyHi Naddy,
What you used is one way and even I failed when tried that method,
Instead go to SE38 - WD_THEMES - and you need to upload the zip file and you need to follow a folder structure.
it is case sensitive, atleast the zip file.
Make a zip file by name "Project.zip" -
Create a Folder Project and have the below folder structure,
1 data - all the properties files and also the designinfo file, below is the code
2 themes - (to get all the files download the theme from portal and you will have all the folders)
2.1 ur
2.1.1 name of the theme
2.1.1.1 common
2.1.1.2 csf
2.1.1.3 r
2.1.1.4 ur - all the css files (would be good if you can get the files from the server.)
2.1.1.5 WSRP
3 war - empty folder
*.designinfo
isVisible=true
version=7.0.14.1.0
isDefault=false
isSapDesign=false
designName=**** name of the theme
Once done create a zip file and click on Start Import and give the path and will ask for transport request, it will take a while to upload once done as mentioned in the use the parameter sap-ep-themeroot="path"
This will resolve the issue.
Cheers-
Pramod
reward points if helpful -
How to call pdf files from oracle forms
I have a pdf file in the server , I need to call this and open when a button is pressed in the oracle forms.
Please let me know how to do this.
Thanks,
PrevinFrank,
I have oracle applications and I want to open a pdf file located in the server from a button in oracle applications.
Previn,
you don't mention the Forms release you are running.
If you are running Forms on the web, you can use
web.show_document() to load files from the Web if
they are accessible via HTTP.
Frank -
How to call standard report in web dynpro abap.
Hi All,
I need the output of one standard report e.g RHXSTR00 on web dynpro abap.
How can I achieve this?
Please help!!! Points will be rewarded.
Thanks in advance!
Cheers,
Darshna.Hi Darshna,
The report result is ALV and in most of the cases we generally do not have function modules or any other easy way to get the output.
In such cases the best approach which we follow is, to run this in background mode and generate the spool and display the ouput in PDF.
But if intertactive form is not present in your requirement then we need to debug the logic of the report (if no FM or class present) and get the results and display it in the View.
Best regards,
Suresh -
How to call t-code from web dynpro ABAP application
Dear Gurus,
I am new to ABAP web dynpros. I have to add a button and have to call a SAP standard t-code if user clicks on this button? How to accomplish this task? Any help or example would be appreciated.
Thanks,
GSMHi GSM,
You have to create a SAP transaction iView in your Portal, then obtain its URL in your webdynpro and call WDPortalNavigation.absolute() method.
Below are the same steps in more detail:
1) Create a SAP Transaction iView or an Internet Application Component iView (whichever you find convenient). While creating you can select whether you want to use SAP GUI for windows or SAP GUI for HTML. For the latter(GUI for HTML) ensure that your ITS is working fine and configured while creating the system in EP.
2) Open the properties of the SAP transaction iView created. In the OK code field you can give the ok code value just as you give in SAP R/3 in case you want to navigate to the second screen of SAP R/3 when you pass values from WebDynpro.
Example for the above would be say Transaction "VA03" for displaying Sales order. Suppose from Webdynpro i want to pass a parameter called "Order number" and when i click a button it should pass the order number to R/3 and skip the first screen required for inputting the sales order numbe.
It should directly go to the main display of sales order for that ordernumber.
3) Create your WebDynpro component and deploy it on the server. In your WebDynpro use the WDPortalNavigation.absolute() method and give the url of the SAP Transaction iView created as a parameter and also the required parameters that you would like to pass from WebDynpro.
4) Create a SAP WebDynpro iView in the Portal.
5) Now run the Component. It should open up your SAP Transaction iview.
Regards,
Uday -
can anybdy tell any link to get the study materials for web dynpro for java in .pdf format.
Hi,
there you can find the entire documentation, you normally have a look at help.sap.com, in pdf format (it's NW2004s, SP 5 or 6, I guess)
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/com.sap.km.cm.docs/library/nw/netweaverdevelopersguide2004s/sap%20netweaver%20developer's%20Guide%202004s/UsingJava_00_PDFsList.ca
(copy & paste the link, directly it won't work )
kind regards
Stefanie -
How to call BI report from web dynpro
Hi ,
How to call BI report from webdynpro application and what are the prerequisites for that .
Please provide an example to work with BI application frame UI element
ThanksHi Rajpal,
Please go through this..
calling BI report
Cheers,
Kris. -
How to include Text file in Web Dynpro structure
Hi Guys,
I know that you can add a "File" object against a Java project (right click on project: New -> File).
Is this possible with WebDynpro? In other words, can I add a Text file "object" against my DC? I need such a File because I need to store text values in it that I read in my View Contoller.
Any suggestions?
ChristiaanHi
Yes
Select the Navigator view --select the dc --right click --new --other --general --- here u will get the option .
Note : put your file only under src--make one folder say util and then put your file here.
Best Regards
Satish Kumar -
HELP !!! Problem in R/3 trying to get a PDF on to Web Dynpro
Hi,
I read a note about <b>How to get PDF on to Web Dynpro iView </b>, it was very helpfull, but the problem is in R/3 because I need that the Print Window do not open and send data direct to Web Dynpro.
the code is:
control_parameters-no_dialog = 'X'.
control_parameters-preview = ' '.
control_parameters-langu = 'S'.
control_parameters-getotf = 'X'.
output_options-xsfcmode = 'X'.
output_options-xsf = space.
output_options-xdfcmode = 'X'.
output_options-xdf = space.
output_options-tdnoprev = 'X'.
* OUTPUT_OPTIONS-TDNOPRINT = 'X'.
output_options-xsfoutdev = output_options-tddest = 'ZWIN'.
output_options-tdimmed = 'X'.
output_options-tddelete = 'X'.
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'Z_REP_TRANS_PRES'
* VARIANT = ' '
* DIRECT_CALL = ' '
importing
fm_name = formato
* EXCEPTIONS
* NO_FORM = 1
* NO_FUNCTION_MODULE = 2
* OTHERS = 3
call function '/1BCDWB/SF00000022'
exporting
* ARCHIVE_INDEX =
* ARCHIVE_INDEX_TAB =
* ARCHIVE_PARAMETERS =
control_parameters = control_parameters
* MAIL_APPL_OBJ =
* MAIL_RECIPIENT =
* MAIL_SENDER =
output_options = output_options
* USER_SETTINGS = 'X'
* USUARIO =
* FECHA_INI =
* FECHA_FIN =
tipo_rep = tipo_rep
* TIPO =
* LOGO = 'ZHR_CANTV_LOGO'
importing
* DOCUMENT_OUTPUT_INFO =
job_output_info = output_job
* JOB_OUTPUT_OPTIONS =
tables
transf_pres = transf_pres
* EXCEPTIONS
* FORMATTING_ERROR = 1
* INTERNAL_ERROR = 2
* SEND_ERROR = 3
* USER_CANCELED = 4
* OTHERS = 5
call function 'CONVERT_OTF'
exporting
format = 'PDF'
*/ MAX_LINEWIDTH = 132
importing
bin_filesize = numbytes
bin_file = bin_file
tables
otf = zoftdata
lines = zpdf
exceptions
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
err_bad_otf = 4
others = 0.
Thanks in advance!!!
tgfchHi Claus,
Try use this web dynpro code to open the XSTRING that coming from abap side:
IWDCachedWebResource resource = WDWebResource.getWebResource(
wdContext.currentZReport_OutputElement().getPdf(), WDWebResourceType.getWebResourceTypeForFileExtensio("pdf"));
resource.setResourceName(this.getDescriptionReport());
// Create a External Window with the URL destination
IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow(resource.getURL(), this.getDescriptionReport(), true);
// Eliminate some features of the window
window.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
window.removeWindowFeature(WDWindowFeature.MENU_BAR);
window.removeWindowFeature(WDWindowFeature.STATUS_BAR);
window.removeWindowFeature(WDWindowFeature.TOOL_BAR);
window.setWindowSize(780,430);
window.setWindowPosition(20,140);
window.open();
This code will open its PDF report!!!
Regards,
Luciano Leite
Maybe you are looking for
-
Ipod shuffle 2nd gen reset problems
I have a 2nd generation ipod shuffle. When i tried to hook it up to m new macbook pro it states the apple reset utility must be downloaded. I downloaded the software and hit the reset button. It states it is restarting the shuffle then freezes. It ki
-
Problem while installing adobe photoshop cs6
Hey guys, I have been trying to install adobe photshop CS3 trial version on my MAC. I have the adobe air installed. When I get to adobes webpage to download the trial version i get this message: This application cannot be installed because this insta
-
Failure to embed Mp4 video [From hard disk and host]
Hi guys, Im Terra - new here and learning DW even more everyday... But I've come stuck the last few hours, so I could do with a little assitance, thanks in advance... I've been trying to insert an mp4 file into a div; which is successful. But when I
-
ZEN for Servers 7 agent on the NW 6.5 sp7
I've tried on couple of servers and it's definitely the problem in running ZEN for Servers 7 agent on the newest NW 6.5 support pack 7 because it causes high processor utilization after 4-5 days of server up-time. Than, you cannot stop the agent with
-
ESB unable to connect to existing Web Service
Use Case: We have an existing webservice which is RPC encoded and that had to be invoked from Oracle ESB. Version used : oracle soa suite 10.1.3.1.0. This service had to be deployed in ESB for common platform across the enterprise, where other servic