Application Development 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: 

I need the EWBEZ value

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

former_member182371
Active Contributor
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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

former_member182371
Active Contributor
0 Kudos

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.

former_member182371
Active Contributor
0 Kudos

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.

former_member182371
Active Contributor
0 Kudos

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.

0 Kudos

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