2013 May 19 10:43 AM
Dear Experts,
I have a requirement that i need to consume a web service to read serial nos for a given
Sale order no and store them in a custom table.
Please find my code snippet.
DATA: http_client TYPE REF TO if_http_client ,
http_url TYPE string,
p_content TYPE string,
p_content1 TYPE xstring,
CODE_REASON TYPE STRING ,
HTTP_CODE TYPE I.
http_client->send( ).
* Reterive the result
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
if sy-subrc <> 0.
call method http_client->get_last_error
importing
code = gv_subrc
message = gv_errortext.
endif.
CALL METHOD HTTP_CLIENT->RESPONSE->GET_STATUS
IMPORTING
CODE = HTTP_CODE
REASON = CODE_REASON .
p_content = http_client->response->get_cdata( ).
My problem is Web service is getting triggered properly but while reading
data into Destination field using method get_cdata(), I was not able read the
entire data into my destination field(P_CONTENT),As i have more than 10000 records in xml format.
P_CONTENT field is only filled with 255 chars during runtime.
Please help me on this,As it was urgent issue.
Regards
Mahesh.P
2013 May 20 2:19 PM
Dear Experts,
I have a requirement that i need to consume a web service to read serial nos for a given
Sale order no and store them in a custom table.
Please find my code snippet.
DATA: http_client TYPE REF TO if_http_client ,
http_url TYPE string,
p_content TYPE string,
p_content1 TYPE xstring,
CODE_REASON TYPE STRING ,
HTTP_CODE TYPE I.
http_client->send( ).
* Reterive the result
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3
OTHERS = 4.
if sy-subrc <> 0.
call method http_client->get_last_error
importing
code = gv_subrc
message = gv_errortext.
endif.
CALL METHOD HTTP_CLIENT->RESPONSE->GET_STATUS
IMPORTING
CODE = HTTP_CODE
REASON = CODE_REASON .
p_content = http_client->response->get_cdata( ).
My problem is Web service is getting triggered properly but while reading
data into Destination field using method get_cdata(), I was not able read the
entire data into my destination field(P_CONTENT),As i have more than 10000 records in xml format.
P_CONTENT field is only filled with 255 chars during runtime.
Please help me on this,As it was urgent issue.
Regards
Mahesh.P
2013 May 20 2:19 PM