‎2006 Dec 05 10:18 AM
Dear all
I have taken activity unit based on activity type
throuh CSLA table
SELECT SINGLE leinh FROM csla INTO (eenheid)
WHERE lstar EQ zorg_product.
so based on the unit i have to take the text
how can do that
the text is in structure CSLAZ
Can u anybody help me out the query
thanx n advance
senthil
‎2006 Dec 05 10:25 AM
REPORT ychatest LINE-SIZE 350.
TABLES : csla , t006a.
DATA : v_unit LIKE csla-leinh,
v_text LIKE t006a-msehl.
SELECT SINGLE leinh FROM csla INTO v_unit
WHERE lstar EQ zorg_product.
IF sy-subrc EQ 0.
SELECT SINGLE msehl FROM t006a INTO v_text WHERE msehi EQ v_unit.
ENDIF.
‎2006 Dec 05 10:24 AM
‎2006 Dec 05 10:25 AM
REPORT ychatest LINE-SIZE 350.
TABLES : csla , t006a.
DATA : v_unit LIKE csla-leinh,
v_text LIKE t006a-msehl.
SELECT SINGLE leinh FROM csla INTO v_unit
WHERE lstar EQ zorg_product.
IF sy-subrc EQ 0.
SELECT SINGLE msehl FROM t006a INTO v_text WHERE msehi EQ v_unit.
ENDIF.
‎2006 Dec 05 10:35 AM
Hi,
select cslaleinh t006amsehl from leinh inner join msehl on cslaleinh = t006aleinh where csla~lstar eq zorg_product.
This above will work only if leinh is primary key in both the tables.
‎2006 Dec 05 10:31 AM
HI Senthil,
The text will be stored in table <b>T006A</b>
SELECT SINGLE leinh FROM csla INTO (eenheid)
WHERE lstar EQ zorg_product.
IF sy-subrc EQ 0.
SELECT SINGLE MSEHL FROM T))6A INTO TEXT
WHERE MSEHI EQ EENHEID.
ENDIF.
Regards
Sudheer
‎2006 Dec 05 10:36 AM
Hi Senthil,
I hope the following code will helps you.
<b>* We are not using full key - so please change select...single to select ... upto 1 rows.
select leinh
from csla
into lv_eenheid
where lstar EQ zorg_product
upto 1 rows.
endselect.
select *
from t006A
into wa_t006A
where spras eq 'EN and
MSEHI eq lv_eenheid.
if sy-subrc eq 0.
write wa_t006 -MSEHT,wa_t006-MSEHL.
endif.</b>
Regards
Bhupal Reddy
‎2006 Dec 05 11:22 AM