Skip to Content
avatar image
Former Member

How to concatenate multiple fields (4 fields) in SLT using ABAP ?

I could create an ABAP Include program for concatenation of 3 fields:

CONCATENATE I_ FIELD _1 I_ FIELD_2 I_ FIELD_3 INTO E_ FIELD_ID.

and then reference the ABAP program in LTRS - Rule Assignment, and pass the values for parameter in Import Parameter 1, Import Parameter 2, Import parameter 3.

Since there are only 3 fields available in the rule assignment for passing parameter values, is there a way to concatenate 4 fileds ?

Thanks and Regards

Add comment
10|10000 characters needed characters exceeded

  • Former Member

    The other way is to Create an event related rule. You will have an option to create a ABAP include file to write the code for concatenation.

    example :

    Assign the filed values from source

    txtfield1 = <wa_s_table>-field1

    txtfield2 = <wa_s_table>-field2

    CONCATENATE txtfield1 txtfield2 INTO txtConctField 

    This would for the target field.

    <wa_r_table>f-field = txtConctField

  • Get RSS Feed

2 Answers

  • Nov 21, 2016 at 09:53 PM

    CONCATENATE I_ FIELD _1 I_ FIELD_2 I_ FIELD_3 FIELD_4 INTO E_ FIELD_ID. ?? this does not work
    Sorry I did not understand your query ..!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Vinita

      I_FIELD_1 is a parameter

      I_FIELD_2 is a parameter

      both the fields are concatenated as field E_FIELD_ID.

      Created a ABAP program with code below,

      CONCATENATE I_FIELD_1 I_FIELD_2 INTO E_FIELD_ID.

      Referenced the ABAP program in the Rule Assignment (LTRS) and passed the parameter value in Import Parameter 1, 2, 3 fields.

      This works for up to 3 fields, but if I need to concatenate 4 fields, how to pass the parameter value for the 4th field as there are only three fields available to pass parameter value ? Is there a different approach in this case ?

      Many Thanks.

      untitled.png (8.1 kB)
  • Feb 08, 2017 at 06:01 AM

    Hi Vijay

    Use the Event rule as indicated by Anil.

    Super easy and very effective

    Regards

    Arden

    Add comment
    10|10000 characters needed characters exceeded