Skip to Content
avatar image
Former Member

Delete entries from database tables using update function module

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Oct 18, 2008 at 06: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 ..........

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 18, 2008 at 05:55 AM

    use Pass by Value .

    check the check box against the parameter. you can see two checkboxes optional and passby value.

    Add comment
    10|10000 characters needed characters exceeded