Skip to Content
author's profile photo Former Member
Former Member

How to compare files, spool files, etc.

We want to compare outputs from report programs. What ways are available to compare flat files or spool files? (The more intelligent the compare program, the happier we'd be.)

Is best way to RFC/JCO to some extant Java utilities, or does SAP provide such functionality?

Add comment
10|10000 characters needed characters exceeded

2 Answers

  • Posted on Jun 02, 2004 at 08:38 PM

    You could write an abap that submits both reports outputing to memory, retrieves the lists from memory into itab, and converts the lists to ascii. Then read each line of each internal table to see if they are equal, if not, then output that line. I don't know of any SAP delivered program that will do this for you.

    Regards,

    Rich Heilman

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 02, 2004 at 08:41 PM

    The fastest file compare is definitely at the operating system level. However, you need to have some shell scripting experience to write such a program. Once you have the shell ready, you can execute it inside an ABAP program as an external command (defined in SM69)with 'SXPG_EXECUTE_COMMAND' function.

    Another option is using "open dataset in text mode" to load file into an internal table and then comparing it with .

    Add comment
    10|10000 characters needed characters exceeded