2008 Mar 05 9:49 AM
Hello,
I try to create via ABAP a file name with date in it. Normaly my script must run but the script won't run. Please help. Thanks.
data = sy-datum. " = data set to sys date
data+6(2) = '01'. " = first day of month
data = data - 1. " = last day of last month
file name creation
p_filename+0(21) = '/sapio/flatfiles/xxx/'. " = first part of file name
p_filename21(6) = data0(6). " = second part of file name
p_filename+27(15) = '_XXXX_XXXXX.csv'. " = last part of file name
p_subrc = 0.
Regards, Thomas
2008 Mar 05 9:54 AM
Concatenate name and date into the file name ...
v_date = data+0(6).
Concatenate '/sapio/flatfiles/xxx/' v_date '_XXXX_XXXXX.csv' into
p_filename.
Hello,
I try to create via ABAP a file name with date in it. Normaly my script must run but the script won't run. Please help. Thanks.
data = sy-datum. " = data set to sys date
data+6(2) = '01'. " = first day of month
data = data - 1. " = last day of last month
file name creation
p_filename+0(21) = '/sapio/flatfiles/xxx/'. " = first part of file name
p_filename21(6) = data0(6). " = second part of file name
p_filename+27(15) = '_XXXX_XXXXX.csv'. " = last part of file name
p_subrc = 0.
Regards, Thomas
2008 Mar 05 9:54 AM
Concatenate name and date into the file name ...
v_date = data+0(6).
Concatenate '/sapio/flatfiles/xxx/' v_date '_XXXX_XXXXX.csv' into
p_filename.
2008 Mar 05 10:04 AM
Hi again!
Now I try it with your hints but now I got a save error.
program conversion_routine.
* Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rsldpsel.
* Global code used by conversion rules
*$*$ begin of global - insert your declaration only below this line *-*
* TABLES: ...
* DATA: ...
data: data like sy-datum.
*$*$ end of global - insert your declaration only before this line *-*
* -------------------------------------------------------------------
form compute_flat_file_filename
using p_infopackage type rslogdpid
changing p_filename like rsldpsel-filename
p_subrc like sy-subrc.
* Insert source code to current selection field
*$*$ begin of routine - insert your code only below this line *-*
* Datum wird gebaut
data = sy-datum. " = data set to actual date
data+6(2) = '01'. " = first day of month
data = data - 1. " = last day of month before
v_date = data+0(6).
* Dateiname wird gebaut
p_filename = '/sapio/flatfiles/XXX/'v_date'_XXXX_XXXX.csv'.
p_subrc = 0.
*$*$ end of routine - insert your code only before this line *-*
endform.
2008 Mar 05 10:18 AM
U need to Concatenate ... using the below statement .. and then use
p_filename
Concatenate '/sapio/flatfiles/xxx/' v_date '_XXXX_XXXXX.csv' into
p_filename.
2008 Mar 05 10:30 AM
Hi,
I try but error again.
* create file name
CONCATENATE '/sapio/flatfiles/xxx/'v_date'_xxxx_xxxxx.csv' INTO p_filename.
Regards, Thomas
Edited by: Thomas Franke on Mar 5, 2008 11:30 AM
2008 Mar 05 10:32 AM
2008 Mar 05 10:37 AM
Hi,
I click on the save button and afterwards a error occurs.
The syntax check produced errors in the form routine.
Hmm ... need help.
Thanks a lot for your time.
Regards, Thomas
2008 Mar 05 1:59 PM
Hi,
I found the error. I replaced v_date with data and the error doesn't occurred again. Hope that is the solution.
Regards, Thomas
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |