12-11-2007 12:14 PM
Hi
i have check the BSIK table for the document number having a vendor number .How to do this
Please give me the coding
12-11-2007 12:21 PM
12-11-2007 12:18 PM
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
12-11-2007 12:21 PM
12-11-2007 12:21 PM
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
12-11-2007 12:22 PM
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
12-11-2007 12:23 PM
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.