Dynamic value passing for Flag Structure BAPI_ITOB(X)

I had to make a program for a costumer to import a CSV file into the system. The file itself contained information on equipments to either change or create them. I did not copy the whole program (not being the purpose of this document).The piece I wanted to share was to dynamicly fill the flag structures. If done by hand, this process could take quitea while.