2021 Jun 28 11:24 AM
Hi, can someone please tell him how do I set a field in ALV output list with a default value? Like here,
File Indicator will be a field with a default value i.e.., ERP
Thanks in advance 🙂
2021 Jun 28 11:26 AM
In the internal table, you have set the value to ERP.
Thanks,
Gourab
2021 Jun 28 11:26 AM
In the internal table, you have set the value to ERP.
Thanks,
Gourab
2021 Jun 28 11:28 AM
It's not related to any fields from any table, just a column with a default value. Can you pls share the syntax
2021 Jun 28 11:40 AM
So, my understanding is, there is a column required in ALV output and the value should be always "ERP".
If my understanding is correct, then proceed with the below code. So, you have to add a field to you internal table if it's not already available.
FIELD-SYMBOLS: <fs_output> type <place_your_work_area_type_here>.
LOOP AT <place_your_work_area_type_here>ASSIGNING <fs_output>.
<fs_output>-file_ind = 'ERP'.
ENDLOOP.
Note:
Please revert back if you are looking for something else.
Thanks,
Gourab
2021 Jun 28 12:03 PM
2021 Jun 28 2:15 PM
Hi Simantini Hazra,
I suppose that column(FILE_IND) is a part of ALV you're displaying.Let's say your table is gt_alv.
So the code will be -
After fetching all relevant data and preparing your internal table. Loop your internal table using a field symbol.
LOOP AT gt_alv ASSIGNING <lfs_alv>.
<lfs_alv>-file_ind = 'ERP'.
ENDLOOP.
UNASSIGN <lfs_alv>.
Regards,
Rohit