2005 Nov 11 8:33 AM
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
2005 Nov 11 11:00 AM
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
2005 Nov 11 8:50 AM
2005 Nov 11 10:45 AM
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
2005 Nov 11 10:51 AM
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
2005 Nov 11 11:00 AM
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
2005 Nov 12 8:30 AM
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....
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |