2007 Jun 20 5:57 PM
Hi all,
I want the logic for
Expense/Repairable flag (Table MVKE Field name - MTPOS) filter with VKORG=sales_org_param and VTWEG=dist_channel_param and SPART=divisioin_param
MTPOS conains either ZREP or ZEXP (ZREP=repairable, ZEXP=expensed)
regards,Ram
2007 Jun 20 5:59 PM
2007 Jun 20 5:59 PM
2007 Jun 20 6:07 PM
Well, in any case, this should get you started.
report zrich_0001 .
data: xmvke type mvke.
data: xmara type mara.
data: begin of ima occurs 0,
matnr type mara-matnr,
spart type mara-spart,
vkorg type mvke-vkorg,
vtweg type mvke-vtweg,
mtpos type mvke-mtpos,
end of ima.
parameters: p_spart type mara-spart,
p_vkorg type mvke-vkorg,
p_vtweg type mvke-vtweg.
start-of-selection.
select * into corresponding fields of table ima
from mara
inner join mvke
on mara~matnr = mvke~matnr
where mara~spart = p_spart
and mvke~vkorg = p_vkorg
and mvke~vtweg = p_vtweg
and mvke~mtpos in ('ZREP', 'ZEXP').
loop at ima.
write:/ ima-matnr, ima-spart, ima-vkorg, ima-vtweg, ima-mtpos.
endloop.
Regards,
Rich Heilman