Skip to Content
author's profile photo Former Member
Former Member

HTTP Multi-Form Post - And Config?

Hey Everyone,

I'm stuck on a situation where my code in PRD does not behave like my code in DEV and QAS. This code is a simple multi-part HTTP post to an external system. Nothing special. There are two variables in my equation:

1. DEV and QAS are on a higher kernel level than PRD. The kernel has not migrated that far yet.
2. I have the cryptographic library active on DEV and QAS, but not on PRD. Like the kernel, it has not migrated there yet.

Mind you, I've double checked the SICF and SMICM settings to guarantee they are identical in all systems. Is there something else that I have missed?

I have seen situations before where kernel applications have "tightened the bolts" on weak code, so I thought perhaps my code was "weak." Would someone mind giving a glance over to see if something is missing? Note that it works great in PRD, but not in QAS and DEV. It could be just sloppy code that crumbled under the stringent eye of a new kernel.

Here is the code...thanks for your attention.


DATA: http_client TYPE REF TO if_http_client.

CALL METHOD cl_http_client=>create


host = lv_host

service = '80'

scheme = '1'


client = http_client.

*These steps fill the HTTP Post basic settings for communication back to the URL that first Posted to SAP.

http_client->request->set_header_field( name = '~request_uri' value = sourcetask_http_url ).

http_client->request->set_header_field( name = '~request_method' value = 'POST' ).

http_client->request->set_header_field( name = 'Content_Type' value = 'multipart/form-data' ).

http_client->request->set_header_field( name = '~server_protocol' value = 'HTTP/1.1' ).

* Variable Fields Need to Map to EDMS Form *These steps fill the MIME multi-part form fields with values.

http_client->request->set_form_field( name = 'taskstatus' value = 'Done').

http_client->request->set_form_field( name = 'attributes_ref_canddoc_1' value = attributes_ref_canddoc_1 ).

http_client->request->set_form_field( name = 'wf_status' value = wf_status ).

http_client->request->set_form_field( name = 'forms_dlm_lbl_form_change_type_1' value = form_change_type_1 ).

http_client->request->set_form_field( name = 'forms_dlm_lbl_form_change_ref_1' value = form_change_ref_1 ).

http_client->request->set_form_field( name = 'forms_dlm_lbl_form_dp_repart_1' value = form_dp_repart_1 ).

*This step sends the HTTP Post to the external system.

http_client->send( ).

*This step is necessary to make sure the communication was a success. Without it a failure won't be known.

CALL METHOD http_client->receive


http_communication_failure = 1

http_invalid_state = 2

http_processing_failed = 3


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2014 at 02:34 PM

    Update: I've reviewed the system profile, the ICF, the Crypto Library, the RFC, the ICM, rewritten my code in numerous ways, reverted the kernel back to its original level...all to no avail. What did come of it is this...and a lesson I've learned many times and should have been more astute and critical from the start. When the downstream system you are communicating with tells you they have not made a change and it must be SAP...well, make sure they are not lying. "Well, the change we made wouldn't affect that." Oh...really.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.