2010 Apr 29 9:46 AM
Hi ALL,
Is there any FM that takes Idoc message as input and gives xml format?
Thanks
Bala Duvvuri
2010 Apr 29 9:52 AM
You can convert the IDOC (idoc number) to XML using the function module "IDX_IDOC_TO_XML".
Regards
Vinod
Hi ALL,
Is there any FM that takes Idoc message as input and gives xml format?
Thanks
Bala Duvvuri
2010 Apr 29 9:49 AM
You can specify an XML Port on a partner profile. I suspect this calls a Function Module. That is how I would find out.
2010 Apr 29 9:52 AM
You can convert the IDOC (idoc number) to XML using the function module "IDX_IDOC_TO_XML".
Regards
Vinod
2010 Apr 29 9:55 AM
Vinod,
I just have idoc message HRMD_A.HRMD_A07.how would i get the xml format.what parameters do i need to pass to the fm which u mentioned
Thanks
Bala Duvvuri
2010 Apr 29 10:11 AM
Hi Bala,
The parameters you need to fill in IDX_IDOC_TO_XML are :-
CALL FUNCTION 'IDX_IDOC_TO_XML' "
EXPORTING
edidc40 = " edi_dc40 Control Record (IDoc)
def_typ = 'X' " char1 (X or SPACE)
syntax_check = 'X' " char1 (X or SPACE) for Syntax Check
tunnel = ' ' " char1 (X or SPACE)
rfc_codepage = " cpcodepage SAP character set identification
multi = 'X' (X or SPACE) " char1 Single-Character Flag
IMPORTING
xml_data = " string
TABLES
idoc_data_40 = " edi_dd40 IDoc Data Record for Interface to External System
EXCEPTIONS
CONVERSION_FAILED = 1 "
SYSTEM_ERROR = 2 " Internal Error
STRUCTURE_ERROR = 3 "
. " IDX_IDOC_TO_XML
You can also check FM IDOC_XML_TRANSFORM or IDOC_XML_DISPLAY . You need to pass the IDOC to this FM and get the output in xml format.
Hope it might be helpful.
Thanks,
Daya.
Edited by: daya mishra on Apr 29, 2010 11:14 AM
2010 Apr 29 11:02 AM
This function module will give XML structure only if the input parameter is idoc number.
You can use transaction code WE60 to generate the XML structure of IDOC type.
WE60 -> Enter Basic Type -> Select Menu Option "Documentation" -> XML Schema.
Regards
Vinod
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |