‎2007 Dec 11 3:37 PM
Hi All, Currently when I run a background process I am giving it a file name of
file_name = '/tmp/END_CUST'.
CONCATENATE file_name '_' v_dat '_' v_tim '.txt' INTO file_name.
This works and shows the filename correctly. However before running the background processing, I choose a variant and would like to concatenate that name in to it as well. I am not having luck with this.
Rewards for helpful answers
‎2007 Dec 11 3:39 PM
Change the file names as follows on the INITLISATION event of your Report. This will give you Exact results which you expect.
INITIALIZATION.
CONCATENATE '\' sy-host 'WFNewHire_' sy-datlo '_' sy-timlo '_SAP.dat' INTO p_hires.
CONCATENATE '\' sy-host 'WFTerms_' sy-datlo '_' sy-timlo '_SAP.dat' INTO p_terms.Amandeep
‎2007 Dec 11 3:39 PM
Try putting this into Intialization section.
file_name = '/tmp/END_CUST'.
CONCATENATE file_name '_' v_dat '_' v_tim '.txt' INTO file_name.Regards,
Naimesh Patel
‎2007 Dec 11 3:39 PM
Change the file names as follows on the INITLISATION event of your Report. This will give you Exact results which you expect.
INITIALIZATION.
CONCATENATE '\' sy-host 'WFNewHire_' sy-datlo '_' sy-timlo '_SAP.dat' INTO p_hires.
CONCATENATE '\' sy-host 'WFTerms_' sy-datlo '_' sy-timlo '_SAP.dat' INTO p_terms.Amandeep
‎2007 Dec 11 3:40 PM
Hi
The variant name should be in the system variable SY-SLSET.
DATA: V_LEN TYPE I
file_name = '/tmp/END_CUST'.
V_LEN = STRLEN( SY-SLSET ).
CONCATENATE file_name '_' SY-SELST(V_LEN) '_' v_dat '_' v_tim '.txt' INTO file_name.
Max
‎2007 Dec 11 3:48 PM
‎2007 Dec 11 3:49 PM
Hi dipesh,
1. The current variant name is stored in system variable
<b>SY-SLSET</b>
2. Hence, you can concatenate it like this for eg.
file_name = '/tmp/END_CUST'.
CONCATENATE file_name '_' v_dat '_' v_tim '.txt' INTO file_name.
<b>concatenate file_name sy-slset into file_name.</b>
regards,
amit m.