Skip to Content
avatar image
Former Member

File Content Conversion Receiver side

hello friends:

I needed output file as with xml tags at beginning and ending and inbetween csv file

Eg for the desired output

<Main>

<Header>

<H1> headertext1 </H1>

<H2> headertext2 </H2>

</Header>

<BODY>

A,123,445,455, KUM1ABC

B,XX, YY,ZZ,KUM2ABC

B,12a,446,457,KUM3ABC

B,12b,447, 458,KUM4ABC

B,12c,448,459,KUM5ABC.

</BODY>

</Main>

1. I am receiving a table from sap rfc as source and mapped inside XI to a target structure.

COL1 COL2 COL3 COL4 COL5

A 123 445 455 KUM1ABC

B XX YY ZZ KUM2ABC

B 12a 446 457 KUM3ABC

B 12b 447 458 KUM4ABC

B 12c 448 459 KUM5ABC

2,Create Target structure

Target Structue:

Node

Header

H1

H2

Data

C1

C2

C3

C4

C5

3.At Receiver communication channel i used FCC with Body.fieldSeparator as ',' and i am getting the output as below with total csv file .How to get xml tags at beginning and at ending and in between csv file?

Output:

headertext1

headertext2

A,123,445,455, KUM1ABC

B,XX, YY,ZZ,KUM2ABC

B,12a,446,457,KUM3ABC

B,12b,447, 458,KUM4ABC

B,12c,448,459,KUM5ABC

thanks for reading my message! any clues are appreciated

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    May 18, 2009 at 02:33 AM

    Do not use FCC for this. Instead define the XM strucuture as you want in the message mapping and then map the way you want using some UDFs.

    VJ

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Is this possible with UDF's . I wanted a file with wrapper as xml tags and in between csv file ?

      can you please give me an UDF example something like this to be achieved !

  • avatar image
    Former Member
    May 18, 2009 at 06:38 AM

    Hi,

    You use like below.

    Use StrictXml2PlainBean to convert the file in .csv format.The same like FCC paramters .

    [http://help.sap.com/saphelp_nw70/helpdata/EN/44/748d595dab6fb5e10000000a155369/content.htm]

    After that use adapter module and add the xml tag in the file.

    Module should be present like,

    1.StrictXml2PlainBean

    2.Custom Adapter module

    3.CallSapAdapter

    Regards,

    Prakasu.M

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    May 19, 2009 at 04:24 AM

    thanks

    Add comment
    10|10000 characters needed characters exceeded