‎2006 May 31 4:32 PM
Hi all
I surch for an way to get the Werks for Eine.
I know
EKPO
EKKO-BSTYP
LFA1
LFM1
EKKO
EKPO
EKPO
EKPO
EBAN
MT06E
EINA
EINE
EKPO
KOMP
But there is no way to select werks.
a bit coding
SELECT * FROM EINE
WHERE INFNR = I_EINE-INFNR
AND EKORG = I_EINE-EKORG.
endselect.
Chris
‎2006 May 31 4:41 PM
hii
there is a WERKS FIELD IN EINE
SELECT * FROM EINE
WHERE INFNR = I_EINE-INFNR
AND EKORG = I_EINE-EKORG AND
WERKS = I_EINE-WERKS .
ReGARDS
Naresh
‎2006 May 31 4:35 PM
Hi Christian,
What values do you have?
What Values do you want?
Regards,
Ravi
‎2006 May 31 4:38 PM
‎2006 May 31 4:41 PM
The Problem is not the selection. I need Werks for the selection, but i can not find the connection.
‎2006 May 31 4:41 PM
hii
there is a WERKS FIELD IN EINE
SELECT * FROM EINE
WHERE INFNR = I_EINE-INFNR
AND EKORG = I_EINE-EKORG AND
WERKS = I_EINE-WERKS .
ReGARDS
Naresh
‎2006 May 31 4:44 PM
there is a WERKS FIELD IN EINE
SELECT * FROM EINE
WHERE INFNR = I_EINE-INFNR
AND EKORG = I_EINE-EKORG AND
WERKS = I_EINE-WERKS
a nice idear. But its not correct.
A sample
SELECT * FROM EINE
WHERE INFNR = I_EINE-INFNR
AND EKORG = I_EINE-EKORG AND
endselect. -> i get all entrys from Eine
But i need a special WERKS
‎2006 May 31 4:42 PM
Select single * from EINE
where infnr eq l_infnr
and ekorg eq l_ekorg
and esokz eq k_std
and werks ne space.
?
‎2006 May 31 4:45 PM
If you have vendor information, then you can get WERKS from LFA1.
Regards,
Ravi
‎2006 May 31 4:49 PM
The Point is this is not the correct Werks.
In the Eine is an entry for Werk 100,200,300
But in the LFA1 is the Werk 500.
‎2006 May 31 4:55 PM
If you have Purchase order Item details, the you can get the WERKS from EKPO.
select single werks from ekpo into v_werks
where ebeln = <PO> and ebelp = <POITEM>.
then you can use it on eina.
Regards,
Ravi
‎2006 May 31 4:58 PM
its correct to.
But The Werks in the purchase order is not the correct one.
Purchase Order 125
Eine 130
‎2006 May 31 4:53 PM
hii
try this
SELECT WERKS ..
FROM LFA1
INTO IT_LFA1
WHERE WERKS IN S_WERKS .
IF SY-SUBRC = 0.
SELECT * FROM EINE
FOR ALL ENTRIES IN IT_LFA1
WHERE INFNR = I_EINE-INFNR
AND EKORG = I_EINE-EKORG AND
WERKS IN S_WERKS .
ENDIF .
THIS WAY YOU WILL HAVE FIELDS IN BOTH .
‎2006 May 31 4:56 PM
Is ok, but ..
In the LFa1 the Werk is 500
in the Eine the Werk is 100.
The would be no result
Again.
On with way i can get WErks for the selection from Eine
SELECT WERKS ..
FROM LFA1
INTO IT_LFA1
WHERE WERKS IN S_WERKS .
IF SY-SUBRC = 0.
SELECT * FROM EINE
FOR ALL ENTRIES IN IT_LFA1
WHERE INFNR = I_EINE-INFNR
AND EKORG = I_EINE-EKORG AND
WERKS IN S_WERKS .
ENDIF .
‎2006 May 31 4:57 PM
‎2006 May 31 4:58 PM
‎2006 May 31 5:50 PM