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

LDB-Sort

Hello All,

After a long long time i am working on 3.1I and am using a LDB - BRF.

In my code i am using

GET BKPF Fields

BUKRS

BELNR

GJAHR.

(at this step - can i SORT the BKPF data by BUKRS BELNR? before i go to BSEG)

and then use

GET BSEG FIELDS

X

Y

Z.

Please let me know the syntax.

Regards,

- PSK

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jun 08, 2005 at 12:40 PM

    Hi,

    Sort is used only for sorting the internal table entries and not for the database tables, while using LDB, you can use Get <tablename/nodename> to get the contents of the table.

    Syntax would be like,

    Get <tabname1> where condition optional.

    Get<tabname2> .

    Hope this helps.

    Rgds,

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 08, 2005 at 02:00 PM

    Hello,

    seems to be difficult, what this 'Get'-statment does.

    At the GET statment you don't read the Table BKPF, but it is the event,when you get one (only one !) entry of table BKPF.

    Since the fields BUKRS,BELNR,GJAHR are the primary keys of that table, a sort does not make sense.

    At 'GET BSEG' you get the first position, then the next and so on to that BKPF entry.

    Could be usefull to try this logic:

    GET BKPF.

    Write: / BKPF-BUKRS, BKPF-BELNR, BKPF-GJAHR.

    GET BSEG.

    WRite: / BSEG-BUKRS, BSEG-BELNR, BSEG-GJAHR, BSEG-BUZEI.

    And test it with a selection of ten FI-documents.

    If you wish to sort in your program, you would use the old extract-logic. Look to the commands FIELD-GROUPS and EXTRACT.

    Regards,

    Wolfgang

    Add a comment
    10|10000 characters needed characters exceeded

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.