Skip to Content
0
Former Member
Aug 03, 2009 at 03:42 PM

Issue with ARTMAS idoc, via LSMW

194 Views

Hello experts,

I'm working with LSMW for initial load of article data in IS-Retail implementation. I'm having problems with ARTMAS idoc.

I configured the source structures in linear way, as every segment is in the same level.

Source Structures
|
|--    ZE1BPE1MATHEAD
|--    ZE1BPE1VARKEY
|--    ZE1BPE1AUSPRT
|--    ZE1BPE1AUSPRTX
|--    ZE1BPE1MARART
|--    ZE1BPE1MAW1RT
|--    ZE1BPE1MAKTRT
|--    ZE1BPE1MARCRT
|--    ZE1BPE1MARMRT
|--    ZE1BPE1MAMTRT
|--    ZE1BPE1MEANRT
|--    ZE1BPE1MBEWRT
|--    ZE1BPE1MVKERT

And the IDOC worked as well as only one article was loaded. But when the files has more than one article, let's say about 30 articles, the idoc generation gets screwed. The first 29 idocs just are the control segment and MATHEAD segment. And the last idoc have ALL the data of 30 articles.

So, i tried to change the configuration of source segments, in which MATHEAD segment is hierarchy 1 and the others segments are hierarchy 2:

Source Structures
|
|--    ZE1BPE1MATHEAD
    |--    ZE1BPE1VARKEY
    |--    ZE1BPE1AUSPRT
    |--    ZE1BPE1AUSPRTX
    |--    ZE1BPE1MARART
    |--    ZE1BPE1MAW1RT
    |--    ZE1BPE1MAKTRT
    |--    ZE1BPE1MARCRT
    |--    ZE1BPE1MARMRT
    |--    ZE1BPE1MAMTRT
    |--    ZE1BPE1MEANRT
    |--    ZE1BPE1MBEWRT
    |--    ZE1BPE1MVKERT

The idoc is running fine now, BUT the characteristics data and variants data (AUSPRT and AUSPRTX) are not loading into the idoc properly. The generic articles are created with no variant data. I think it's logical because variants and generic articles has not the same MATNR number. BTW, generic and variant numbers are created within BADI ARTMAS_BAPI_EXTEND, with BAPIs BAPI_MATERIAL_GETINTNUMBERRET and BAPI_MATERIAL_GETVARNUMBERS. In this BADI, article numbers are being created as expected.

In SAP documentation I read that generic and variant must be loaded in the same idoc... But how can I achieve this? Anyone had worked with this IDOC in LSMW?

Thanks in advance.

Edited by: Julio Almeida on Aug 4, 2009 11:51 AM