Display Appraisal Templates in Web Dynpro
Hi All,
I have a requirement to build a Web Dynpro Application that exposes the Appraisal Templates built in the backend to the users.
Can someone guide me as to how I can go about with this. How can I access the Templates in Web Dynpro?
Regards,
Ashwini.
Hi
As per your question, I understand that HTML output is getting generated through a R3- Bapi call. Fine, create a model with the data binding to the context to some text view. Simply create view with the relevant UI element through which you want to exhibit the data and call the R3 call through your model. instead of a HTML output, you will get your data in the view.
you may not get the exact format / style of the html output.
Otherwise, directly HTML content cannot be shown in webdynpro. You need to have some UI control to take its content.
Or else, you can go in for j2ee stack and end up with a java based appl, use a simple jsp and get the output!
if you have any specific queries do let us know
hope this helps you
thanks
Similar Messages
-
Appraisal Templates - Custom Web Dynpro developement
Hi All,
I have a requirement to display the new Appraisal document templates created using a Web Dynpro application.
How do I go about doing this? How can the Appraisal templates be exposed to the Web Dynpro application?
Regards,
Ashwini.Hi Bhagat
You have raised a very good point,
As far as i know there is no such option available in NWDS ,there is a separate thread called
POLL: Web Dynpro UI elements - enhancement proposals
Please do post your same query there, hope SAP considers this, we all wait for the same feature in the forthcoming versions of NWDS
Regards
Chaitanya.A -
How to display an XML in Web Dynpro
Hi,
I am pretty new to Web Dynpro and have a specific requirement.
I have a web dynpro page on which we display a table. One of the columns in the table is a XML message. Now on lead selection of each row I want to display the contents of the XML in an embedded control below the table. I have already implemented the functionality to download the XML message to file system but I want a capability to show the XML contents within my page in a formatted way.
If I use a text view, the XML does not look very nice.
I do not want to implement a new tree control based control now where I parse my xml file and then try to recursively generate a tree. This will take time for me as i am not very well versed with WD programming.
Can anyone tell me if there exists any control in WD which can display the XML in formatted way?
If you guys have used the new ABAP debugger and seen the XML viewer in it then you can get an idea of what I need. I am not sure about the control that the ABAP debugger uses. It will be good if someone can help me find something like that.
After all WD is all about reusability.
Regards,
VikasHi Vikas,
see this little example which creates a xml file to download and open in the browser. Put it in an action handler method.
DATA lr_conv TYPE REF TO cl_abap_conv_out_ce.
DATA lv_data TYPE string.
DATA lv_xfile TYPE xstring.
lv_data = '<?xml version=1.0" encoding="utf-8"?> put your xml here'.
cl_abap_conv_out_ce=>create( RECEIVING conv = lr_conv ).
lr_conv->convert( EXPORTING data = lv_data
IMPORTING buffer = lv_xfile ).
cl_wd_runtime_services=>attach_file_to_response(
EXPORTING
i_filename = 'test.xml'
i_content = lv_xfile
i_mime_type = 'application/xml' ).
Hope this helps you. Revert if need some more help.
Regards,
Pavan. -
Display sapscript form in Web Dynpro Java
Hi,
Is it possible to print an existing sapscript form i.e. PO from ECC to my Web Dynpro application? I have successfully created a Web Dynpro Java application to create POs but now have a requirement to display or print the PO?
Can someone provide me with a sample code? I'm hoping to be able to do this without using Adobe.
Again, thanks for all your help.
Best regards,
JaypeeHi mark,
Without Adobe also u can display PO order.
Below is the code to open a HTML window from WDJava, with data from WDJava...
Inside DoInit()
IWDAttributeInfo attr1 =
wdContext.getNodeInfo().getAttribute("htmlfile");
ISimpleTypeModifiable mtype1 = attr1.getModifiableSimpleType();
IWDModifiableBinaryType btype1 = (IWDModifiableBinaryType) mtype1;
btype.setFileName(attr.getName() + ".html");
btype.setMimeType(WDWebResourceType.HTML);
_contentType = mtype;
Where htmlfile is a context attribute of type binary... and do a global declaration like this
ISimpleTypeModifiable _contentType = null; (This declaration can be done at the end of your view's coding between Begin Others and End Others)
Now,
inside on action print
public void onActionPrintData(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String videoName )
//@@begin onActiondisplayVideo(ServerEvent)
byte[] content = new byte4028;
try {
content = this.displayPrint().getBytes("UTF-8");
wdContext.currentContextElement().setHtmlfile(content);
wdContext.currentPrintElement().setAttrUrl(
_contentType.format(content));
//Where content is loaded with data from displayPrint() method, which is holding the HTML *page to be displayed to the user *
IWDWindow win =
wdThis
.wdGetAPI()
.getComponent()
.getWindowManager()
.createNonModalExternalWindow(WDWebResource
.getWebResource(content, WDWebResourceType.HTML)
.getURL(),"ShowVideo");
win.setWindowSize(445,460);
win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);
win.removeWindowFeature(WDWindowFeature.TOOL_BAR);
win.removeWindowFeature(WDWindowFeature.MENU_BAR);
//win.open();
win.show();
// wdComponentAPI.getMessageManager().reportSuccess("444444444444");
} catch (Exception e) {
wdComponentAPI.getMessageManager().reportException ("Unable to open window"+e,false);
//@@end
Now finally, design your HTML Page inside the method displayPrint() like this
public java.lang.String displayPrint( java.lang.String strVideoName )
//@@begin displayPrint()
String htmlcontent=null;
htmlcontent="content what you want to show in print window";
use script inside the html content to do a print... like window.print();
return htmlcontent;
//@@end
Regards,
Sunaina Reddy T -
Error when loading Web Template from Web Dynpro
Hi Experts,
I work on a BI ABAP server. I'm trying to integrate a BIApplicationFrame in my ABAP Web Dynpro application.
First, I created a Web Template (named ZTPL_Z0AFSD_C01_Q0001) with Web Application Designer and I can run it from there. It works fine. The address looks like :
http://pwdf2927.wdf.sap.corp:50300/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?TEMPLATE=ZTPL_Z0AFSD_C01_Q0001&DUMMY=2
In my BIApplicationFrame in Web Dynpro, I give the server name (and port), the server type (ABAP) and the templateId (ZTPL_Z0AFSD_C01_Q0001). My application work and the BIFrame try to open the following address:
http://usciq75.wdf.sap.corp:50010/SAP/BW/BEX?CMD=LDOC&TEMPLATE_ID=ZTPL_Z0AFSD_C01_Q0001 ...
I receive the error:
Error loading template ZTPL_Z0AFSD_C01_Q0001
Notification Number BRAIN 276
So, it looks like that the server is found but my Web Template is unknown for Web Dynpro. Did I forgot a step after the creation of the Web Template that would 'activate' it and make it visible? Why the two Web Address looks so different?
Thanks for your answer
DavyHi
Check
Re: JCO$Exception: RFC_ERROR_SYSTEM_FAILURE in WAD Template
Also make sure that you have installed 0ANALYSIS objects from Business Content->Object types -> BEx Web Template and choose all 0ANALYSIS objects and install the same.
Hope this helps
Raja -
Display file content in Web Dynpro ABAP
Hello,
we would like to be able to display any file after having uploaded files using FileUpload ui element in a web dynpro abap application.
for microsoft word excel files, the OfficeControl ui element can be used and for pdf documents the InteractiveForm ui element can be used.
for other formats such as '.tif', '.jpg', '.txt'..... we did not find out how to be able to display the file contents
Does anybody know if and how this could be achieved?
Cheers
AnaChris,
You may be right. Also it requires some configuration in SAP KPro ( document class etc).
Please see SAP [Help |http://help.sap.com/printdocu/core/print46c/en/data/pdf/BCSRVBDS/BDS_STRUCTURE.pdf]on Business Document Services.
At page 64 of this document under topic 'Display Documents' 'Feature it says. "If it is not possible to display the document in place, an appropriate viewer that is available on the
PC is started and the document is displayed u201Cout placeu201C -
Display HTML stream in Web Dynpro application
Hello,
Sorry, I am new to the Web Dynpro environment, so this might seem like a stupid question.
How can I display streaming HTML content in a Web Dynpro application. The IFrame element only seems to allow you to point to a URL. In this case, I am receiving an HTML stream back from an R/3 system via a BAPI call.
Thanks very much.Hi
As per your question, I understand that HTML output is getting generated through a R3- Bapi call. Fine, create a model with the data binding to the context to some text view. Simply create view with the relevant UI element through which you want to exhibit the data and call the R3 call through your model. instead of a HTML output, you will get your data in the view.
you may not get the exact format / style of the html output.
Otherwise, directly HTML content cannot be shown in webdynpro. You need to have some UI control to take its content.
Or else, you can go in for j2ee stack and end up with a java based appl, use a simple jsp and get the output!
if you have any specific queries do let us know
hope this helps you
thanks -
HTML Template for Web Dynpro (ABAP)
Hi Guys,
I am developing a webpage in webdynpro abap.
my requirement is to use a existing HTML(same as existing applications) template for this.
how do i do that ?
regards
SiddharthYou don't. That isn't how Web Dynpro works. The architecture is such that it abstracts the HTML/JavaScript rendering of the output. You place a UI element on the screen and only a metadata reprsentation of the screen is created at design time. At runtime different rendering engines can be applied to produce the final output. This allows SAP to add new rendering engines and to improve the rendering engines over time without having to adjust the applicaitons itself. This makes Web Dynpro sutiable for producing Business Transactions, but not general web pages. It also gives us the flexibility to render Web Dynpro in HTML/JavaScript, a desktop client (.Net 3.0 and WPF), and a RIA client (Adobe Flex).
You can alter the theme of the WDA application when running in HTML rendering. The theme gets automatically inherited from the NetWeaver Portal - or you can apply a stanalone theme when running without the portal. Theming allows for some basic changes of color scheme and branding elements - but is not the same as applying a complete HTML template. -
Display a photo via web dynpro (jpg files)
Hi
I have photo's of employees which I would like to display via my Web dynpro (it is jpg files). I was able to do it using an Interactive form element, but then I cannot resize the photo; it is to big. I was hoping to display it via an Image element, but then I only see the icon, but not my photo.
Could someone please assist me in helping to display my photo better?
Regards
DebbieHi Debbie,
Below is the code to generate the URL using ICM cache
"l_image is the variable that has your image in XSTRING format.
DATA:gx_mimetype TYPE string VALUE 'JPG'.
****Create the cached response object that we will insert our content into
DATA: cached_response TYPE REF TO if_http_response.
CREATE OBJECT cached_response
TYPE
cl_http_response
EXPORTING
add_c_msg = 1.
TRY. " ignore, if compression can not be switched on
CALL METHOD cached_response->set_compression
EXPORTING
OPTIONS = cached_response->co_compress_based_on_mime_type
EXCEPTIONS
OTHERS = 1.
CATCH cx_root.
ENDTRY.
****set the data and the headers
DATA: l_app_type TYPE string.
DATA: l_xstring TYPE xstring,
i_cache_timeout TYPE i VALUE '300'.
cached_response->set_data( l_image ).
l_app_type = gx_mimetype.
cached_response->set_header_field( name = if_http_header_fields=>content_type
value = l_app_type ).
****Set the Response Status
cached_response->set_status( code = 200 reason = 'OK' ).
****Set the Cache Timeout - 60 seconds - we only need this in the cache
****long enough to build the page and allow the Image on the Client to request it.
cached_response->server_cache_expire_rel( expires_rel = i_cache_timeout ).
DATA: r_url TYPE string.
DATA: i_path TYPE string VALUE '/sap/public',
i_format TYPE string VALUE 'JPG'.
****Create a unique URL for the object
DATA: guid TYPE guid_32.
CALL FUNCTION 'GUID_CREATE'
IMPORTING
ev_guid_32 = guid.
CONCATENATE i_path '/' guid '.' i_format INTO r_url.
****Cache the URL
cl_http_server=>server_cache_upload( url = r_url
response = cached_response ).
" bind the generated url with the image uielement attribute
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context TYPE wd_this->element_context.
DATA lv_url LIKE ls_context-url.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* set single attribute
lo_el_context->set_attribute(
EXPORTING
name = `URL`
value = r_url ).
Hope this helps!
Radhika -
Problem in displaying GOS document in Web dynpro
Hi,
Requirement is to display attached documents of business objects (PR, PO) in Web Dynpro.
I am able to do this successfully but there is an issue with Office 2007 documents. Office 2007 documents are getting corrupted.
I am using following logic for reading the attached documents:
1. Called cl_binary_relation=>read_links method to get the document list.
2. Called SO_DOCUMENT_READ_API1 to get the content and details of documents.
3. Called SCMS_BINARY_TO_XSTRING to convert document content to XString.
4. Called SDOK_MIMETYPE_GET to get mime type for document so that I can bind it with FileDownload UI element.
After doing the analysis, I found that SO_DOCUMENT_READ_API1 is not returning correct file content and extension type for Office 2007 documents. Instead of '.docx' it is returning '.doc' and also the document content is not proper as I check by hard coding the mine type for .docx.
Please let me know, is there any other FM for reading document content or am I missing something?
Regards,
Vikram RawalHey Vikram Rawal,
maybe you can help me i also want to display attached documents of bussiness objects (material). When i call cl_binary=>read_links the table where the results should be is empty.
I hope you can help me.
Regards
Alexander Diring -
Problem in displaying GOS documents in Web Dynpro
Hi,
Requirement is to display attached documents of business objects (PR, PO) in Web Dynpro.
I am able to do this successfully but there is an issue with Office 2007 documents. Office 2007 documents are getting corrupted.
I am using following logic for reading the attached documents:
1. Called cl_binary_relation=>read_links method to get the document list.
2. Called SO_DOCUMENT_READ_API1 to get the content and details of documents.
3. Called SCMS_BINARY_TO_XSTRING to convert document content to XString.
4. Called SDOK_MIMETYPE_GET to get mime type for document so that I can bind it with FileDownload UI element.
After doing the analysis, I found that SO_DOCUMENT_READ_API1 is not returning correct file content and extension type for Office 2007 documents. Instead of '.docx' it is returning '.doc' and also the document content is not proper as I check by hard coding the mine type for .docx.
Please let me know, is there any other FM for reading document content or am I missing something?
Regards,
Vikram RawalHi,
I had the same problem...
Maintain the office 2007 extension from maintenance view V_TOADD (SM30)
for example
xlsx application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
docx application/vnd.openxmlformats-officedocument.wordprocessingml.document
then associate these extensions to your archive object maintenance view TOAVE.
Regards,
Ivan -
Where can I get project template for Web Dynpro example&
Hello,
There is an example in SAP NetWeaver Developer Studio Documentation for creating a Web Dynpro Application accessing ABAP functions. It references the initial Web Dynpro project template file: TutWD_FlightList_Init.zip. How can I get it?
It is not available in the SAP Developer Network (Web Application Server area | Samples and Tutorials).
ThanksThe URL I gave you also contains a link to the _Init project.
"Project Template: The initial project (starting point for this tutorial) is also available to [download from SDN]." (https://www.sdn.sap.com/sdn/downloaditem.sdn?res=/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/business_packages/a1-8-4/4tutwd_flightlist_init.zip) -
Displaying streamed images in Web Dynpro
Hi All,
I have following scenario to programme.
- The DB have "images" stored as BLOB.
- I need to read the images (stream) and make them visible in Web Dynpro UI.
Problem is i only one way to providing images in Web Dynpro. The images are picked from url that points to Resource either at temporary location of permanent position Sap Images pool or contribution under mimes folder.
I see temporary location as one option here but still not able to figure out where to store it !
Can anybody help in this.
Thanks and Regards,
Ashwani Kr SharmaHi ,
Use
WDWebResource.getPublicCachedWebResource(byte[] webResource,
WDWebResourceType resourceType,
WDScopeType scopeType,
WDDeployableObjectPart deployableObjectpart,
String key)
Regards
Bharathwaj -
How to set Password change in Web templates through WEB DYNPRO
Hello All
Before dropping my question i will explain you what was the Real scenario, i am using WAD 3.50 Version and server is BW 3.0B.we are not using portal, and Enduser will view the reports in the browser through the WAD execute Http link.
Question.
whenever the enduser uses Http link of web template in the browser, he will connect through VPN and they can able view the reports. the question is That Some system Enduser won't have SAPGUI in their system so they wants to change the password because they won't know even if it is expire. is it possble to set password change system through WEBDYNPRO ABAP in the WEB Templates
Please Help me how to set Change Password in the browser for the WAD Application.To do this you will have to use either make use of portal or BSP application or Dynpro..
It is not possible for the user to change the password just from the web query -
Web Dynpro Display PDF on Submit
Friends,
I have a requirement where I need to fetch PDF stored in table as RAWSTRING and display in Web Dynpro ABAP IFRAME container on the View
Basically user access this application , from the drop down select the value and click submit, now it should read the PDF rawstring from the table and display on the same View as a PDF. Please let me know how to proceed with it , and what is the best way to handle this.
Thanks
KrishHi Krish,
You can use interactiveform UI element to achieve your requirement.
Step1. Create UI element called interactiveform in ur VIEW ( may be in ur case below the dropdown and submit button ).
Step2 : On click of submit button read the selected pdf file from DB and supply it to the context node element of type XTRING ( which is mapped with the interactive form UI element of the view )
Refer wiki article in case of doubt :
http://wiki.scn.sap.com/wiki/display/WDABAP/A+Simple+Web+Dynpro+Application+to+display+a+pdf+file+in+the+browser+window
Regards,
~Raj
Maybe you are looking for
-
Pages gives an error, 'Cannot read file' , when trying to open pages document
I recently deleted a pages file. I recovered it using disk drill and now Pages refuses to open it. It gives me an error that it cant read the file. The file size is exactly the same as i had created earlier. Please help me out on this. This is a very
-
Variable list of parameters in PL/SQL functions
As I know, PL/SQL decode function can be called with variable number of parameters: decode (a, b, c); decode (a, b, c, d, e); decode (a, b, c, d, e, f, g); How is is possible to implement a PL/SQL procedure or function like decode, which is usable wi
-
Spinning Ball, iTunes Frozen
All of my music is on my external hard drive. I created a new iTunes library, placing it on my laptop hard drive. In the iTunes preferences, I indicated the laptop hard drive as the location of my library, and then imported my music into the iTunes l
-
How to get the ablolute path of the web application in WebSphere?
How to get the ablolute path of the web application in WebSphere? For example: I have installed IBM WebSphere on D:\WebSphere\Appserver, and I created a new appliction named "myapp" on D:\myapp,. How can I get the absolute path of application "myapp"
-
Installed Acrobat won't open in Doc or from Finder
I installed Adobe Acrobat and it will not open from the Dock or from Finder, but when I click on a PDF file Acrobat does open. Any idea what could be causing this? How can I get it to open independent of a specific document?