10-17-2008 3:25 AM
hi experts,
now my requirement is i have two variables v_sgtxt = 345
and v_sgtxt1 = 01/01/2007 so i have to move the data from this two fields in to only one field say v_sgtxt2 like
v_sgtxt2 = 345
01/01/2007 this .After 345 date field come in the next line. i am not able to solve this one . can any one explain me pls.
Thanks & Best Regards,
Praveen.
10-17-2008 3:47 AM
Try using attribute: CR_LF of class: CL_ABAP_CHAR_UTILITIES.
>CONCATENATE <text1> <text2> INTO <text3> SEPARATED BY c_cr_lf.
Regards
Eswar
10-17-2008 3:47 AM
Try using attribute: CR_LF of class: CL_ABAP_CHAR_UTILITIES.
>CONCATENATE <text1> <text2> INTO <text3> SEPARATED BY c_cr_lf.
Regards
Eswar
10-17-2008 3:53 AM
Hi Eswar,
how to use CR_LF of class: CL_ABAP_CHAR_UTILITIES.
can u please tell me.
Thanks & Regards,
Praveen.
10-17-2008 3:55 AM
Check below example:
DATA: text1 TYPE char10 VALUE '1234',
text2 TYPE char10 VALUE 'abcde'.
DATA: l_file TYPE string,
i_data TYPE TABLE OF string,
wa_data TYPE string.
PARAMETERS: p_file TYPE filename OBLIGATORY DEFAULT 'C:\linefeed.xls'.
CONSTANTS: c_cr TYPE char1 VALUE cl_abap_char_utilities=>cr_lf.
START-OF-SELECTION.
CONCATENATE text1 text2 INTO wa_data SEPARATED BY c_cr.
APPEND wa_data TO i_data.
l_file = p_file.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
filename = l_file
CHANGING
data_tab = i_data[]
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
not_supported_by_gui = 22
error_no_gui = 23
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Regards
Eswar
10-17-2008 4:59 AM
Hi Esawr,
Its working fine in xl but i want the field to be display in alv list. while i debugging the field
v_sgtxt2 = 345#01/01/2007 is showing like this but i want
v_sgtxt2 = 345
01/01/2007 like this.
can u please tell me .
Thanks & Best Regards,
Praveen.
10-17-2008 5:49 AM
hi,
we can't display 2 lines in single cell in ALV. there is no option for justify alignment in alv.