08-04-2008 8:30 PM
Hi ,
We are passing the data to the application server ..
Using open dataset..
Close Dataset...
Previously we used
sep type x value '|"
as the separator..
Now that we made our code unicode compliant ,We could not pass the non character field to the file which is opened in TEXT mode.
Could anyone suggest what is the exact replacement of this seperator so that it introduces the Null character in between two fields...
Thank you..
08-04-2008 8:39 PM
Use static attribute CR_LF of class CL_ABAP_CHAR_UTILITIES for the same purpose.
Like:
concatenate ITAB-FIELD1 ITAB-FIELD2 into l_text
spearated by CL_ABAP_CHAR_UTILITIES=>CR_LF.
Regards,
Naimesh Patel
08-04-2008 8:39 PM
Use static attribute CR_LF of class CL_ABAP_CHAR_UTILITIES for the same purpose.
Like:
concatenate ITAB-FIELD1 ITAB-FIELD2 into l_text
spearated by CL_ABAP_CHAR_UTILITIES=>CR_LF.
Regards,
Naimesh Patel
08-04-2008 8:46 PM
Hi naimesh,
Can we use the CL_ABAP_CHAR_UTILITIES=>CR_LF in the structure ..
Because in our code we have like..
var1 type char2 ,
sep1 type x value '|',
var2 type char2 ,
sep2 type x value '|',
var3 type char2 ,
sep3type x value '|',
var4 type char2 ,
08-04-2008 8:58 PM
You can define your type like this:
types: begin of ty_data,
fld type char20,
sep1 type ABAP_CR_LF, " <<
fld1 type char20,
end of ty_data.
When you move the data in the workarea, fill the SEP1 with the value CL_ABAP_CHAR_UTILITIES=>CR_LF.
Regards,
Naimesh Patel
08-04-2008 9:07 PM
When you move the data in the workarea, fill the SEP1 with the value CL_ABAP_CHAR_UTILITIES=>CR_LF.
...
I did not get the above statement..
Can we use
types: begin of ty_data,
fld type char20,
sep1 type CL_ABAP_CHAR_UTILITIES=>CR_LF, " <<
fld1 type char20,
end of ty_data.
08-04-2008 9:19 PM
Naimesh,
The ABAP_CR_LF is producing 2 spaces in the file..
Was it exactly represents the null then..
And can you explain how can we identify the null in the file..
08-04-2008 9:22 PM
I meant,
TYPES: BEGIN OF TY_DATA,
FLD TYPE CHAR20,
SEP1 TYPE ABAP_CR_LF,
FLD1 TYPE CHAR20,
END OF TY_DATA.
DATA: IT_DATA TYPE STANDARD TABLE OF TY_DATA,
LA_DATA TYPE TY_DATA.
DO 5 TIMES.
LA_DATA-FLD = 'test1'.
LA_DATA-FLD1 = 'test1'.
LA_DATA-SEP1 = CL_ABAP_CHAR_UTILITIES=>CR_LF.
APPEND LA_DATA TO IT_DATA.
ENDDO.
Regards,
Naimesh Patel
08-04-2008 9:23 PM
When you read back the file from server, you can use the SPLIT command to split at CL_ABAP_CHAR_UTILITIES=>CR_LF.
Regards,
Naimesh Patel
08-05-2008 1:55 PM
Hi naimesh..but we are using the CSV FORMAT to resolve this format..
I appreciate for your attention and the time you spent ...
Thanks a lot