cancel
Showing results for 
Search instead for 
Did you mean: 

FCC with input as a single string

0 Kudos

Hello All,

I am working on a feasibility check to convert a conversion agent code using PI's built in features. I find myself stuck in one such case and need your expert advice:

The file in consideration appears as below:

HDR12345ADD8908ADD8908ITM34567ITM34567

HDR marks the beginning for Header - which is followed by a 5 number of constant fields

ADD marks the beginning for Address - which is followed by 4 number of constant fields

ITM marks the beginning for Item - which is followed by 5 number of constant fields.

The recordsetStructure looks as below: HEADER,1,ADDRESS,*,ITEM,* i.e. each line can have multiple addresses and items

The desired output is:

<MT_DATA>

    <RECORD>

         <HEADER>

              <VALUE>12345</VALUE>

         </HEADER>

         <ADDRESS>

              <VALUE>8908</VALUE>  

         </ADDRESS>

         <ADDRESS>

              <VALUE>8908</VALUE>  

         </ADDRESS>

         <ITEM>

              <VALUE>34567</VALUE>  

         </ITEM>

         <ITEM>

              <VALUE>34567</VALUE>  

         </ITEM>

      </RECORD>

</MT_DATA>

The problem I am facing right now is that if my input had HDR, ADD and ITM on different lines, my FCC works well. However if they are in the same line, I am only able to read only the HDR and the rest seems to be ignored. I am finding it hard to believe that a string without a nl cannot be  addressed in FCC.

Regards,

KN

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

I had to create my own adapter module to address this.

Regards,

Keerti

Answers (1)

Answers (1)

former_member184720
Active Contributor
0 Kudos

Hi Keerti -Thatz how the content conversion works and I dont think you can do this with standard content conversion.

May be you need to read the entire line into one field and handle it in the mapping.

0 Kudos

I think you are right. Did a fair bit of reading through other forums and have come to the same conclusion. It sucks to know that SAP has not bridged this gap as yet. So much more development to do such a tiny little thing.

former_member184720
Active Contributor
0 Kudos

Agreed!! and ofcourse i feel some gaps will never get filled though they are tiny .  Good thing is that atleast it supports customization.Like in your case writing an adapter module/ java mapping.