File adapter custom module problem
Dear All,
Currently my file adapter is picking up a flat file and I have writeen a module which will remove junk characters from the start of the file...I have also used FCC to convert the flat file to xml.
now my question is what is the sequence...
1. is it that my FCC will convert the flat to xml first and then the module will get xml as input
2. or is it that module will get the flat file as input , it will perform the maipultaions and then my FCC will be called to convert it to xml
Actually after running the scenraio what we can see in the audit log is
1.flat file converted ok and then
2.processing module
My requirement : module should get a flat file as input and then that module will remove junk char..after this standard FCC should convert it to XML
1. is it that my FCC will convert the flat to xml first and then the module will get xml as input
first FCC will get executed then MODULE
My requirement : module should get a flat file as input and then that module will remove junk char..after this standard FCC should convert it to XML
Dont use FCC just read .txt file after removing junk character buid the XML file using DOM parser in the MODULE itself.
Similar Messages
-
XI File Adapter Custom File Encoding for issues between SJIS and CP932
Dear SAP Forum,
Has anybody found a solution for the difference between the JVM (IANA) SJIS and MS SJIS implementation ?
When users enter characters in SAPGUI, the MS SJIS implementation is used, but when the XI file adapter writes SJIS, the JVM SJIS implementation is used, which causes issues for 7 characters:
1. FULLWIDTH TILDE/EFBD9E 8160 ~ 〜
2. PARALLEL TO/E288A5 8161 ∥ ‖
3. FULLWIDTH HYPHEN-MINUS/EFBC8D 817C - −
4. FULLWIDTH CENT SIGN/EFBFA0 8191 ¢ \u00A2
5. FULLWIDTH POUND SIGN/EFBFA1 8192 £ \u00A3
6. FULLWIDTH NOT SIGN/EFBFA2 81CA ¬ \u00AC
7. REVERSE SOLIDUS 815F \ \u005C
The following line of code can solve the problem (either in an individual mapping or in a module)
String sOUT = myString.replace(\u0027~\u0027,\u0027〜\u0027).replace(\u0027∥\u0027,\u0027‖\u0027).replace(\u0027-\u0027,\u0027−\u0027).replace(\u0027¢\u0027,\u0027\u00A2\u0027).replace(\u0027£\u0027,\u0027\u00A3\u0027).replace(\u0027¬\u0027,\u0027\u00AC\u0027);
But I would prefer to add a custome Character set to the file encoding. Has anybody tried this ?Dear SAP Forum,
Has anybody found a solution for the difference between the JVM (IANA) SJIS and MS SJIS implementation ?
When users enter characters in SAPGUI, the MS SJIS implementation is used, but when the XI file adapter writes SJIS, the JVM SJIS implementation is used, which causes issues for 7 characters:
1. FULLWIDTH TILDE/EFBD9E 8160 ~ 〜
2. PARALLEL TO/E288A5 8161 ∥ ‖
3. FULLWIDTH HYPHEN-MINUS/EFBC8D 817C - −
4. FULLWIDTH CENT SIGN/EFBFA0 8191 ¢ \u00A2
5. FULLWIDTH POUND SIGN/EFBFA1 8192 £ \u00A3
6. FULLWIDTH NOT SIGN/EFBFA2 81CA ¬ \u00AC
7. REVERSE SOLIDUS 815F \ \u005C
The following line of code can solve the problem (either in an individual mapping or in a module)
String sOUT = myString.replace(\u0027~\u0027,\u0027〜\u0027).replace(\u0027∥\u0027,\u0027‖\u0027).replace(\u0027-\u0027,\u0027−\u0027).replace(\u0027¢\u0027,\u0027\u00A2\u0027).replace(\u0027£\u0027,\u0027\u00A3\u0027).replace(\u0027¬\u0027,\u0027\u00AC\u0027);
But I would prefer to add a custome Character set to the file encoding. Has anybody tried this ? -
File adapter (sender) module throws exception, but adapter proceeds again
Hello dear reader,
I wrote a module that converts a flat file into XI-XML and tested it within the file adapter. It works fine so far. But if I force the module to throw an exception to handle an erroneous flat file, the file adapter tries to proceed the erroneous file again and again. Not very nice, isn´t it?
Has anybody an idea, how to configure the file adapter to stop the processing of an erroneous file?
Thank you in advance
Yours
Frank WaskowHello Satish,
the weblog doesn´t describe my problem correctly. Let me show you the Audit Log from the Messeage Display Tool of the Adapter Engine:
Audit Log for Message: 06ff54a0-a258-11db-b9e2-003048226013
Time Stamp Status Description
2007-01-12 16:14:49 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:14:50 Error Attempt to process file failed with null
2007-01-12 16:15:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:15:00 Error Attempt to process file failed with null
2007-01-12 16:16:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:16:00 Error Attempt to process file failed with null
2007-01-12 16:17:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:17:00 Error Attempt to process file failed with null
2007-01-12 16:18:00 Success Send text file "Invoice_error_wf.edi" from FTP server "HH-168:/XI_Infotag_Testdaten/EDIX/In", size 27993 bytes with QoS EO
2007-01-12 16:18:00 Error Attempt to process file failed with null
It seems to me that the Adapter gets the error of the module, but it is not handled as an error like shown in the blog <a href="/people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically:///people/sap.user72/blog/2005/11/29/xi-how-to-re-process-failed-xi-messages-automatically.
The adapter tries to proceed the same file again and again, till I delete it from the source directory.
Any more idea?
Frank -
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. -
Sender File Adapter Bespoke Module Development
I have been following the How To ... Create Modules for the J2EE Adapter Engine to create a bespoke module for the Sender File Adapter.
Initially all the module does is write a message to the Augit Log. The module has been deployed to XI successfully. When I add the module to the sender file adapter the adapter is green in the adapter monitor but I get the following message in the message monitor ....
"Attempt to process file failed with Path to object does not exist at com.kk.FileAdapter, the whole lookup name is localejbs/sap.com/com.kk.FileAdapter/WriteToLog."
com.kk.FileAdapter is the package. All of the required files have been built as per the How To pdf.
Does anyone have any ideas??Hi Satish,
Thanks for the quick response.
Using the fully qualified name I get the following error in the adapter monitor.
"Last message processing started 18:32:11 2005-09-19, Error: Module Exception 'com.sap.aii.af.mp.processor.ModuleProcessorException' found, cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
If is use the JNDI name I do not get an error in the Adapter Monitor but get the following error in the Message Monitor.
"Attempt to process file failed with Path to object does not exist at BANKSenderFileAdapterEAP, the whole lookup name is localejbs/sap.com/BANKSenderFileAdapterEAP/WriteToLog."
The rest of the message seems to be successful, only the run of the module.
Any ideas??
Many thanks
Gary -
Hi all
Why is the File adapter does not work properly with modules.
The source file does not be picked up from the source directory when I use module with the CC , but when I remove the modules it works fine.
Do I have to activate anything or to do any set up.
any help would be apreciated.
thanks.Hi .
It is getting a little bit complicated than I can manage to understand -)
Those are the modules I am using
1 AF_Modules/RequestResponseBean Local Enterprise Bean 1
2 CallSapAdapter Local Enterprise Bean 2
3 AF_Modules/ResponseOnewayBean Local Enterprise Bean 3
config.
1 passThrough true
3 receiverChannel cc_receive_from_xtl
3 receiverService FileAdapter
This is what I getting from RWB
2008-02-11 10:36:02
Success Channel cc_sender_com_get_details: Send binary file "D:\usr\xifileadapter\test\in\compget.txt". Size 151 with QoS EO
2008-02-11 10:36:02
Error: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of RequestResponseBean
How can I determine the SP of my xi whether is 19 or not.
I hope you can help.
best regards
Camilla -
File Adapter Write Compilation problem JDev 11.1.1.6 and BPEL 2.0
Hi,
Im creating a simple BPEL Project with a One-way Process template project.
I have added just one Partnerlink with a File Adapter to do a write operation.
I have assigned the main process input to the file Write Invoke operation.
But I am getting a compilation error.
Error(81): inputVariable "inputVariable" of type "client:BPELProcessWriteToFileRequestMessage" is not compatible with WSDL message "ns1:Write_msg".
Can you pl help ?
Here is the BPEL syntax :
<?xml version = "1.0" encoding = "UTF-8" ?>
<process name="BPELProcessWriteToFile"
targetNamespace="http://xmlns.oracle.com/FirstApplication/FileWriter/BPELProcessWriteToFile"
xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:client="http://xmlns.oracle.com/FirstApplication/FileWriter/BPELProcessWriteToFile"
xmlns:ora="http://schemas.oracle.com/xpath/extension"
xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/file/FirstApplication/FileWriter/WriteTextToFile"
xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap">
<import namespace="http://xmlns.oracle.com/FirstApplication/FileWriter/BPELProcessWriteToFile" location="BPELProcessWriteToFile.wsdl" importType="http://schemas.xmlsoap.org/wsdl/"/>
<partnerLinks>
<partnerLink name="bpelprocesswritetofile_client" partnerLinkType="client:BPELProcessWriteToFile" myRole="BPELProcessWriteToFileProvider"/>
<partnerLink name="WriteTextToFile" partnerLinkType="ns1:Write_plt"
partnerRole="Write_role"/>
</partnerLinks>
<variables>
<variable name="inputVariable" messageType="client:BPELProcessWriteToFileRequestMessage"/>
</variables>
<sequence name="main">
<!-- Receive input from requestor. (Note: This maps to operation defined in BPELProcessWriteToFile.wsdl) -->
<receive name="receiveInput" partnerLink="bpelprocesswritetofile_client" portType="client:BPELProcessWriteToFile" operation="process" variable="inputVariable" createInstance="yes"/>
<assign name="Assign">
<copy>
<from>string('$inputVariable.payload/client:input')</from>
<to>$inputVariable.payload/client:input</to>
</copy>
</assign>
<invoke name="InvokeWriteTextToFile"
partnerLink="WriteTextToFile" portType="ns1:Write_ptt"
operation="Write"
inputVariable="inputVariable" bpelx:invokeAsDetail="no"/>
</sequence>
</process>The error seen in your case typically occurs when the schemas of BPEL valriable and the schema of message in file adapter WSDL are different. You may use a transform activity in BPEL to map the fields of the two schemas.
You may also like to have a look at various file adapter examples at
http://java.net/projects/oraclesoasuite11g/pages/FileAdapters
These samples provide working examples of how to handle various kinds of data when using file adapter.
Regards. -
How to use standard Java file in custom module
Hi All,
I want to use some CatalogItemImpl.java file in my custom DC but i was unable to find any entry in the standard component in businessobject.xml file as <businessObject name="XYZ" className="x"/>. Can anyone let me know how can we use the file file in my custom DC.
Please provide your inputs......
Regards,
Rahul.Hi Rahul,
You will not find the "CatalogItemImpl" in the 'businessobject.xml'. The 'businessobject.xml' is there to define session based API of modules. Those API have properties and web channel builder values injected when the user start a web session.
For the "CatalogItem", you will have to use the Generic Factory concept. The Generic Factory is used to allocate instance given a configuration. If no configuration exists, the default implementation is used. By adding an entry in the Generic Factory you can choose to allocate your class instead of the default class.
Within the catalog module, the alias to use for classes extending "CatalogItemImpl" is "com.sap.wec.app.common.module.catalog.businessobject.ext.interf.CatalogItemExtInterf".
Please refer to the extension guide on how to manage the Generic Factory configuration file.
Regards,
Robin -
Sender File Adapter content conversion problem
Hi all,
is it possible to do content conversion like this:
Key;Field1;Field2;Field3
PO00H;0482000000;20061102;PL61
PO01I;00010;0A720;Material 1;100.000
PO02D;20061102;100.000;
PO00H;0482000001;20061102;PL63
PO01I;00010;0A730;Material 2;40.000
PO02D;20061102;40.000;
PO01I;00010;0A740;Material 3;140.000
PO02D;20061102;30.000;
PO02D;20061103;110.000;
convert to
<?xml version="1.0" encoding="utf-8" ?>
<MT_PO>
<DT_PO>
<DocumentHeader>
<PONumber>0482000000</PONumber>
<PODate>20061102</PODate>
<CompanyCode>PL61</CompanyCode>
</DocumentHeader>
<Item>
<ItemHeader>
<ItemNumber>00010</ItemNumber>
<MaterialCode>0A720</MaterialCode>
<MaterialDescription>Material 1</MaterialDescription>
<Quantity>100.000</Quantity>
</ItemHeader>
<ItemDetail>
<DeliveryDate>20061102</DeliveryDate>
<Quantity>100.000</Quantity>
</ItemDetail>
</Item>
</DT_PO>
<DT_PO>
<DocumentHeader>
<PONumber>0482000001</PONumber>
<PODate>20061102</PODate>
<CompanyCode>PL63</CompanyCode>
</DocumentHeader>
<Item>
<ItemHeader>
<ItemNumber>00010</ItemNumber>
<MaterialCode>0A730</MaterialCode>
<MaterialDescription>Material 2</MaterialDescription>
<Quantity>40.000</Quantity>
</ItemHeader>
<ItemDetail>
<DeliveryDate>20061102</DeliveryDate>
<Quantity>40.000</Quantity>
</ItemDetail>
</Item>
<Item>
<ItemHeader>
<ItemNumber>00010</ItemNumber>
<MaterialCode>0A740</MaterialCode>
<MaterialDescription>Material 3</MaterialDescription>
<Quantity>140.000</Quantity>
</ItemHeader>
<ItemDetail>
<DeliveryDate>20061102</DeliveryDate>
<Quantity>30.000</Quantity>
</ItemDetail>
<ItemDetail>
<DeliveryDate>20061103</DeliveryDate>
<Quantity>110.000</Quantity>
</ItemDetail>
</Item>
</DT_PO>
</MT_PO>Ivan,
I fear this is not possible.
You can have
<?xml version="1.0" encoding="utf-8" ?>
<MT_PO>
<DocumentHeader>
<PONumber>0482000000</PONumber>
<PODate>20061102</PODate>
<CompanyCode>PL61</CompanyCode>
</DocumentHeader>
<ItemHeader>
<ItemNumber>00010</ItemNumber>
<MaterialCode>0A720</MaterialCode>
<MaterialDescription>Material 1</MaterialDescription>
<Quantity>100.000</Quantity>
</ItemHeader>
<ItemDetail>
<DeliveryDate>20061102</DeliveryDate>
<Quantity>100.000</Quantity>
</ItemDetail>
</MT_PO>
Multiple <Item header> and multiple <Item details>
Do the content conversion like this and then in mapping, convert it to any structure you need.
Regards,
JaiShankar -
File Adapter format translation problem
This is my incoming payload from a legacy application
"66386","9002011319","01-FEB-2013","","2114.11","ITEM","0.12","","85411","2310","0","85","GST","68085"
"66386","9002011319","01-FEB-2013","","2114.11","ITEM","15.00","","85411","2311","0","85","GST","68085"
"66386","9002011319","01-FEB-2013","","2114.11","ITEM","1823.24","","85411","2313","0","85","GST","68085"
"66386","9002011319","01-FEB-2013","","2114.11","TAX","275.75","","","","","","GST",""
"66386","9002013706","01-FEB-2013","","717.60","ITEM","624.00","","85411","2319","0","85","GST","68232"
"66386","9002013706","01-FEB-2013","","717.60","TAX","93.60","","","","","","GST",""
"66386","9002026588","03-FEB-2013","","2706.30","ITEM","2353.30","","85411","2319","0","85","GST","68085"
"66386","9002026588","03-FEB-2013","","2706.30","TAX","353.00","","","","","","GST",""
What we have here is 3 different record sets. Field 2 is the invoice number. What I need to do is translate this into something like
<Container>
<invoiceHeader>
<InvoiceLines>
The first 4 elements in each line are the header details and everything after that is line level detail.
So the resultant xml will look something like this........ Please note I have left A LOT of the detail for xml out of this
<container>
<invoice>
<Vendor>66386<>
<InvoiceNum>9002011319<>
<InvoiceDate>01-FEB-2013<>
<Description/>
<InvoiceAmount>2114.11<>
<Lines>
<Line>
<LineType>ITEM<LineType>
<LineAmount>0.12<LineAmount>
<LineDescription/>
<Code1>85411<Code1>
<Code2>2310<Code2>
<Code3>0<Code3>
<Code4>85<Code4>
<TaxCode>GST<TaxCode>
<PONumber>68085<PONumber>
</Line>
<Line>
<>ITEM<><>15.00<><><><>85411<><>2311<><>0<><>85<><>GST<><>68085<>
</Line>
<Line>
<>ITEM<><>1823.24<><><><>85411<><>2313<><>0<><>85<><>GST<><>68085<>
</Line>
<Line>
<>TAX<><>275.75<><><><><><><><><><><><>GST<><><>
</Line>
</Lines>
</invoice>
<invoice>
<>66386<><>9002013706<><>01-FEB-2013<><><><>717.60<>
<Lines>
<Line>
<>ITEM<><>624.00<><><><>85411<><>2319<><>0<><>85<><>GST<><>68232<>
</Line>
<Line>
<>TAX<><>93.60<><><><><><><><><><><><>GST<><><>
</Line>
</Lines>
</invoice>
<invoice>
<>66386<><>9002026588<><>03-FEB-2013<><><><>2706.30<>
<Lines>
<Line>
<>ITEM><>2353.30<><><><>85411<><>2319<><>0<><>85<><>GST<><>68085<>
</Line>
<Line>
<>TAX<><>353.00<><><><><><><><><><><><>GST<><><>
</Line>
</Lines>
</invoice>
</container><?xml version="1.0" encoding="windows-1252" ?>
<container>
<invoices>
<invoice>
<invoiceheader>
<Vendor>66386</Vendor>
<InvoiceNum>9002011319</InvoiceNum>
<InvoiceDate>01-FEB-2013</InvoiceDate>
<Description/>
<InvoiceAmount>2114.11</InvoiceAmount>
</invoiceheader>
<invoiceLines>
<line>
<LineType>ITEM</LineType>
<LineAmount>0.12</LineAmount>
<LineDescription/>
<Code1>85411</Code1>
<Code2>2310</Code2>
<Code3>0</Code3>
<Code4>85</Code4>
<TaxType>GST</TaxType>
<PONumber>68085</PONumber>
</line>
<line>
<LineType>ITEM</LineType>
<LineAmount>15.00</LineAmount>
<LineDescription/>
<Code1>85411</Code1>
<Code2>2311</Code2>
<Code3>0</Code3>
<Code4>85</Code4>
<TaxType>GST</TaxType>
<PONumber>68085</PONumber>
</line>
<line>
<LineType>ITEM</LineType>
<LineAmount>1823.24</LineAmount>
<LineDescription/>
<Code1>85411</Code1>
<Code2>2313</Code2>
<Code3>0</Code3>
<Code4>85</Code4>
<TaxType>GST</TaxType>
<PONumber>68085</PONumber>
</line>
<line>
<LineType>TAX</LineType>
<LineAmount>275.75</LineAmount>
<LineDescription/>
<Code1/>
<Code2/>
<Code3/>
<Code4/>
<TaxType>GST</TaxType>
<PONumber/>
</line>
</invoiceLines>
</invoice>
<invoice>
<invoiceheader>
<Vendor>66386</Vendor>
<InvoiceNum>9002013706</InvoiceNum>
<InvoiceDate>01-FEB-2013</InvoiceDate>
<Description/>
<InvoiceAmount>717.60</InvoiceAmount>
</invoiceheader>
<invoicelines>
<line>
<LineType>ITEM</LineType>
<LineAmount>624.00</LineAmount>
<LineDescription/>
<Code1>85411</Code1>
<Code2>2319</Code2>
<Code3>0</Code3>
<Code4>85</Code4>
<TaxType>GST</TaxType>
<PONumber>68232</PONumber>
</line>
<line>
<LineType>TAX</LineType>
<LineAmount>93.60</LineAmount>
<LineDescription/>
<Code1/>
<Code2/>
<Code3/>
<Code4/>
<TaxType>GST</TaxType>
<PONumber/>
</line>
</invoicelines>
</invoice>
<invoice>
<invoiceheader>
<Vendor>66386</Vendor>
<InvoiceNum>9002026588</InvoiceNum>
<InvoiceDate>03-FEB-2013</InvoiceDate>
<Description/>
<InvoiceAmount>2706.30</InvoiceAmount>
</invoiceheader>
<invoicelines>
<line>
<LineType>ITEM</LineType>
<LineAmount>2353.30</LineAmount>
<LineDescription/>
<Code1>85411</Code1>
<Code2>2319</Code2>
<Code3>0</Code3>
<Code4>85</Code4>
<TaxType>GST</TaxType>
<PONumber>68085</PONumber>
</line>
<line>
<LineType>TAX</LineType>
<LineAmount>353.00</LineAmount>
<LineDescription/>
<Code1/>
<Code2/>
<Code3/>
<Code4/>
<TaxType>GST</TaxType>
<PONumber/>
</line>
</invoicelines>
</invoice>
</invoices>
</container> -
Problem: The same filename from a sender to a receiver file adapter - SP14
Blog : /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
My Problem:
The thing works for me and i am able to get my input files name as my output file name. But one thing i noticed is that in my target message, the field where i have mapped the code it always returns the value "null" but finally when the file is created i get the required result.
My input file name is input.txt and i get the same name in my output file too.
In sxmb_moni if i check DynamicConfiguration link i see the following
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
- <!-- Response
-->
- <sap:DynamicConfiguration xmlns:sap="http://sap.com/xi/XI/Message/30">
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFTPHost">10.25.116.98:21</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="Directory">/input/test</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileTimestamp">20060228T112200Z</sap:Record>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileType">bin</sap:Record>
<b><sap:Record namespace="http://sap.com/xi/XI/System/File" name="FileName">input.txt</sap:Record></b>
<sap:Record namespace="http://sap.com/xi/XI/System/File" name="SourceFileSize">770</sap:Record>
</sap:DynamicConfiguration>
But when i check my mapped field i see
<field3>BodyC</field3>
<keyfield>02</keyfield>
<field5>BodyE</field5>
<field6>BodyF</field6>
</Body>
- <Trailer>
<keyfield>03</keyfield>
<b><field2>null</field2> -> Null value instead of input.txt</b>
</Trailer>
</ns0:MT_Putfile>
The code i have used to map the field2 of the trailer is the following ....
<i>DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileType");
String valueOld = conf.get(key);
return valueOld; </i>
Any clues ?Gosh this is spooky
Anyway i tried with that line of code but it throws me an error during activation ...
Activation of the change list canceled Check result for Message Mapping mm_IS | http://t-systems.com/Shabarish: Starting compilation Source code has syntax error: /usr/sap/TXT/DVEBMGS00/j2ee/cluster/server0/./temp/classpath_resolver/Map387c7300a9ac11da9d280011256afae8/source/com/sap/xi/tf/_mm_IS_.java:104: cannot resolve symbol symbol : method getTransformationParameters () location: interface com.sap.aii.mappingtool.tf3.rt.GlobalContainer DynamicConfiguration conf = (DynamicConfiguration) container.getGlobalContainer().getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION); ^ 1 error
The code is :
DynamicConfiguration conf = (DynamicConfiguration) container.getGlobalContainer().getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
//DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
//String valueOld = conf.get(key);
String valueOld = conf.toString();
return valueOld;
Thanx Renjith so far .. but i hope this gets resolved (else i will loose my sleep thinkin abt the situation) -
Empty Message Handling with Receiver File adapter
Hi,
We were using the "Empty-Message-Handling" (status set to Ignore) of Receiver file adapter to stop a 0 KB file from being written to the specified directory.
However, inspite of this, a 0KB file continues to be written.
The specifications are given below-
File Construction Mode - Add Time Stamp
Put File - Directly
Empty Message Handling - Ignore
Maximum Concurrency - 1
File Type - Binary
Can anyone please help with this.
Thanks and Regards,
ShiladityaHI,
In one of thread the same problem was coming. Just look at the thread.
Receiver file adapter creates empty files, Empty-Message Handling SP19
Or
Follow the weblog for the same requirement.
/people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module
Thnx
Chirag
Reward points if it helps. -
Error at Receiver File Adapter
Hi All,
Mine is FILE (txt) to FILE (txt) scenario with content conversion.
No problem from SENDER FILE adapter.
No problem in XI pipeline processing.
Error at receiver adapter:
The eror is:.. 1.fieldSeparator is missing or 1.fieldFixedLengths is missing...
Though, I have checked at Receiver Adapter configuration that
*.fieldSeparator is properly filled.
There are no optional fields as such in the input file.
Thanks,
ShailyHi,
Check the links on FCC and compare what u have gave is correct or not.
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
/people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
/people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
/people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion
http://help.sap.com/saphelp_nw04/helpdata/en/d2/bab440c97f3716e10000000a155106/content.htm
Regards,
Phani
Reward points if Helpful -
Hi Friends,
I am trying a simple scenario File -> XI -> File.In this scenario i have to send an attachment also along with the message. I have done with sender file adapter, but the problem is how can i handle the attachments in receiver file adapter. Means i just want to create the attachment on the receiver side with the same name.
But when i activate the scenario only one file is getting created i.e message payload. I can't see the attachment there. Do i need to do any extra settings for this scenario....Hi,
>>>Do u mean to say File adapter attachments concept is used only when the receiver is Mail adapter ?????
of course not
many apdater support attachments
(like SOAP, proxies, mail)
but in case of file adapter it only works with
sender adapter
if you want to achive your scenarion
you can create a simple java proxy
in which you will take the payload
and attachments and put them somewhere
(folder etc)
but you need to do a little programming to do that
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
Empty-Message Handling is not working in receievr File Adapter
Hi All,
I have selected "Empty-Message Handling" = 'Ignore'in Receiver File adapter, but still empty files are creating in target directory.
Message mapping generates output based on the conditon, if the condition is 'false' mapping will generate empty file (no data is being mapped).
Why Receiver file adapter is processing empty fiels even i set 'ignore' empty fiels in configuration (ID)?
Hoe can i manage not to place empty fiels in target directory?
File type is '.txt'
Your help would be appreiciated greatly.
Thanks,
RajeshNot sure why is it not working. Make sure the channel is activated and cache is refreshed properly. But as a workaround you may use OS script checking for size of message and deleting it or configure a BPM to avoid the file creation. Or else an adapter module as shown
/people/gowtham.kuchipudi2/blog/2006/01/13/stop-creation-of-an-empty-file-from-file-adapter-using-module
Regards,
Prateek
Maybe you are looking for
-
As an asset management tool it should manage all images but only adjust raw
Is Aperture an image management tool, raw converter/workflow tool, or both? Let it be both! Restrict what is is ALLOWED to ADJUST, but manage it all. When I do a shoot, I start out with 300-1000 RAW images. By the time I am finished with the client I
-
Creating large documents in InDesign... is there a limit?
Hi, I am creating a 1000 page document in InDesign through plug-in. The pages contians simple text objects and a logo, no high-quality graphics etc. But on reaching above 700 pages the application crashes (debug version). The memory for InDesign touc
-
Desktop wallpaper resets on reboot
Hi All i have an Intel I7 Mac Mini running the latest version of Mavericks. The problem is that if i set a desktop wallpaper of my choosing the picture defaults to the Mavericks Wave Image on reboot. If i just put the mac to sleep then everything is
-
Mulitple Smartforms for single output type
Hi Experts, I have 4 programs and 4 smartforms and One output type Z999. Depends on Company code i need to generate appropriate smartform using VF02. ( 4 programs & 4 smartforms means, US invoice, US Creditmemo, Canada Invoice and Canada creditmemo
-
Hi all, I am writing a script for export PDF in same file path using indesign Preset Could any one solve this pls: var myDoc=app.documents.item(0); var myJobOptionName = "Small File Size"; var myOutFolderPathName = app.documents[0].fullName +"/"; var