on 06-13-2008 12:53 PM
Hi all ,
I am doing simple file to file scenario in which i have following as my target structure.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_IN007_IN xmlns:ns0="Http://xyz.pi.com/OTC/IN007_ABC_PQR">
<OUTPUT>
<HEADER>
<ShipmentDate/>
<FROMCompund/>
<TOCompound/>
<ShipmentNumber/>
<Carrier/>
<TruckNumber/>
<TrailerId/>
<ContainerCount/>
<TotalNetWeight/>
<OwnerId/>
</HEADER>
<DELIVERY>
<DeliveryNo/>
</DELIVERY>
<DETAILS>
<TransactionType/>
<ContainerNo/>
<CheckDigit/>
<Condition/>
<RJRGrade/>
<Belt/>
<CropYear/>
<Processor/>
<ContainerNetWeight/>
<ContainerType/>
<ProductionDate/>
<ProductionTime/>
<ProcessorBaleId/>
<DealerContainerId/>
<CustomerPackageId/>
</DETAILS>
</OUTPUT>
</ns0:MT_IN007_IN>
I am using Delivery node for generating file with the name in its subfield Delivery_No with the help of variable substitution. I dont want the Delivery node to be appearing in my output file,so i am suppressing it in my communication channel as shown below:
OUTPUT.fieldFixedLengths 161
OUTPUT.fieldSeparator 'nl'
HEADER.fieldFixedLengths 8,4,4,2,15,15,15,3,5,1,3
HEADER.endSeparator 'nl'
DELIVERY.fieldFixedLengths 0
DELIVERY.fixedLengthTooShortHandling Cut
DETAILS.fieldFixedLengths 1,8,1,3,10,2,4,3,4,1,8,6,14,6,15
DETAILS.endSeparator 'nl'
In the Output file I am not getting the delivery node but a line break for it which i dont want to be there.I can't even change the structure so dat line break comes at the end.
Please help
Thanks in Advance,
Amit
HI,
If you will try to supress the variables with fcc parameter fixedLengthTooShortHandling, then it will ada the blank line in it.
You need to either develop the adapter module to overcome this or, use the field seperator as null value ie.e pass as '0x0D''0x0A'
And make the occurance as 0...1 or 0..unbound ie.e optional
Thanks
Swarup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swaroop,
I tried putting the null value as you mentioned but it didnot work, it is giving me now following error in AUDIT LOG in message monitoring :
File adapter receiver channel CC_IN007_OUT is not initialized. Unable to proceed: null
Delivery 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.
I only put the field seperator in my delivery node and removed fieldFixedLength parameters from it as below :
DELIVERY.fieldSeperator '0x0D''0x0A'
Please help.
Thanks,
Amit
Hope you have used a single quotes for DELIVERY.endSeparator='0'.
We had a similar problem (XI3.0 SP15) where we had File Name Node to be suppressed and also be used in variable substitution. The only difference was our file name node was at the end (last node). When we suppressed using '\nl' one additional blank line was coming at the end. when we used '0' as a end separator we could suppress the same.
Just try suppressing your last XML node instead of DELIVERY node. see if it works otherwise you can go for a Dynamic Configuration/UDF approach I had suggested in my earlier post.
If you are on XI 3.0 SP16 and above version then you can use the following approach.
You can dynamincally set you file name in mapping itself by setting the dynamic configuration parametres and using Adapter Specific Identifiers.
With no variable substitution required you can suppress Delivery node in the mapping itself.
Refer below for the same...
/people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI,
If you will try to supress the variables with fcc parameter fixedLengthTooShortHandling, then it will ada the blank line in it.
You need to either develop the adapter module to overcome this or, use the field seperator as null value ie.e pass as '0x0D''0x0A'
or try with split by value function.
reg,
suresh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.