cancel
Showing results for 
Search instead for 
Did you mean: 

FCC SplitByValue function

Former Member
0 Kudos

Hi Friends,

I have requirement where user will provide text file with following pattern of data:

:20:2000000003

:32A:081227SAR10000,00

:50:AL WAHA PETROCHEMICALS

AL-JUBAIL INDUSTRIAL CITY

KSA

:52A:AAALSARI

:53B:/010-049-123-008

:57A:BSFRSARI

:59:/812-8300-270

SAHARA PETRO. (TESTING FOR B2B)

OFFICE NO. 987

45678 AL JUBAIL INDUSTRIAL CITY

:70:INV. 9876543 FR.27.12.08

I need to convert this into xml like:

<?xml version="1.0"?>

<PaymentMessage>

<PaymentTransaction>

<CompanyCode>Corporate code</CompanyCode>

<SequenceNum>0000000000107007</SequenceNum>

<TransactionData>:20:2000000003

:32A:081227SAR10000,00

:50:AL WAHA PETROCHEMICALS

AL-JUBAIL INDUSTRIAL CITY

KSA

:52A:AAALSARI

:53B:/010-049-123-008

:57A:BSFRSARI

:59:/812-8300-270

SAHARA PETRO. (TESTING FOR B2B)

OFFICE NO. 987

45678 AL JUBAIL INDUSTRIAL CITY

:70:INV. 9876543 FR.27.12.08

</TransactionData>

</PaymentTransaction>

</PaymentMessage>

Can this be done using Splitbyvalue function in xi?

or please suggest how can i achieve this in XI

Accepted Solutions (1)

Accepted Solutions (1)

former_member206760
Active Contributor
0 Kudos

Dear Brijesh,

It seems that there is some confusion...

1. FCC and split by value are two different things

2. As far as your requirement is concerned of converting the text file to XMl

you will need to use a sender FCC at the sender file adapter ...

hence search the sdn for sender FCC or fcc on the sender file adapter and you will get lots of info

Answers (1)

Answers (1)

Shabarish_Nair
Active Contributor
0 Kudos

from what i see, all the data in your file should go under one node in the XML. Right?

Well, dont use FCC here. in the sender adapter instead of FCC use message protocol as FILE and then use a java mapping.

The java mapping will be similar to this wiki entry - https://wiki.sdn.sap.com/wiki/display/XI/WholePayloadtoaXML+field

Former Member
0 Kudos

Hi!

You can achive File Content Conversion in a most simple way by using this module...you can split the data based on the parameters giving...follow according to the below blog and this feature is available in PI This feature is available from PI 7.0 SP09

[http://help.sap.com/saphelp_nw70/helpdata/en/44/75bdab7b2618e8e10000000a1553f7/content.htm]

Adding StrictXml2PlainBean (XML to Text) in the Module Processor

StrictXml2PlainBean

[http://help.sap.com/saphelp_nwpi71/helpdata/en/44/748d595dab6fb5e10000000a155369/frameset.htm]

Converting XML in the Receiver File/FTP Adapter to Text Format

[http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/frameset.htm]

  • BLOG::*

[https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/13292] [original link is broken] [original link is broken] [original link is broken];

I hope this will be easy one and definetely useful to you..

Regards::

Amar Srinivas Eli

Former Member
0 Kudos

Hi Shabarish,

that document is really helpful, n i think it wll meet my req..

i tried to compile that program in java bt got many error like..

C:\j2sdk1.4.2_16-x64\bin>javac PayloadToXMLField.java

PayloadToXMLField.java:1: package com.sap.aii.mapping.api does not exist

import com.sap.aii.mapping.api.StreamTransformation;

^

PayloadToXMLField.java:2: package com.sap.aii.mapping.api does not exist

import com.sap.aii.mapping.api.AbstractTrace;

^

PayloadToXMLField.java:3: package com.sap.aii.mapping.api does not exist

import com.sap.aii.mapping.api.StreamTransformationConstants;

^

PayloadToXMLField.java:8: cannot resolve symbol

symbol : class StreamTransformation

location: class PayloadToXMLField

public class PayloadToXMLField implements StreamTransformation {

^

PayloadToXMLField.java:16: cannot resolve symbol

symbol : class AbstractTrace

location: class PayloadToXMLField

AbstractTrace trace;

^

PayloadToXMLField.java:27: cannot resolve symbol

symbol : class AbstractTrace

location: class PayloadToXMLField

(AbstractTrace) param.get(

^

PayloadToXMLField.java:28: cannot resolve symbol

symbol : variable StreamTransformationConstants

location: class PayloadToXMLField

StreamTransformationConstants.MAPPING_TRACE);

^

PayloadToXMLField.java:43: cannot resolve symbol

symbol : variable outputPayload

location: class PayloadToXMLField

outputPayload =

^

PayloadToXMLField.java:50: cannot resolve symbol

symbol : variable outputPayload

location: class PayloadToXMLField

out.write(outputPayload.getBytes());

^

9 errors

Do I need to install something else also so that this program should work properly