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

SQVI - Query for BSEG and BKPF

Hello Expert,

In SQVI, we have one functionality where we can join 2 tables. I am trying to join BKFP and BSEG table but system is not allowing to join this 2 table.

My requirement is i want document number in Date range from table BKPF and put it in BSEG table and bring the output.

Is this possible in SQVI or any other way without writing the ABAP programme?

Regards

Zunaid

Add comment
10|10000 characters needed characters exceeded

5 Answers

  • Posted on Nov 20, 2013 at 10:01 AM

    hey,

    you have to use the logicial data base BRM

    greetz

    N

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      as written by NICO, use logical database BRM or BRF(?). There BKPF and BSEG (amongst other tables) are already joined. Or use a SAP query info set (if it exists already) as data source in SQVI for one of mentioned logical databases.

      BR Christian

  • Posted on Nov 20, 2013 at 11:05 AM

    Hi

    BSEG cant be used in join condition....

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 20, 2013 at 12:04 PM

    Hi,

    BSEG is a cluster program and cannot be used in SQVI.

    Regards,

    Eli

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 20, 2013 at 12:33 PM

    Hi Zunaid,

    You can use line item journal t-code S_ALR_87012291 for this. There are different options available in selection screen to restrict the selection of documents. Check if this meets your requirement.

    There are many more standard reports available. Explore easy menu for more reports.

    If none meets your requirement, you can try with index tables of BSEG which are

    BAIS, BSAS - G/L open and cleared items

    BSID, BSAD - Customer open and cleared items

    BSIK, BSAK - Vendor open and cleared items

    BSIM - Material documents index table

    Thanks,

    Vinod.

    Add comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 20, 2013 at 11:26 PM

    You cannot use QuickView for the purpose as you described in your posting. You can build an infoset query though:

    1. in SQ02, define your infoset as 'direct read of table' and specify the table as BSEG.

    2. In SQ02 Extras, specify you want table BKPF as additional table. System will automatically connect BKPF to BSEG for you

    3. In SQ01, you can then use document number date range from BKPF as you query selection.

    Actually, to inprove the performance, in SQ01 you should specify document number from BSEG and date range from BKPF.

    Add comment
    10|10000 characters needed characters exceeded