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

concatenate <f2>........ into <f1>

Hi,

I need to concatenate <f2> <f3> <f4> <f5> <f6> <f7> <f8> <f9> <f10> into <f1>.

but giving shortdump.

Can I use the stmt like this?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • Posted on Jan 11, 2007 at 07:18 AM

    Hi,

    I think the dump may be because you can concatenate only character field.

    Check this.

    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/concaten.htm

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 07:19 AM

    Sri,

    first make sure that, all the field symbols are assiagned to some field reference.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 07:23 AM

    I think UR Overwriting a protected field.

    The following objects are protected:

    - Character or numeric literals,

    - Constants (CONSTANTS),

    - Function module and method parameters with the type IMPORTING

    REFERENCE,

    - Untyped field symbols to which a field has not yet been assigned

    using ASSIGN,

    - TABLES parameters, if the corresponding actual parameter is protected

    against changes,

    - USING reference parameters and CHANGING parameters in FORMS, if the

    actual parameter is protected against changes,

    - Field symbols, if the field assigned using ASSIGN is protected against

    changes,

    - External write access to attributes with the READ-ONLY property.

    Write like this :

    data : v_10(100) type c.

    Assign v_10 to <f1>.

    Add a comment
    10|10000 characters needed characters exceeded

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

    u can use liek tht but before using this the field symbols must be assigned to some variable..otherwise it wil give u dump..

    see demo code -

    data: name like p0002-vorna,

    nachn like p0002-nachn,

    f_name(40).

    parameter pernr like pernr-pernr.

    field-symbols <fs_name> type any.

    field-symbols <fs_name1> type any.

    field-symbols <fs_name2> type any.

    start-of-selection .

    assign name to <fs_name>.

    assign nachn to <fs_name1>.

    select single vorna nachn into (<fs_name>,<fs_name1>) from pa0002

    where pernr = pernr.

    assign f_name to <fs_name2>.

    concatenate <fs_name> <fs_name1> into <fs_name2>.

    write: 'Name: ' ,<fs_name2> .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 07:31 AM

    i dont know whether this will solve your problem or not?

    first check whether the field symbols are of type c or not?

    then concatenate the value to a character field and then assign the value into <f1>.

    may be there is some assignment problem to the fieldsymbol but i am not sure.

    regards

    shiba dutta

    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.