Hi every one,
with a base of this selection criteria :
i want to get data of the following fields:
BUKRS , BELNR , BUDAT, doc_date, Currencies ( doc currency, tax_Country_currency, local curr) , line VAT code = the deference tax_code of ONE docment number and one company code and One posting date.
from bkpf BSET BSEG...:
This is my Query but i don't know how can i do to receive just One entry containing:
1 company code 1 document number 1 posting date 1 document date 3 currencies 2 Deference VAT code.
select * from bkpf into corresponding fields of table it_bkpf
where bukrs = p_bukrs
and belnr in p_belnr
and budat in p_budat
and budat in p_budat
and gjahr in p_gjahr.
select * from bseg into corresponding fields of table it_bseg for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr eq it_bkpf-belnr
and gjahr = it_bkpf-gjahr.
select * from bset into corresponding fields of table it_bset for all entries in it_bkpf
where bukrs = it_bkpf-bukrs
and belnr eq it_bkpf-belnr
and gjahr = it_bkpf-gjahr.
* SELECT * FROM bset INTO TABLE it_bset
* FOR ALL ENTRIES IN it_bseg
* WHERE bukrs EQ it_bseg-bukrs
* AND belnr EQ it_bseg-belnr
* AND gjahr = it_bseg-gjahr.
" bukrs land1
select * from t001 into corresponding fields of table it_t001
for all entries in it_bkpf
where bukrs = it_bkpf-bukrs.
"land1 waers
select * from t005 into corresponding fields of table it_t005
for all entries in it_t001
where land1 = it_t001-land1.
Please can some One help me.
Best regard,
Ouail