10-18-2008 6:38 AM
Hi All,
I need to delete entries from database tables using the update function module. I am calling the FM by this method -
CALL FUNCTION 'Z_CL_DELETE' IN UPDATE TASK EXPORTING P1 = L_GUID P2 = TABLENAME.
But the problem with update function modules is that it does not accept reference parameters.
What code shall i write exactly in the FM so that enties get deleted from the databse table TABLENAME for the parameter L_GUID.
Thanks ,
Pradipta.
10-18-2008 7:32 AM
Hello Pradipta Paul,
You can delete the Database table entries using MODIFY keyword also it but first using MODIFY table just get all the data from the database table to the internal table.
After fetching all the data then keep the loop to the internal table.
example
Loop at itab into wa_itab.
Modify database table name from wa_itab index sy-tabix.
endloop.
But ITAB and WA_ITAB structure must be same just like the DATABASE table.
It will work ..........
10-18-2008 6:55 AM
use Pass by Value .
check the check box against the parameter. you can see two checkboxes optional and passby value.
10-18-2008 7:32 AM
Hello Pradipta Paul,
You can delete the Database table entries using MODIFY keyword also it but first using MODIFY table just get all the data from the database table to the internal table.
After fetching all the data then keep the loop to the internal table.
example
Loop at itab into wa_itab.
Modify database table name from wa_itab index sy-tabix.
endloop.
But ITAB and WA_ITAB structure must be same just like the DATABASE table.
It will work ..........