Skip to Content
0
Former Member
Apr 10, 2008 at 08:40 PM

Update question

16 Views

Hi Experts,

I have the following code: I would like to update the table t_yeban with the value in z_menge. I am getting an error at the statement

update t_yeban. I know this is not the right statement. Please help.

Code:

FUNCTION Z_XYZ.
*"----------------------------------------------------------------------
*"*"Local Interface:
*"  TABLES
*"      T_XEBAN STRUCTURE  EBAN OPTIONAL
*"      T_XEBKN STRUCTURE  EBKN OPTIONAL
*"      T_YEBAN STRUCTURE  EBAN OPTIONAL
*"      T_YEBKN STRUCTURE  EBKN OPTIONAL
*"----------------------------------------------------------------------



data: z_menge LIKE EBAN-MENGE.

if lines( t_xeban[] ) gt 0.


 z_menge = t_yeban-menge.
 z_menge = z_menge * -1.
 t_yeban-menge = z_menge.
 update t_yeban.



endif.




ENDFUNCTION.

Thanks.

Regards,

bw_newbie