In my current project I have a file to import, which only delivers me a string with a length of 1000. I also get a description what is in this file. Like the following points:
- Customer from 1 to 10
- City from 11 to 50
The file looks like: 0000123456London............................ So I have a file and a description how to decode this file. Now I need to find a way to separate this information into InfoObjects. I build a Z-Table which contains the decode information.
The content look like the following example.
After I filled all my necessary information into the table, I started to write my code in an expert routine. First I need some variables and internal tables.
After the variable declaration, we have to select our data and sort the internal tables.
Now we loop over the SOURCE_PACKAGE and loop over our internal table to assign all values.
So when we now see the import file, which looks like the following.
The result looks like the a normal import.
You can download the whole source code from github. If you have questions, feel free to ask.
These posts might also be interesting: