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

Selection problem on ADRC Table.

Former Member
0 Likes
1,697

Dear Exparts.

please see the Query:

select country city1 from adrc

into CORRESPONDING FIELDS OF wa_country

where

country = p_country

and

city1 = p_city.

append wa_country to it_country.

endselect.

In this selection, when I send p_country = AE and p_city = Dubai I cannot get any data. But there have data In DB.

But when I send p_country = DE and p_city = Berlin I can get porper data.

Can anybody solve this problem.

Your regards

rayhan

11 REPLIES 11
Read only

Kanagaraja_L
Active Contributor
0 Likes
1,444

CITY1 is case sensitive Field. Check your selection Screen entry and DB Table entry.

Kanagaraja L

Read only

0 Likes
1,444

Dear, I copy the value form DB then pest on P_city but problem is still.

other hand Ifound data for Berlin but notfound Dubai.

pls try to Understand.

Your regards

Rayhan

Read only

0 Likes
1,444

Just paste the below code and check either getting value or not

DATA wa_country TYPE adrc.

PARAMETERS: p_city TYPE adrc-city1 DEFAULT 'Dubai',
            p_countr TYPE adrc-country DEFAULT 'AE'.
SELECT SINGLE * FROM adrc INTO wa_country WHERE country = p_countr
AND city1 = p_city.

IF sy-subrc = 0.
  WRITE : / wa_country-city1, / wa_country-country.
ENDIF.

Kanagaraja L

Read only

0 Likes
1,444

Thanks For solution.

It work properly in SE38.

But I want to show data in smartfrom.

I done as follows...

Take 2 import parameter in fprm interface as

P_country type land1

p_city type ad_city1.

then write the query in global defination-initalization.

Then take a table in main window and display data.

Pls try to understand

I found data when I send P-country= DE,P_city = Berlin

But not found for AE and Dubai.

Best Regards

Rayhan

Read only

0 Likes
1,444

Your select qry is not working properly, Check the same entries in SE16 aacording that chnage your SQL statement.

Kanagaraja L

Read only

0 Likes
1,444

Check whether the data is existing in DB datable or not..

Indra...

Read only

Former Member
0 Likes
1,444

How you have defined p_country is it same as country in adrc or not.

Atul

Read only

0 Likes
1,444

Dear,

I define p_country as like as ADRC COUNTRY.

ADRC -COUNTRY 's data element is LAND1.

So I define p_country as LAND1.

your regards

Rayhan

Read only

former_member156446
Active Contributor
0 Likes
1,444

check the data if it supports

country = p_country

and

city1 = p_city.

does the data your are checking have AE and Dubai in table entries?

Read only

Former Member
0 Likes
1,444

Hi ,

Your select query is fine , records extracted needed to be passed to smartform and this is not going proper.

Take help on smartform, search SDN.

Read only

Former Member
0 Likes
1,444

X