‎2008 Apr 24 7:19 PM
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.
‎2008 Apr 26 7:43 PM
Read the abap help on CALL cfunc (note the abap returns -1). It gives youthe answer!
‎2008 Apr 24 7:26 PM
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.
‎2008 Apr 24 7:59 PM
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.
‎2008 Apr 26 7:43 PM
Read the abap help on CALL cfunc (note the abap returns -1). It gives youthe answer!
‎2008 Apr 26 8:53 PM
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