Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

FCC Parameters for Comments fields

My requirement to pick the text file in that comments field comes to multiple lines. What is the way to use the FCC parameters for this requirement.

Text file looks

New       Material       Comments

|            093846         Line1: Welcome

Line2:SAP PI

Line3:Netweaver

|            093847         Line1: Hello

|            093848         Line1: Hai

Line3, Line 2 is blank

Line4

Line5

|           093849          eeeee

e

e

eee

ee

|           093850          Hi

Reulst comes to Comments should be line wise

Line1: Welcome

Line2: SAP PI

Line3:Netweaver

Thanks

Ashok

Former Member
Former Member replied

Hi Raghu,

We change the requirement as a starting delimiter to ending delimiter in a record creating single text file, and we write a UDF to pick the material number and remaining as internal comments.

UDF Material:

==========

String material = "";

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

{

if (var1[i].startsWith("|")) {

result.addValue(var1[i].substring(2,10));

material = var1[0].substring(2,10);

}

else {

result.addValue(material);

}

}

UDF Internal Comments:

==================

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

{

if (var1[i].startsWith("|")) {

result.addValue(var1[i].substring(11,var1[i].length()));

}

else

{

result.addValue(var1[i]);

}

}

Thanks

Ashok

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question