cancel
Showing results for 
Search instead for 
Did you mean: 

udf for TDLINE field coming from IDOC

former_member452321
Participant
0 Kudos
source   


                                                         Target

ze1edpt2  0...99999


tdline             0..1                                                Notes 0..10000





ID 0..1






Text

I am getting the text data from  Idoc  in tdline field. In TDLINE

terminating each segment with 70 characters and it is going to next segment. But I need to get each terms and conditions in separate paragraph in to text field. The terms and conditions start with (1),(2) or (A) ,(B) etc. I need double line space after end of each of this T&C.

Thanks for your help .

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mahesh,

This can be done with a UDF.

Read TDLINE values as queue, concat each record of array and form T&C as string. Then you can add new line character and double space characters using java functions.

Thanks,

Pranav

former_member201264
Active Contributor
0 Kudos

Hi Mahesh,

For TDLINE field mapping, you need some other fields to be mapped in MATMAS, I did it but not sure what are those fields exatly.

Get in touch with MM Functional and ABAPer they may help you.

Regards,

Sreeni.

former_member452321
Participant
0 Kudos

Hi

Thanks for looking into it. Could you please help me on this udf.

String concattext = "";

for (i= 0;i<a.length;i++) {

concattext = concattext + ""+ a[i];

result.addValue(concattext);

With the above I am getting all Terms and conditions one text.

I have a requriement for after each T&C (as attached example) double line space .I am not sure how to break with doule line after each T&C

  example

Standard Terms and conditons:

  (1) This is terms and conditions 1st we

      need to implement ; (This text is coming from TDLine more       than one segment )

   (2) This is terms and conditions 2nd we

      need to implement ;This text is coming from TDLine more             than one segment )

    (3) some text here:

      (A) This is another terms and conditions;

      (B)  This is another terms and conditions:

    (4) This is terms and conditions 4th we

      need to implement ;This text is coming from TDLine more  than one segment )

ambrish_mishra
Active Contributor
0 Kudos

Assuming that by double line space, you mean line feed, append 2 'CRLF' with each append.

Ambrish

Former Member
0 Kudos

Hi Mahesh,

As every T&C is starting with a brace '(', get index of ( and add new line character.

Regards,

Pranav

ambrish_mishra
Active Contributor
0 Kudos

Mahesh,

Try and explain your requirement clearly with an example.

Ambrish