03-02-2011 6:46 AM
Hi,
I have created an ABAP function wherein I am reading table to output in a table. Code as follows
SELECT * FROM <source_table>
INTO CORRESPONDING FIELDS OF TABLE <t_output_table>
WHERE <conditions>
Import tab has two import parameters.
Export tab has none.
Changing has none.
Table tab has
PARAMETER NAME as t_output_table,
TYPING as LIKE,
ASSOCIATED TYPE as source table
What I want to do next is to add another field to the output which will be substring of one of the field of source table. For example if FieldA of source table has value "abcdefgh", I want to return "defgh" as additional column of the output table.
Appreciate any help !!
IMS
03-02-2011 8:40 AM
Hi,
You would need to create a structure that includes your extra column. Use this structure as the reference in your tables tab.
Now when you have selected the data in the table.
loop at the table.
populate the new column according to your logic.
Modify the new column.
endloop.
Hope this solves the problem.
Regards,
Anju
03-02-2011 7:36 AM
Hi,
Add one more required field to your input table.Once the value has been retrieved to ur Output table,modify the table with your requiremnt and pass this value to the field required.
03-02-2011 8:40 AM
Hi,
You would need to create a structure that includes your extra column. Use this structure as the reference in your tables tab.
Now when you have selected the data in the table.
loop at the table.
populate the new column according to your logic.
Modify the new column.
endloop.
Hope this solves the problem.
Regards,
Anju