08-03-2007 11:03 AM
hi,
i want to read table in a function module for all tax codes starting with C , code is as follows:
LOOP AT t_bkpf WHERE awtyp = 'RMRP'.
CLEAR : wa_bkpf.
MOVE-CORRESPONDING t_bkpf TO wa_bkpf.
READ TABLE t_bset INTO wa_bset
WITH KEY bukrs = t_bkpf-bukrs
belnr = t_bkpf-belnr
gjahr = t_bkpf-gjahr
MWSKZ = 'C%'
kschl = 'JCSN'.
CHECK : sy-subrc = 0.
LOOP AT t_bseg INTO wa_bseg WHERE bukrs = wa_bset-bukrs
AND belnr = wa_bset-belnr
AND gjahr = wa_bset-gjahr
AND matnr <> space.
here how to write condition for mwskz. mwskz = 'C%' is not working.
Pls help.
08-03-2007 11:08 AM
Hi,
U can't use C% in read table. So better to use loop at ..where.
Regards,
Sankar
08-03-2007 11:11 AM
08-03-2007 11:19 AM
Hi Sohali
can you please check this BSEG table and t007a
MWSKZ - Tax Code TXJCD - Tax Jurisdiction
T007A-MWSKZ
Reward points for hepful answers,
best regds,
kiran.M
08-03-2007 11:09 AM
Hi Sonali,
can you try like this: mwskz like 'C%'.
Reward points if helpful,
Best regds,
kiran.M
08-03-2007 1:11 PM
08-03-2007 11:12 AM
Please define one range for Tax code as below;
Ranges: s_mwskz for bseg-mwskz.
s_mwskz-sign = 'I'.
s_mwskz-option = 'CP'.
s_mwskz-low = 'C*'.
append s_smwskz.
READ TABLE t_bset INTO wa_bset
WITH KEY bukrs = t_bkpf-bukrs
belnr = t_bkpf-belnr
gjahr = t_bkpf-gjahr
MWSKZ in s_mwskz
kschl = 'JCSN'.
08-03-2007 11:35 AM
08-03-2007 11:12 AM
Hi sonali
i think it is not possible using '%' in read stmt ,
the better way is when u r filling the internal table at that time you use in where stmt for this condition
this will work
Reward points if helpful.
thanks,
kiran.m