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

Unix command question on TAB content

Former Member
0 Likes
441

We found the following ABAP statemenet



DATA: our_unix_path_and_file_name(64) TYPE c,
           v_unixcmd(255) TYPE c,
           result(255) TYPE c OCCURS 100 WITH HEADER LINE.

CONCATENATE 'ls -al' our_unix_path_and_file_name INTO v_unixcmd SEPARATED BY space.

CALL 'SYSTEM' ID 'COMMAND' FIELD v_unixcmd
                ID 'TAB'     FIELD result-*sys*.

The question is: is result an internal table? if it's an internal table, then why it's defined as type c? And also what is included in this result after calling this UNIX command? it will list all the file content?

Thanks and we will give you reward points!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
424

The fact that the result says "occurs 100" defines it as an internal table. It is an archaic way of declaring it, but still valid.

We found the following ABAP statemenet



DATA: our_unix_path_and_file_name(64) TYPE c,
           v_unixcmd(255) TYPE c,
           result(255) TYPE c OCCURS 100 WITH HEADER LINE.

CONCATENATE 'ls -al' our_unix_path_and_file_name INTO v_unixcmd SEPARATED BY space.

CALL 'SYSTEM' ID 'COMMAND' FIELD v_unixcmd
                ID 'TAB'     FIELD result-*sys*.

The question is: is result an internal table? if it's an internal table, then why it's defined as type c? And also what is included in this result after calling this UNIX command? it will list all the file content?

Thanks and we will give you reward points!

2 REPLIES 2
Read only

Former Member
0 Likes
425

The fact that the result says "occurs 100" defines it as an internal table. It is an archaic way of declaring it, but still valid.

Read only

Former Member
0 Likes
424

Hi,

The result you'll get is a list of files and attributes from a directory and it will be placed in an internal table.

Regards,

Nicolas.