File Adapter Receiver Conversion to EANCOM
Hi Guys,
i seeking parameters (Adapter Module) for File Adapter they should convert XML output to EANCOM.
Thank you,
PM
Thank you guys,
maybe i should explain in more detail. In message mapping i created from IDoc Orders an EANCON xml.
<ORDERS96A>
<S_UNA>:+.? '</S_UNA>
<S_UNB>
<C_S001>
<D_0001>UNOK</D_0001>
<D_0002>3</D_0002>
</C_S001>
<C_S002>
<D_0004>8697459040217</D_0004>
<D_0007>14</D_0007>
</C_S002>
<C_S003>
<D_0010>9011111940365</D_0010>
<D_0007>14</D_0007>
</C_S003>
<C_S004>
<D_0017>140508</D_0017>
<D_0019>1335</D_0019>
</C_S004>
<D_0020>0000000000215021</D_0020>
<D_0026>ORDERS</D_0026>
</S_UNB>
<M_ORDERS>
and i would like to convert it via file adapter and after AS2 in following format
UNA:+.? '
UNB+UNOK:3+8697459040217:14+9011111940365:14+140430:1605+0000000000209261++ORDERS'
Similar Messages
-
Hi,
I am facing some problem in FCC for Receiver adapter. It has to convert from XML to CSV File.
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:PaymentFull_Target xmlns:ns0="http://sdn.com/Payment">
- <RECORDSET>
- <Header>
<LineItem>1</LineItem>
<SaleNumber>102</SaleNumber>
<TransNumber>105</TransNumber>
<Store>1326</Store>
<variant>Z6</variant>
<TransType>NEW</TransType>
<Adjustm_Type />
</Header>
- <Header>
<LineItem>2</LineItem>
<SaleNumber>102</SaleNumber>
<TransNumber>105</TransNumber>
<Store>1326</Store>
<variant>Z6</variant>
<TransType>NEW</TransType>
<Adjustm_Type />
</Header>
- <Header>
<LineItem>3</LineItem>
<SaleNumber>102</SaleNumber>
<TransNumber>105</TransNumber>
<Store>1326</Store>
<variant>Z6</variant>
<TransType>NEW</TransType>
<Adjustm_Type />
</Header>
</RECORDSET>
</ns0:PaymentFull_Target>
Output File is coming only with lineitem values , remaining fields are not coming.
*1,2,3*
FCC Used...
RecordSet Structure -- Header
Header.fieldNames -
LineItem,SaleNumber,TransNumber,Store,variant,TransType,Adjustm_Type
Header.fieldSeparator----- ,
Header.endSeparator----- 'nl'
Did I miss anything.. any idea whats going wrong?
Thanks
DeepthiHi Deepthi,
Mention the occurrence of header in Recordset
You specify like this:
Recordset: Header, *
Header.fieldSeparator : u2018Field Separatoru2019
-->For FCC on Receiver side you donu2019t have to mention the field names.
-->The u2018endSeparatoru2019 parameter needs to given for substructure only
Check this links:
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
Rgds,
Akhila -
Problem in file adapter @ receiver end
Hi ,
I am using file adapter @ receiver end using content conversion.
Using field separator as 'nl'.
When i open file in Hex mode it's showing the field separator as 2 Cariage returns(CR) & 1 line feed(LF).
But the requirement is only 1 CR n 1 LF .
Appriciate ur help..
Regards,
KishoreHi
I tried giving like this,
Datarow.fieldFixedLengths : 15,15,15,15,10,10,10,10
Datarow.endSeparator : '0x0A' or '0x0D'
but da result is same...2 CR n 1 LF..
even if i dont give endseparator then also same thing is happening..
Regards
Kishore -
File adapter @ receiver end using fieldFixedLengths
Hi ,
I am using file adapter @ receiver end using content conversion.
Using field separator as 'nl'.
When i open file in Hex mode it's showing the field separator as 2 Cariage returns(CR) & 1 line feed(LF).
But the requirement is only 1 CR n 1 LF . I tried giving like this,
Datarow.fieldFixedLengths : 15,15,15,15,10,10,10,10
Datarow.endSeparator : '0x0A' or '0x0D'
but da result is same...2 CR n 1 LF..
even if i dont give endseparator then also same thing is happening..
regards,
KishoreHi Kishore,
Try using fieldseparator directly, instead of working around with fixedFieldlength.
cheers,
Prashanth -
Unable to clone File Adapter receiver channel for parallel processing
Hi Experts,
I am using variable substitution for File - RFC - File with out BPM scenario(using request response, oneway bean).
While i placed the file in the sender FTP folder, the file didnt get picked up, but in communication channel monitoring, i am getting error ' Unable to clone File Adapter receiver channel for parallel processing'.
Can anybody provide me suggestions to solve this error.
Note : without variable substitution , the interface is working good.
Is it due to, i am trying the source structure field in response file adapter?Hi,
In your CC, do you use some additional paramaters ?
like these one of point 47/48 of [Oss note 821267 - FAQ: XI 3.0 / PI 7.0/ PI 7.1 File Adapter|https://service.sap.com/sap/support/notes/821267]
Maybe there is conflict with a parallel connexion and the bean used to do asynch-synch bridge...
Mickael -
Adapter moduler in file adapter receiver - get Target Directory from param
Hi everybody,
We are in PI 7.1
I need in an adapter module (file adapter receiver) to access to the Target Directory comming from parameters
I foound the code in a weblog
/people/sap.user72/blog/2005/07/15/copy-a-file-with-same-filename-using-xi
Here is the code I found
public ModuleData process(
ModuleContext moduleContext,
ModuleData inputModuleData)
throws ModuleException {
Object obj = null;
Message msg = null;
try {
Channel ch = new Channel(moduleContext.getChannelID());
obj = inputModuleData.getPrincipalData();
msg = (Message) obj;
XMLPayload xmlpayload = msg.getDocument();
String path = ch.getValueAsString("file.targetDir");
if (!path.endsWith("
") && !path.endsWith("/"))
if(path.indexOf("
")!=-1)
path+="
else
path += "/";
if (xmlpayload != null) {
convert(xmlpayload.getContent(), path);
inputModuleData.setPrincipalData(msg);
} catch (Exception e) {}
return null;
private void convert(byte[] bs, String path) throws Exception {
String bs_out = new String(bs);
String filename =
bs_out.substring(
bs_out.indexOf("<FileName>") + 10,
bs_out.lastIndexOf("</FileName>"));
bs_out =
bs_out.substring(
bs_out.indexOf("<Base64>") + 8,
bs_out.lastIndexOf("</Base64>"));
byte bb[] = com.sap.aii.utilxi.base64.api.Base64.decode(bs_out);
File f1 = new File(path + filename);
FileOutputStream fos = new FileOutputStream(f1);
fos.write(bb);
fos.close();
The object Channel come s from the package import com.sap.aii.af.service.cpa.Channel;
The jar is in the build path (com.sap.aii.af.service.cpa.jar);
When I write in NWDS
Channel ch = new Channel(moduleContext.getChannelID());
NDWS gives me an error "Cannot instantiate the type Channel".
Can somebody help me about that, please?
Does that code dosn't work in pi 7.1?
Thanks in Advance for your help.
Best Regards.
E. Koralewski
Edited by: Eric Koralewski on Feb 3, 2011 1:40 PM> When I write in NWDS
> Channel ch = new Channel(moduleContext.getChannelID());
> NDWS gives me an error "Cannot instantiate the type Channel".
it should be:
Channel ch = (Channel) LookupManager.getInstance().getCPAObject(CPAObjectType.CHANNEL, moduleContext.getChannelID());
(taken from sample module ConvertCRLFfromToLF)
http://help.sap.com/javadocs/pi/pi711sp03/index.html?com/sap/aii/af/service/cpa/Channel.html
Edited by: Stefan Grube on Feb 3, 2011 2:02 PM -
File Adapter with Conversion - XML with Hierarchy?
XI 3.0 (SP9)
We are using the inbound file adapter with conversion to convert a flat file that has header and line items. I would have thought that the data type should have been setup something like this:
<data type>
<header>
<item>1</item>
<item>2</item>
</header>
</data type>
Our flat file looks like this:
H12345
I12345
We have only been able to configure the file adapter to bring in the data like this:
<data type>
<header></header>
<item>1</item>
<item>2</item>
</data type>
What is the proper way to inbound data through a file adapter that has structure conversion like this?
Do all of the elements get put under the root node, or is there a way to build structure?
Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
Thanks
PeterNot quite sure what you want to get, as the flatfile and xml structure does not contain the same values.
However, I will try to give you an example:
Your flat file looks like this:
H12345
I12345
If the first row is header and the next is a line, then you need to specify the fila adapter with the following:
Document name = datatype
Recordset name = recordset
Recordset structure = header,1,item,*
Recordsets per message = *
Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
Keyfieldname = id
header.fieldFixedLengths = 1,5
header.fieldNames = id,number
header.keyFieldValue = H
header.lastFieldsOptional = Yes
item.fieldFixedLengths = 1,5
item.fieldNames = id,number
item.keyFieldValue = H
item.lastFieldsOptional = Yes
This will create something like this:
<datatype>
<recordset>
<header>
<id>H</id>
<number>12345</number>
</header>
<item>
<id>I</id>
<number>12345</number>
</item>
</recordset>
</datatype>
Hoever, if both rows are "item" rows , then you need to specify the file adapter with the following:
Document name = datatype
Recordset name = header
Recordset structure = item,*
Recordsets per message = *
Recordset sequence = Ascending (need SP10 for this, but you do not need it for this)
item.fieldFixedLengths = 1,5
item.fieldNames = id,number
item.lastFieldsOptional = Yes
This will create something like this:
<datatype>
<header>
<item>
<id>H</id>
<number>12345</number>
</item>
<item>
<id>I</id>
<number>12345</number>
</item>
</header>
</datatype>
Q: Do we need to build the data type to correspond with the exact way that the data will come in from the file adapter?
A: Yes!
Good luck! -
How to use File Adapter Receiver to write attachments
Hi,
i have a scenario, in which our own XInotes adapter sends an XIMessage from an IBM Lotus Notes database into XI. This XIMessage contains an XML document as application main document and several PDF files as additional attachments
On the receiver side, i must use a File Adapter to write both the XML documents and the PDF attachments into a directory.
The problem is i don't know how to use the file adapter receiver to write the attachments. In the Channel Monitoring, i can see that all PDF files are transferred to the file receiver. But the file adapter writes only the XML document into the directory.
I've also tried the AF_Modules/PayloadSwapBean, but it can only swap one PDF file into the application payload. And the file name must be hard coded in the module configuration as swap.KeyName.
Could anyone give me any ideas?
thanks a lot in advance
Xianghi,
receiver file adapters do not supprt attachments.
Only File Sender adapter is capable of handling attachments not the receiver.
http://help.sap.com/saphelp_nw2004s/helpdata/en/4b/a20c4cfea96b498b1e1af3f32f0670/frameset.htm
Configuring the sender FILE adapter
The sender file adapter is configured to pick the normal payload (file1.xml), which is specified in the File
access parameters, and the additional image file (file1.jpg) that is to be sent as an attachment is configured
under the Additional File(s) as shown in the screenshot below. The file type would still remain binary.
Since, by default, XI sends payload and attachments in XML format, we need to call two beans, namely the
MessageTransformBean and the PayloadSwapBean to help us is transforming the content to jpeg format
and also change the file extension.
The PayloadSwapBean module is used to replace the application payload of the XI message that holds the
data with another payload which is appended to the message as an attachment. In our case, the payload
would be file1.xml whereas the attachment would be file1.jpg
The swap module is denoted in our scenario with the module key swap. It has two parameters from the
MIME header.
regards,
pradeep. -
A problem with the File adapter receiver
Hi people,
In the Integration Monitoring the system represent this problem:
File adapter receiver channel Mainframe_FA_StructureAch_CC_RC is not initialized. Unable to proceed: null
Any body can help me!!
Thanks!!Hi ,
Just check is it Activated ? Go to RWB->Adapter Monitoring
Check the status there ..
To more- Go to service market place to view the Adapter Monitoring PDF
https://websmp103.sap-ag.de/~sapdownload/011000358700002757652005E/HowtoMintorAF.pdf
Hope this helps.
Regards,
Moorthy -
File adapter receiver channel is not initialized.
Hi
iam wrking idoc-file scenario, as per the requirement i have created 4datatypes 4 mapping in IR with 4 communaction chanles in ID. the scenarios is working fine with 3 mappings.but in 4 the scenario
the file genaraing properly , i have cheked in SXMB_moni payload but it is not creating in destination system
in runtimeworkbench->message-monitaring-> adpater
i have find the below issues
1) File adapter receiver channel CC_DDPWCS_US_TO_101 is not initialized. Unable to proceed: null Error 2) Exception caught by adapter framework: File Adapter configuration not initialized:
3) Error Delivery of the message to the application using connection AFW failed, due to: File Adapter configuration not initialized:.
please tell me how can i reslove the issue
thanks
niruHi
i have checked the content convertion and changed as below
the structure is
Row.fieldNamesTrans_Id,Order,Item,Product_Id,Product_desc,Lot_nr,Ship_via,Exp_qty,Carousel_loc,compart,Destination,Label
Row.fieldSeparator ,
Row.fieldFixedType char
Row.endSeparator 'nl'
Row.addHeaderLine 4
Row.headerlineTrans_Id,Order,Item,Product_Id,Product_desc,Lot_nr,Ship_via,Exp_qty,Carousel_loc,compart,Destination,Label
even though iam facing the issue. iam wondering "_i have used in the similar structure for other 3 mappings in same scenario those are working perfect "_ but based on condition if 4 th mapping is executed iam facing the problem
error message in RWB/Adapeters
File adapter receiver channel CC_DDPWCS_US_TO_101 is not initialized. Unable to proceed: null
Error Exception caught by adapter framework: File Adapter configuration not initialized:
Error Delivery of the message to the application using connection AFW failed, due to: File Adapter configuration not initialized:.
please help if any of you face the similar situation , i struck-up long ago here
regards
niru -
Hi All,
File to File (CSV)
At the receiver side i am not getting the file it is showing problem in runtime workbench: File Adapter Receiver Channel is not initilaized Unable to proceed : null.
Thanks,
Satish.<i>File Adapter Receiver Channel is not initilaized Unable to proceed : null.</i>
>>>
1. check if your adapter is active
2. in case you have FCC just remove the same for the time being and check if it can pass the XML version (without FCC). this will confirm if it was a problem with your FCC parameters.
Let us know the proceedings !!!!! -
File Adapter receiver channel : change encoding attribut in xml file
Hi,
How can I change the XML encoding attribut
from:
<?xml version="1.0" encoding="UFT-8"?>
to:
<?xml version="1.0" encoding="ISO-8859-1"?>
in my File Adapter, receiver channel ?Hi,
plz chk the following link:
http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
● Select the File Type of the document:
○ Binary
○ Text
Under File Encoding, specify a code page.
The default setting is to use the system code page that is specific to the configuration of the installed operating system.
The content of the message is converted to the corresponding code page before the message is saved as a file.
Permitted values for the code page are the existing Charsets of the Java runtime. According to the SUN specification for the Java runtime, at least the following standard character sets must be supported:
Regards -
Receiver File adapter content conversion using StrictXml2PlainBean
Hi All,
For receiver file adapter i am using the module StrictXml2PlainBean, and also i mentioned the module configuration like this
parameter name parameter value
recordTypes Header,TransactionHeader,TransactionDetail,TransactionTrailer,FileTrailer
FileTrailer.endSeparator |\n
FileTrailer.fieldSeparator |
Header.endSeparator |\n
Header.fieldSeparator |
TransactionDetail.endSeparator |\n
TransactionDetail.fieldSeparator |
TransactionHeader.endSeparator |\n
TransactionHeader.fieldSeparator |
TransactionTrailer.endSeparator |\n
TransactionTrailer.fieldSeparator |
But when i send the idoc, The receiver CC is throwing an error
Message processing failed. Cause: com.sap.aii.af.modules.conversion.xml2plain.ConversionException: Invalid structure name encountered during conversion: Transaction at XML element MT_DeliveryOrder,Transaction
My actual structure is
MT_DelvOrder
Header 0...1
Transaction 0....Unbounded
TransactionHeader 1..1
TransactionDetail 0...unbounded
TransactionTrailer 1...1
FileTrailer 0...1
The module is checking for the Transaction node,but i require the rest 3.
Same configuration i have done successfully with FCC without using the module....
So can any one suggest me where i am missing... why the module is pointint towards, the Transaction cant i ignore this node . and continue with the rest???
Regards,
Sridhar
Edited by: sridhar reddy kondam on Aug 10, 2009 12:35 AMHi Rajesh,
The same FCC configuration was working fine with FCC and when i am using this module configuration i am getting the prob...
In the file i need the Header,TransactionHeader,TransactionDetail,TransactionTail,Filetrailer
my sample output file is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_DeliveryOrder>
<Header>
</Header>0...1
<Transaction>0...Unbounded
<TransactionHeader> 1..1
</TransactionHeader>
<TransactionDetail> 0...Unbounded
</TransactionDetail>
<TransactionTrailer>1...1
</TransactionTrailer>
</Transaction>
<FileTrailer> 0...1
</FileTrailer>
Any suggestions will be great help...
I think i need to go with other options without using this module....
Regards,
Sridhar
Edited by: sridhar reddy kondam on Aug 10, 2009 6:03 AM -
Receiver File Adapter Content Conversion Problem.
Hi All,
I am getting in receiver file adapter due to content conversion setting. Problem is that all the fields coming in file adapter are optional. In content conversion , i have specified fieldfixedlengths. So whenever any optional field is not present , it fails . How should we handle it? is there any option to declare fields as optional, I know that is the there for sender adapter. But no. of fields is also very large, so putting each and every field as optional is very time consuming.
What should i do?
Ranjeet Singh.Hi Daniele,
Instead of using the standard funciton , i created a UDF for handling this situation.
My logic is UDF is like
//write your code here
int Size = Integer.parseInt(Truncate_Size);
String Return_Value = "";
if (!("".equals(Input)) )
if (Input.length() > Size )
Return_Value = Input.substring(0,Size);
else
Return_Value = Input.substring(0, Input.length());
else
for(int i = 0; i< Size ; i++)
Return_Value = Return_Value + " " ;
return Return_Value;
SO in this case also , it should be able to handle empy source element. But it is not working. -
Receiver File Adapter - Content Conversion
Hi,
I don't quite get this:
I have a structure
<?xml version="1.0" encoding="UTF-8"?>
<AnElement1>
<AnElement2>
Bla bla bla
</AnElement2>
</AnElement1>
I want to convert this to a flat file with a line containing
Bla bla bla
In te receiver file adapter I define the following:
In the 'Content Conversion Parameters'
Recordset Structure : AnElement2
Name Value
AnElement2.addHeaderLine 0
AnElement2.fieldSeparator 'nl'
AnElement2.endSeparator 'nl'
This results in an Empty file each time indicating some error somewhere.
What am I missing?
Thanks
AndreHi Andre,
Just check the link <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm">File content conversion</a>
Also check out this web log <a href="/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2 to TXT</a>
Is there any error log shown in File adapter ?
Regards,
Keith
Message was edited by: keith thompson
Maybe you are looking for
-
Can Outlook 2013 Email sync with iPhone 4s via iCloud?
Hi. I am hoping to sync my iPhone 4s with my email in Outlook 2013. I thought I had found a link online earlier today to do this via the iCloud but my system rebooted and I lost the link. Can this be done? When I try to setup my email using iCloud
-
EDI - B2B or A2A??
Hello guys. I have a conceptual question regarding the configuration of a business scenario with an outside partner using EDI. As general ones would say that because the partner is outside the LAN its a B2B scenario ,but <b>what if the EDI box sits i
-
Promoting my virtual domain to online status
Hello, First of all, I'm a rookie and it may be difficult to understand my problem description. Here are my parameters: - My internet connection is based on ADSL router - My internet connection has a Static IP address which is assigned to the router
-
Chat InformationPlease hold as we route your chat to an Adobe Representative. Chat InformationWelcome to Adobe.com! My name is Heath. May I assist you with your selection today? Heath: Hello, how can I help you? Visitor: hi heath, i'm dave milbut. He
-
Embeded SQL Statment VS Store procedure
On J2ee tecknology, what is the better method of usind data services. raping all sql statment in the store procedure or embeded all sql statment in EJB. thanks null