Dynamic selection list based on selection screen values ?
I have a requirement which I can't solve in one step in a selection screen
first field I have to select the contract like you do with me33k
in the second field I have to select the position of the contract filled in at the first field ?
if the position is selected I have to fill other fields in the selection screen and block them for altering the information entered by the position selected
anybody got some sample on how to do this ??
kind regards
arthur de smidt
I really don't understand why it's not working. after input of the parameter field debugging doesn't start when is it evaluated ??
I want the screen modified at every change of p_contr.
SELECTION-SCREEN: BEGIN OF BLOCK s01 WITH FRAME TITLE text-s01.
parameters: p_bukrs like ekko-bukrs MEMORY ID BUK obligatory,
P_WERKS like EKPO-WERKS MEMORY ID WRK OBLIGATORY,
p_ekorg like ekko-ekorg MEMORY ID EKO obligatory,
P_EKGRP like EKKO-EKGRP MEMORY ID EKG OBLIGATORY.
SELECTION-SCREEN: END OF BLOCK s01.
SELECTION-SCREEN: BEGIN OF BLOCK s05 WITH FRAME TITLE text-s05.
parameters: p_contr AS CHECKBOX USER-COMMAND contr,
p_konnr like EKKO-ebeln MATCHCODE OBJECT MEKK ,
P_KTPNR like EKPO-ktpnr.
SELECTION-SCREEN: END OF BLOCK s05.
SELECTION-SCREEN: BEGIN OF BLOCK s02 WITH FRAME TITLE text-s02.
parameters: p_lifnr like ekko-lifnr modif id CTR,
p_EVERK like EKKO-VERKF," obligatory,
p_afnam type zafnam,
p_uwkenm like EKPO-TXZ01,
P_IHRAN like EKKO-IHRAN DEFAULT SY-DATUM,
P_KDATB like EKKO-KDATB," obligatory,
P_KDATE like EKKO-KDATE," obligatory,
p_cntVU LIKE RP50G-PERNR OBLIGATORY
MATCHCODE OBJECT PREM,
p_advies type lifnr.
SELECTION-SCREEN: END OF BLOCK s02.
SELECTION-SCREEN: BEGIN OF BLOCK s03 WITH FRAME TITLE text-s03.
SELECTION-SCREEN PUSHBUTTON /1(17) WERK USER-COMMAND WERK.
parameters: P_TXZ01 like EKPO-TXZ01 obligatory,
* p_txt9 type tline,
P_MATKL like EKPO-MATKL DEFAULT 'DNST-02' OBLIGATORY.
selection-screen begin of line.
SELECTION-SCREEN COMMENT 1(31) TEXT-001 FOR FIELD p_menge.
parameters: P_MENGE like EKPO-MENGE DEFAULT '1' OBLIGATORY,
P_MEINS like EKPO-MEINS DEFAULT 'ST' OBLIGATORY.
selection-screen end of line.
selection-screen begin of line.
SELECTION-SCREEN COMMENT 1(31) TEXT-002 FOR FIELD p_netpr.
parameters: P_NETPR like EKPO-NETPR obligatory,
P_EPEIN like EKPO-BPRME DEFAULT 'ST' OBLIGATORY.
SELECTION-SCREEN POSITION 55.
parameters: p_schpr like ekpo-schpr.
selection-screen end of line.
parameters: p_saknr like mepoaccounting-sakto obligatory,
p_aufnr like mepoaccounting-aufnr obligatory.
SELECTION-SCREEN: END OF BLOCK s03.
initialization.
clear h_exit.
set pf-status 'STANDAARD'.
move 'Werkomschrijving' to WERK.
at selection-screen on p_contr.
loop at screen.
if p_contr = 'X'.
if screen-group1 = 'CTR'.
screen-input = 0.
screen-active = 0.
screen-required = 0.
modify screen.
else.
screen-input = 0.
screen-active = 1.
screen-required = 1.
modify screen.
endif.
endif.
endloop.
at selection-screen on exit-command.
case sy-ucomm.
when '&F03' or '&F015' or '&F12'.
leave program.
endcase.
at selection-screen on block S01.
case sy-ucomm.
when 'ONLI'.
type_doc = 'B'.
when 'ONLI1'.
type_doc = 'O'.
endcase.
perform checks_org.
at selection-screen on block S02.
perform checks_lev.
at selection-screen on block s03.
check sy-ucomm(4) eq 'ONLI'.
perform checks_werk.
at selection-screen.
case sy-ucomm.
when 'WERK'.
perform lange_omschrijving.
when 'SPOS'.
CALL FUNCTION 'RS_VARIANT_SAVE_FROM_SELSCREEN'
EXPORTING
CURR_REPORT = 'ZBESTELLING'.
endcase.
start-of-selection.
Similar Messages
-
Creating a dynamic Selection List based on a View Object
Hello,
I'm new to JDeveloper and I would like to create a JSP Page with dynamic Selection List based on a runtime query or based on a view object (BC4J). The selection made by an user should serve another dynamic query with the necessary parameters that I built using createViewObjectFromQueryStmt(). By now I tried this using the InputSelectLOV from the Component Palette in JDeveloper. But without success. By the way: the selection list is not very large (5 values), so it's not necessary to have a form finding the desired value.
Maybe someone had experience about creating this already. Please give me a tip or a little example.
Thanks.http://otn.oracle.com/products/jdev/howtos/jsp/renderers.html
-
Select list based on LOV - and allowing new values
Hi All,
I have a page that has a select list based on a dynamic list of values. I wanted to test out how the system was working, so I truncated all of my tables, and now my select list is blank (which makes sense). The problem is that I can't type anything into the select list. How can I make it so that if there isn't a value returned from the query that populates the LOV, I can just type one in? This also goes further in that if the value I wanted isn't already in the db, how does the user add in another value?
Thanks in advance,
CoreyHello,
Well as you now know HTML based select lists don't work like that, that widget is called a combo box and there will be built in combo boxes in APEX 3.0, it's a fairly complex dhtml widget.
What you might want to do is provide a text item next to your select box and an Add New Value Option in your select list.
Carl -
Dynamic Select List based on TextField data
Hi,
I like to dynamically display the select list based on the value in the textfield, the data in the textfield is of character type.
ThanksHello,
Well as you now know HTML based select lists don't work like that, that widget is called a combo box and there will be built in combo boxes in APEX 3.0, it's a fairly complex dhtml widget.
What you might want to do is provide a text item next to your select box and an Add New Value Option in your select list.
Carl -
Based on select list, i need to retrieve values in other select list
Hi,
am new to apex using apex3.2, i need to retrieve values in select list based on the other select list vale with out refreshing page.
ie i have region select list and country select list,in country corresponding region country must be display but with out refreshing page.
can you please any body guide me.
Regards
shashidhar
Edited by: 871140 on Jul 7, 2011 10:34 PMHi,
you can use cascading LOV for that, i which the other LOV field will be changing depending upon the selection of other value(which is in LOV).
http://www.inside-oracle-apex.com/oracle-apex-4-0-cascading-lovsselect-lists/
Regards,
Mini
Mark Answers Promptly -
Problem writing a sql query for a select list based on a static LOV
Hi,
I have the following table...
VALIDATIONS
ID Number (PK)
APP_ID Number
REQUESTED Date
APPROVED Date
VALID_TIL Date
DEPT_ID Number (FK)
I have a search form with the following field item variables...
P11_DEPT_ID (select list based on dynamic LOV from depts table)
P11_VALID (select list based on static Yes/No LOV)
A report on the columns of the Validations table is shown based on the values in the search form. So far, my sql query for the report is...
SELECT v.APP_ID,
v.REQUESTED,
v.APPROVED,
v.VALID_TIL,
d.DEPT
FROM DEPTS d, VALIDATIONS v
WHERE d.DEPT_ID = v.DEPT_ID(+)
AND (d.DEPT_ID = :P11_DEPT_ID OR :P11_DEPT_ID = -1)
This query works so far. My problem is that I don't know how to do a search based on the P11_VALID item - if 'yes' is selected, then the VALID_TIL date is still valid. If 'no' is selected then the VALID_TIL date has passed.
Can anyone help me to extend my query to include this situation?
Thanks.Hello !
Let's have a look at my example:create table test
id number
,valid_til date
insert into test values( 1, sysdate-3 );
insert into test values( 2, sysdate-2 );
insert into test values( 3, sysdate-1 );
insert into test values( 4, sysdate );
insert into test values( 5, sysdate+1 );
insert into test values( 6, sysdate+2 );
commit;
select * from test;
def til=yes
select *
from test
where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
=decode('&til','yes',1,-1);
def til=no
select *
from test
where decode(sign(trunc(valid_til)-trunc(sysdate)),1,1,0,1,-1)
=decode('&til','yes',1,-1);
drop table test; It's working fine, I've tested it.
The above changes to my first idea I did because of time portion of the DATE datatype in Oracle and therefore the wrong result for today.
For understandings:
1.) TRUNC removes the time part of DATE
2.) The difference of to date-values is the number of days between.
3.) SIGN is the mathematical function and gives -1,0 or +1 according to an negative, zero or positiv argument.
4.) DECODE is like an IF.
Inspect your LOV for the returning values. According to my example they shoul be 'yes' and 'no'. If your values are different, you may have to modify the DECODE.
Good luck,
Heinz -
Select List (based on LOV) query problem
Hello experts! I have a small problem here, which I can't seem to overcome.
I have a page item (select list based on LOV), which is based on a query. The query returns all potential employees of a department that are responsible for a certain duty. So far so good!
The problem is that there are two departments, which should not only see there own employees but also the name of the employee that has carried out a certain task. However, due to my query, the name of that person is not displayed - only the pk is returned.
Do you have a recommendation how I display all employees of a specific department and have additional values translated as well?
My query is as follows: select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where cnt_bearbeiter in (SELECT
CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK) union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user)) whereas :app_user holds the information of the department.
Any hint is appreciated!
Many thanks,
SebOkay, I just had the right idea and it's working well! Sorry for posting!
I return the name of the employee that has edited a dataset and simply add all others of the logged on department! Really easy! Should have thought of that before posting! ;-(
The correct code is select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter a, vt_tbl_punktdaten b where a.cnt_bearbeiter = b.int_bearbeiter and
inv_pt_id_sub = :P4_PTIDS
union select str_bearbeiter, cnt_bearbeiter from vt_tbl_bearbeiter where int_behoerde in (SELECT
CNT_REGIERUNGSBEZIRK FROM TBL_REGIERUNGSBEZIRK where STR_REGIERUNGSBEZIRK = lower (:app_user))Bye,
Seb -
Order in a Select List based in a LOV is wrong
I have a select list based upon a LOV SQL Query.
Values in table are:
FIELD
001
002
003
AAA
when I make query in SQL Workshop:
select FIELD from TABLE order by FIELD;
I get
001
002
003
AAA
But when I make a similar query in LOV the result is in the select list
AAA
001
002
003
Someone knows what is happening?
Thank
Andermhichwa wrote:
It looks like your application is running a different sort / NLS preference then is the SQL workshop. Is there a chance your application identifies a language that sorts differently then default APEX. I am just guessing but it could explain this behavior.OK, I think something like this is happening because my Oracle instance have SPANISH like a NLS_LANG parameter, but why is different result between sql Workshop and LOV query, I have installed english and spanish languages in my apex instance, I get the same problem in both cases.
Other curious think is that my min and max values are OK,
for example
BETWEEN: <select list 1> AND <select list 2>
default value for <select list 1> is
DECLARE
exitvalue varchar2(10);
BEGIN
select min(FIELD) into exitvalue
from TABLE
return (exitvalue);
END;
I get 001
default value for <select list 2> is
DECLARE
exitvalue varchar2(10);
BEGIN
select max(FIELD) into exitvalue
from TABLE
return (exitvalue);
END;
I get AAA
But select list are ordered like
AAA
001
002
003
I have based select list in a lot of different sql ways
select FIELD from TABLE ORDER BY FIELD
select FIELD from TABLE ORDER BY 1
select FIELD from TABLE ORDER BY FIELD ASC
select FIELD from TABLE ORDER BY 1 ASC
Other extraneous think is that I use DESC order I get
003
002
001
AAA
Thanks
Edited by: user10999912 on 24-Jul-2010 08:07 -
Creating a Dynamic Update Statement based on Select
hi,
i'm trying to create a dynamic update statement based on select statement
my requirment is to query a joint tables and get the results then based on the results i need to copy all the data and create an update statement for each row
for ex
the update statement should look like this
update iadvyy set SO_SWEEP_CNT = '1' where inst_no = '003' and memb_cust_no = 'aaaaaaaaaaaaaaaa';
and the select statement like the following
select substr(key_1,11,9) account_no,sord_mast SO_SWEEP_CNT from
select acct_no,count(*) sord_mast from
(select from_acct_no acct_no,update_mast
from sord where FROM_SYS in ('DEP','INV') and TERM_DATE > 40460
union all
select to_acct_no acct_no,update_mast
from sord where TO_SYS in ('DEP','INV') and TERM_DATE > 40460)
group by Acct_no)
right outer join
invm
on
key_1 = '003'||acct_no
where sord_mast > 0;
so taking the above two columns from the above select statement and substitue the values as separate update statement.
is that doable , please share your knowledge with me if poosible
thanks in advancedis that doable , please share your knowledge with me if poosibleyes
The standard advice when (ab)using EXECUTE IMMEDIATE is to compose the SQL statement in a single VARCHAR2 variable
Then print the SQL before passing it to EXECUTE IMMEDIATE.
COPY the statement & PASTE into sqlplus to validate its correctness. -
Select list not setting a return value
I have defined a select list based on a named LOV. With the default values for the SOURCE section I do not seem to be getting a value returned, as indicated in the following debug output:
0.05: parse query
0.05: binding: ":P1_SALESMANAGER_SHOW"="P1_SALESMANAGER_SHOW" value=""
0.05: print column headings
0.05: rows loop: 15 row(s)
no data found
If I change the Source Type to SQL Query and enter the query in Source Value or Expression I get the behaviour I would expect that the value returned is always the first row returned by the query, no matter which one I pick from the list.
What do I need to set so it behaves correctly?
Thanks
AndyHow do I generate all the page item attributes to send you? What do you mean by "see the page" - do you want me to submit the generated HTML source?
In the meantime, I have dropped the select list item and am now re-creating it as follows:
- Click the Item Create icon
- Choose Select List
- For Select List Control Type, accept the default of Select List and click Next.
- Item name = P1_SALESMANAGER_SHOW and click Next
- Choose a named LOV, enter null value / text and click Next
- Accept default item attributes and click Next, then Create Item
This is exactly in accordance with the instructions for the example page in Chapter 2 of the 2-day Tutorial.
Run the page, exactly the same result. Clicking Debug shows that P1_SALESMANAGER_SHOW .value is set to null, even though I have picked one of the displayed values.
I need to do a proof-of-technology demo of HTMLDB to my managers this week so would really appreciate your advice to get this going.
Thanks,
Andy -
Select List with Submit Not pulling % values
Hello All,
I have a tabular form in app and displays data based on choice selected in 'select list with submit' from Item, it works fine for values chosen, when i choose '%' I want to display all the records existing in the tabular form but instead it says 'No Data Found'. How do i solve this ? Kindly advice and help.
ex:
Tabular form query-
select a, b
from table
where a like :ITEM
Item:
Type: select list with submit
Named LOV:
select a d, a r
from lookup_table order by 1
Appreciate your response.
Thanks and Regards,
SenanaHello,
You need to check what value is returned by select list when you select '%' in the select..
there is a field display null value as where you can enter '%' and return value of null you can enter 0
and then modify your tabular form query to
select a , b from table where a like :ITEM OR :ITEM = 0
Regards,
Shijesh -
Open qty errin Selection list For Ref Doc. screen while converting to order
Hi SAP Gurus,
For one of my materials, the open quantity is not updating in the Selection list For Ref Doc. screen while converting to sales order.
Can you please help me?
Thanks,
KetanHi Senthilkumar,
I really appreciate for your kind Hint of SEL ID.
I created and assigned new 'Sel Priority' to the SEL ID same as for Routing.
Now while converting Planned order to Production order system is asking for Reference operation set as there is no such need of Routing as I already mentioned in previous post.
Regards, -
2 Select lists do not change the value
Hi all,
I am having a situation. I have 2 select lists . The second one is dependent of the first one. Data are retrieved perfectly.
These select lists are done in page 0 and they are used in the referenced page. Apexlib is used in the page 0
When I change the item of the second list, the returned value used in a report, is ok. It takes the correct one.
If I change the item of the fist select list, the returned value of the second select list does not change(the displayed value are correct). the report is run (after changing the first select list) but the wrong returned value of the second list is taken.
The correct value of the second one is taken only if page is submited or we change the option.
it seems that it keeps the last value of the second list according to the previous selection.
Both select list is without submit.
How can I make a "refresh" of the returned values of the second select list (the records are ok) after changing the first one?
Thanks in advance
RafHi Rafael,
is ApexLib integrated correct? Did you check against http://apexlib.oracleapex.info/howto_integrate_manual_steps.html ?
Or did you try and install the ApexLib Feature Demonstration Application and see if it works there?
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
Work: http://www.click-click.at -
Select List based on other select List
Hi
I have 2 select lists when a selection is made in one I want the second list to be limited but when nothing is selected in the first list I want the second list to display all. Apolgies if this is really a plsql thing .
Heres what I have so far
if :P52_ORGNAME is null
then
return 'select unique surname d,id r from com_contact';
else
return 'select unique forename||surname d,id r from com_contact where orgname = :P52_ORGNAME order by id';
end if;
the else is fine but I cant get the null condition to work.
:P52_ORGNAME is a select list where show null is yes and there is no NULL value
thanks in advance
KirkHi,
you can try 2 things.
1)try putting a null display value and keep null return value as blank. dont put any value in the default value also,and see if this works,
2)else try putting a null return value(like BLANK) and check for that value in the condition insted of null. i.e
if :P52_ORGNAME ='BLANK'
then
return 'select unique surname d,id r from com_contact';
else
return 'select unique forename||surname d,id r from com_contact where orgname = :P52_ORGNAME order by id';
end if;
Hope it works.. -
Select list: Display the selected value using JSP
Hi
I have a select list with a set of values and when I select a value from the list I want the selected text to appear on the screeen. How do I display the selected value?
Please help:
Here is the code for the list:
<select name="arraySelect" size="8" onclick="">
<%for (int i = 0; i < dumpArray.length; i++) {
if( i == 3){
%>
<option value="<%=dumpArray%>" selected><%=dumpArray[i]%></option>
<% i++;} else %>
<option value="<%=i%>"><%=dumpArray[i]%></option><p>
<% } %>
</select>
<% String name;
name = request.getParameter("arraySelect");
out.println(name);
I tried request parameter but it did not help. How can I do it?did you submit your page?
Maybe you are looking for
-
Advantages of using J1IS instead of J1IIN for excise invoice during stock t
Hi, what are the advantages of using J1IS instead of J1IIN for excise invoice during stock transfer order....using delivery. Please clarify clearly. Regards, Dharani
-
3 inch disc stuck in disc drive
I accidently put a 3 inch disc in my mac book disc drive and now it's stuck. Does anyone know how to get it out? Thanks.
-
Can we apply note AFTER patch has been applied?
Hello We have installed a patch set into DEV which is being tested. This patch set contains a note which we need urgently in QA. Are there any issues with applying the note individually? It will need to go into DEV first - although it's already th
-
Picking Request Number Generation
In the Tcode VL02N For a Purchase Order after assigning the material numbers and saving the delivery a Picking Request Number is usually created in the Document Flow which is usually in YYYYMMDD . But i am not using the TCODE but using the bapi I ''
-
Adding a mouseListener to the tabs in a tabbedPane.
What I would like is a listener that listens to mouse clicks on the tabs in a tabbed pane. How would I go about creating this? The changeListener will not work for my purpose.