cancel
Showing results for 
Search instead for 
Did you mean: 

Collect pttern

former_member182412
Active Contributor
0 Kudos

Hi Experts,

I am picking the file from local directory using Plain J2SE adapter.iam using Integration process for collect pattern that means iam reading record by record in the file collecting in IP and process the whole message at a time.

I configure the sender file adapter like this in Plain J2SE.

    1. file adapter java class

classname=com.sap.aii.messaging.adapter.ModuleFile2XMB

version=30

#mode=FILE2XMB

mode=FILE2XMBWITHROWCONVERSION

    1. Integration Engine address and document settings (example, see docu)

XI.SLDConfiguration=SLDaccessor

XI.TargetURL=<fromSLD>

XI.QualityOfService=EO

XI.SenderParty=

XI.SenderService=Praveen_Adapter_BS

#XI.ReceiverParty=

#XI.ReceiverService=

XI.Interface=TranslatorMessage_OMI

XI.InterfaceNamespace=http://absa.co.za/BA/Translator_TO_BA

##File Adapter specific parameters (example, see docu)

file.type=BIN

#file.type=TXT

#file.encoding=UTF-8

##Adress for XMB endpoint

XMB.httpPort=8200

XMB.httpService=/file/receiver

XMB.Userid=sap

XMB.Password=init

XMB.Client=400

XMB.Language=en

file.sourceDir=C:
ABSA_XI
OUT

file.sourceFilename=translator2BA_out.txt

#file.processingMode=setAttribute

file.processingMode=test

#file.processingMode=delete

#file.processingMode=archiveWithTimeStamp

#file.archiveDir=./temp_archive

#file.retryInterval=20

file.pollInterval=60000

xml.addHeaderLine=0

xml.headerLine=

xml.processFieldNames=notavailable

xml.fieldSeparator=,

But Iam getting the error like this

SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_TranslatorMessage_BankAnalyzerMess~</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack>During the application mapping com/sap/xi/tf/_TranslatorMessage_BankAnalyzerMess~ a com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown: Fatal Error: com.sap.engine.lib.xml.parser.Parser~</SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

Can anybody please tell me what was the problem.

and another thing i need to read the file untill the last record.how can i find the no of records in the file and how can i give that value to LOOP STEP in ip.

Answer will be rewarded

Kind Regards

Praveen

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Praveen,

test your mapping in message mapping test tab for the data of your XML message in SXMB_MONI......see what error is generated in mapping.....remove the error...save and activate the mapping, reprocess this XML message in SXMB_MONI......then your mapping error will be removed.

you can count the records in file, by having the node in graphical mapping, change its context to the topmost node, send it to a UDF, then in that UDF, for each array element, increase count variable by 1....then the UDF will return the count of the records in the file.....use the output of UDF to target count node.

Thanks,

Rajeev Gupta

prabhu_s2
Active Contributor
0 Kudos

also for having the count on the files we can also goahead with the help of context change in graphical mapping. set the context of the node to the parent and use the node f/n count which maps to the target. hope this helps

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

The XI.TargetURL is used to establish a connection between the Plain J2SE Adapter Engine and the Integration Server. The nomenclature of the above is followed as: http://<xiserver>:<httpport>/sap/xi/engine/type=entry.

In your configuration, replace sap-client=000 .... with type=entry. The appropriate client would be resolved during the runtime, using the server name.

Please see the below links

Regards

Chilla..

Former Member
0 Kudos

Hi ,

Test your mapping ......

/people/michal.krawczyk2/blog/2005/09/16/xi-how-to-test-your-mapping-in-real-life-scenarios

Regards,

Former Member
0 Kudos

Hi,

Collect pattern is used to collect different number of files(messages). It is not used to read a single file record by record. Check the SAP BASIS SWC in your IR . Go to the namespace http://sap.com/xi/XI/System/Patterns to see an example. You will find all patterns.

To find the number of records in the message this can be easily achieved in the graphical mapping.

Regards,

Sudheer

prabhu_s2
Active Contributor
0 Kudos

check ur mapping possibly with the payload

prabhu_s2
Active Contributor
0 Kudos

Error ID EXCEPTION_DURING_EXECUTE is thrown when there is fault in the design phase. Just copy the payload from sxmb_moni and perform the mapping and interface test in Integration Repository.Check the output.