ABAP Service: Scanning through HTML

Dear ABAP community,
Iu2019m thinking about a method to scan through HTML code of an specified URL.
The idea is to scan the HTML content by a search term; so I need a function to get the data of the page specified by a URL and scan this page.
Is there any method/function in ABAP?
Thanks for your feedback.
Best regards,
Kurt.

Hello to all,
a colleague of mine found a very good solution to scan a page provided by an appropriated URL:
  data: lv_html   type string,
        lv_url    type string.
* Create client
  call method cl_http_client=>create_by_url
    exporting
      url                = lv_url
    importing
      client             = lv_client
    exceptions
      argument_not_found = 1
      plugin_not_active  = 2
      internal_error     = 3
      others             = 4.
  if sy-subrc ne 0.
    message id sy-msgid type sy-msgty number sy-msgno
      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
* Get request:
  call method lv_client->send
    exceptions
      http_communication_failure = 1
      http_invalid_state         = 2
      http_processing_failed     = 3
      others                     = 4.
  if sy-subrc ne 0.
    message id sy-msgid type sy-msgty number sy-msgno
      with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
  endif.
* Prepare client-receive:
  lv_client->receive( exceptions others = 1 ).
* Get HTML:
  lv_html = lv_client->response->get_cdata( ).
* Sesrch for a string in HTML:
  if not pa_find is initial.
    find first occurrence of pa_find in lv_html in character mode ignoring case.
    if sy-subrc eq 0.
    endif.
  endif.
Best regards,
Kurt.

Similar Messages

  • Error while invoking BPEL Process through HTML Page

    Hi ,
    I have created a HTML Page to invoke BPEL synchronous process .
    HTML Page contains :
    <html>
    <head>
    <title>Untitled Document</title>
    <h1>Add Macro Task Input Form </h1>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body bgcolor="cyan" text="#000000">
    <form name="form1" method="get" action="/httpbinding/default/AddMacroSync/process">
    EmployeeId :
    <input type="text" name="EmployeeId" ><br>
    <br>
    TaskName :
    <input type="text" name="MacroTaskName" >
    <button
    id="identifier"
    class="dialog"
    label="OK"
    accesskey="t"/>
    <br>
    </form>
    </body>
    </html>
    I am able to invoke my BPEL Process named as " AddMacroSync" .
    It also creating instance for this BPEL Process .
    But when I go BPEL Console and check my instance , it is always faulted .
    I am providing two inputs : Employee Id and Taskname through HTML Page .
    These inputs got assigned to their respective output variables .
    But when I click on audit link ..it shows error while invoking the Process .
    It Show error :
    when invoking endpointAddress 'http://152.69.248.232:8990/AddMacroTask-AddMacroTask-context-root/AddMacroTaskWebService', [java.lang.NumberFormatException]
    But this end point address is working when I put this address in URL .
    Please someone help me how to solve this problem .
    Thanks
    Prashant Dwivedi
    Message was edited by:
    Prashant Dwivedi

    Hi Clemens ,
    I changed My HTML ...Now it looks like as :
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="application/x-www-form-urlencoded; charset=iso-8859-1">
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <form name="form1" method="post" action="/httpbinding/default/AddMacroSync">
    <input type="hidden" name="msg_part" value="payload">
    <input type="hidden" name="namespace" value="http://xmlns.oracle.com/AddMacroSync">
    EmployeeId:
    <input type="text" name="EmployeeId">
    TaskName :
    <input type="text" name="TaskName">
    <input type="submit" name="Submit" value="Submit">
    </form>
    </body>
    </html>
    After this when I try to incoke my BPEL Process through this HTML :
    I am gettign following error :
    500 Internal Server Error
    java.lang.IllegalStateException: IOException: Premature end of POST data
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.EvermindHttpServletRequest.getParameter(EvermindHttpServletRequest.java:2452)
         at com.collaxa.cube.ws.http.HttpBindingServlet.checkSecurity(HttpBindingServlet.java:281)
         at com.collaxa.cube.ws.http.HttpBindingServlet.doPost(HttpBindingServlet.java:85)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)
         at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)

  • Error while Testing Web Service created through SICF.

    Hi,
    I have created a Web Service through SICF, Activated the service and now trying to test this service but am getting the following Error Msg in the Explorer.
    I have also maintained the Login Details in this Service.
    503 Service not available
    Error: -6
    Version: 7000
    Component: J2EE Server
    Date/Time: Fri May 27 11:00:30 2011 
    Module: http_j2ee_mt.c
    Line: 820
    Server: CRMQA_ECQ_08
    Error Tag:
    Detail: Cannot reach external Application Server on localhost:50800
    I have browsed through some of the threads related to this, but was unable to resolve this issue.
    Please Help.
    Thanks and Best Regards,
    Sunil.

    Hello Sunil
    The WS navigator that is for testing the ABAP services is a JAVA
    application.
    Do you have java stack installed along with your ABAP on this
    System?
    Is the J2EE running?
    Best Regards
    Luis Rivera

  • OSB 10g: Accessing password in Service Account through WLST

    Hi,
    There is a requirement to get the password stored in a Service Account through a script. Can anyone let me know if this is possible and how it can be done?
    Thanks in advance
    Vikas

    http://download-llnw.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/appendixAPIs.html#wp1046774
    I doubt if you can do that. API to accomplish that is not in public domain as you can notice from the above link.
    Manoj

  • Firewall Rules for Printing and Scanning through Windows Firewall

    Hello,
    I am having trouble determining the Ports, Programs, and Services required for printing and scanning with my AIO.
    I am using Windows Firewall in Windows 7, and am only allowing certain rules in and out.
    I know the firewall is the problem, for when I disable it, everything works fine.
    Which rules are required for printing and scanning through the firewall?

    4th Bump,
    Is there anyone who can help me with this?
    As I said before, other printer manufacturers such as Lexmark and Brother provide this exact information.
    Why doesn't hp have a document for this? Does everyone just disable their firewall or open every port?

  • Developing for iPad   iMac through HTML

    The new DHCP standards for internet security mean that home computers will have to configure IP passthrough, as well as configure NAT/Gaming custom services in order to serve web pages. The machine IP will then be assigned a new IP, based on the ISP.
    This system is even more secure than in the past, but many people do not know how to configure the DHCP routers. With proper configuration, a home-based computer can connect with iPad, etc, through HTML/Javascript which is not a new idea, but does open many possibilities for development, especially if used in conjunction with iOS applications.
    Here is a link with the settings for one common DHCP router.

    mark133 wrote:
    It is not gibberish, and I wouldn't be reposting if the previous post had not been removed due to a complaint.
    Major ISPs have started widely using DHCP with limited ports and no outside internet connection as the default, which is a recent development.
    Trust me. It is gibberish. If the hosts are removing your posts, it is not a good idea to keep reposting them.
    DHCP stands for Dynamic Host Constrol Protocol. It is a way of assigning dynamic IP addresses to hosts on a network. It has nothing to do with ports, routing, or the internet. It is simply an alternative to avoid having to manually configure your machine's IP address, subnet mask, DNS servers, and default router.
    ISPs have been limiting ports since the first days of internet ISPs in the 1990s. It is not a recent development.
    Do you have a specific question regarding development on Apple products? I do not see how your post belongs in this forum. Do you have a specific question regarding Apple products at all? If so, please ask it and I can ask the hosts to move your thread to the appropriate forum. If you do not have a specific question about an Apple product that someone can help you with, then your post is in violation of the Apple Support Communities Terms of Use and is likely to be removed just like the first one was.

  • Which multifunction Laser printer (MFP) for Lion? - need multipage scanning through automatic document feeder

    Hi all,
    I'd love to get your advice on what MFP laser printer to buy.
    I need:
    - Laser color PRINTING for a small business (+/- 1500 pages per month)
    - SCANNING, preferably easy multipage scanning through the automatic document feeder
    Optionally:
    - 2nd paper feed tray
    I think of buying the HP Color LaserJet CM2320fxi, but there seem to be plenty of compatibility issues with Lion (e.g. scan to network folder does not work on Lion).
    I'd love to hear about success or failure of MFP on Lion from HP, Brother, Xerox, Lexmark, etc...
    Thx for your advace,
    S.

    I can recommend the Canon MF8380C. It has a document feeder that supports duplex scanning to Lion, either via Image Capture or Preview or 3rd party application like Acrobat Pro. You can also push scan documents from the machine by first configuring the scan settings using the Canon MF Toolbox that gets installed on the Mac.
    The print quality is good for office documents, but not that accurate for colour proofing. It uses Canon's proprietary UFR2 v2.30 driver of which the Lion version of this driver is available from the Canon web.
    As for the monthly volume, 1500 pages per month is the maximum recommended volume, so not sure if this would suit your business needs. It's recommended monthly volume is 800 colour pages.

  • ABAP Service Users  not working - important

    Hi,
    I installed finally BPC 75 NW, and I cannto get ito the application for the 1° time because I have several issues.... I get the error "The user ID, password  cannot be authenticated. Make sure you entered valid credentials".
    On Server Mgr. i get 2 errors " Sap server connection : database connection"  and "ms message queue:  queue name:  .private$BPCstatusmessagequeue".
    I have done eveything in order to solve this... but... after a lot of research I found a note where it is suggested to uninstall, however I still want to change some parameters as described in the installation guide, I hope you can please help me to clear this:
    Manual, page 43, installation for NW.
    - ABAP service users can be locked as a result of the install.
    - Check and unlock users, use SU01, press Ctrl + F5  (done, not a problem)
    - Check that COM + Components exist (done)
    - Check interfaces (this means changes in Pooling & Recycling?)
    - Check that librfc32.dll is set up appropiately (I had the problem during install where i needed to reassign this dll, now is not an issue  unless there is something else to check that i am not aware of)
    - IIS Port (80 by default right?)
    - ServerConfiguration.config for the correct username and system info (cant find this file)
    - Registry Entries on 32 and 64 bits (how can I do this)
    - Check C:windowssytem32driversetchosts file to ensure that a fully qualified domain and IP resolution exists (what exactly do i need to check)
    On server mgr also I have for  COM+ components " domain system administrator with which i installed  & password"   is this right?
    Thanx in advance, it is really important.
    Velázquez

    Hi,
    Thanx for the feedback !! really appreciate it. Here is the response:
    The COM components are ok, as well as the MSMQ and every other component you mentioned (also reinstalled it). I reactivated all "dictionary" to the 3 users created in ABAP, changed role to communication, and give SAP_ALL permission.
    In the machine, changed the Default web site to port 81 (to let BPC website take port 80)
    Reinstalled  NET 2.0, set all components for BPC website to Net 2.0
    Created the 3 abap users in domain and gave in both systems  the same password.
    Entered in the machine as the administrator user (also administrator in Netweaver) and started the installation without trouble.
    After that, tried to run the server diagnostic but this user was lacking permits, so I added the 3 users (abap) in the local machine as administrators, in a  new group called BPC (only giving the administrator role). Entered now in the machine as BPC_SYSADMIN and ran the Server Diagnostic without trouble.
    After doing this, I now am facing an issue trying to add users to the 1° appset... choosing the domain users... however someone mentioned that this is related to the NET tier, is it better to reinstall this tier completely or at least try with NET 1.1, but im just about to find out.
    Thanx again for the response.
    Velázquez

  • Display ABAP variable in an HTML page

    I am trying to display an ABAP variable in an HTML page. What is the syntax for the same? Kindly help.

    Thats exactly what im doing...modifying a class to change the properties of the table in a web template. Srry its not a BSP page....
    I tried ur syntax..
    concatenate '<table><tr><td colspan=6 style="background:green;height:20px">'l_r_tmp_var'</td></tr></table>' into C_CELL_CONTENT.
    .It gives an error..
    After "'<table><tr><td colspan=6 style="background:green;height:20px">'", there must be a space or equivalent character (":", ",", "."). (":", "          
    And when i remove the single quotes from the variable...it gives an error...
    Unable to interpret "'<table><tr><td colspan=6          
    style="background:green;height:20px">l_r_tmp_var</td></tr></table>'".     
    Possible causes: Incorrect spelling or comma error.     
    Plz help...

  • When I open iTunes or even change a preference, iTunes scans through all of my apps. How can I stop this?

    To get straight to the point, whenever I open iTunes or close a pop-up from iTunes, it starts scanning through my collection of applications. This has slowly got on my patient nerve. It wasn't always this was. Before I transfered all my data from my Mac to Pc, it worked fine. So I am wondering what is it doing, and how can I stop this. Bare in mind I have alot of apps. Thanks in advance for the help!
    Sincerely,   
         Tarellano

    You can only use the German iTunes/App store if you are located in Germany.  The German store is in the German language.

  • Error to import  RFC (ABAP) service in CAF

    I am trying to import a ABAP service  (as an external service) BAPI_USER_GET_DETAIL and getting the following error after selecting  BAPI_USER_GET_DETAIL  checkbox
    cannot load R/3 descriptions.
    Env. -
    NetweSAP NetWeaver Developer Studio Version: 7.0.0
    Please help

    Hi,
    Mmmh, in general case the import mechanism for external services in the CAF perspective works really stable and reliable. So I'm wondering if this is a general problem or does this message occurs only if you use the BAPI_USER_GET_DETAIL?
    Regards,
      Jan

  • Publishing a Web ABAP Service with ABAP stack

    Hi,
    We are only running ABAP Stack (we don't have Java Stack) in a SAP ECC 6.0 version.
    We have a RFC (or BAPI), for instance BAPI_CUSTOMER_GETDETAIL.
    How could we publish a Web ABAP Service?
    Thanks.
    Regards,
    Marta.

    Hi,
    I think this could be possible,
    refer below links
    Working With Web Services From ABAP
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a4433436-0301-0010-f2a9-9281ad574054
    ABAP Web Services in the Real World
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/244e7923-0a01-0010-5887-fe0b0c6dbb8d
    Journal Part XIII: Developing ABAP WebServices
    /people/thomas.jung3/blog/2004/11/15/bsp-150-a-developer146s-journal-part-xiii-developing-abap-webservices
    SAP Network Blog: BSP a Developer's Journal Part XIV - Consuming WebServices with ABAP
    /people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap
    Thanks
    Swarup

  • To fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL

    Hi Experts,
    My basis team wants me to write a OPEN sql statement in DB2 . T
    The Open SQL statement for reading data from database tables is:
    SELECT      <result>
      INTO      <target>
      FROM      <source>
      [WHERE    <condition>]
      [GROUP BY <fields>]
      [HAVING   <cond>]
      [ORDER BY <fields>].
    I want to fetch 2 fileds of table TRFCQIN (abap schema table ) through OPEN SQL in report RSORADJV  in PI .
    As per PI basis comment : To use u201CRSORADJVu201D you need write the code in open SQL. If the code had been written in open SQL in the first place you wouldnu2019t be having to translate this from MS SQL.
    Can you pls help in writing open sql with above syntax .
    Initially when I wrote as
    QL statement : select * from SAPDBSR3.XI_AF_MSG, I got the error messege as
    Error : insufficient priviliage to access specified  table.
    Again basis suggested to write this code in OPen SQL statement .
    Please suggest., I dont know open SQL for the same.
    Regards,
    Arnab.

    Hi,
    Well I don't know why you have duplicates, this is a functionnal issue. But you get the dump due the the message number 864 that triggers the abend... Changing the message type to 'E', 'S' or 'I' will prevent the dump but I guess this message has a good reason to be
    Kr,
    Manu.

  • Scan through the records in the Form and display the message!

    Hello Everyone,
    We have a requirement, I do not know how to achieve it.
    In a Forms 6i, 2 fields Type, Comment.
    Type is a list of Values (1,2,3)
    Comment - Free Text Field.
    User can enter as much rows of data, but while user saves the data we have to validate that all the records of Same Type(Say 1). If not we have to display a Message.
    So how to achieve this? How to scan through the records in the Form. Any comments on it would be great.
    Thanks.

    User can enter as much rows of data, but while user saves the data we have to validate that all the records of Same Type(Say 1). If not we have to display a Message.I am assuming that you want to check from the first record. Suppose in first record the user coosed 1 and you will check for all the entries for 1.
    Couple of ways to do this.
    1. While user is entering first record. You can keep that selected type value in GLOBAL variable and while he is entering further records you can match type with that global variable. If it is not matching then you can display message.
    2. On KEY-COMMIT trigger you can start loop from first record and can check for all the records one by one. Like.
    DECLARE
      vVal DATATYPE;
    BEGIN
      GO_BLOCK('BLOCK_NAME');
      FIRST_RECORD;
      vVal:=:FORM_TYPE_FIELD;
      LOOP
        IF vVal!=:FORM_TYPE_FIELD THEN
          MESSAGE(..);
          EXIT;
        END IF;
        EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
        NEXT_RECORD;
      END LOOP;
    END;I would go for earlier approach and will use WHEN-VALIDATE-ITEM / PRE-INSERT for type field for this purpose. Because in KEY-COMMIT the system is doing same thing again.
    -Ammad
    Edited by: Ammad Ahmed on May 15, 2010 12:23 AM
    changes not equal sign to !=

  • Debugging of ABAP Function Module through ISA Application CRM B2C 4.0

    Hi Experts
    There is way to Debug ABAP FM through ISA CRM b2c Application by Modifying some XML Files as per Extn Guide.
    I tried modifying the <APPLICATION_HOME>\WEB-INF\xcm\customer\modification\modification-config.xml After that I restarted the Application .
    But it is not Breaking for Both Statefull & Stateless FM after running my Application.
    With Some Help i found that if we try it on Remote System ( Means SAP GUI has to in Same System where CRM is Installed ???????????). but that is not Advisable Right !!!.
    So if i am able to Debug ABAP Function Module through ISA Application from any Other remote System.
    I think it will be very Useful.
    Thanks & Regards
    Ravi Sah

    Ravi
    It is other way around !!!
    You should have SAP GUI installed on the machine in which you start(access) your B2C Application. This enables for ABAP Debugging.
    We have tried this and works fine for us !!!
    Thanks
    Jack
    <b>Allot points if my post helps !!!</b>

Maybe you are looking for

  • How do you set up so that you can view the alternate text on an image when you hover over it like you do in IE?

    Using Mozilla at present the alternate text for an image does not pop up when you hover your mouse over the image. This is what occurs in Internet Explorer. In Mozilla Firefox you have to right click, choose Properties and then you can view the alter

  • View Objects

    Ok, I would like my JSP project to: - Show the user a datatable with just a FEW record from a particular table (viewobject). - When the user would like to 'Edit' one of those records, he would like to edit ALL the available fields of the record, and

  • How do i get french books on ibooks?

    How do i get french books on ibooks?

  • Videos not xfering on hotsync

    I have desktop 6.2 and windows xp home. I cannot get the videos from my palm onto my pc. when I sync the photos xfer just fine but the videos stay on my centro. Post relates to: Centro (AT&T)

  • Where is Photoshop CC and why did the system give me CS6?

    When I signed up for CC membership (single app) and paid for it, I was offered one version of Photoshop and one version only - CS6 Externded Edition. Where is the Photoshop CC I paid for? If they are the same thing, why is that not made clear in the