Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Need code logic

Former Member
0 Likes
483

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

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
446

Have you tried it yourself yet? This is pretty straight foward, yes?

Regards,

Rich Heilman

2 REPLIES 2
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
447

Have you tried it yourself yet? This is pretty straight foward, yes?

Regards,

Rich Heilman

Read only

0 Likes
446

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