on 07-20-2016 10:29 AM
Hello
We try to make multiple documents with multiple lines in LSMW using 1 file and
Standard batch/direct input 0110 0000 RM07MMBL.
The problem is, the program is using field MTSNR by default to sort all the records in the file
so that it knows how to combine them, and which of them go together in one document.
How can we choose another filed?
In the context of https://scn.sap.com/thread/1931489
Perhaps Juergen Lins will know.
Thanks in advance
ILIAN
I don't really believe that SAP is sorting something on its own.
how is your source file defined?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
MTSNR is a external reference number. It might be logical to group all movements that share the same external reference number together, however it is certainly possible to control LSMW to do what you want.
Since you have just defined a single flat source structure SAP is certainly processing the records in sequence like they are visible in the READ data.
You did not yet say how you want it to be. do you just want a single material document per line, or do you want it grouped by another field?
Many thanks for your time, and your answers Juergen.
Also thank you for all the efforts you put here on SDN, and all the information you provide in many different forms.
Unfortunately it appears that I cannot use your methods in my case, because the program itself (RM07MMBL) provides a single non hierarchical structure/dataset BMSEG. It does not matter what convertion rules I do in "Maintain Field Mapping and Conversion Rules" the program takes this dataset, and then decides how to do head/items on its internal logics. I debugged.
It considers several fields as header, and then upon change of any of them, makes a new document.
The easiest way for me is to use BKTXT with some suffix (i.e. CHARG) when I want new document generated. Anyway I learned a lot. Thanks again.
P.S.
if anybody is interested the fields for header are:
TCODE
BLDAT
BUDAT
BWART
XBLNR
FRBNR
BKTXT
WEVER
LDEST
MTSNR
XABLN
LIFNR
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.