Country State combo on BSP
hi all,
I want to implement two combos one for country and the other for state.
If I change the country, then the corresponding states should get filled in the state combo.
any suggestions how do I achieve the same. If possible without refreshing the page.
thanks in advance.
Hi,
Here is the code:
Layout:
<phtmlb:comboBox id = "state"
behavior = "FREETEXT"
enabled = "X"
nameOfKeyColumn = "name"
nameOfValueColumn = "Value"
width = "90px"
selection = "<%= seleccted_state"
table = "<%= state_TAB %>" />
<phtmlb:comboBox id = "country"
behavior = "FREETEXT"
enabled = "X"
nameOfKeyColumn = "name"
nameOfValueColumn = "Value"
width = "90px"
onSelect = "country_changed"
selection = "<%= selected_country"
table = "<%= country_TAB %>" />
DO_HANDLE_EVENT/ONINITIALIZATION
Note: state_tab is type of TIHTTPNVP.
data:
i_t005u TYPE TABLE OF T005U,
wa_t005u TYPE T005u,
wa_kv TYPE IHTTPNVP.
DATA: t TYPE , entry TYPE .
IF EVENT = '"country_changed'. "Triggered when 'Country' Dropdown list selected
if selected_country is initial.
selected_country = 'US'
endif.
SELECT * FROM T005U INTO TABLE i_t005u
WHERE SPRAS EQ SY-LANGU
AND LAND1 EQ selected_country.
LOOP AT i_t005u INTO wa_t005u.
CLEAR wa_kv.
wa_kv-name = wa_t005u-bland.
wa_kv-value = wa_t005u-bezei.
CONDENSE wa_kv-value.
IF NOT wa_kv-value IS INITIAL.
APPEND wa_kv TO state_tab.
ENDIF.
ENDLOOP.
SORT state_tab AS TEXT BY value ASCENDING.
CLEAR wa_kv.
wa_kv-name = ''.
wa_kv-value = ' '.
INSERT wa_kv INTO state_tab INDEX 1.
endif.
Let me know if you any issue.
<b>* Reward each useful answer.</b>
Raja T
Message was edited by:
Raja T
Similar Messages
-
Country-State-City hierarchy is driving me crazy ( duplicate attribute key errors)
hi guys:
I've a dimDesitination dimension and inside this dim , I have 4 attributes, dimDest_ID, country, state and city,
my goal is pretty simple, create a hierarchy country-state-city .
I've made sure there are no NULLs in each column, also state and city attribute, I've created composite key
for example, for state attribute , the key column is (country , state)
for city attribute, the key column is (country, state , city)
when the source dim table contains small number of data, every is fine and process full did succeed.
However, when the raw dim table gets bigger( more data comes in), the process full starts to give me error msg
says duplicate attribute key errors.... this is painful as I did check the raw table but no duplicate key found ever
any comments?
thanks
--Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --Hi Cat_ca,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Charlie Liao
TechNet Community Support -
Sql Server Script for the List of all Country State and City
I am searching for the Sql Server Script of all country State and City with the Following type
For the Country only 2 Columns are there i.e. CountryId and CountryName(CountryId is primary Key)
For the State 3 Columns are there i.e. CountryId, StateId and StateName(StateId is Primary Key and CountryId is Foreign Key)
For the City 3 Columns are there i.e. StateId ,CityId and CityName(CityId is PrimaryKey and StateId is foreign Key).
I need this type of Script with Column name. plzzz help me out i m stuck i didnt get the list as i want.
Thanx and Regrads,Hi Vishnu,
According to your description, you want to list all countries, states and cities, right?
I have tested it on my local environment, here is a sample script for you reference.
select
[dbo].[Country].[CountryId]
, [dbo].[Country].[CountryName]
, [dbo].[State].[StateId]
, [dbo].[State].[StateName]
, [dbo].[City].[CityId]
, [dbo].[City].[CityName]
from
[dbo].[Country]
left join [dbo].[State] on [dbo].[Country].[CountryId]=[dbo].[State].[CountryId]
left join [dbo].[City] on [dbo].[State].[StateId]=[dbo].[City].[StateId]
Regards,
Charlie Liao
TechNet Community Support -
Country ,state and city checklist XML by JAVA
Hi friends,
I have textboxes for entering the country ,state and city values and all these 3 fields are related by primary/foreign keys.
I wan now store and retrieve values entered by users for country state and city by xml files .I also wan all these 3 field to be interrelated so that based on value of country I can populate the related states dropdownlist and based on value of state I can populate the related cities dropdownlist.Can some one pls answer my question about STORING AND RETRIEVING COUNTRY STATE AND CITY FIELDS USING XML FILES?
I also did this application using string(short cut) way but is not efficient and all I want is direct modification in XML file by java?
I didnt put my codes here bcos it so long and still if any one want my codes i wll email u sperately.
All I need is any example approach for this kind?
Any one help will be appreciated...Using XMLEncoder
by Philip Milne
This article covers advanced use of XMLEncoder, showing how it can be configured to create archives of any Java objects -- even when they don't follow the JavaBeans conventions. We include examples of how to make properties 'transient' and how to create archives that call constructors with arguments, use static factory methods, and perform non-standard initialization steps. We also cover exception notification, the 'owner' property (which can be used to a link an archive to the outside world), and methods for creating internationalized archives.
http://java.sun.com/products/jfc/tsc/articles/persistence4/index.html -
How to find the Time zone of a given country & state
Hi,
Does anyone know how to retrieve the Time zone of a given Country/ State/ City?
If I give 'United States of America' & 'California' as input, i want to get 'Pacific Standard Time' as output.
Regards,
AMRITA..There is no such built-in functionality. You would need a special database of all cities in US (if you want US only) or in the whole world that would tell you in which time zone a city lies. One US state may use multiple time zones, so you need a database at city (or, possibly, at least county level).
I have no idea if anybody provides such a database, but Oracle certainly does not. Note also that such database would change over time as time zone assignments change from time to time.
-- Sergiusz -
RETURN statement "kills" my BSP event handling
Hi,
I've gone through [this|Downloaded Excel data is shown using Chinese characters (!); and everything went just fine. At the end of that code, to make my BSP react and finally display that popup, I had to insert a RETURN statement, and by doing so, the BSP virtually "dies": stops reacting to any ohter event, and finally makes me close the browser. This is the relevant section of my code:
cFolders
OnInputProcessing event
response->set_data( data = lv_xstring ).
navigation->response_complete( ). " signal that response is complete
return.
Why is that happening? What could I do to avoid that behavior, and keep working my custom pushbutton functionality?
Thanks in advance, hope someone could help me.
Regards,
Federico.Hi Frederico,
I think there is a misunderstanding, what you want your application to do and what response_complete is used for.
Do I understand your requirement right: You want a popup-window with excel content and in background-window the standard application should run unchanged?
That doesn't work with response_complete in OnInputProcessing, because the statement is used to prevent creating the default response of a page in onLayout method
If you use RETURN, the processing of your page is stopped and the response consists only of the content you filled in but not of any default page layout => excel appears but your application seems to be dead
If you do not use RETURN, you navigate to another page (statement cl_cfx_util_ui=>navigate). As navigation in BSPs is realized by a browser redirect, a complete new request-response-zyklus is started => no excel appears, your response seems to be overwritten
Possible solutions are:
1. Instead of sending the response object back to the client, store it in the server-cache (method SERVER_CACHE_UPLOAD of class CL_HTTP_SERVER) in OnInputProcessing and open a new browser window with url of object in server-cache.
OR
2. Open a new browser window with url of a new custom bsp page and generate the response in onInitialization of the new custom page.
Search the forum, you'll find a lot of examples how to use the server-cache and how to open a new window with javacript.
Anyway: read also SAP help to understand the control flow of BSPs: [http://help.sap.com/saphelp_nw70/helpdata/en/a3/4b9afa7aa511d5992e00508b6b8b11/frameset.htm]
Best regards,
CW -
List of country,state and city???
hi,
does anybody know from where i can get
list of countries,state and cities of the world.
i want to populate in one of my oracle forms.
thanks in advance.Hello
If your looking for the 2 or 3 digit or numbered ISO values as well as the actual name of every country in the world then check this site out:
http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
cheers
Q -
Country state drop down list oracle & php
Hi all.
I'm new in this forum.
I have created two tables :
create table countries
country_id int not null,
country_name varchar2(50),
constraint countries_country_id_pk primary key (country_id)
create table states
state_id int not null,
state_name varchar2(50),
country_id int,
constraint states_state_id_pk primary key (state_id),
constraint states_country_id_fk foreign key (country_id) references countries (country_id)on delete cascade
and insert data.
I have connect to oracle database by this php file.
<?php
$conn = oci_connect('hr', 'hekal', 'or');
if (!$conn)
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
?>
then I make combobox dropdown list like that
<?php
include ('../connect_db.php');
$sql = 'select * from countries order by country_name';
$stid = oci_parse($conn, $sql);
oci_define_by_name($stid, 'country_id', $country_id);
oci_define_by_name($stid, 'country_name',$country_name);
oci_execute($stid);
?>
<select name="country">
<?php
while (oci_fetch($stid)) {
?>
<option value="$country_id" id="country_id"> <?php echo"$country_name" ; ?></option>
<?php } ?>
This code get values into drop down list
and make another to the states.
But I need to connect the two each other.
I need when I choose USA. the other list show only states of USA
thank youSee multiple dropdown
-
The attached code is a simple query I use to generate a
CFCHART flash graph of total page visits by country. The stats_log
table also has a date column.
I'd like to provide the user a with form to pick a date range
(startdate, enddate) and re-create the "By Country" chart for that
specific date range.
How do I modify this query to give me back the total hits
grouped by country for this date range only?
I tried adding a WHERE clause like
WHERE statdate<=#dateB# and statdate>=#dateA#
But it doesn't work and/or I don't understand how to filter
in a Group By.
I'd appreciate the help.
Thanks,
DonHi,
You can use:
SELECT *
FROM myTABLE
WHERE dateColumn BETWEEN '#dateA#' and '#dateB#'
Hope that helps
-WestSide -
Place: Country/State/City/custom
Is there any way to edit these four fields seperately in iPhoto?
The problem I have is that they are sometimes used in a format I don't want. For example, if I have a picture taken at the New York Aquarium and assign it in iPhoto it will get as location USA/New York/Brooklyn/New York Aquarium (this was a choice suggeted by the program). Pics from The Empire State Building get USA/New York/New York/ Empire State Building however. Now if I look for pictures from New York (city) via Places the pics from the Aquarium are not listed.
So the question is: how do I change Brooklyn to New York?Hi Cat_ca,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Charlie Liao
TechNet Community Support -
Global post code/city/state/province/country selection
Is there a best-practise approach for a global application
needing to
let users input their addresses?
Are there any free MySQL DB's that have this info available?
I'm thinking of maybe three ways to go about this and maybe
there are
more but I just don't know what's going to result in the most
accurate
data and easiest mechanism for users to input their address
info.
1: AJAX calls populating relevant selects onChange
2: Non-JS clients doing a round trip to the server and back
instead
(possibly multiple times if need be)
3: If there is no way to get a free DB set up for both steps
1 and 2 to
reference, is there a free webservice instead (although this
could be
slow/unreliable unless someone knows of an outstanding
service they
could recommend).
Perhaps there are better ways?
Hopefully many developers have come across this before and
settled on
the best way to achieve this and are willing to share their
experiences
and advice.
Thanks.Oh, and further to that, what's the best free way to gleam
the users
location from their IP addy? GeoLocator.cfc? Other? I'm
thinking that
would be a good starting point when the user first encounters
the
address form; have it automagically select guestimate
country/state/city.
Lossed wrote:
> Is there a best-practise approach for a global
application needing to
> let users input their addresses?
>
> Are there any free MySQL DB's that have this info
available?
> I'm thinking of maybe three ways to go about this and
maybe there are
> more but I just don't know what's going to result in the
most accurate
> data and easiest mechanism for users to input their
address info.
>
> 1: AJAX calls populating relevant selects onChange
> 2: Non-JS clients doing a round trip to the server and
back instead
> (possibly multiple times if need be)
> 3: If there is no way to get a free DB set up for both
steps 1 and 2 to
> reference, is there a free webservice instead (although
this could be
> slow/unreliable unless someone knows of an outstanding
service they
> could recommend).
>
> Perhaps there are better ways?
>
> Hopefully many developers have come across this before
and settled on
> the best way to achieve this and are willing to share
their experiences
> and advice.
>
> Thanks. -
hi all,
can any one help me in writing code for populating one combobox depending on selection in another combo box in java or javascript
like country,state,city in address
by selecting particular country in country combo box ,states belongs to that country should be populated in state combo box.
please help me out which driving me mad
Thank you for ur replyHaii arptihaa...
The correct place to check for user attempts is after else condition of your login validation. Ie is a user login attempt will be checked once the login is failed.
ie code some what look like this..
session=request.getSession();
if(validate user){}
else
Integer k=(Integer) session.getAttribute("userAtmpt");
if(k==null) //If the user is attempting for the first time
k=new Integer(0);
session.setAttribute("userAtmpt",k)
url="login.jsp"
else //If this is not first attempt
if(k.intValue>=3) //if the user exceeds the no of attempts
url="lock.jsp";
else
k=new Integer(k.intValue()+1);
url="login.jsp"
}Arpitha, I am not sure abt the syntax but logically it should be correct. Try get the flow and implement, u will get...
regards
Shanu -
Org model by State & Zip code - ORGMAN_7 - set default if no entry
Orgman_7 10000164 works well for us. But if no country, state, zip code is found it errors as no org object is found.
How can I set a default org if no country state zip is found?
in CRMC_ORGPROF I set 10000164 as the org model determination rule, then I tried to create a responsibilitiy rule based on document type and added the document type as an attribute in the org model but did not work.
Thanks,
GlennHi Ashish,
In PPOMA_CRM for the organizational elements that represent our sales offices we maintain the Country, State, & Postal Codes (some have hundreds of entries as some states have multiple sales offices in territory, but a single sales office controls a single postal code).
A new customer calls our ICWC and we create a new BP, using ORGMAN_7 works well when the state & zip code exist as an attribute. It finds that sales office and sales org it is assigned to.
If no entry is found, then the ICWC user gets numerous error messages all related to no organization being found. If an order is created it fails to pass to R/3 until we correct the document. Usually done in the GUI as there is no place in the ICWC to update the sales org.
Basically looking to have a dummy office get found if no entry is found in ORGMAN_7. This would allow the order to pass to R/3 and then we could more easily work entries that his the dummy office (update PPOMA_CRM when a bad zip or state combo is entered.) Sometimes is a typo on the user in creating the BP record.
Thanks,
Glenn -
Dynamically change the contents of one combo box based on the other
Hi Forum,
I have a question which might have a possibly simple answer. Well anyway help me out since i could not find the simple answer.
I am building an application using Swing and binding with BC4J using JClient. My GUI has combo boxes, grids, editboxes. My requirement is that i should be able to dynamically change the contents of one combo box based on the selected item in trhe previous combo box. For example, when i choose a country in the "country combo box", the "states combo box" should show the list of the states of the selected country.
Now how do i do this using binding. If not, how do i write custom querirs in BC4J layer and return a resultset to the remote application so theat i can populate the dependent combo boxes.
I will appreciate if anyone can help me out in this regard.
Thank You
Sumitthere could be quite a few number of ways of solving this problem.
One way is through event handlers.
taking your example as a model when user selects a country you could fire an action with a flag set to ture. A method will return the states from the DB or your temporary files or what ever and then the true flag will be used in the states combo box rendering.
other way: javascript
this might be a bit clumsy as you will need the states information in a property file and you can get the info as the user selects a country.
regards,
raj -
I just changed my residence to the US and now I cant register my new US credit card on itunes cause the state list doesnt match to the US states, what should I do?
Your credit card info, billing address must be the same country as the iTunes store country you registering.
For example, you can’t have a credit card from a U.S. bank with a U.S. billing address registered in the iTunes store for China.
I tried to change my payment information too, but it happened the same, I can change the information but when I get to the state part, it only shows the other country states
Remove all payment info and save it.
Then change the iTunes store country to U.S., add a U.S. credit card with a U.S. billing address.
As previously suggested, if this does not work, contact iTunes store support.
-> http://www.apple.com/support/itunes/contact/
Maybe you are looking for
-
Is there any way to incorporate elements from the 2006 namespace in an application that uses the 2
I have a desktop app built in AIR using the 2009 namespace. Is there any way to incorporate any of the of the xmlns:mx="http://www.adobe.com/2006/mxml" components into it? Or better yet, since the AIR namespace is sort of layered on top of the spar
-
It has taken me 18 months to get my secondary emails to show up on my Apple mail server. Now my iphone mail service for that account won't work. How can I get both to work at the same time?
-
Hey everyone, dont know if anyone else has had this issue, any information would be helpful. Acrobat 9.3 standard crashes after signing the document, but it not comming with any errors. the user opens and saves PDF, then opens agian and signs it. Aft
-
On Instagram you offer a free iPhone for 20K tagers and followers, is this true or a scam.
-
I am planning on getting the new ipod touch 5G and i don't know what color i choosing between red and black i want black because the front is black and the red because it is my favirote color and i am not sure about the white front which is better wh