2013 Jan 10 6:04 PM
Can anybody guide how to found the 'Byte or Character String' from any web url through sap wheather the given 'Byte or Character String' it is avalible or not?
2013 Jan 17 3:44 PM
In your code you could try to use CL_HTTP_CLIENT->RESPONSE->GET_CDATA to get the content of the web page in a string.
You could convert it to a readable format like W3HTML with a call of FM CONVERT_STRING_TO_TABLE. the resultant internal table can be used for display with CL_GUI_HTML_VIEWER->LOAD_DATA and ->SHOW_DATA (instead of direct SHOW_URL) then use standard Abap tools with the loaded internal table.
Look also a demo SAP report like RSDEMO_HTML_VIEWER.
Regards,
Raymond
2013 Jan 11 6:06 AM
2013 Jan 16 4:13 PM
Hi ganesh,
i am opening web url throuh sap, In my scenario i have a two input fields in module pool screen with custom container screen element. In the first input field used to enter web url and second field is used to enter required word to found the given word exist or not in given url and container used to show url.
For example i am opening www.google.com url in custom container. After that i am given 'Search' word in second field and peforming action. In this action i need to find wheather this 'Search' key is avalible or not in given url. If not i need to show error message.
2013 Jan 16 4:20 PM
Hi Ashok,
You can use string operations "CS" - contains string.
Through this you can check the required substring in URL that was already generated.
Reward if helpful.
Regards,
Mahidhar.
2013 Jan 17 3:00 PM
Hi Mahidhar,
In my screnario i am interacting with non sap, so how can i use 'CS'. Can you please provide a sample code how to search given word from given url.
Regards,
Ashok.
2013 Jan 17 3:44 PM
In your code you could try to use CL_HTTP_CLIENT->RESPONSE->GET_CDATA to get the content of the web page in a string.
You could convert it to a readable format like W3HTML with a call of FM CONVERT_STRING_TO_TABLE. the resultant internal table can be used for display with CL_GUI_HTML_VIEWER->LOAD_DATA and ->SHOW_DATA (instead of direct SHOW_URL) then use standard Abap tools with the loaded internal table.
Look also a demo SAP report like RSDEMO_HTML_VIEWER.
Regards,
Raymond
2013 Jan 18 10:51 PM
Hi Raymond
cl_http_client->response->get_cdata( ) is working. Thanks for giving response.
Regards,
Ashok.