Spliting the data at '##'
I have a requirement to pick the data form CSV file using BSP and upload the data in SNC DB table, Following are the steps used:
1) Data is picked from BSP using upload ?= cl_htmlb_manager=>get_data( request = request id = 'FileUpload' name = 'fileUpload' ).
2) Above step gives the data in XString format. Next step is to convert the data from XString to string type. For which i have used CALL FUNCTION 'CRM_IC_XML_XSTRING2STRING'
EXPORTING inxstring = filexstring
IMPORTING outstring = filestring.
3) I'm passing the above string (data in filestring) from BSP to a FM where i can update the SNC DB table.
Now Complete data of CSV file is in a single string type variable(say p_content) in which every row of CSV file is separated by '##', so to update the DB table i'm trying to split the string variable(p_content) at '##'. but split is not working in this case.
Split works properly when i test my logic by hardcoding the above data in FM, but doesn't work when content is passed dynamically.
Please suggest me some workaround to rectify the problem.
Thank you very much in advance.