2008 Dec 02 3:08 PM
Hai Friends,
How can i link material document number and financial document number
2008 Dec 02 3:13 PM
2008 Dec 03 4:48 AM
Hi,
Invoice Reference number is stored in FI document. Table is BSIK and BSAK.
2008 Dec 03 4:52 AM
Hi,
I did below for my requirement to get payment document number. It will useful to you
FORM GET_PAY_DOC .
data: wa_bkpf TYPE bkpf.
data: wa_obj_key TYPE bkpf-AWKEY,
wa_AUGBL TYPE bsak-AUGBL.
SELECT SINGLE belnr GJAHR from ekbe into (it_table-belnr, it_table-GJAHR)
where ebeln eq it_table-ebeln AND
ebelp eq it_table-ebelp AND
BEWTP eq 'Q' AND
XBLNR eq it_table-tknum.
CHECK sy-subrc eq 0.
CONCATENATE it_table-belnr it_table-GJAHR INTO wa_obj_key.
SELECT SINGLE bukrs belnr GJAHR from bkpf into CORRESPONDING FIELDS OF wa_bkpf
where awtyp = 'RMRP' AND
awkey = wa_obj_key.
CHECK sy-subrc eq 0.
SELECT SINGLE AUGBL from bsak into wa_AUGBL
where bukrs eq wa_bkpf-bukrs AND
lifnr eq it_table-tdlnr AND
belnr eq wa_bkpf-belnr AND
GJAHR eq wa_bkpf-GJAHR.
CHECK sy-subrc eq 0.
SELECT SINGLE belnr budat from bsak into (it_table-belnr1, it_table-Budat)
where bukrs eq wa_bkpf-bukrs AND
lifnr eq it_table-tdlnr AND
AUGBL eq wa_AUGBL AND
GJAHR eq wa_bkpf-GJAHR AND
blart eq 'KZ' and
belnr ne wa_bkpf-belnr AND
SHKZG eq 'S'.
ENDFORM. " GET_PAY_DOC
2008 Dec 03 4:56 AM
hi,
the link is
BKPF-AWKEY= MKPF-Mblnr + MKPF-MJAHR.(Concatenation of Mat.Doc and Mat. Doc. Year)
Hope this helps you.
Raj
Edited by: Raj on Dec 3, 2008 5:57 AM