2011 Jun 07 9:35 AM
All,
I using LSMW (RMDATIND) to load material masters. IM using GUI upload to read the data into an internal table. The data reads in fine. Prioblem I have is when i map the internal table to the fields within each of the segments i only get the first record. Im using 3 segments in the materia load,
the structure is as follows:
BMM00 Mat1
BMMH1 UOM1
BMMH7 TEXT 1
I''m not sure where i should put the loop or how to force it to the next record
thanks for any help
All,
I using LSMW (RMDATIND) to load material masters. IM using GUI upload to read the data into an internal table. The data reads in fine. Prioblem I have is when i map the internal table to the fields within each of the segments i only get the first record. Im using 3 segments in the materia load,
the structure is as follows:
BMM00 Mat1
BMMH1 UOM1
BMMH7 TEXT 1
I''m not sure where i should put the loop or how to force it to the next record
thanks for any help
2011 Jun 07 10:16 AM
IM using GUI upload to read the data into an internal table
this does not really sound like you are using LSMW, as this step is not necessary at all as it is included in LSMW step 9 Read data.
Prioblem I have is when i map the internal table to the fields within each of the segments i only get the first record.
Mapping of fields is done in step 5. you first describe your internal table structure in step 2 and 3.
then you assign the structure to the target structure in step 4
and map field of internal structure to target structure in step 5.
Please describe your structure from step 2 and your mapping in step 4.
2011 Jun 07 10:26 AM
hi jurgen
In this case im using the Function GUI upload to read the file into an interna table, The souce data file is selected when the convert data step is ran (via a parameter). I have mapped the structures to a dummy file that contains only 1 field. All of the data i need is in the Internal table now and my intention was to map directly from that internal table. As i mentioned this works but i am only getiing the first record. Alternatively i could create the source fields and map them to the fields but i still need to take the source data into an internal table to remove duplicates.
hope this makes sense?
thanks for your reply
2011 Jun 07 3:45 PM
Even after this long explanation it still is a step that is not needed .
Please answer my questions, otherwise I cannot help you
2011 Jun 07 3:50 PM
I have mapped the structures to a dummy file that contains only 1 field.
How many records are in the dummy file?
The souce data file is selected when the convert data step is ran (via a parameter).
The convert step is after the read step. how many records have you read in step READ DATA? and how many records do you see in DISPLAY READ DATA.
SAP runs the convert data step once for each record per structure level in the .READ file.
2011 Jun 07 6:51 PM
Jürgen L. is correct the file does not need to be uploaded through GUI_UPLOAD as this is the primary function of the Read Data step.
You said you have 2 files one with records and the other with only 1 (to load the read), why would you not just read the main file with records and process the data within the LSMW? You can also have the LSMW read from multiple files in the Specify Files and Assign Files steps.
2011 Jun 08 10:29 AM
gents
thank you for your responses,
FYI
I have managed to find a resolution to this by using the 'transfer_this_record' stamement. So at the end of the first segement I pass data that would ordinarly be mapped and transfered at the end of each segment. Using a Loop statement this then reads each record one by one.
cheers
2011 Jun 09 3:00 PM
There are macros in LSMW you can use, I think you need 'skip_record'.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |