Skip to Content

bods: best way to update each column of each table in the db

Jul 20, 2017 at 10:12 AM


avatar image
Former Member

hi all,

i have a requirement to check and update each column value for each table in a sql database.

i need to check if each column in each table has a value of blank and then update it to null.

doing this from bods, callign a function like replace, ifthenelse will involve a lot of developemnt effort and execution time.

Can anyone suggest a better option for this task?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Adilson Vinicius Passos Junior Jul 20, 2017 at 12:31 PM

Hello Swetha,

to do it, you can do one select in table DD02L and doing one loop in the result, make one select into the loop and in witch result of the second select you change the content of the table.

To look for the componentes of with table dinamic, you can use the class cl_abap_structdescr to look for all colums of each table.

Using Field Symbols you assing each componente to search de contente.

10 |10000 characters needed characters left characters exceeded