cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with receiver file adapter printing data line by line in .txt file

Former Member
0 Kudos

We are working on e-payments integration with one of the bank. As part of text file generation, we have a written a UDF which accumulates all Invoice details( 10 input fields information ) into one string and then sends output line by line with a delimiter separation for each invoice.

H

D

E

E

E

T

Bank requires a file in above format separating invoice in separate E band.( one invoice collection in one E band)

As per our scenario, multiple invoice details from an idoc(PAYEXT) have to be written to a text file line by line. i.e one invoice details per one row.

After the execution of the scenario, in SXMB_MONI, the message display clearly showing that the invoice details are printed line by line. A java function used in message mapping for the writing the invoice details line by line.

But actual file that is written to a text file is showing all the invoice details in written in single row.

When I enable the option Word wrap in the notepad, then only I can see the details in desired format.

Please guide us where we are going wrong.

Can notepad settings make any difference while displaying the text file???

Is there any way to write the file as desired without enabling the word wrap in notepad.

Thanks in advance.

Nagendar

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi venkatnrj,

i hope this UDF might be its helps

public void CombineText(String[] var1, String[] var2, String[] var3, String[] var4, String[] var5, ResultList result, Container container) throws StreamTransformationException{

String s = "";

for( int i = 0 ; i < var1.length ; i++)

{

if ( var1<i> != ResultList.CC)

s = s + var1<i> + "," + var2<i> + "," + var3<i> + "," + var4<i> + "," + var5<i> + "\n" ;

}

result.addValue( s );

}

Output diplay like below the format by using above udf:

aaa,bbb,cccc,dddd,eee,fff,

aaa,bbb,cccc,dddd,eee,fff,

aaa,bbb,cccc,dddd,eee,fff,

aaa,bbb,cccc,dddd,eee,fff,