cancel
Showing results for 
Search instead for 
Did you mean: 

Content conversion

Former Member
0 Kudos

Hi,

I am having a form ,that contains customer id ,name address etc in diff diff fixed lenghts and different lines.so wen pi sends that file it has to place in that form exactly.i mean pi sends a file with that formatted file to trex team.they will take the printout of that form using their tool.scenario is file to file.

Ex:customer id

     Name

                            address                                      street

                                                   pin                                         location

etc...

Can we achieve this with pi.if yes can any body suggest how i can do.

Thanks and Regards,

Narendra

Accepted Solutions (1)

Accepted Solutions (1)

Syed1234
Explorer
0 Kudos

I suggest you to manipulate the required text output in Message Mapping or Interface Mapping (using Java program). The target XML structure can contain only one field for the output string (in required format).

Former Member
0 Kudos

Hi Frnds,

yup i have changed to File content coversin to File them my channel is working fine.wen i changed again to FCC it i sthrowing below error i am attching the error here please have a look and suggest.

and removed all the DATA2, 3, 4, structures and tried with only 1 set of parameters(Data1).still facing the same issue.

Former Member
0 Kudos

Hi,

That issue got resolved and channel is working fine now.

and here my query is need to pass the values Data1 fields sud start from 22nd position and second field sud be 40th position.

And Data2 fields sud start from 4th line 22nd position and 2nd field from 40th position.

Ex:

Data1 i have 2 fields

A and B

A sud start from 1st line the position 22nd

B wil be from 40th position

Data2 having C and D again

C sud start from 4th line 22nd postion and D will be from 40th position

How can i do this??

Please suggest.

Narendra

Former Member
0 Kudos

Farhan's suggestion to pre-format some of the text in your mapping might help you out. If you find that some of your spaces are getting lost on output, you might try the fieldContentFormatting parameter to preserve the white space (e.g. Data1.fieldContentFormatting = nothing). I think these are always set to trim white space as default.

This thread might help: http://scn.sap.com/thread/2109969

Also, you might be able to pass hex encoded values for line breaks. If not, you might have to put in some empty / dummy records to skip down to the correct line (line 4 in your example)

Also a suggestion to make the most progress, it is polite in these forums to mark answers that are helpful. This not only rewards people who are helping you, but it lets future community members who might have the same problems as you quickly find right answers.

Good luck!

Former Member
0 Kudos

Yes Aaron,

Sure..

I didn't do anything Restarted the JAVA stack server level and Checked the NWA setings.And deleted the scenario and recreated the scenario and tested it is working fine.

and as per ur suggestion i am creating the scenario for diff fixed lenghts and created dummy records for changing the lines as well.

Thanks for ur help.

Regards,

Narendra

Former Member
0 Kudos

Thats good news Narendra.

In that case, please mark this question as "answered".


Answers (6)

Answers (6)

Former Member
0 Kudos

In your File Adapter Parameters tab, under Message Protocol, try switching from File Content Conversion to just File. This might help narrow down your problem since the error messages are not very helpful.

Does the channel initialize? If yes, run your scenario to confirm you get XML output where you expect your new file. If yes, then you will know the error is with your FCC parameters.

Switch back to FCC mode and then try to remove all the DATA2, 3, 4, structures and try with only 1 set of parameters(Data1).

Does the channel fail initialization again?

Former Member
0 Kudos

From the description it is hard to say where the error is in your adapter settings.

Does the channel initialize with the FCC turned off? That will narrow where to look.

Also try checking the NWA default trace logs right after trying to stop/start your adapter. Sometimes it gives more detailed adapter errors.

To get to it by going http://[your pi server]:[your port]/nwa

Former Member
0 Kudos

Hi Aaron,

Checked in server level i can found below error over there but i am not sure whats the wrong with this error. and can you tell me if my channel turned of with FCC parameters ?How to turn it on.

pls find below error

found in lookup of TestListener.#

#1.#0025B3E732C800550000000800000EFE0004D3527EC30D15#1358251174333#com.sap.aii.adapter.file.util.AuditLog#sap.com/com.sap.aii.af.app#com.sap.aii.adapter.file

.util.AuditLog.addAuditLog(PublicMessageKey, String, AuditLogStatus, String, String, Object[])#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [359176e001ffff

ff98]#n/a##0719fe3f5f0b11e2ca3400000359176e#XI XI2FileD[CC_MR2A_Formlayout/PI_DEV/]_37##0#0#Error#1#/Applications/ExchangeInfrastructure/AdapterFramework/Ser

vices/ADAPTER/ADMIN/File#Plain###FILE_ERR_202#

#1.#0025B3E732C800550000000A00000EFE0004D3527EC33590#1358251174344#com.sap.aii.af.ra.ms.impl.core.queue.consumer.ReceiveConsumer##com.sap.aii.af.ra.ms.impl.c

  • ore.queue.consumer.ReceiveConsumer.invokeHandler(QueueMessage, MessageController)#J2EE_GUEST#0#SAP J2EE Engine JTA Transaction : [359176e001ffffff98]#n/a##07

19fe3f5f0b11e2ca3400000359176e#SAPEngine_Application_Thread[impl:3]_29##0#0#Error##Java###Rolling back transaction for message {0} due to: {1}#2#cb5fc1c7-f39

b-4b42-366e-daf23a21711a(INBOUND)#Channel has not been correctly initialized and cannot process messages#

If i miss any paremeters in FCC please suggest.

Regards,

Narendra

Former Member
0 Kudos

Hi Narendra,

This can be done with file content conversion with field fixed values.

Thnx,

Chandra.

Former Member
0 Kudos

Hi Frnds,

I have out put structure like this.

                    1234567890            1234567890


                    VINVINVINVINVINVI                        CCRAT         GVMGV


                    DESCRIPTIONDESCRIPTIONDESCRIPTIONDESCRIPTIONDESCRIPTIONDESCR

    NSC##  TEXT##

                    PURPLE     ORANGE                3    ENGINENOENGINE     STS


                                  99                     99                   99


                                                         XX         HUB SERIALNO
                                  99
                                                         HUBSTART


                                                 4               X         X


                    LICENCEL                             XXXXXXXXXX

                                                                           X
    LASTNAMELASTNAMELASTNAMELASTNA FIRSTNAMEFIRSTNAMEFIRSTNAMEFIR

    TradingAsTradingAsTradingAsTra              M     F               DD MM CCYY

Fields are in diffrent lines nd different postions.and diff fixed lenghts.

Please give me the parameters how i can achieve in reciver content conversion in file adapter.

Thanks,

Regards,

Narendra

Former Member
0 Kudos

If you have a complex layout you can set different record type structures in your File Conversion (fcc) parameters.

Simplify your input file and solve it in small steps. At this document near the end it shows how different layout structures can be defined in your parameters.

http://help.sap.com/saphelp_nw73/helpdata/en/44/6713EC3F914DDEE10000000A1553F7/frameset.htm

Try it and let us know your parameters if you get stuck.

Former Member
0 Kudos

Sorry, you are looking for PI to output to your fixed format to the receiver? The parameters are very similar, here is the guide:

http://help.sap.com/saphelp_nw73/helpdata/en/44/6713EC3F914DDEE10000000A1553F7/frameset.htm

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You might also want to see this blog which talks about Random pattern content ...

http://scn.sap.com/people/shabarish.vijayakumar/blog/2005/06/08/content-conversion-patternrandom-con...

Former Member
0 Kudos

Hi Bhaskar,

But my case conversion should happen at receiver end.PI-->Legacy.

Please suggest

Regards,

Narendra

Former Member
0 Kudos

Hi Aaron,

I tried giving the below parameters

Data.fieldSeparator

Data.endSeparator

Data.fieldFixedLengths

Data.fieldNames

But it didn't work out.

1)in 1st line i have to write 2 fields with spaces.next to lines nothing sud write.

2)from 4th line i have to write again 2 filds with spaces.and again seventh same.

3)from 8th line lenghths are changing so above parameters are giving error.

Please suggest what other parameters i have to use.

Regards,

Narendra

Former Member
0 Kudos

Hi Frnds,

I have defined my DT like below

And Reciver CC like below with endseperator 'nl'

But i need output like below

                    1234567890            1234567890 


                    VINVINVINVINVINVI                        CCRAT       


                    DESCRIPTIONDESCRIPTION         ESCRIPTIONDESCRIPTIONDESCR

    NSC##  TEXT##

Please suggest what other parameters do i need to use.

Regards,

Narendra

Former Member
0 Kudos

Hi Frnds,

Wen i tried to test with above configuration getting error log as below

11.01.2013 04:02:41.307SuccessMP: Entering module processor
11.01.2013 04:02:41.307SuccessMP: Processing local module localejbs/CallSapAdapter
11.01.2013 04:02:41.308SuccessFile adapter receiver: processing started; QoS required: ExactlyOnce
11.01.2013 04:02:41.308ErrorFile adapter receiver channel CC_XXXXXXXXXX is not initialized. Unable to proceed: null
11.01.2013 04:02:41.309ErrorException caught by adapter framework: Channel has not been correctly initialized and cannot process messages
11.01.2013 04:02:41.309ErrorMP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages
11.01.2013 04:02:41.312ErrorDelivery of the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: Channel has not been correctly initialized and cannot process messages.

Please suggest.

Regards,

Narendra

Former Member
0 Kudos

Fixed-length file output is a very standard feature of the file adapter. If your source is different then you can follow the tutorial from Riyaz or many other blog posts/wikis on this topic.

http://www.riyaz.net/sap/xipi-file-content-conversion-for-simple-structure/75/

If you don't want to alter the contents of the source file to destination, then Nebendu's approach is perfect.

Former Member
0 Kudos

Hi ,

Thanks for ur reply....

I am using pi7.o

Here source structure is different.mapping needs to be develope and have to convert above mentioned file in target system.

if same file need to send then we can bypass the scenario.but here structures are different.

all the fields are coming in detail records only.but wen it comes to target end following different lines in diff lenghts as per the application form.

pls advice....

Regards,

Narendra

Former Member
0 Kudos

Learn how to do a basic structure following the mentioned tutorial and then move on to advanced structure. You will see how to adjust the file parameters for fixed width output. This should answer your question.

nabendu_sen
Active Contributor
0 Kudos

Hi Narendra,

It seems you dont need any transformation of the file. You just need to send the file to Receiver as it is Source is sending. If this is the case, then you dont need to create any ESR objects. Just use dummy names of Sender Interface, Sender Namespace, Receiver Interface, Receiver Namespace in Receiver Determination, Interface Determination, Sender Agreement and Receiver Agreement. In File communication channel (both Sender and Receiver) dont use any Content Conversion. If this is not the case, please elaborate your requirement.

Former Member
0 Kudos

Questions:

1. Which version of PI

2. Are you trying to convert a file to xml? I.e. is the "form" an xml?