10-16-2007 8:28 AM
Hi,
This is Retail.
I am creating articles from scratch based on data uploaded to some Z-tables.
I have already successfully created the article. Now I need to list this article in some assortments, but I can't seem to understand how this can be done in ABAP. I tried to look for relevant FM but didn't find any.
Can anyone help?
Thanks,
Nuno
10-19-2007 12:41 PM
how you going determine in which assortments list article?
from algorithm point of view
0. you have relations "article - store - yes/no" in your scratch DB
1. for each article change article listing procedure (mm42 -> listing -> listing procedures 03 (manual)
2. for each store create standart module (wso1)
3. fill module with articles according to relations from scratch DB
4. assign module to store local assortment (ws05, local assortment exists for each store and has same code as store)
10-19-2007 12:41 PM
how you going determine in which assortments list article?
from algorithm point of view
0. you have relations "article - store - yes/no" in your scratch DB
1. for each article change article listing procedure (mm42 -> listing -> listing procedures 03 (manual)
2. for each store create standart module (wso1)
3. fill module with articles according to relations from scratch DB
4. assign module to store local assortment (ws05, local assortment exists for each store and has same code as store)
10-19-2007 12:54 PM
Hi Mikhail,
Thank you for your answer.
But in ABAP I don't want to start inserting records in tables directly so I'm looking for a function which helps me achieve this safely. Now I'm already doing it by submitting program RWSORLIARTI which is assigned to transaction WSM3 which kind of works, but it's not easy to get error reporting and it always commits. With a function I'd have much more control.
Thanks,
Nuno
10-19-2007 2:05 PM
I did this awhile back: Loop at your matnrs, then....
LOOP AT t_outdata INTO wa_outdata. "MATNRS
CLEAR: t_assortments_matnrs.* REFRESH: t_assortments_matnrs.*
SELECT filia FROM wlk1 APPENDING CORRESPONDING FIELDS OF TABLE t_assortments_matnrs
WHERE artnr = wa_outdata-matnr AND
datab <= sy-datum AND
datbi => sy-datum.
10-19-2007 2:18 PM
Hi Tom,
Thank you for answering.
Actually I need to CREATE listing for this materials in WLK1. Not list existing entries in WLK1 because there are none since I've just created the material programmatically.
Regards,
Nuno
10-24-2007 9:35 AM
Well,
I found the solution by analysing report RWSORLIARTI. It can be done using two function modules: MODULE_CREATE followed by ASSIGNMENT_POS_TO_SHOP. It's fast and it works quite well.
Regards,
Nuno