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

No data display

Former Member
0 Likes
524

Hi Abap experts,

Nothing was display when I loop the INTERNAL_TABLE.

Need your help to debug this program :-

REPORT ZUNIX1 .

data: unix_command(50) type c value 'ls -ls /usr/sap/trans/data'.

data: begin of internal_table occurs 0,

line(200),

end of internal_table.

call 'SYSTEM' id 'COMMAND' field unix_command

id 'TAB' field internal_table.

LOOP AT INTERNAL_TABLE.

WRITE:/ INTERNAL_TABLE.

ENDLOOP.

Thanks for your help.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
503

Read the abap help on CALL cfunc (note the abap returns -1). It gives youthe answer!

4 REPLIES 4
Read only

Former Member
0 Likes
503

Check this one:

data: unix_command(50) type c value 'ls -ls /usr/sap/trans/data'.

data: begin of internal_table occurs 0,

line(200),

end of internal_table.

call 'SYSTEM' id 'COMMAND' field unix_command

id 'TAB' field internal_table.

LOOP AT INTERNAL_TABLE.

WRITE:/ INTERNAL_TABLE-line.

ENDLOOP.

Regards.

Dara.

Read only

Former Member
0 Likes
503

Use the command as it follows:


CALL 'SYSTEM' ID 'COMMAND' FIELD unix_command
              ID 'TAB'     FIELD internal_table-*SYS*.

When you write, do:


LOOP AT internal_table.
  WRITE:/ internal_table-line.
ENDLOOP.

Hope it helps.

Regards.

Read only

Former Member
0 Likes
504

Read the abap help on CALL cfunc (note the abap returns -1). It gives youthe answer!

Read only

Former Member
0 Likes
503

hHi Ashutosh,

i think u must write

CALL 'SYSTEM' ID 'COMMAND' FIELD unix_command

ID 'TAB' FIELD internal_table-SYS.

i think u forgot to write sys may be this may be the problem.

thanks & regards

jyothi