Quantcast
Channel: SCN: Message List - ABAP Connectivity
Viewing all articles
Browse latest Browse all 3125

Re: HTTP_POST structure / syntax

$
0
0

in another thread Chan-Seok Jeon showed the proper structure of the body internal table. here it is, and thanks about Chan-Seok Jeon.

 

* Set Header

APPEND 'Content-Type: text/xml; charset=euc-kr' TO LT_REQ_HEAD.

 

* Set Parameter

APPEND '<?xml version="1.0" encoding="euc-kr"?>             ' TO LT_REQ_BODY.

APPEND '<root>                                              ' TO LT_REQ_BODY.

APPEND '<params>                                            ' TO LT_REQ_BODY.

APPEND '<param id="admMode" type="STRING">Y</param>         ' TO LT_REQ_BODY.

APPEND '<param id="block" type="STRING">A23</param>         ' TO LT_REQ_BODY.

APPEND '<param id="gubun" type="STRING">lot</param>         ' TO LT_REQ_BODY.

APPEND '<param id="ocomp" type="STRING"></param>            ' TO LT_REQ_BODY.

APPEND '<param id="path" type="STRING"></param>             ' TO LT_REQ_BODY.

APPEND '<param id="shipno" type="STRING">S630</param>       ' TO LT_REQ_BODY.

APPEND '<param id="userid" type="STRING">AAAAAAAAAA</param> ' TO LT_REQ_BODY.

APPEND '<param id="plate" type="STRING">Y</param>           ' TO LT_REQ_BODY.

APPEND '<param id="print_view" type="STRING">V</param>      ' TO LT_REQ_BODY.

APPEND '</params>                                           ' TO LT_REQ_BODY.

APPEND '<dataset id="ds_input">                             ' TO LT_REQ_BODY.

APPEND '<colinfo id="chk" size="1" type="STRING"/>          ' TO LT_REQ_BODY.

APPEND '<colinfo id="dwgno" size="2" type="STRING"/>        ' TO LT_REQ_BODY.

APPEND '<colinfo id="fab" size="3" type="STRING"/>          ' TO LT_REQ_BODY.

APPEND '<colinfo id="filechk" size="3" type="STRING"/>      ' TO LT_REQ_BODY.

APPEND '<colinfo id="filename" size="30" type="STRING"/>    ' TO LT_REQ_BODY.

APPEND '<colinfo id="grp" size="1" type="STRING"/>          ' TO LT_REQ_BODY.

APPEND '<colinfo id="lot" size="3" type="STRING"/>          ' TO LT_REQ_BODY.

APPEND '<colinfo id="revno" size="3" type="STRING"/>        ' TO LT_REQ_BODY.

APPEND '<colinfo id="ship" size="5" type="STRING"/>         ' TO LT_REQ_BODY.

APPEND '<record>                                            ' TO LT_REQ_BODY.

APPEND '<chk>1</chk>                                        ' TO LT_REQ_BODY.

APPEND '<dwgno>01</dwgno>                                   ' TO LT_REQ_BODY.

APPEND '<fab>COM</fab>                                      ' TO LT_REQ_BODY.

APPEND '<filechk>Oilechk>                                   ' TO LT_REQ_BODY.

APPEND '<filename>XXXXXXXXXXXXX.XXX</filename>              ' TO LT_REQ_BODY.

APPEND '<grp>4L</grp>                                       ' TO LT_REQ_BODY.

APPEND '<lot>A23</lot>                                      ' TO LT_REQ_BODY.

APPEND '<revno>0</revno>                                    ' TO LT_REQ_BODY.

APPEND '<ship>S630</ship>                                   ' TO LT_REQ_BODY.

APPEND '</record>                                           ' TO LT_REQ_BODY.

APPEND '</dataset>                                          ' TO LT_REQ_BODY.

APPEND '</root>                                             ' TO LT_REQ_BODY.

 

You are just passing the exact structure of the xml to http_post.

thanks,

Erik


Viewing all articles
Browse latest Browse all 3125

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>