hi,
i'm trying to make a LSMW to create BoMs.
i can't use the standard batch input method since there are custom fields for the item positions and i get a dump for conversion error.
therefore i went for the recording method.
i created the header first and then i used recordings in order to add the positions, that would be the idea at least.
i had to do several recording for the item positions because different position types generate different dynpro sequences and adding the first item position also generates a different dynpro sequence compared to subsequent item positions.
basically i have several recordings and i'm trying to add some code in the _BEGIN_OF_RECORD_ in order to select the correct one.
for the pos type it's not dificult by i'm trying to differenciate between the first position and subsequent ones without success.
all i could come up with was to check MAST for MATNR/WERKS/STLAN/STLAL in order to get the STLNR, check STAS for STLNR/STLAL to see if there are existing item positions.
here's the code:
tried several times but at the convert data step no record is written unless i remove all the checks, giving me the feeling that i cannot perform SELECTs and probably not even declare variables in the _BEGIN_OF_RECORD_ space...
what am i doing wrong?
any solution?