‎2007 Aug 07 4:54 AM
Hi,
I am working on a function module where for all the movement types 901,902,903,904,601,602,603,604 from ZTE003_MOVEMENTS table with material number (ZCO_CSTBRK01-MATNR)having valuation class(MBEW-BKLAS) 3300 should not be updated in table ZCO_CSTBRK01.How can i write an IF condition for this?
Useful answers will be rewarded.
Regards,
Hema
‎2007 Aug 07 5:01 AM
if ZCO_CSTBRK01-MATNR ne 3300.
insert table
endit.
explin..
if example zco_cstbrk01 = 3300
= 3300
exit from if codition.
‎2007 Aug 07 5:58 AM
Hi,
I have written a select query like this.
read table T_BKLAS with key MATNR = XMCMSEG-MATNR
BWTAR = XMCMSEG-BWTAR
BKLAS = XMCMSEG-BKLAS.
The movement types 901, 902, 601, 602 with valuation class
3300 are ignored and the line item is not updated in the ZCO_CSTBRK01 table
IF ( XMCMSEG-BWART = c_901 or
XMCMSEG-BWART = c_902 or
XMCMSEG-BWART = c_903 or
XMCMSEG-BWART = c_904 or
XMCMSEG-BWART = c_601 or
XMCMSEG-BWART = c_602 or
XMCMSEG-BWART = c_603 or
XMCMSEG-BWART = c_604 )
AND t_bklas-bklas = c_3300.
CONTINUE.
SELECT * FROM ZTE003_MOVEMENTS into TABLE t_final_table
FOR ALL ENTRIES IN t_bklas WHERE matnr = t_bklas-matnr AND
bklas = c_3300.
IF SY-SUBRC <> 0.
update TABLE t_final_table.
ENDIF.
ENDIF.
Here it is giving error as 'field MATNR unknown'.
Could u pls suggest me the proper solution for this?
Regards,
Hema