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

BSEG

Former Member
0 Likes
913

Hi experts

Which fields can I use from BSEG and BKPF for vendor number, invoice number and vendors banking details.

Thanx for your assistance.

1 ACCEPTED SOLUTION
Read only

anuj_srivastava
Active Participant
0 Likes
728

Hi ,

Use tables BSIK , BSID , BSAK and BSAD for fetching the details for vendor ( field is LIFNR ) and Document ( field is BELNR).

For fetchin Bank details to go table LFBK and BNKA.

Regards,

Anuj

5 REPLIES 5
Read only

Former Member
0 Likes
728

Hi ,

Use table BSID, BSAD

Regards,

Vijay

Read only

Former Member
0 Likes
728

HI,

In BSEG you can use LIFNR for vendor number and BELNR for document number. For vendor banking details u can refer table PAYR

Regards,

Satish

Read only

anuj_srivastava
Active Participant
0 Likes
729

Hi ,

Use tables BSIK , BSID , BSAK and BSAD for fetching the details for vendor ( field is LIFNR ) and Document ( field is BELNR).

For fetchin Bank details to go table LFBK and BNKA.

Regards,

Anuj

Read only

Former Member
0 Likes
728

Hi Beatrice Nkomo

BSEG is cluster table... it contains huge data.. so if possible checkout below tables you will get the information required from these tables also... there may be performance issue if you will fetch data from BSEG

BSAK ==> Accounting: Secondary Index for Vendors (Cleared items)

BSIK ==> Accounting: Secondary Index for Vendors

LIFNR ==> Vendor

BELNR ==> Accounting Document Number

Relation :

BSAK-BELNR = BKPF-BELNR

BSAK-GJAHR = BKPF-GJAHR

Hope it will solve your problem..

Thanks & Regards

ilesh 24x7

ilesh Nandaniya

Read only

Former Member
0 Likes
728

Hi,

To bseg Pass Belnr BUKRs and GJAHR other wise the performance issue will coem..

and Use the same for BKPF table to fetch..



    SELECT bukrs belnr gjahr buzei mwskz zuonr saknr kunnr
            FROM bseg
            INTO TABLE t_bseg
            WHERE belnr = w_belnr      "Document Number or Invoice number
            and  bukrs  = 'IE34'              "Company code
            AND gjahr IN s_gjahr  .       "Fiscial year
If sy-subrc = 0.
* Fetching BKPF Data
  SELECT bukrs belnr gjahr blart bldat budat
         wwert waers xblnr
           FROM bkpf INTO TABLE t_bkpf
           FOR ALL ENTRIES IN t_bseg
           WHERE bukrs = t_bseg-bukrs
           AND   belnr = t_bseg-belnr
           AND   gjahr = t_bseg-gjahr.
  IF sy-subrc = 0.
  Endif.
ENDIF.

Prabhudas