‎2015 Feb 02 5:04 PM
Dear all,
I'm currently working on a strong problem where I need a new column in internal table.
So there is a standard transaction where the output is a fixed table structure which cannot be enhanced. No Append is possible.
Because of this I want to add a new column to the already existing strcuture during runtime.
Following example:
Data: wa_bkpf type bkpf.
*Now I want to add a new column to the structure.Lets say I want a new column "LIFNR" so that I can add a value to this.
wa_bkpf-lifnr = '12345'.
Is this possible?
Br
‎2015 Feb 02 5:46 PM
‎2015 Feb 02 5:52 PM
Hi,
because I'm in an SAP Standard program with an enhancement spot. The table will be displayed later on as an ALV.
Thanks
‎2015 Feb 02 6:35 PM
Hello.
I think without changing standard code no.
You need change the declaration adding a field, but you say its all standard.
Like This: http://www.sapdev.co.uk/tips/tips_itab.htm
But in run-time i believe it not possible.
Regards.
‎2015 Feb 02 7:10 PM
Hmmm...
is it possible to overwrite data declaration?
i Thought may be it can be done with field-symbols.
br
‎2015 Feb 04 11:20 AM
‎2015 Feb 04 12:04 PM
Hi,
I did not understand your requirnment complitely, but from what did understand, i would suggest,
Take an internal table as,
data : begin of itab.
Include structure "what-ever-your-structure".
data : lifnr type lfa1-lifnr. "new field which has to be added.
data : end of itab.
Then move your final internal table and new columns values in itab accordingly.
Hope this is what you need.
Regards-
Makarand