1. ABAP提供了一个工具类cl_proxy_xml_transform,通过它的两个方法abap_to_xml_xstring和xml_xstring_to_abap实现两种格式的互换。 看具体例子: REPORTzxm.DATA:ls_abapTYPEzzcrmost__pro001dotproduct1.DATA:ls_lineLIKELINEOFls_abap-item.ls_line-logsys='AG3'.ls_line-object_family='0401'.ls_line-...
1. ABAP提供了一个工具类cl_proxy_xml_transform,通过它的两个方法abap_to_xml_xstring和xml_xstring_to_abap实现两种格式的互换。 看具体例子: REPORTzxm.DATA:ls_abapTYPEzzcrmost__pro001dotproduct1.DATA:ls_lineLIKELINEOFls_abap-item.ls_line-logsys='AG3'.ls_line-object_family='0401'.ls_line-...
方式一:使用ABAP工具类cl_proxy_xml_transform,借助其两个方法abap_to_xml_xstring和xml_xstring_to_abap完成格式转换。以具体示例为例,最后一行的ASSERT语句验证了从ABAP到XML再到ABAP的转换过程中,原始ABAP数据与最终ABAP数据完全一致。涉及的结构体zzcrmost__pro001dotproduct1定义如下,用于ABAP代...
cl_proxy_xml_transform=>xml_xstring_to_abap( EXPORTING ddic_type ='ZZCRMOST__PRO001DOTPRODUCT1' xml = xml IMPORTING abap_data = ls_abap2 ).ASSERT ls_abap2 = ls_abap. 最后一行的ASSERT语句,说明从ABAP格式转换成XML格式,再转换成ABAP格式,转换前的ABAP数据和转换后的ABAP数据是完全相同的。 上...
ABAP和XML数据格式互相转换是广大开发人员经常遇到的需求。本文介绍两种方式。 1. ABAP提供了一个工具类cl_proxy_xml_transform,通过它的两个方法abap_to_xml_xstring和xml_xstring_to_abap实现两种格式的互换。 看具体例子: REPORT zxm. DATA: ls_abap TYPE zzcrmost__pro001dotproduct1. ...
REPORT ztool_xml_parse. DATA: lv_xstring TYPE xstring. DATA: lv_xml TYPE string. DATA: lv_conv_out TYPE REF TO cl_abap_conv_out_ce. DATA: lv_reader TYPE REF TO if_sxml_reader. DATA: lv_node TYPE REF TO if_sxml_node.
use cl_proxy_xml_transform to transform data between XML and ABAP Useful SAP System Administration Transactions Useful Transactions in SAP Workflow Use of BAPI_SHIPMENT_CREATE concerning shipping statuses and deadlines userexit to allow posting in MIRO if the difference is = to packing amout ...
CLASS /clean/xml_converter DEFINITION PUBLIC FINAL CREATE PUBLIC. PUBLIC SECTION. METHODS convert IMPORTING file_content TYPE xstring RETURNING VALUE(result) TYPE /clean/some_inbound_message. ENDCLASS. CLASS /clean/xml_converter IMPLEMENTATION. METHOD convert. cl_proxy_xml_transform=>xml_xstring_...
If you read any XML into your program, transform that to ABAP data and then those back to JSON, then ... (that would be the second way listed in the blog above). PS: CL_ABAP_CODE_PAGE would be the better choice compared to function module 'ECATT_CONV_XSTRING_TO_STRING'. Former ...
xml_out = CL_PROXY_ADAPTER_TEST=>XML_PRETTY_PRINT(EXPORTINGSOURCE = xml_out ). where xml_out(type xstring) is output from transformation call Reply Jelena_Perfiljeva Active Contributor 2016 Jul 14 6:25 PM 2 Kudos 1,222 SAP Managed Tags: ABAP Development To add to Sandra's ...