cancel
Showing results for 
Search instead for 
Did you mean: 

Send XML to SFTP with SAP PI

former_member269988
Participant
0 Kudos

Hi Dear,

Please i need a help...i try send to SFTP the xml file (i convert internal table in XML and send), but the file is not correct:

In RWB the error message:

my module in CC:

Does anyone have any idea what I can do to make this xml recording be correct?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

former_member269988
Participant
0 Kudos

I gave up doing this dynamic reading and did using field mapping. Thank you for your attention and help.

Answers (2)

Answers (2)

former_member190293
Active Contributor
0 Kudos

Hi Wilson!

If you need to send contents of your table as XML structure, why not to create Data/Message types for that table, define interface with operation using that maessage type and generate ABAP sender proxy in your source system?

In ABAP code you just fill structures of source message with your table's data and call the generated proxy class's method to send message to PI.

Regards, Evgeniy.

former_member190293
Active Contributor
0 Kudos

Hi Wilson!

Your error message is self-descriptive. It says that module processor couldn't find "MessageTransformBean" module. Check your communication channel where this module is used.

Regards, Evgeniy.

former_member269988
Participant
0 Kudos

Hi Evgeny,

Yes its self-descriptive, but my question is, why its incorrect ? can i not using this module to create a xml file in sftp?

thanks for your attention

former_member190293
Active Contributor
0 Kudos

Hi Wilson!

No, it just says that given JNDI module name is incorrect.

Please check, module name should look like:

AF_Modules/MessageTransformBean.

Regards, Evgeniy.

former_member269988
Participant
0 Kudos

Hi Evgeniy,

i change the module adapter to:

1localejbs/ModuleProcessorExitBeanLocal Enterprise Beanexit2localejbs/StrictXml2PlainBeanLocal Enterprise Beanconvert

Module configuration:

convert dataRec.fieldSeparator *

convert singleRecordType dataRec

exit JNDIName deployedAdapters/com.sap.aii.adapter.sftp.ra/shareable/com.sap.aii.adapter.sftp.ra

I don't see any errors, but my XML is like a payload, do you know how i convert to XML (generate in abap)?

former_member190293
Active Contributor
0 Kudos

Hi Wilson!

Maybe I don't understand your requirement but why not to use ABAP proxy sender?

Regards, Evgeniy.

former_member269988
Participant
0 Kudos

Hi Evgeniy....

I convert the internal table in XML and try create a file in sftp, but i send a string....i don't know how i convert a input string in XML.

ex.:

Input :

<?xml version="1.0" encoding="UTF-8"?> -<ns0:MT_TEST_COM xmlns:ns0="urn:hrsolutions:vagas.com:1.0"> <LINE><?xml version="1.0" encoding="utf-16"?><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values><TAB><item><AREARH_DEPART>TESTE</AREARH_DEPART><CENTROCUSTO>1233</CENTROCUSTO></TAB></item></asx:values></asx:abap></LINE> </ns0:MT_TEST_COM>

But the correct is:

output:

<?xml version="1.0" encoding="UTF-8"?> -<ns0:MT_TEST_COM xmlns:ns0="urn:hrsolutions:vagas.com:1.0">
<?xml version="1.0" encoding="utf-16"?><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">

<asx:values>

<TAB>

<item>

<AREARH_DEPART>TESTE</AREARH_DEPART> <CENTROCUSTO>1233</CENTROCUSTO>

</TAB>

</item>

</asx:values>

</asx:abap>

</ns0:MT_TEST_COM>


thanks