06-30-2007 5:03 PM
Hi;
i need to get the name of "Denomination for external group articles" that is in the field EWBEZ of the table TWEWT but in cant get it with any SELECT command, and i need this value for a title in a Smartform.
i tried with the view v_twew too and i can't get it.
I tried this but doesn't work:
PARAMETERS pcasa LIKE twew-extwg OBLIGATORY. " this works ok to get the match code
SELECT SINGLE ewbez INTO (casa) FROM twewt WHERE spras = 'ES' AND extwg = pcasa.
doesn't mark any error but i get nothing and if in debug mode i see the table TWEWT it has no records, is empty.
Thanks on advance for any help.
David Fúnez
Tegucigalpa, Honduras
Corp. Mandofer
06-30-2007 5:49 PM
Hi,
may be something like:
SELECT SINGLE b~ewbez
INTO (casa)
FROM twew AS a
INNER JOIN twewt AS b
ON bextwg = aextwg
AND bspras = aspras
WHERE a~spras = sy-langu
AND a~extwg = pcasa.
Best regards.
06-30-2007 5:24 PM
Hi
Have u checked the table contains any entry or not..
Its advisible to use all the key fields in Select single. I think u didnt use key field here..
try to use all the key fields in Where condition.
In WHERE spras = 'ES' AND extwg = pcasa. statement, Are u passing pcasa as value or ur passing parameter. If its value then put in qutets 'PCASA'.
Reward me if its helpful
Regards
Ravi
06-30-2007 5:33 PM
Hi,
there is a view V_TWEW and within this view there is a table <u>TWEWT</u>.
Have you tried accessing this table and searching for <u>TWEWT-EWBEZ</u>.?
Best regards.
06-30-2007 5:41 PM
Hi,
forget about my former answer.
why not trying a JOIN meeting the following condition:
TWEW MANDT = TWEWT MANDT
TWEW EXTWG = TWEWT EXTWG
Best regards.
06-30-2007 5:49 PM
Hi,
may be something like:
SELECT SINGLE b~ewbez
INTO (casa)
FROM twew AS a
INNER JOIN twewt AS b
ON bextwg = aextwg
AND bspras = aspras
WHERE a~spras = sy-langu
AND a~extwg = pcasa.
Best regards.
06-30-2007 6:07 PM
Pablo;
Thanks a lot i just take off the SPRAS part.
SELECT SINGLE b~ewbez
INTO (casa) FROM
( twew AS a
INNER JOIN twewt AS b ON bextwg = aextwg )
WHERE a~extwg = pcasa.
This works fine.
David Fúnez
Tegucigalpa, Honduras
Corp. Mandofer