‎2012 Jul 11 11:35 AM
HiExperts,
I need to load an internal table from csv file which is located in application server of SAP.
This csv file contains header and item details, now my doubt is how to segregate this header and item details and put in one internal table?
Moderator message: Please do a proper analysis of your requirement and post your question here if you are facing any technical difficulties. You question is purely related to the specification analysis which cannot be helped here.
Message was edited by: Kesavadas Thekkillath
‎2012 Jul 11 11:39 AM
Hi,
Header will always be first line. So you can read the internal table with INDEX 1 and you can segregate the header and line item.
First get file contents into a internal table using OPEN DATASET, READ DATASET and CLOSE DATASET.
Then read the internal table with index 1 to get the header line.
Cheers
~Niranjan