Application Development 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: 

checking table

Former Member
0 Kudos

Hi

i have check the BSIK table for the document number having a vendor number .How to do this

Please give me the coding

1 ACCEPTED SOLUTION

former_member624107
Contributor
0 Kudos

select BELNR

from BSIK into

where LIFNR = vendor number

5 REPLIES 5

former_member386202
Active Contributor
0 Kudos

Hi,

Refr this code

&----


*& Form read_bsik

&----


form read_bsik .

if p_date is initial.

select * from bsik

into corresponding fields of table it_bsik_s

where bukrs in s_bukrs

and lifnr in s_lifnr.

elseif s_lifnr is initial.

select * from bsik

into corresponding fields of table it_bsik_s

where bukrs in s_bukrs

and budat <= p_date.

elseif p_date is not initial and s_lifnr is not initial..

select * from bsik

into corresponding fields of table it_bsik_s

where bukrs in s_bukrs

and lifnr in s_lifnr

and budat <= p_date.

elseif p_date is initial and s_kunnr is initial.

select * from bsik

into corresponding fields of table it_bsik_s

where bukrs in s_bukrs.

endif.

if sy-subrc ne 0.

message e000(8i) with 'No records for Selection'.

endif.

endform. " read_bsik

Regards,

PRashant

former_member624107
Contributor
0 Kudos

select BELNR

from BSIK into

where LIFNR = vendor number

Former Member
0 Kudos

hi,

I didnt understand the question.

In bsik-lifnr is Account number of vendor or creditor.

And you want to check whether the account number belongs to vendor or customer you have to other validation using KNA1 table for customer or LFA! table for vendor.

Please reward if useful.

Thanks

Sivaparvathi

Former Member
0 Kudos

BSIK table is for vendor open item. so document must have vendor code in BSIK table. no need to check vendor is there or not...

raj

Former Member
0 Kudos

Hi

welcome to SDN forum

for Vendor Number - LFA1 table

Material Number -MARA

customer No - KNA1

these are the basic master tables in SAP to deal with any business

with the data element of the table field you can search the table name from SE11

or enter the field descriptions in DD03L and DD03T table and search for the respective tables

OR:

Goto Se11

select DATA TYPE

press F4 there

select SEARCH FOR DATA ELEMENTS

But you should have some basic SAP related Busniess info regarding some basic tables

Like I told already without CUSTOMER,VEndor,material NO BUSINESS TAKES PLACE.

So it is minimum thing to know the master tables of these three

Reward points if found helpful....

Cheers,

Chandra Sekhar.