‎2013 Jan 02 6:25 AM
Hello, Friends i want to update a table through rfm but its showing that it is entered into the table but when i check the table there is no entry.Please someone help me out..
Here is my code
FUNCTION Zdemo.
*"----------------------------------------------------------------------
*"*"Local Interface:
*" EXPORTING
*" REFERENCE(PRODUCT_CODE) TYPE ZPRODUCT
*" REFERENCE(PRODUCT_DESCR) TYPE ZDESCRIPTION
*" TABLES
*" ITAB STRUCTURE ZPRODUCT_MASTER
*"----------------------------------------------------------------------
ITAB-PRODUCT_CODE = '10 '.
ITAB-PRODUCT_DESCR = 'Sun'.
APPEND ITAB .
update ZPRODUCT_MASTER from itab .
modify ZPRODUCT_MASTER from itab .
ENDFUNCTION.
‎2013 Jan 02 6:31 AM
use commit work statement after calling database update and also check value of sy-subrc.It should be zero.
‎2013 Jan 02 6:49 AM
use work area in this case.
loop at itab.
modify zproduct_master from itab.
endloop.
hope it helps,
Vinoth
‎2013 Jan 02 6:55 AM
Hi parikshit,
use
modify ZPRODUCT_MASTER from table itab[] .
after the fm you have to use commit work....
hope it will help to solve your problem and if you get correct answer then close your thread according SCN rules and engagement.
Regards
Sabyasachi
‎2013 Jan 02 7:16 AM
HI Parikshit ,
As per your statement ,
i want to update a table through rfm but its showing that it is entered into the table but when i check the table there is no entry.Please someone help me out..I would like to know how the RFM is making you know that values has been entered into the table.
And also why are you using INSERT and MODIFY simultaneously.
MODIFY itself will do the job.
MODIFY = INSERT + UPDATE.
And also as told by Vinoth use a WORK AREA of type itab for MODIFY statement.