Skip to Content
avatar image
Former Member

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

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 02, 2012 at 06:35 AM

    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 != 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,

    Add comment
    10|10000 characters needed characters exceeded