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

Routing data Issue Table MAPL & PLPO

Former Member
0 Likes
4,978

Hi,

I am trying to retrive routing data...

based upon material i am fetching value from MAPL and based upon group(plnnr) i am retriving activity type and time from table PLPO ...

the problem here i face is...when i fetch a group(PLNNR) it has many counter(ZAEHL) in PLPO which is not availible in MAPL...

one more problem... if there is more than one material has same group(plnnr) and more then one opration (VORNR) then i couldn't take the corresponding material value from PLPO...

1, Is there any function module to solve this problem ...

2, Any oppropriate table is avalible for this ....

Thank in advance,

sakthi

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,591

Another way from MAPL and PLAS / PLPO.

-


FORM get_recipes.

REFRESH : i_recep_info.

SELECT matnr "Material number

plnnr "Key for task list group

plnal "Group counter

datuv "Valid-from date

FROM mapl

INTO TABLE i_recep_info

FOR ALL ENTRIES IN i_mat_info

WHERE matnr = i_mat_info-matnr

AND werks = p_werks

AND plnty = p_routy

AND loekz = space.

IF sy-subrc = 0.

SORT i_recep_info BY matnr ASCENDING datuv DESCENDING.

DELETE ADJACENT DUPLICATES FROM i_recep_info.

ENDIF.

ENDFORM.

SELECT a~plnnr "Key for task list group

a~plnal "Group counter

a~plnkn "Number of the task list node

b~vornr "Operation Number

b~steus "Control key

b~arbid "Object ID

b~phflg "Phase/indicator

FROM plas AS a LEFT OUTER JOIN plpo AS b

ON aplnty = bplnty

AND aplnnr = bplnnr

AND aplnkn = bplnkn

INTO TABLE i_route_info

FOR ALL ENTRIES IN i_recep_info

WHERE a~plnty = p_routy

AND a~plnnr = i_recep_info-plnnr

AND a~plnal = i_recep_info-plnal

AND a~datuv <= p_datuv

AND a~loekz = space.

regards

Aveek

Hi,

I am trying to retrive routing data...

based upon material i am fetching value from MAPL and based upon group(plnnr) i am retriving activity type and time from table PLPO ...

the problem here i face is...when i fetch a group(PLNNR) it has many counter(ZAEHL) in PLPO which is not availible in MAPL...

one more problem... if there is more than one material has same group(plnnr) and more then one opration (VORNR) then i couldn't take the corresponding material value from PLPO...

1, Is there any function module to solve this problem ...

2, Any oppropriate table is avalible for this ....

Thank in advance,

sakthi

5 REPLIES 5
Read only

Former Member
0 Likes
2,591

Hi,

Try the tables AFVC and AFVV.

regards

Aveek

Read only

0 Likes
2,591

Hi Aveeks,

Thanks for the quick response,

But still i couldn't meet the requirment since the ISTRU(material) in the tables AFVC, AFVV are not having any values ....

and i am not sure whether it can give the proper operation(VORNR) for the specific material...

Do we have any other options...

Ur support is appreciated...

Thanks and regards..

sakthi

Read only

Former Member
0 Likes
2,591
  • select process order item lines FROM afvc

  • select process order item values FROM afvv

  • select process order related work centre data FROM crco

  • Retrieve work center details FROM crhd

regards

Aveek

Read only

Former Member
0 Likes
2,592

Another way from MAPL and PLAS / PLPO.

-


FORM get_recipes.

REFRESH : i_recep_info.

SELECT matnr "Material number

plnnr "Key for task list group

plnal "Group counter

datuv "Valid-from date

FROM mapl

INTO TABLE i_recep_info

FOR ALL ENTRIES IN i_mat_info

WHERE matnr = i_mat_info-matnr

AND werks = p_werks

AND plnty = p_routy

AND loekz = space.

IF sy-subrc = 0.

SORT i_recep_info BY matnr ASCENDING datuv DESCENDING.

DELETE ADJACENT DUPLICATES FROM i_recep_info.

ENDIF.

ENDFORM.

SELECT a~plnnr "Key for task list group

a~plnal "Group counter

a~plnkn "Number of the task list node

b~vornr "Operation Number

b~steus "Control key

b~arbid "Object ID

b~phflg "Phase/indicator

FROM plas AS a LEFT OUTER JOIN plpo AS b

ON aplnty = bplnty

AND aplnnr = bplnnr

AND aplnkn = bplnkn

INTO TABLE i_route_info

FOR ALL ENTRIES IN i_recep_info

WHERE a~plnty = p_routy

AND a~plnnr = i_recep_info-plnnr

AND a~plnal = i_recep_info-plnal

AND a~datuv <= p_datuv

AND a~loekz = space.

regards

Aveek

Read only

0 Likes
2,591

Hi Aveek,

Thanks the issue is fixed with all ur valuable inputs..

The PLAS table is the one i was really looking for.....

Thanks again & Regards...

sakthi....