Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data Retrieval from Cluster Table - BSEG

Former Member
0 Likes
646

Hi all,

I need to retreive data related to document line items from BSEG whose CLEARING DATE (AUGDT) is greater than a user given date for TWO COMPANY CODES (say 0010/0200).

as BSEG is a cluster table, it has huge data and taking large amt of time can anybody suggest a better way of retrieving data for the above conditions(fastly)

Thanks in Advance,

Lakshmi

Hi all,

I need to retreive data related to document line items from BSEG whose CLEARING DATE (AUGDT) is greater than a user given date for TWO COMPANY CODES (say 0010/0200).

as BSEG is a cluster table, it has huge data and taking large amt of time can anybody suggest a better way of retrieving data for the above conditions(fastly)

Thanks in Advance,

Lakshmi

3 REPLIES 3
Read only

andreas_mann3
Active Contributor
0 Likes
597

hi,

use second. index tables:

customers: BSAD

vendors: BSAK

G/L acc.: BSAS

sample:


  SELECT (felder) FROM  bsad into TABLE stab
         WHERE  bukrs  = bukrs
         AND    kunnr  IN kunnr
         AND    gsber IN gsber
         AND    augbl  <>  space
         AND    hkont  IN akont
         AND    augdt GT p_date.

regards Andreas

Message was edited by: Andreas Mann

Read only

0 Likes
597

Hi Andreas,

First of all let me thank you for the informative reply.

As i need get only CLEARED DOCUMENTS for DOCUMENT TYPE KR AND KG only, will it be suffice if i extract data from BSAK(Secondary index for vendors).

What about if the payment is not one time but partial (using tcode FB60/FB65) even in that case will BSAK only help or i need to consider BSIK also?

Hope i am clear.

Thanks in advance,

Lakshmi

Read only

0 Likes
597

Hi Lakshni,

As you require only the line items whose CLEARING DATE (AUGDT) is greater thangiven date, it should be enough if you doa SELECT on BSAK. If you need to look for open items also then go for BSIK.

Regards,

Suresh Datti