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

Concatenate fields(OBJECT_I) in ALV based on another column(SUBTYPE)

<changed the subject line>

Hi All

gt_history is the internal table.object_ID of history table is displayed as Goods Receipt in alv output.


In history table i have two different object_ID's for same subtype,In my alv only one object ID is displayed.


My requirment is i wnt to display 2013/5000000537 also along with 2013/5000000536


Ex : 2013/5000000536/2013/5000000537.


Please help on this


Moderator message - Please use more specific subject lines in future.

Message was edited by: Suhas Saha

Message was edited by: Suhas Saha

history.JPG (34.9 kB)
alv.JPG (13.6 kB)
Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 09, 2014 at 10:57 AM

    Hi,

    If it is the customizing program, You can handle this in processing of final internal table!

    If sub type is same for the record, concatenate the values as mentioned above!

    Rg, Kiran

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 10:59 AM

    Hi,

    you have to define a field bigger than your OBJECT_ID

    make an internal table for list all the subtype : IT_SUBTYPE

    make a loop on this subtype and concatenate the OBJECT_ID.

    loop at GT_HISTORY.

    move gt_history-subtype to it_subtype-subtype.

    append it_subtype.

    endloop.

    sort it_subtype.

    delete adjacent duplicates from it_subtype comparing all fields.

    loop at it_subtype.

    loop at gt_history where subtype eq it_subtype-subtype.

    concatenate it_subtype-object_id gt_history-objectid into it_subtype-objectid.

    endloop.

    modify it_subtype.

    endloop.

    ...

    not really complex

    regards

    Fred

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 11:02 AM

    Hello Vamsi,

    Please use append statement for GT_HISTORY-object-id inside a loop statement.

    Thanks,

    Kalpesh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 09, 2014 at 11:28 AM

    Hi Mohan,

    as kiran has been sujjested, if it is a custom program, you can create another field, and a internal table

    having added another field, having sufficient length to hold both id's, create a copy of your final table

    then read data from both table and concatenate both, finally you can modify your final internal table.

    after concatenate both the id's, also please declare the same new variable inside the structure

    having final internal table.

    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.