‎2008 Feb 25 4:12 PM
Hi frnds,
Below i am providing code where my problem is data is coming using open data set i.e from application server.
and it should split it in given variables.
When i am manually giving its spliting but when i need that it shuld split when taken from application server.
The Bolded is given by me manually which is splitting but when i taken the same data from application server then its not splitting.
so can anyone tell me whst the problem.
<code>
data : var type string value '210651#WHA-588QV#11/26/2007 10:58#527.02#526.99#526.99#17640207#ALLEN K WITHRAW J#1000#CVGOGG20071118NL02#Approved on link to booking.#',
var1(100),
var2(100),
var3(100),
var4(100),
var5(100),
var6(100),
var7(100),
var8(100),
var9(100),
var10(100),
var11(100),
var12(100).
split var at '#' into var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 var11.
if sy-subrc = 0.
endif.
</code>
regards,
sanjay
‎2008 Feb 25 4:17 PM
Try using FM TEXT_CONVERT_TXT_TO_SAP just remember to change the i_field_separator for the one you're using
By the way, are you sure the # sign is really "#" or is just an horizontal tab or other line break? Maybe that's why is not splitting
Edited by: Ramiro Escamilla on Feb 25, 2008 5:18 PM
‎2008 Feb 25 4:31 PM
Hi Ramiro,
Still the same can u suggest what can be done.
Actually its going to dump, showing problem at I_TAB_CONVERTED_DATA.
so can u plz help me.
regards,
sanjay
‎2008 Feb 25 4:37 PM
Again, my intuition tells me that the "#" sign is really a line break
Did you made the program that transfers the data to the server?
Could you look at the source at least?, I'm pretty sure is a tabulation or other line break.
If you are in ECC use :
split var at CL_ABAP_CHAR_UTILITIES=>HORIZONTAL_TAB into var1 var2 var3 var4 var5 var6 var7 var8 var9 var10 var11.