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

relation between EKPO and EKKN

Former Member
0 Likes
6,167

Hi, what is the relation between EKPO and EKKN?

I want to retrieve the requestor name (EKKN-WEMPF) for all open orders in EKPO. But I dont find any matching data between these two tables.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
3,063

Hi S Kantheri,

EKPO-EBELN and EKPO-EBELP is the Relation. But the EKKN

will only be filled, if you have a COST-Order, f. Example

to KOSTL or AUFNR.

Regards, Dieter

9 REPLIES 9
Read only

Former Member
0 Likes
3,063

Hello,

EKPO-EBELN & EBELP

Read only

Former Member
0 Likes
3,063

Hi

SELECT * FROM EKKN WHERE EBELN = EKPO-EBELN

AND EBELP = EKPO-EBELP.

WRITE EKKN-WEMPF.

.........................

Max

Read only

Former Member
0 Likes
3,064

Hi S Kantheri,

EKPO-EBELN and EKPO-EBELP is the Relation. But the EKKN

will only be filled, if you have a COST-Order, f. Example

to KOSTL or AUFNR.

Regards, Dieter

Read only

0 Likes
3,063

Thanks Dieter,

But then how to relate these two table using KOSTL or AUFNR. EKPO doesnot have both

Read only

0 Likes
3,063

Hi

But what do you really need to do?

The link between EKKN and EKPO are only the field EBELN and EBELP.

If you know the item you can know its data for account reading EKKN, you don't need to know how to relate KOSTL or AUFNR with EKPO.

SELECT * FROM EKPO WHERE EBELN = P_EBELN

SELECT * FROM EKKN WHERE EBELN = EKPO-EBELN

AND EBELP = EKPO-EBELN

-


>EKKN-KOSTL is the cost center of the position you're elaborating

Max

Read only

0 Likes
3,063

Hi S Kantheri,

the question is, what do you want to know.

You can read EKKN with KOSTL or AUFNR and then

read EKPO with EBELN and EBELP from EKKN.

Or you read EKPO with KNTTP = 'F' (AUFNR) or = K (KOSTL)

and then go to EKKN with EKPO-EBELN and EBELP.

Regards, Dieter

Read only

0 Likes
3,063

I have a program which gets the open purchase order.

Now I need to get the requestor name (EKKN-WEMPF) for these purchase orders.

I know that ebeln and ebelp has to be used to get the corresponding EKKN records. But I am not getting any record picked. So is it that not all EKPO records have entry in EKKN? Only those EKPO record with KNTTP = 'F' or 'K' will have corresponding records in EKKN?

Read only

0 Likes
3,063

Hi S Kantheri,

if you want to know the WEMPF.

If there is no EKKN there is no WEMPF.

WEMPF can only be filled in EKKN/EBKN!

Look at SE11. WEMPF is only used in EBKN and in EKKN

not in EKPO, EKKO etc.

Regards, Dieter

Read only

Former Member
0 Likes
3,063

Hi,

Select single EKKN into lv_ekkn

where EBELN = EKPO-EBELN

AND EBELP = EKPO-EBELP.

Write:/ lv_ekkn.

Regs,

Venkat Ramanan