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

table linking

Former Member
0 Likes
634

hi expert,

i want to fetch vendor information from document number(BELNR) of bkpf , for that i am linking table bkpf with EKBE and getting the PO number and then linked the EKKO.

i am using awkey and awtyp field of bkpf to link with EKBE. but some document are not getting the PO number or i can say not have corresponding entry in EKKO.

can anybody explain me why its happening.

thanks and regards

abaper.

3 REPLIES 3
Read only

Former Member
0 Likes
506

Hi

What data you need from BKPF? what for you need

don't use BKPF and BSEG

just take the tables BSIK and BSAK

pass the EBELN pur order field to them and take

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
506

u have to filter Documents in BKPF on Document Types .

Regards

Peram

Read only

Former Member
0 Likes
506

Hi ,

thanks for your reply,

this is the code i am using..........

IF s_bkpf-awtyp = 'RMRP' . "OR s_bkpf-awtyp = 'BKPF'.

SELECT SINGLE * FROM ekbe WHERE

belnr = s_bkpf-awkey+0(10) AND

bewtp = 'Q'.

IF sy-subrc EQ 0.

MOVE ekbe-ebeln TO rec-yebeln.

ENDIF.

ELSE.

SELECT SINGLE * FROM ekbe WHERE

belnr = s_bkpf-belnr AND

bewtp = 'R'. "retrieve PO number

IF sy-subrc EQ 0.

MOVE ekbe-ebeln TO rec-yebeln.

ENDIF.

i want to know abour awtyp and bewtp...etc

thanks and regards

abaper.