Please Help | Dyanamic variable based on another field
In the query below, I'm attempting to replace task codes with task descriptions by left joining to a multi-purpose control table.
In our corp, the description for the task code varies based on the value of change_program in each record, so rather than referencing the value of code_index.tabl statically as I do in the query below (201), I need a dyanamic variable to be defined for each record based on the value of work.change_program, which would represent the value for code_index.tabl.
For each record
if change_program =1 then v_tabl = 201
elseif change_program =2 then v_tabl = 202
elseif change_program =3 then v_tabl = 203
else v_tabl = 201
BTW, I'm really a noob, so I have no idea how to declare and use variables, but I'm sure it must be possible. Any assistance with the syntax would be GREATLY appreciated.
SELECT account,
change_program,
task_code_01,
task_code_02,
task1.longdesc,
task2.longdesc
FROM work
left join (SELECT id,
longdesc
FROM code_index
WHERE corp = mem
AND tabl = 201) task1
ON task1.id = work.task_code_01
left join (SELECT id,
longdesc
FROM code_index
WHERE corp = mem
AND tabl = 201) task2
ON task2.id = work.task_code_02
WHERE work.corp = mem
Welcome to the forum,
CASE WHEN change_program =1 THEN 201
WHEN change_program =2 THEN 202
WHEN change_program =3 THEN 203
ELSE 201
ENDis a valid construct in SELECT statement.
Check SELECT syntax in ORacle documentation.
vr
Sudhakar B.
Similar Messages
-
Restriction of f4 help of a bex variable based on another variable input
Hi,
Could you please let me know if there is any possibility to restriction of f4 help of a bex variable based on another variable input.
eg: when i select particular company code in one variable, i need to restrict the f4 help for another variables eg: pur. group based on selected company code.
Regards
KasiHi,
Try using replacement path option in bex with replace variable with variable selction.
Thanks. -
Search help for a field in table control based on another field value
Hi,
I want to attach the Search help for a field in table control based on another field value.
Please help me asap.
Will be highly rewardedHI,..
Check these links
search help in table control
Re: How to create Search Help for a field in Table control !!
How to create Search Help for a field in Table control !!
F4 Help In Table Control
Control table F4 help
Problem in F4 help in screen field
check this code
DATA: BEGIN OF it_value4 OCCURS 0,
TEXTCODE LIKE ZXX-TEXTCODE,
TEXTDESC LIKE ZXX-TEXTDESC,
END OF it_value4.
progname = sy-repid.
dynnum = sy-dynnr.
SELECT TEXTCODE TEXTDESC
FROM xxxx
INTO CORRESPONDING FIELDS OF TABLE<b> it_value4</b>
WHERE LOSS_CODE =<b> IT_VALUE1 .</b>
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TEXTCODE'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'ITVALUE-TEXTCODE' "-->UR 4 th filed value in screen
value_org = 'S'
TABLES
value_tab = it_value4.
endmodule.
Message was edited by:
veereshbabu ponnada -
Please Help, I want to change field value in a table, based on another field value in the same row (for each added row)
I am using this code :
<HTML>
<HEAD>
<SCRIPT>
function addRow(tableID) {
var table = document.getElementById(tableID);
var rowCount = table.rows.length;
var row = table.insertRow(rowCount);
var colCount = table.rows[0].cells.length;
for(var i=0; i<colCount; i++ ) {
var newcell = row.insertCell(i);
newcell.innerHTML = table.rows[1].cells[i].innerHTML;
switch(newcell.childNodes[0].type) {
case "text":
newcell.childNodes[0].value = "";
break;
case "checkbox":
newcell.childNodes[0].checked = false;
break;
case "select-one":
newcell.childNodes[0].selectedIndex = 0;
break;}}}
function deleteRow(tableID) {
try {var table = document.getElementById(tableID);
var rowCount = table.rows.length;
for(var i=0; i<rowCount; i++) {
var row = table.rows[i];
var chkbox = row.cells[0].childNodes[0];
if(null != chkbox && true == chkbox.checked) {
if(rowCount <= 2) {
alert("Cannot delete all the rows.");
break;}
table.deleteRow(i);
rowCount--;
i--;}}}catch(e) {alert(e);}}
</SCRIPT>
</HEAD>
<BODY>
<INPUT type="button" value="Add Row" onClick="addRow('dataTable')" />
<INPUT type="button" value="Delete Row" onClick="deleteRow('dataTable')" />
<TABLE id="dataTable" width="350px" border="1">
<TR>
<TD width="32"></TD>
<TD width="119" align="center"><strong>Activity</strong></TD>
<TD width="177" align="center"><strong>Cost</strong></TD>
</TR>
<TR>
<TD><INPUT type="checkbox" name="chk"/></TD>
<TD>
<select name="s1" id="s1">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</TD>
<TD><input type="text" name="txt1" id="txt1"></TD>
</TR>
</TABLE>
</BODY>
</HTML>Hi,
Let me make sure u r working with table control.
First u have to create a event(VALIDATE) to do the validation.
Inside the event,
1. First get the current index where user has pointed the curson
2. Once u get the index read the internal table with index value.
3. Now u can compare the col1 and col2 values and populate the error message.
1. DATA : lo_elt TYPE REF TO if_wd_context_element,
l_index type i.
lo_elt = wdevent->get_context_element( name = 'CONTEXT_ELEMENT' ).
CALL METHOD LO_ELT->GET_INDEX( RECEIVING MY_INDEX = l_index.
above code should be written inside the event.
Thanks, -
Table Control: make a field editable or not based on another field value
HI All,
How to make a column field input enabled or disabled based on another field value in a Table Control.
Here's the scenario:
I have a table control with two columns, KTOKK and LIFNR. Now for certain KTOKK, the LIFNR field should be editable and for certain KTOKK it should not be editable.
Eg., KTOKK = 0001 => LIFNR field is not editable.
KTOKK = ZKTO => LIFNR field is editable.
But these fields are in a table control.
Please advice.
Thanks in advance,
RK.Hi RK,
Go through the below link..
how to make special field editable or diseditable in table control?
the code mentioned in the link.. just add ur conditions in the module....
Best Regards,
Brijesh -
How to make DFF mandatory in forms personalization based on another field
how to make DFF field mandatory in forms personalization based on another field ,and also user can put values in the DFF field.
Edited by: SinghP on Mar 14, 2012 12:16 AMHi,
4 DFFs are enabled.
CASE1: when payment is voided DFF4 should be mandatory feild
CASE2: when user queries the voided payment , above DFF4 should be readonly or not editable
Unable to acheive both the cases with Forms Personalization.
When trying case2 error pops up saying null canvas.
Can you please provide some examples if you have any.
I can find any customizations on this form
Thanks
Edited by: user11344029 on Mar 15, 2012 11:28 AM -
Making a DFF field mandatory based on another field
Hello All,
We have a requirement where in we need to make a DFF field mandatory based on another field.
example:
DFF has two fields :
Filed1 : values 'Email', 'Fax'
Filed2
If 'Email' is selected in 'Field1' then Field2 should become mandatory.
Any inputs on this will be really helpful.
Thanks & Regards,
Satya.hi kumar3a,
recently, i spent considerable amount of time wracking my brain on a similar problem. the nearest i came to a solution was when i used a forms personalisation. mind you, forms personalisation will not work directly on the DFF window, so it has to be approached in a roundabout sort of way.
i got this information from an Oracle Support personnel - MOS Note 1078348.1.
i would start with the flexfield segment as "not required", and then using Forms Personalization, i would make it "required". i would try to figure out how to establish a condition where the previous 'required' flexfield segment's value is checked to see if this 'not required' segment needs to be made 'required'. in theory, this should solve the issue. i gave up on it because the forms personalisation would need to cover WHEN-VALIDATE trigger event, and we had close to 100 validations going on through other preexisting forms personalisations, which rendered it near impossible to employ this method.
best regards. -
Changing a field based on another field
hi one and all
i am looking for a way to change a field based on another field. if i have item 2 and item 8 on the page and item 8 needs to be required based on item 2 based on a requirement, how would this be done.
ex if item 2 has a PO inputed, when it is moved off the field, item 8 should be changed from required false to required true. i have tried in both the process request and process form request with no luck
any suggestions.
thankshello again
after your input and after reviewing the tutorial ( which i accomplished based on data from a table but not a field ) , i did the following and have been fighting it for a day. am i doing this correctly
on the itemid OrgRptCode1 i changed the action type to firePartialAction and the event is name o1
then i added this code to see if the action would fire
if (pageContext.getParameter("OrgRptCode1") !=null) // either line will be commented out
if (pageContext.getParameter("o1") !=null) // either line will be commented out
System.out.println("Field is not empty");
else
System.out.println("Field is empty");
am i missing a step . also
when i enter the page i get Field is empty. when i enter the field and tab off i get the error page w/ this msg
oracle.apps.fnd.framework.OAException: java.lang.NullPointerException
at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1064)
at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1294)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2396)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.lang.NullPointerException
at uaboaf.oracle.apps.xxuab.hr.orghierarchy.webui.manageOrgCO.processFormRequest(manageOrgCO.java:289)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534)
java.lang.NullPointerException
at uaboaf.oracle.apps.xxuab.hr.orghierarchy.webui.manageOrgCO.processFormRequest(manageOrgCO.java:289)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:734)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:943)
at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1546)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:373)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:929)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:895)
at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:751)
at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:352)
at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:340)
at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2392)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1512)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:463)
at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:384)
at OA.jspService(OA.jsp:40)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:534) -
Choose field from joined table based on another field?
Good morning!
Is it possible to select a field from a joined table row based on another field? Consider the following data in the CVALUES table:
ID C1 C2 C3 C4 C5 C6
T1 9.6 10.3 12.4 19.6 19.6 0
T7 9.6 10.4 0 0 0 0
T3 8.2 9.9 11.4 19.6 19.6 0
T8 8.3 10.7 13.5 20.7 0 0
T5 9.4 10.3 12.7 22.9 19.6 0
...And the following data in the MDETAIL table:
ID MDATE CNUM ...
T1 03/28/2012 18:00:00 4
T1 03/28/2012 18:00:00 1
T8 03/29/2012 06:00:00 6
T8 03/29/2012 06:00:00 5
...I want to get the column from CVALUES corresponding to the CNUM field in the MDETAIL table. I'm currently doing this:
SELECT m.t1, m.mdate,
CASE WHEN m.cnum = 1 THEN c.c1
WHEN m.cnum = 2 THEN c.c2
WHEN m.cnum = 3 THEN c.c3
WHEN m.cnum = 4 THEN c.c4
WHEN m.cnum = 5 THEN c.c5
WHEN m.cnum = 6 THEN c.c6 END AS cvalue
FROM mdetail m
JOIN cvalues c ON m.id = c.idThe records in the CVALUES table are unique; only one row per ID.
This method works, and it's fast but it's messy code and I think there has to be a better way to do it. I use the cvalue value in several calculations so every calculation I use it in has this giant glob of CASE in it!Since you're comparing the same column against scalar values, the CASE statement could be simplified in a similar way :
CASE m.cnum
WHEN 1 THEN c.c1
WHEN 2 THEN c.c2
WHEN 3 THEN c.c3
WHEN 4 THEN c.c4
WHEN 5 THEN c.c5
WHEN 6 THEN c.c6
END AS cvalueSince performance is not the issue here, now it depends on what you consider "more readable".
Using a one-liner piece of code certainly makes the query looks less bulky, but I won't be so sure about readability and immediate understanding. -
Problem with changing required property based on another field using EL
Hi,
In my form, I want to set required property should be true or false for field 'B' based on value of field 'A'.
Value of 'A' is from 1 to 10 as choice list.
If 'A' value is 1 then i want i want to set required property of 'B' is false.otherwise the field 'B' should be required.
I set auto Submit to true for field 'A' and 'A' assigned as partial trigger for 'B'.
In required property of 'B', i given
#{bindings.ScheduleLevel.inputValue!=1}
Now, it is working fine if i try to change the list value of 'A' from 2 to 1 or 1 to 2 or more in the existing record.
But, if i click create button, then if i choose 1 for 'A', then the 'B' field is not changing from required to non-required.
my jdev version is 11g.
Any suggestions please.
Thanks in advance,
SANThis would not work as validations would fire before. So you will have to accomplish this using a valuechangelistener like this.
Keep a boolean variable which captures whether field is required or not let' say brequired
for field A
set immediate=true, autosubmit=true
then in value change listener of A you use the code as follows:-
public void onAChange(ValueChangeEvent valueChangeEvent) {
Object value=valueChangeEvent.getNewValue();
if(value!=null&&!value.toString().trim().equalsIgnoreCase("")){
setBrequired(true);
FacesContext.getCurrentInstance().renderResponse();
else{
setBRequired(false);
FacesContext.getCurrentInstance().renderResponse();
} -
Adding the field in the internal table based on another field
Hi all,
I am Creating a Function module with three fields (HKONT,EBELN,DMBTR) in the output internal table(ITAB)
My Requirement is that as soon as the value of the HKONT in the internal table changes, i need to sum the DMBTR field values and should pass into a variable(v_sum).
ON CHANGE OF seems to me Obsolete.
Please help me in doing this.
Thanks
AjayHI,
Use control break event . AT END OF.
loop at ITAB.
V_DMBTR = V_DMBTR + ITAB-DMBTR.
at end of HKONT.
v_sum = V_DMBTR.
clear : V_DMBTR.
endat.
endloop.
Regards,
Srini. -
Urgent, Please help !!! Input Date field in Mysql database using JSP
Hi All,
Please help me ! I am trying to store a date field in MySql databaseusing JSP on Tomcat Server.I am gettting the following error.
I am taking the String Input and then trying to convert it into date type
inorder to store it into date field in a database.
I am using the following code :
<%
try{
String dt=request.getParameter("avldt");
SimpleDateFormat adt= new SimpleDateFormat("dd-MM-yyyy");
Date sqlToday = new java.sql.Date(adt.parse(dt).getTime());
catch(ParseException e){
e.printStackTrace();
%>
But I am getting the following error message :
Class jsp.myjsp.SimpleDateFormat not found.
Please help me !!!.It's very urgent.
Thanks,
Savdeepprogramming is more then copy pasting, it actually is usefull to think about what you are doing. First you declare that you date is format dd-MM-yyyy, then you want to parse a date in format dd/MM/yyyy and behold Java warns you it cannot parse the one into the second ! Cant you solve the rest of this puzzle yourself then ?
-
Please Help Session variables disappear
Hi. I am having issues with the developer's version of CF MX
7. I recently set up the developer's version on a test server, and
moved over code from a properly working site using MX 6. I have an
application.cfm file set will the correct <cfapplication> tag
attributes, and the session management is set in the CF admin. When
working on MX 6 the session variables I set were working. Now using
MX 7 none of my sessions are holding. When I first login the
sessions exist, if I click any other page, the variables disappear.
Again, this does not happen on MX 6.
Please help!
Thanks,
jlgDouble-check your sessiontimemout
Try setting up a simple test application using something
similar to the example at
http://livedocs.adobe.com/coldfusion/7/htmldocs/00000217.htm -
Hiding Subform based on another field value which is not in Layout
Hi,
I tried using Formcalc for hiding a subform like below.
if ($record.BLOCK04.GT_ITEM_LEV1_910.DATA[].GT_ITEM_LEV2_910.DATA[].KDMAT == null)
$.presence = "hidden"
endif
My subform is Flowed, Western text
When i run it, its not working..so i hided using context condition like if there is no value in KDMAT, do not pass it to Layout...Now it's working..My problem is, when there is no vaue, it is leaving BLANK LINE in the print out..a gap is there for that row.
Please help me how to avoid the EMPTY/ BLANK LINE??
Thanks in advanceHi,
All my PARENT subforms are Flowed only..still its not working..Yes, I want to print left to right only..
Please help..
I checked REPEAT SUBFORM but not MAX or MIN count..then it's working but it prints 2 times for first item which is wrong.
I am not understanding the behaviour of this..Please help -
Selection values in query should have help values based on another field
Hi all,
I have the following requirement:
I have a query in which there are the following two filters in the
selection criteria:
1. COuntry
2. State
Based on the Country selected, the values for the State should come up
in the Help values in the slection criteria. The user then shall select from these values.
I plan to use a variable for Country with Replacemetn path as the second query whcih shall have Coutnry and States.
Is this right or can I do this in a better way? Please suggest.
Thanks and Regards,
Srilakshmi BHi,
See you can achieve this through exit variable.
Try to create one custom table or try to refer to master data tables may be?
Custom table need to maintain your master data and need to be referred in below code.
INCLUDE ZXRSRU01 *
Enhancement: MultiProvider using InfoProvider Variable
include YBW_INFOPROVIDER_VARIABLE.
*& Include YBW_INFOPROVIDER_VARIABLE *
DATA:
ls_var TYPE rrs0_s_var_range,
ls_range TYPE rsr_s_rangesid,
l_contained TYPE c,
ls_mapping TYPE ybw_mapping,
lt_mapping TYPE TABLE OF ybw_mapping.
Called after variable popup
IF i_step = 2 AND i_vnam = 'INFOPROV'.
- 13 -
Read mapping table
REFRESH lt_mapping.
SELECT * FROM ybw_mapping INTO TABLE lt_mapping.
Process all selection for country variable
REFRESH e_t_range.
LOOP AT i_t_var_range INTO ls_var WHERE vnam = 'S_COUNT'.
Process all mapping rules
LOOP AT lt_mapping INTO ls_mapping.
Always fill LOW and HIGH, Otherwise logic below will not work
IF ls_mapping-high IS INITIAL.
ls_mapping-high = ls_mapping-low.
ENDIF.
Check if selection is contained in the defined InfoProvider
CLEAR l_contained.
CASE ls_var-opt.
WHEN 'EQ'.
IF ls_var-low BETWEEN ls_mapping-low AND ls_mapping-high.
l_contained = 'X'.
ENDIF.
WHEN 'BT'.
IF ls_var-low <= ls_mapping-high AND
ls_var-high => ls_mapping-low.
l_contained = 'X'.
ENDIF.
ENDCASE.
Add InfoProvider to return table
Note: Use COLLECT to avoid duplicates
IF l_contained = 'X'.
CLEAR ls_range.
ls_range-sign = 'I'.
ls_range-opt = 'EQ'.
ls_range-low = ls_mapping-infoprov.
COLLECT ls_range INTO e_t_range.
ENDIF.
ENDLOOP. " lt_mapping
ENDLOOP. " i_t_var_range
EXIT.
ENDIF.
Thanks and regards
Maybe you are looking for
-
I use FireFox regularly and am very pleased but I am concerned the new version (5.0) may not be compatible with several Add -on versions. I use windows 7. I'm not sure the benefits of the new 5.0 is worth potential loss of existing features and perfo
-
Weird sounds on Audigy 2ZS,need he
Hi all,i having problem when i watching dolby digital?dvd. The problem is when i watching dvd it got some "Dit Dak Dit Dak" sounds come out and in my dvd software setting i have on SPDIF output let my Audigy 2ZS decode it. Is it this is soundcard pro
-
TS3297 What can I do for Message 'Your request cannot be processed Error code: 1009 ?
Message 'Your request cannot be processed Error code: 1009 What can I do for above error?
-
Viewing quicktime movies from iphoto 08
I just upgrade to Snow Leopard, I use to be able to view quicktime movies from Iphotos in Leopard, now if i click on the movie nothing happens, From Quicktime doesnt seem to want to open my library where the movies are located. These are small video
-
Oracle Weblogic 10.3 BEA-000362
Hi, I have just installed weblogic server and have create my base_domain. However when running startup I get the following error:- BEA-000362 - Server failed. Reason: Management:141266 Parsing Failure in config.xml: java.lang.IllegalArguementExceptio