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

Sorting a DMEE tree

I have made a very simple DMEE tree to generate a flat file from program SAPFPAYM. I would like to sort the file by FPAYH-BNKL1 (Bank key) and FPAYH-ZPFAC (PO Box) (which is are not key fields).

When the file is generated, the entries are not sorted. E.g. BNKL1 value 00035211 occurs several times (se below). It seems like the file is sorted by field FPAYH-LFDNR even though this is not part of the sort fields I have given.

How can I make sure that the file is actually sorted and grouped by the fields I have entered and not by LFDNR?

I have set the following in Sort-fields:

Key field  No sorting  Sequence  Structure  Sort field  Level
    X                  1         FPAYH      BNKL1       1
    X                  2         FPAYH      ZPFAC       2

My REGUH looks like this (first 8 fields are keys fields- last 2 are not):

--------------------------------------------------------------------------------
|Run Date  |ID    ||CoCd|Vendor|Customer|Payee     |Payment|Bank Key|PO Box    |
--------------------------------------------------------------------------------
|24.10.2007|125602||0020|13    |        |3105600000|1      |00035211|3105609992|
|24.10.2007|125602||0020|16    |        |2106530000|2      |00035211|2106539992|
|24.10.2007|125602||0020|16    |        |2106530000|3      |01032224|2106539992|
|24.10.2007|125602||0020|84    |        |2302450001|5      |00035211|2302459991|
|24.10.2007|125602||0020|84    |        |2302450001|6      |00035211|2302459991|
|24.10.2007|125602||0020|20440 |        |2512484908|8      |00700460|2512484908|
|24.10.2007|125602||0020|100031|        |0210679991|9      |00035211|0210679991|
|24.10.2007|125602||0020|100032|        |0210679991|11     |00035211|0210679991|
|24.10.2007|125602||0020|100038|        |          |13     |00035211|1509559991|
--------------------------------------------------------------------------------

This is what is in the file:

FPAYH-BNKL1:       00035211  
- FPAYH-ZPFAC:       2302459991 / LFDNR:  13556664
- FPAYH-ZPFAC:       3105609992 / LFDNR:  13556665
- FPAYH-ZPFAC:       2106539992 / LFDNR:  13556666
FPAYH-BNKL1:       01032224  
- FPAYH-ZPFAC:       2106539992 / LFDNR:  13556667
FPAYH-BNKL1:       00035211  
- FPAYH-ZPFAC:       2302459991 / LFDNR:  13556668
FPAYH-BNKL1:       00700460  
- FPAYH-ZPFAC:       2512484908 / LFDNR:  13556670
FPAYH-BNKL1:       00035211  
- FPAYH-ZPFAC:       0210679991 / LFDNR:  13556671
- FPAYH-ZPFAC:       1509559991 / LFDNR:  13556675

I would expect this:

FPAYH-BNKL1:       00035211  
- FPAYH-ZPFAC:       0210679991 / LFDNR:  13556671
- FPAYH-ZPFAC:       1509559991 / LFDNR:  13556675
- FPAYH-ZPFAC:       2302459991 / LFDNR:  13556664
- FPAYH-ZPFAC:       2302459991 / LFDNR:  13556668
- FPAYH-ZPFAC:       3105609992 / LFDNR:  13556665
- FPAYH-ZPFAC:       2106539992 / LFDNR:  13556666
FPAYH-BNKL1:       00700460  
- FPAYH-ZPFAC:       2512484908 / LFDNR:  13556670
FPAYH-BNKL1:       01032224  
- FPAYH-ZPFAC:       2106539992 / LFDNR:  13556667

Rasmus

Message was edited by:

Rasmus Feldtmose

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2007 at 12:40 PM

    hi Rasmus,

    please go through :

    http://www.sapsecurity.co.uk/sap-tables.html

    here you will find :

    DMEE_TREE DMEE Format Tree: General Data -1

    DMEE_TREE_AGGR DMEE: Aggregation of Nodes -1

    DMEE_TREE_HEAD DMEE: Format Tree Header Data -1

    DMEE_TREE_LEVEL DMEE: Format Level -1

    DMEE_TREE_SORT DMEE: Sort and Key Fields for Format -1

    DMEE_TREE_T DMEE: Text Table for Tree Definition

    hope it will give you some idea to move forward.

    reward points if helpful.

    Best regards,

    Rahul

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2007 at 01:14 PM

    I have now looked through all DMEE_TREE* tables, but found nothing out of the ordinary. The first I checked of course was the DMEE_TREE_SORT table, but it just confirmed, that I have only selected the FPAYH-BNKL1 and FPAYH-ZPFAC fields.

    I found that FPAYH-LFDNR is mapped from REGUH-SRTF2 (which is not a key field). But I still haven't found out why the file is sorted by this field and not by the fields I have specified.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi Rasmus,

      If you're still out there I just wanted to say thanks for documenting your issue so well even though nobody jumped in to help you. I've been going crazy trying to figure out why changing the sort fields in my DMEE definition didn't seem to do anything - now I know!

      Thanks,

      Jim

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.