Application Development 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: 

md_pegging_nodialog

Former Member
0 Kudos

hello!

does anyone ever used fm md_pegging_nodialog?

if so what fields do i need?

for some reason i get exception.

regards

yifat

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

call function 'MD_PEGGING_NODIALOG'
exporting
edelkz                = u_delkz
edelnr                = v_delnr
edelps                = v_delps
ematnr                = u_matnr
ewerks                = u_werks
tables
imdrqx                = t_imdrqx
exceptions
error                 = 1
no_requirements_found = 2
order_not_found       = 3
others                = 4.       

for example, with the table and fields of the format for the fn module.

In fact, if you look at the documentation for md_pegging_nodialog parameters, you'll see what each parameter is for

hope this helps you.

regards,

venu.

2 REPLIES 2

Former Member
0 Kudos

Hi,

call function 'MD_PEGGING_NODIALOG'
exporting
edelkz                = u_delkz
edelnr                = v_delnr
edelps                = v_delps
ematnr                = u_matnr
ewerks                = u_werks
tables
imdrqx                = t_imdrqx
exceptions
error                 = 1
no_requirements_found = 2
order_not_found       = 3
others                = 4.       

for example, with the table and fields of the format for the fn module.

In fact, if you look at the documentation for md_pegging_nodialog parameters, you'll see what each parameter is for

hope this helps you.

regards,

venu.

0 Kudos

Here is a sample program...... you can peg by production order.



report zrich_0003.

data: begin of mdrqx occurs 50.
        include structure mdrq.
data: end of mdrqx.

parameters: p_matnr type mara-matnr,
            p_werks type marc-werks,     " Planning Plant
            p_aufnr type aufk-aufnr.

data: werks type marc-werks.
data: matnr type mara-matnr.
data: delnr type mdps-del12.

perform prod_order using P_matnr
                         p_werks
                         p_aufnr.

*********************************************************************
*   PROD_ORDER
*********************************************************************
form prod_order using matnr
                      werks
                      aufnr.


* edelkz = 'FE' --  Production Order
* edelkz = 'PA' --  Planned Order

  call function 'MD_PEGGING_NODIALOG'
       exporting
            edelet                = 0000
            edelkz                = 'FE'       
            edelnr                = aufnr
            edelps                = 000001
            ematnr                = matnr
            ewerks                = werks
       tables
            imdrqx                = mdrqx
       exceptions
            error                 = 1
            no_requirements_found = 2
            order_not_found       = 3
            others                = 4.

  loop at mdrqx where DELKZ = 'VC'.    " VC is sales order
    write:/ mdrqx-DELKZ, mdrqx-matnr, mdrqx-planr+0(10),
            mdrqx-planr+10(6) .
  endloop.

endform.


Regards,

Rich Heilman

Message was edited by: Rich Heilman