cancel
Showing results for 
Search instead for 
Did you mean: 

Urgent: Suppressing unwanted Node Line in the target file

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Former Member
0 Kudos

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

GabrielSagaya
Active Contributor
0 Kudos

instead of fieldSeparator

use it as

DELIVERY.endSeparator='0x0D''0x0A'

Former Member
0 Kudos

Hi,

I tried putting field.endsepartor as nulll value but even it did not work and gave same error.

And Anand,thanks for reply but I have kept the udf option as my last preference.If you know any standard FCC parameter which suppresses the node directly then please let me know

Thanks,

Amit

Former Member
0 Kudos

Try this...it suppresses a node and also does not add any additional line...it works for me

DELIVERY.fieldFixedLengths 0

DELIVERY.fixedLengthTooShortHandling Cut

DELIVERY.endSeparator='0'

Former Member
0 Kudos

Hi Anand,

I tried your soultion but it didnt work for me.i tried both ''0' and 0 for endseperator.

Thanks,

Amit

GabrielSagaya
Active Contributor
0 Kudos

Have you tried with this???

DELIVERY.fieldFixedLengths 0

DELIVERY.fixedLengthTooShortHandling Cut

DELIVERY.endSeparator='0x0D''0x0A'

Former Member
0 Kudos

Hi,

I did tried with your suggested solution its not working.

Thanks,

Amit

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi Anand,

I tried suppressing Last node also in similiar fashion but its only suppressing the node and not the line which is the major culprit in my case.

neways thanx a lot 4 reply.

Thanks all,

Amit

Answers (2)

Answers (2)

Former Member
0 Kudos

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

Former Member
0 Kudos

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