Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to load a web into table

Former Member
0 Likes
627

Hi all,

I have generated HTML page to make a demand in one server. This page returns me another page which I can see perfectly in the GUI browser if I execute this code.

CALL METHOD HTML_EXPLAIN->LOAD_DATA
   IMPORTING
    ASSIGNED_URL = URL_DOC
   CHANGING
    DATA_TABLE = HTML.

  CALL METHOD HTML_EXPLAIN->SHOW_URL
   EXPORTING
    URL = URL_DOC.

My problem is I need put the information displayed in the browser in one internal table, but I don't know how to achieve this. Any help?

Thank you very much.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
572

Hi,

i do it in this way:

TYPES: BEGIN OF TY_,

LINE(132),

END OF TY_.

*

DATA: HEAD_RES TYPE TABLE OF TY_.

DATA: BODY_RES TYPE TABLE OF TY_.

DATA: HEAD_REQ TYPE TABLE OF TY_.

DATA: BODY_REQ TYPE TABLE OF TY_.

*

DATA: URI(128).

*

URI = 'http://www....'. -> Your www-address

*

CALL FUNCTION 'HTTP_GET'

EXPORTING

ABSOLUTE_URI = URI

RFC_DESTINATION = 'SAPHTTP' "s. THTTP PräsenServer

  • RFC_DESTINATION = 'SAPHTTPA' "s. THTTP AppliServer

BLANKSTOCRLF = 'Y'

TABLES

RESPONSE_ENTITY_BODY = BODY_RES

RESPONSE_HEADERS = HEAD_RES

REQUEST_ENTITY_BODY = BODY_REQ

REQUEST_HEADERS = HEAD_REQ

EXCEPTIONS

CONNECT_FAILED = 1

TIMEOUT = 2

INTERNAL_ERROR = 3

TCPIP_ERROR = 4

DATA_ERROR = 5

SYSTEM_FAILURE = 6

COMMUNICATION_FAILURE = 7

OTHERS = 8.

*

Regards, Dieter

Hi all,

I have generated HTML page to make a demand in one server. This page returns me another page which I can see perfectly in the GUI browser if I execute this code.

CALL METHOD HTML_EXPLAIN->LOAD_DATA
   IMPORTING
    ASSIGNED_URL = URL_DOC
   CHANGING
    DATA_TABLE = HTML.

  CALL METHOD HTML_EXPLAIN->SHOW_URL
   EXPORTING
    URL = URL_DOC.

My problem is I need put the information displayed in the browser in one internal table, but I don't know how to achieve this. Any help?

Thank you very much.

2 REPLIES 2
Read only

Former Member
0 Likes
573

Hi,

i do it in this way:

TYPES: BEGIN OF TY_,

LINE(132),

END OF TY_.

*

DATA: HEAD_RES TYPE TABLE OF TY_.

DATA: BODY_RES TYPE TABLE OF TY_.

DATA: HEAD_REQ TYPE TABLE OF TY_.

DATA: BODY_REQ TYPE TABLE OF TY_.

*

DATA: URI(128).

*

URI = 'http://www....'. -> Your www-address

*

CALL FUNCTION 'HTTP_GET'

EXPORTING

ABSOLUTE_URI = URI

RFC_DESTINATION = 'SAPHTTP' "s. THTTP PräsenServer

  • RFC_DESTINATION = 'SAPHTTPA' "s. THTTP AppliServer

BLANKSTOCRLF = 'Y'

TABLES

RESPONSE_ENTITY_BODY = BODY_RES

RESPONSE_HEADERS = HEAD_RES

REQUEST_ENTITY_BODY = BODY_REQ

REQUEST_HEADERS = HEAD_REQ

EXCEPTIONS

CONNECT_FAILED = 1

TIMEOUT = 2

INTERNAL_ERROR = 3

TCPIP_ERROR = 4

DATA_ERROR = 5

SYSTEM_FAILURE = 6

COMMUNICATION_FAILURE = 7

OTHERS = 8.

*

Regards, Dieter

Read only

0 Likes
572

Perfect answer Dieter Gröhn, I was in the wrong way.