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

BSEG & Purchase order (EKKO-EBELN)

Hello Gurus,

I need to read BSEG table but not using key fields. I have to read it using only company code (BUKRS), purchase order number (EBELN), purchase order item number (EBELP) and material (MATNR) because I need to find the G/L account assigned to this purchase order. I cannot use BSIK/BSAK.

And as you know the performance is very very poor.

Do you have any idea?

Regards,

M.

Add a comment
10|10000 characters needed characters exceeded

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jul 31, 2008 at 07:48 PM

    Hi,

    you can get the G/L account number by using EKKN and EKPO-matnr , why are you using BSEG for getting G/L account? it will be much faster if you use EKKN and EKPO as a join .

    Please reward if you find the answer useful.

    Thanks & Regards,

    Kamesh Bathla

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 08:47 AM

    hi,

    Try making use of all the key fields in the where condition of your select statement....

    Regards,

    Santosh

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2008 at 08:50 AM

    yes, I have... 😊 read table EKKN (postings of purchasing documents). This table you can read with EBELN and EBELP. The G/L account will be in field SAKTO. (If you want to restrict your selection based on Company code and material number, than you have to read EKKO (for company code) and EKPO (for material number) tables first)

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 24, 2008 at 08:52 AM

    BSEG is a cluster table. You can't create secondary indexes on cluster tables.

    Why can't you get the PO GL code from the PO account assignment table EKKN?

    Just for clarification. My mentioning that you can't create secondary indexes on BSEG, which now appears to have nothing to do with this thread at all, was in reponse to Santosh Kumar Patha's suggestion that you can do that very thing. He has since edited his post to remove that suggestion.

    Edited by: Christine Evans on Jul 25, 2008 1:02 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 24, 2008 at 09:58 AM

    hi,

    why cant u try fpr BSIK and BSAK and den make relation with table BKPF and then take the AWTYP = RMRP and u get a/c no in RSEG

    and there u can have ur requiered PO no.. and PO Item.........

    Bseg will be more complex as it contains the data which will be heavier and it might also effect your report performance.....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 27, 2008 at 06:50 PM

    Please see:

    [Quickly Retrieving FI document Data from BSEG|Quickly Retrieving FI document Data from BSEG]

    Rob

    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.