Skip to Content
author's profile photo Former Member
Former Member

Concatentating values of internal table

Hi,

can anyone help me with this?

How can i concatenate values from internal table?

Example:

Concatenate i_sto-matnr i_sto-sales-org into v_name1.

Would it be possible? Please reply. Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 09:19 AM

    Yes . Use the Work area for that.

    loop at i_sto into wa_sto.

    concatenate wa_sto-matnr wa_sto-org into v_name1.

    endloop.

    Regards,

    Nilesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 10:25 AM

    due to follow up question

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 11, 2007 at 12:14 PM

    Hi,

    Please note that concatenation will work if & only if noe of the variables contain Spaces.If you want to concatenate the variables eventhough they contain spaces then you mau use the following procedure so that it will always work.

    Define DATA: w_fix(50) VALUE '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '.

    • 'Value' be any special character whch you will never grt from the i/p. Then for each & every variable which you are using for concatenation use:

    IF NOT variable IS INITIAL.

    ELSE.

    variable = w_fix.

    ENDIF.

    Then Concatenate variable variable1 into say w_c.

    then use TRANSLATE w_c USING w_c3.

    I hope this helps,

    Regards

    Raju Chitale

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.