09-29-2008 3:04 PM
Dear experts.
I have to provide an csv file with information from table KNA1 in a background task.
I have several questions:
1.) I don't want to create a structure like:
TYPES: BEGIN OF itab_formate_def,
bukrs(4),
tren1(1),
kunnr(10),
tren2(1),
madat(10),
tren3(1),
mahns(1),
tren4(1),
umsaj(14),
tren5(1),
umsvj(14),
tren6(1),
offen(14),
tren7(1),
faell(14),
tren8(1),
land1(3),
tren9(1),
wechs(14),
trena(1),
isocd(5),
END OF itab_formate_def.
Is there a way to insert a delimiter dynamically?
2.) Can 'GUI_DOWNLOAD' be used in a background task? Existing files can be overwritten without request.
Many thanks for your help.
Kind regards.
Andreas
09-29-2008 6:39 PM
1) you can concatenate your fields into a string separated by comma.
2) no, GUI = Graphical User Interface.. In background, there is no GUI
09-29-2008 6:39 PM
1) you can concatenate your fields into a string separated by comma.
2) no, GUI = Graphical User Interface.. In background, there is no GUI
09-29-2008 9:44 PM
Hello Andreas,
In addition to Robert's solution 1, you have to use the additional clause RESPECTING BLANKS. Otherwise you lose all spaces and your defined structure is completely destroyed.
DATA: v_STRING TYPE STRING.
CONCATENATE bukrs kunnr madat ...... into v_string separated by ',' RESPECTING BLANKS
.
Have success,
Heinz