03-17-2014 7:44 AM
Hi techies,
I have two internal tables .
I need append itab 2 with the entries of one.
I don't want to overwrite.
I want to append.
Append lines is not working.
Suggest me alternative of append lines.
Thanks.
03-17-2014 7:53 AM
loop at itab2 into wa2.
wa1-field = wa2-field.
append wa1 to itab1.
endloop.
03-17-2014 7:53 AM
loop at itab2 into wa2.
wa1-field = wa2-field.
append wa1 to itab1.
endloop.
03-17-2014 7:54 AM
Can you elaborate on :
Append lines is not working.
As APPEND LINES OF jtab [FROM idx1] [TO idx2] [USING KEY keyname] usually do the job ?
If your itab is a sorted type of itab, then you may be required to use INSERT LINES OF jtab [FROM idx1] [TO idx2] [USING KEY keyname]
Regards,
Raymond
03-17-2014 7:55 AM
append lines will work on a standard table. Once it is not standard, you can't use it. So first show us your code
03-17-2014 8:29 AM
03-17-2014 9:24 AM
Are table *Sys* and logfile of the same structure ? They must be otherwise it won't work.
Do you get an error message when this statement is performed ?
03-17-2014 9:31 AM
03-17-2014 9:33 AM
03-17-2014 9:35 AM
*SYS* is used when call 'system' is used to capture the command.
Even am not very clear regaring the statement :
CALL SYSTEM ID 'COMMAND' FIELD uxcmdfile ID 'TAB FIELD xoutput-*sys* '
03-17-2014 9:42 AM
Even am not very clear regaring the statement :
CALL SYSTEM ID 'COMMAND' FIELD uxcmdfile ID 'TAB FIELD xoutput-*sys* '
Is it a custom code? If yes, then why are you using something which you don't understand?
Anyway C-calls should not be used in customer code unless there is no suitable alternative available. Can you tell us what business case do you want to achieve?
- Suhas
03-17-2014 9:45 AM
i have a logfile in which am maintaining my log , and i want to append the error lines which are captured in xoutput-*sys* .
it is customcode , but developer is not me .
03-17-2014 10:04 AM
"tabl-*sys* is the outdated and undocumented way of writing tabl[] in order to address the table body of an internal table with header line. That's all." described by Horst Keller inhttp://scn.sap.com/community/abap/blog/2013/03/06/a-word-about-call-system
03-17-2014 10:14 AM
Well I think that this one answered the question - as xoutput-*sys* is another way to access the header line, one can't touch it's lines, as it has none.
03-17-2014 10:56 AM
Have you tried:
append lines of xoutput to logfile.
Can't see a reason for this not to work.
Cheers,
Custodio
03-17-2014 11:03 AM
do you know the structure of xoutput? It probably is not a flat structure
03-17-2014 11:07 AM
He said they are the same structure, no?
Praveen Bindla wrote:
They are of the same type holding one structure as LINE(255) .
03-18-2014 10:47 AM
i have edited my code with loop append endloop.
hope this should work .
can you techies explain me what the line mean :
CALL 'SYSTEM' ID 'COMMAND' FIELD uxcmdfile ID 'TAB' FIELD xoutput-*sys*.
what it will do ?
can you explain me ?