Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Declarations Linux Server

Former Member
0 Likes
917

Hello experts,

I have an abap code to generate a csv file on a linux server (trough transcation AL11)

On the decalarion part, I found this:


DATA : c_file_path(60),
c_file_path_d
(12) VALUE 'XXX',
c_file_path_f
(11) VALUE '/XX/XX/XX'.

Could someone tell me for what thoses declarations stand for?

Thanks.

Amine

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
892

Share the piece of code where c_file_path_d and

c_file_path_f are being used.

Regards,

Felipe

8 REPLIES 8
Read only

Former Member
0 Likes
893

Share the piece of code where c_file_path_d and

c_file_path_f are being used.

Regards,

Felipe

Read only

0 Likes
892

Hi Felipe,

Here it is:


CONCATENATE    c_file_path_d sy-sysid c_file_path_f INTO c_file_path.

Amine

Read only

0 Likes
892

Also share the part of code where c_file_path is used or look for commad "call 'SYSTEM' id 'COMMAND' " or "OPEN DATASET"

Regards,

Felipe

Read only

0 Likes
892

Hi Felipe,


IF NOT c_file_path IS INITIAL.

         CLEAR XXXXX.

         CONCATENATE c_file_path 'XXX_'

               code-company '_XXX_'

               wa_tvarvc-low(4) wa_tvarvc-low+5(2) '.csv'

          INTO fichier_sor.

         OPEN DATASET fichier_sor FOR  OUTPUT IN TEXT MODE ENCODING DEFAULT.

         IF sy-subrc EQ 0.

           file_out = 'XXX,XXX,XXX'.

           TRANSFER file_out TO fichier_sor.

Sorry for the placeholders,

Thanks.

Amine

Read only

0 Likes
892

So looks everything is clear now, those variables are just use to compose the file name and directory to be used in file transfer.

Felipe.

Read only

0 Likes
892

Thank you Felipe.

Amine

Read only

ThomasZloch
Active Contributor
0 Likes
892

Looks like a clumsy way of doing what you would normally do using logical filenames and the FILE transaction, e.g. incorporating a varying system ID (sy-sysid) in the path name for application server access.

By the way, could it be that you have the values of d and f mixed up in your first post? Are these placeholders or did you tell us the actual values?

Thomas

Read only

0 Likes
892

Hi Thomas,

In fact those are placeholders...

Amine