Reading HTML Content using Web Dynpro ABAP
Hello,
I was wondering if it is possible to read the content (HTML) behind a given URL using Web Dynpro ABAP. If so, are there any functions available to parse the HTML ? I have been asked to develop an application that requires going to a URL, reading the content, and formatting a table from that content for presentaion within Web Dynpro ABAP. The HTML of the URL is nothing more than a "Table of Contents" to existing documentation ( Word Documents )
Thank you for any help / advice you can provide
Larry
You can get the HTML returned in a table using fm RSFO_HTML_REQUEST2.
Once you have that, you can convert it to a string using any number of methods. CL_RSR_WWW_RENDERER=>TABLE_TO_STRING should work fine.
One option for parsing it would be to get it converted into an iXML object, but you might have to do quite a bit of manipulation first depending on what the html looks like. You can see more info here on iXML classes: [http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm|http://help.sap.com/saphelp_nw04/helpdata/de/86/8280ba12d511d5991b00508b6b8b11/frameset.htm]
Otherwise I would just make use of find statements with regex patterns to sort through the html.
Similar Messages
-
Adobe form to save data using Web Dynpro ABAP
Hi. I am pretty new to SAP world and trying to learn and work on a task given to me relate to
creating Adobe offline form using Web Dynpro ABAP same time.
I have several questions and hopefully, many gurus like you will provide answers.
I noticed there are many examples creating and using Adobe interactive forms (though not many newer version),
but I didn't see (at least I didn't find any) any detail example on saving data to an internal table (such as fixed assets, vendor master, etc)
using interactive form. Is there any detail explanation/example on this?
I have ask this question in another forum (before I found this forum) but didnu2019t get the answer yet.
2. When I tried to see graphic layout and modify the layout from Web Dynpro, I can't see the graphic layout.
All I see is text list of fields/buttons that I created, but can't see section for graphic layout where I can modify layout.
I am sure I didn't install/configure something correctly.
Anyone has any idea what I didn't do?
I have another question, but I will wait till later after I figure out above ones first.
Thanks for all your help in advance.
JohnHi John,
In the WD4A view, there is a button "Show/Hide Layout Preview".
Click on that button to be able to see the Layout.
Note that this button is next to the Pretty Print button.
regards,
Reema. -
How to display the data of CJ2C(T-CODE) using web dynpro abap
Hi all:
How to display the data of CJ2C(T-CODE) using web dynpro abap.
CJ2C used to display a Gantt Chart.
Thanks.Hi,
Create a Value attribute (resource) of type Resource, bind it with the property of File Upload UI element.
On action place the code and Deploy the application
byte[] bytes = new byte[ 1024];
FileOutputStream out = new FileOutputStream( new File( <path in server>));
InputStream in = resource.read( true);
int len;
while( ( len = in.read( bytes)) > 0)
out.write( bytes, 0, len);
in.close();
out.close();
Regards
Vinod V -
How to save file in km using web dynpro abap
Hi Experts,
We have a requirement that file should be saved in a folder in km, the name of the folder should be the employee number.
Could you please tell me how to create folder with employee number in KM and store file in it using web dynpro abap.
Thanks and Regards,
Santhoshi.Thanks Naga Raju Meesala.
How come all these methods are deprecated...getEP5User
Also, since I am building a weddynpro DC, what is the proper way to include these jar files as Used DCs?
Now proceed in the same way with the variable PORTAL_HOME and add the following .jar files:
u2022 \lib\prtapi.jar The portal runtime APIs
u2022 \portalapps\com.sap.portal.usermanagement\lib\com.sap.security.api.ep5.jar The user management APIs of the Enterprise Portal 5.0 are deprecated, but still in use in SAP NetWeaver 04
u2022 \portalapps\com.sap.netweaver.bc.rf\lib\bc.rf.framework_api.jar KM Repository Framework APIs
u2022 \portalapps\com.sap.netweaver.bc.rf.service\lib\bc.rf.global.service.urlgenerator_api.jar Repository Framework Utility: URL Generator
u2022 \portalapps\com.sap.netweaver.bc.sf\lib\bc.sf.framework_api.jar Repository Framework: Repository Services
u2022 \portalapps\com.sap.netweaver.bc.util\lib\bc.util.public_api.jar Repository Framework Utilities -
Create portal user using web dynpro abap application
Dear All,
I would like to know is it possible to create portal user-id through web dynpro abap application.
My requirement is
> I have to create a web dynpro abap application. In the web dynpro abap application I have name email-id and phone number as entry fields.
> I will click on submit, one unique id will get created. This unique id will be the login id for portal.
I found how to create portal user using web dynpro java, but i could not find regarding web dynpro abap.
If it is possible to create the portal users using web dynpro abap pls share the code as well.
Regards,
Swapnil IndulkarHi swapnil,
I think by using BAPi.. BAPI_USER_CREATE1 you can create.
Please check this...
Create portal user from webdynpro abap
Creating user and assigning a group through code
user administration su01
How can i get the portal user id from logon ticket in the webdyn 4 ABAP
Cheers,
Kris.
Edited by: kissnas on May 21, 2011 8:47 AM -
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 -
Upload file into KM using Web Dynpro ABAP
Hi, I'm looking at converting an existing Web Dynpro Java application to a Web Dynpro ABAP application. However, I cannot find how to upload a file and store it in the Portal KM repository using WDA. I have been able to do it successfully using WDJ. Any help on how to do this would be very much appreciated. Thanks.
Hi, I'm looking at converting an existing Web Dynpro Java application to a Web Dynpro ABAP application. However, I cannot find how to upload a file and store it in the Portal KM repository using WDA. I have been able to do it successfully using WDJ. Any help on how to do this would be very much appreciated. Thanks.
-
Shooping cart creation in SRM 7.0 using web dynpro ABAP classes.
Hi,
We have recently upgraded to SRM 7.0 from SRM 4.0. We are using customized portal application for the creation of the shopping cart.I am planning to create custom FM which will use the standard Web dynpro ABAP classes to create the shopping cart.
Could you please guide with the classes that are need to be implemented and the sequence of the classes used in the shopping cart creation.
I think these are the classes that are used in the standard web dynpro ABAP component.
CL_FPM_EVENT -> Creates an instance of this class based on an event ID.
CL_BADI_FLT_DATA_TRANS_AND_DB -> Data Handling: Transport and Database.
CL_EXITHANDLER -> Class for Ext. Services Within Framework of Exit Technique.
CL_EX_BBP_DOC_CHANGE_BADI -> BAdI Class CL_EX_BBP_DOC_CHANGE_BADI.
CL_BBP_OBJECTS_ACCESS -> Access Functions for Object Types.
/SAPSRM/CL_PDO_BO_SC -> Shopping Cart BO.
Your expert comments will be appreciated...
Regards,
NareshDear Poster,
As no response has been provided to the thread in some time I must assume the issue is resolved, if the question is still valid please create a new thread rephrasing the query and providing as much data as possible to promote response from the community.
Best Regards,
SDN SRM Moderation Team -
Rules Engine using Web Dynpro ABAP
Hi,
Can we build a Rules Engine which works with Web Dynpro-ABAP? Something similar to BRM in CE-7.2.
Thanks,
PrasannaDo you mean BRM or BRF. BRF is the name of the business rules framework that is integrated in the ABAP engine. BRM is Business Rules Management and a part of NetWeaver CE - running on the Java Stack and a part of SAP NetWeaver BPM (Business Process Management).
Generally if your work is all ABAP based you would use BRF. Here is a small eLearning that shows the usage of BRF within Web Dynpro ABAP.
http://www.sdn.sap.com/irj/scn/elearn?rid=/library/uuid/c0181bb1-28e7-2c10-538c-a093c616310e -
File Upload In DMS Using Web Dynpro ABAP
Hi,
I have a requirement to upload files in DMS using Web Dynpro. I have written the code by the hint of the following thread:-
scn.sap.com/thread/1865934
My code is uploading all files but when I try to view them from CV03N only txt files are displaying , Images and PDF files are not
showing there.
Please help me. It's urgent requuirement.
Thanks
AmitTYPES : BEGIN OF zst_ts_raw_line,
line TYPE orblk,
END OF zst_ts_raw_line.
DATA : ls_draw TYPE draw ,
ls_api_ctrl TYPE cvapi_api_control,
ls_message TYPE messages,
lv_documentnumber TYPE draw-doknr,
it_objectlinks TYPE STANDARD TABLE OF dms_db_drad,
ig_objectlinks TYPE dms_db_drad ,
it_documentdescriptions TYPE STANDARD TABLE OF bapi_doc_drat,
ig_documentdescriptions TYPE bapi_doc_drat ,
it_originals_of_doc TYPE STANDARD TABLE OF cvapi_doc_file,
ig_originals_of_doc TYPE cvapi_doc_file ,
lv_storage_cat TYPE cv_storage_cat,
lv_size TYPE i ,
lt_bindata TYPE STANDARD TABLE OF zst_ts_raw_line," STANDARD TABLE OF zst_ts_raw_line,
ls_bindata TYPE zst_ts_raw_line ,"SOLISTI1,"sdokcntbin ,
ls_drao TYPE drao,
lt_drao TYPE TABLE OF drao,
lt_DRAT TYPE TABLE OF DMS_DB_DRAT,
ls_DRAT TYPE DMS_DB_DRAT,
lt_files TYPE cvapi_tbl_doc_files,
ls_files TYPE cvapi_doc_file,
l_string TYPE string.
DATA : ex_pf_ftp_dest TYPE rfcdes-rfcdest.
DATA : ex_pf_http_dest TYPE rfcdes-rfcdest.
DATA lo_nd_upload TYPE REF TO if_wd_context_node.
DATA lo_el_upload TYPE REF TO if_wd_context_element.
DATA ls_upload TYPE wd_this->element_upload.
DATA lo_nd_upload1 TYPE REF TO if_wd_context_node.
DATA lo_el_upload1 TYPE REF TO if_wd_context_element.
DATA ls_upload1 TYPE wd_this->element_upload1.
DATA lo_nd_upload2 TYPE REF TO if_wd_context_node.
DATA lo_el_upload2 TYPE REF TO if_wd_context_element.
DATA ls_upload2 TYPE wd_this->element_upload2.
* navigate from <CONTEXT> to <UPLOAD> via lead selection
lo_nd_upload = wd_context->get_child_node( name = wd_this->wdctx_upload ).
lo_el_upload = lo_nd_upload->get_element( ).
lo_el_upload->get_static_attributes( IMPORTING static_attributes = ls_upload ).
* navigate from <CONTEXT> to <UPLOAD1> via lead selection
lo_nd_upload1 = wd_context->get_child_node( name = wd_this->wdctx_upload1 ).
lo_el_upload1 = lo_nd_upload1->get_element( ).
lo_el_upload1->get_static_attributes( IMPORTING static_attributes = ls_upload1 ).
* navigate from <CONTEXT> to <UPLOAD2> via lead selection
lo_nd_upload2 = wd_context->get_child_node( name = wd_this->wdctx_upload2 ).
lo_el_upload2 = lo_nd_upload2->get_element( ).
lo_el_upload2->get_static_attributes( IMPORTING static_attributes = ls_upload2 ).
DATA : lv_file_name TYPE filep.
ls_draw-dokar = 'Document Type'.
ls_draw-dokvr = '00'.
ls_draw-doktl = '000'.
ls_draw-dwnam = sy-uname.
lv_storage_cat = 'Storage space'.
ls_DRAT-doknr = 'Document Type'.
ls_DRAT-dokvr = '00'.
ls_DRAT-doktl = '000'.
ls_DRAT-dktxt = 'Test Document'.
ls_drat-dktxt_uc = 'Test Document'.
append ls_drat to lt_drat.
ls_api_ctrl-tcode = 'CV01N'.
ls_api_ctrl-commit_flag = 'X'.
ls_api_ctrl-save_flag = 'X'.
ls_api_ctrl-api_mode = 'X'.
ls_api_ctrl-no_update_task = 'X'.
ls_draw-filep = ls_upload-filename. "l_string. *
ig_objectlinks-dokar = doc type
ig_objectlinks-dokvr = '00'.
ig_objectlinks-doktl = '000'.
ig_objectlinks-dokob = 'LFA1'.
ig_objectlinks-objky = lifnr.
APPEND ig_objectlinks TO it_objectlinks.
CALL FUNCTION 'CVAPI_DOC_CREATE'
EXPORTING
ps_draw = ls_draw
*• PF_STATUSLOG = ' '
*• PF_REVLEVEL =
ps_api_control = ls_api_ctrl
*• PF_FTP_DEST = ' '
*• PF_HTTP_DEST = ' '
*• PF_HOSTNAME = ' '
*• PF_CONTENT_PROVIDE = ' '
IMPORTING
psx_message = ls_message
*• PFX_DOKAR =
pfx_doknr = lv_documentnumber
TABLES
pt_drad_x = it_objectlinks
pt_drat_x = lt_drat
* pt_files_x = lt_files.
* documentdescriptions = it_documentdescriptions.
IF sy-subrc NE 0.
WRITE: 'no number'.
ENDIF.
IF ls_message-msg_type CA 'EA'.
ELSE.
ls_draw-doknr = lv_documentnumber.
COMMIT WORK.
ENDIF.
DATA lv_count TYPE i.
DO 3 TIMES.
REFRESH : lt_files,lt_bindata,lt_drao.
lv_count = lv_count + 1.
ls_files-appnr = lv_count."'1'.
CASE lv_count.
WHEN '1'.
ls_files-filename = ls_upload-filename. "wa_general-REF_FILE_NAME1. "
ls_upload-filecontent = ls_upload-filecontent.
WHEN '2'.
ls_files-filename = ls_upload1-filename. "wa_general-REF_FILE_NAME1. "
ls_upload-filecontent = ls_upload1-filecontent.
WHEN '3'.
ls_files-filename = ls_upload2-filename. "wa_general-REF_FILE_NAME1. "
ls_upload-filecontent = ls_upload2-filecontent.
ENDCASE.
MOVE ls_files-filename TO lv_file_name.
CALL FUNCTION 'CV120_DOC_GET_APPL'
EXPORTING
*•PF_DIALOG =
*•PF_DISPLAY =
* PF_FILE = 'DO.TXT'
pf_file = lv_file_name "wa_general-REF_FILE_NAME1 "
*•PF_TYPDT =
IMPORTING
pfx_dappl = ls_files-dappl.
ls_files-updateflag = 'I'.
ls_files-langu = sy-langu.
ls_files-storage_cat = 'Srotage ID'.
ls_files-description = 'DMS'.
APPEND ls_files TO lt_files.
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = ls_upload-filecontent "wa_general-ref_doc1 "
*• APPEND_TO_TABLE = ' '
IMPORTING
output_length = lv_size
TABLES
binary_tab = lt_bindata.
DATA : lv_zaehl TYPE obzae.
CLEAR lv_zaehl.
LOOP AT lt_bindata INTO ls_bindata.
CLEAR ls_drao.
lv_zaehl = lv_zaehl + 1.
ls_drao-orblk = ls_bindata-line.
ls_drao-orln = lv_size.
* ls_drao-dokar = ls_draw-dokar.
* ls_drao-doknr = lv_documentnumber.
* ls_drao-dokvr = ls_draw-dokvr.
* ls_drao-doktl = ls_draw-doktl.
ls_drao-zaehl = lv_zaehl.
* ls_drao-appnr = lv_count."'1'.
APPEND ls_drao TO lt_drao.
ENDLOOP.
CALL FUNCTION 'CVAPI_DOC_CHECKIN'
EXPORTING
pf_dokar = ls_draw-dokar
pf_doknr = lv_documentnumber
pf_dokvr = ls_draw-dokvr
pf_doktl = ls_draw-doktl
ps_api_control = ls_api_ctrl
pf_content_provide = 'TBL'
IMPORTING
psx_message = ls_message
TABLES
pt_files_x = lt_files
pt_content = lt_drao.
COMMIT WORK.
ENDDO. -
When to use 'Web dynpro ABAP' and when to go for 'Web Dynpro Java'
Hi,
I am trying to learn 'Web dynpro ABAP' from tutorials available on SDN as i am presently working in ABAP. I am also Java learned.
Please tell me the selection criteria for using Web Dynpro component / application using ABAP or JAVA.
Regards,
TanayaHi,
Go through this
Web Dynpro: ABAP or Java?
WebDynpro for ABAP Vs Java
Re: Javascript future in Webdynpro (JAVA and ABAP)
Javascript future in Webdynpro (JAVA and ABAP)
PradeeP -
E-recruiting using web dynpro ABAP
Hi experts,
I am new to HR E-recruiting. I understand the concepts through SDN and [help.sap.com]. But I want to know how to develop E-Recruiting in Web dynpro ABAP. Is there any tutorial or document for this....
I cant get a clear idea till now. Please provide me with some steps,documents and procedures .
Thanks&Regards,
vinoVino,
check these links
http://help.sap.com/saphelp_erp60_sp/helpdata/en/72/c9b54015c4752ae10000000a155106/frameset.htm
EREC 600-http://help.sap.com/saphelp_erp60_sp/helpdata/en/72/c9b54015c4752ae10000000a155106/frameset.htm
http://help.sap.com/saphelp_erp2005/helpdata/en/45/8150635e9c40c1e10000000a1553f7/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/30adcac6-7a55-2a10-9fa9-a61d947f6ec9
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a07122ae-8216-2a10-c9a5-996717a0648b
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/24396589-0a01-0010-3c8c-ab2e3acf6fe2
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/erphcm/sap%2be-recruiting
E-Recruitment-SAP E-Recruiting
Thanks
Bala Duvvuri -
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. -
Calling URL when click on buttons using web dynpro - ABAP
Hi All,
I am new to web dynpro application development and i am facing issue when i try to test my application.
simple require when i click on button i should direct the to one of url say 'http://www.google.co.in/' my application is activate with no error but when i test the application i am getting below error , can someone please provide me the solution or way out.
The URL http://ides47:8062/sap/bc/webdynpro/sap/zwa_calling_url/ was not called due to an error.
Note
The following error text was processed in the system N6Q : Access via 'NULL' object reference not possible.
The error occurred on the application server IDES47_N6Q_62 and in the work process 0 .
The termination type was: RABAX_STATE
The ABAP call stack was:
Method: IF_WDR_CONTEXT_MENU_HANDLER~CONTEXT_MENU_CALLED of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
Method: IF_WDR_CONTEXT_MENU_HANDLER~CONTEXT_MENU_CALLED of program CL_WDR_INTERNAL_WINDOW_ADAPTERCP
Method: IF_WDR_ADAPTER_EVENT_HANDLER~HANDLE_EVENT of program CL_WDR_CONTEXT_MENU_HANDLER===CP
Method: IF_WDR_CLIENT~GET_CLIENT_UPDATES of program CL_WDR_CLIENT_SSR=============CP
Method: EXECUTE of program CL_WDR_MAIN_TASK==============CP
Method: IF_HTTP_EXTENSION~HANDLE_REQUEST of program CL_WDR_MAIN_TASK==============CP
Method: EXECUTE_REQUEST_FROM_MEMORY of program CL_HTTP_SERVER================CP
Function: HTTP_DISPATCH_REQUEST of program SAPLHTTP_RUNTIME
Module: %_HTTP_START of program SAPMHTTP
HTTP 500 - Internal Server Error
Thanks,
ParabHi ,
It seesms something you are missing. It would be easy for us if you could paste your code which you have written in the Action of Button.
Sample code for your reference :
METHOD onactionget_url .
data lo_window_manager type ref to if_wd_window_manager.
data lo_api_component type ref to if_wd_component.
data lo_window type ref to if_wd_window.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = 'http://www.google.co.in/'
MODAL = ABAP_FALSE
HAS_MENUBAR = ABAP_TRUE
IS_RESIZABLE = ABAP_TRUE
HAS_SCROLLBARS = ABAP_TRUE
HAS_STATUSBAR = ABAP_TRUE
HAS_TOOLBAR = ABAP_TRUE
HAS_LOCATION = ABAP_TRUE
RECEIVING
WINDOW = lo_window.lo_window->open( ).
ENDMETHOD. -
Adobe form taking too much time to render using Web dynpro ABAP
Dear All,
we are rendering an Adobe form online to view employee profile, the form is hardly 100KB but it takes 5 minutes to render in the browser. I have checked the performance of abap code and there is no performance issue. the form shows downloaded 100kb ot 100kb and then I get the wait symbol for quite sometime and after a few minutes wait it renders. the form has XML based interface and ZCI layout. I have done a HTTP trace and could not trace out anything, so I suspect it is something to do at the client level.
Can anyone help me to identify what and where exaclty is the problem.
Is it with the
1. Adobe Reader ? - I have adobe X reader
2. Is it to do with any browser or Adobe reader settings?
3. Is it do with ADS?
4. Or any other compatibility issues?
Any pointers is appreciated. 5 minutes is too long to render a 100 KB form.
Thanks in Advance.
Raghavendra PrabhuPlease go through the below link, hope you may get any help...
http://www.stechno.net/sap-notes.html?view=sapnote&id=1785100
Naveen
Maybe you are looking for
-
Back-up mail, in case of ...
I use mail. It is fitting my needs and works overall fine. But, because I have by now years of e-mail stored in the different accounts, I tend to get a bit worried. Mail is basically a database that contains links to e-mails stored in various places.
-
My understanding of shift registers is that if you don't initiaze them then they will hold the value from the last instance, hence be static. I've created a subvi and placed multiple copies in a case statement, all it does is check to see if the valu
-
Oracle Database for solaris x86
dear gurus i have a little question... The Oracle Database 9i is not available for Solaris Operating System (x86) ???? in that link only i can see... SPARC: http://www.oracle.com/technology/software/products/oracle9i/index.html Please would you confi
-
Hi, Every time I changed text property - size, color, etc and when I am done with it I hit the selection or enter. This is the message I get every time. So basically I can't change any text property! Please help!
-
Execution reportbuilder.exe blocked by applocker
Hi, We try to run reports from our asp.net webapplication. On the client machines, MS Applocker is installed. It allows only to run applications which are installed in Programs directory. If we call now the sql server reporting services url, it downl