Pull Value based on Lookup Code
I have a form that displays multiple values from a suppliers table. I have an item call Supplier Name (LOV), depending what i choose, item displays data in the "Airport Origin" and "Forwarder". I also have another table call Destinations and Another Table call Rates. On my form (page 2) one of the requirements is to automatically display the "Cost Per KG". I need to display the Cost per KG by what ever i have in the 'Destination Field' and 'Airport Orign'?
I have created 2 Processes: One for pulling multiple item values and the other for getting the value from the rates table.
1)Set_Multi_Items
DECLARE
v_ORIGIN_AIRPORT_CODE VARCHAR2 (200);
v_FORWARDER_CODE VARCHAR2 (200);
CURSOR cur_c
IS
SELECT ORIGIN_AIRPORT_CODE, FORWARDER_CODE
FROM lfaf_SUPPLIERS
WHERE LFAF_SUPPLY_ID = TO_NUMBER (v ('MULTI_TEMP_APPLICATION_ITEM'));
BEGIN
FOR c IN cur_c
LOOP
v_ORIGIN_AIRPORT_CODE := c.ORIGIN_AIRPORT_CODE;
v_FORWARDER_CODE := c.FORWARDER_CODE;
END LOOP;
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<body>');
HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
HTP.prn ('<item id="P2_ORIGIN_AIRPORT_CODE">' || v_ORIGIN_AIRPORT_CODE || '</item>');
HTP.prn ('<item id="P2_FORWARDER_CODE">' || v_FORWARDER_CODE || '</item>');
HTP.prn ('</body>');
EXCEPTION
WHEN OTHERS
THEN
OWA_UTIL.mime_header ('text/xml', FALSE);
HTP.p ('Cache-Control: no-cache');
HTP.p ('Pragma: no-cache');
OWA_UTIL.http_header_close;
HTP.prn ('<body>');
HTP.prn ('<desc>this xml genericly sets multiple items</desc>');
HTP.prn ('<item id="P2_ORIGIN_AIRPORT_CODE">' || SQLERRM || '</item>');
HTP.prn ('</body>');
END;
2)getDet
DECLARE
my_det NUMBER;
BEGIN
SELECT KGRM_RATE
INTO my_det
FROM LFAF_RATES
WHERE ORIGIN_AIRPORT_CODE = :P2_ORIGIN_AIRPORT_CODE
AND LFAF_DESTINATION_ID = :P2_LFAF_RATE_ID;
HTP.prn (my_det);
EXCEPTION
WHEN OTHERS
THEN
HTP.PRN ('');
END;
******I have a Javascript code in the header of the page*******
<script language="JavaScript" type="text/javascript">
<!--
function pull_multi_value(pValue){
var get = new htmldb_Get(null,html_GetElement('pFlowId').value,
'APPLICATION_PROCESS=Set_Multi_Items',0);
if(pValue){
get.add('MULTI_TEMP_APPLICATION_ITEM',pValue)
}else{
get.add('MULTI_TEMP_APPLICATION_ITEM','null')
gReturn = get.get('XML');
if(gReturn){
var l_Count = gReturn.getElementsByTagName("item").length;
for(var i = 0;i<l_Count;i++){
var l_Opt_Xml = gReturn.getElementsByTagName("item");
var l_ID = l_Opt_Xml.getAttribute('id');
var l_El = html_GetElement(l_ID);
if(l_Opt_Xml.firstChild){
var l_Value = l_Opt_Xml.firstChild.nodeValue;
}else{
var l_Value = '';
if(l_El){
if(l_El.tagName == 'INPUT'){
l_El.value = l_Value;
}else if(l_El.tagName == 'SPAN' &&
l_El.className == 'grabber'){
l_El.parentNode.innerHTML = l_Value;
l_El.parentNode.id = l_ID;
}else{
l_El.innerHTML = l_Value;
get = null;
//-->
</script>
<script language="JavaScript" type="text/javascript">
function f_getDet ()
var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=getDet',0);
get.add('P2_LFAF_RATE_ID',html_GetElement('P2_LFAF_RATE_ID').value)
gReturn = get.get();
if(gReturn)
{ html_GetElement('P2_COST_PER_KG').value = gReturn }
else
{ html_GetElement('P2_COST_PER_KG').value = '' }
get = null;
</script>
<script language="JavaScript" type="text/javascript">
<!--
function sumItems(){
var actual_weight = 0;
var volumetric_weight = 0;
function getNumericVal(item){
if($x(item).value != "") {
return parseFloat($x(item).value);
} else {
return 0;
if ($x('P2_GROSS_WEIGHT').value !="" && $x('P2_VOLUME').value !="" ) {
if ($x('P2_WEIGHT_UOM').value == "LBS") {
actual_weight = getNumericVal('P2_GROSS_WEIGHT') / 2.2046;
} else {
actual_weight = getNumericVal('P2_GROSS_WEIGHT');
if ($x('P2_VOLUME_UOM').value == "CFT") {
volumetric_weight = getNumericVal('P2_VOLUME') / 35.314 / 0.006;
} else {
volumetric_weight = getNumericVal('P2_VOLUME') / 0.006;
if (volumetric_weight > actual_weight) {
$x('P2_CHARGABLE_WEIGHT').value = volumetric_weight.toFixed(2);
} else {
$x('P2_CHARGABLE_WEIGHT').value = actual_weight.toFixed(2);
</script>
//-->
<script>
function mulItems(){
function getVal(item){
if($x(item).value != "")
return parseFloat($x(item).value);
else
return 0;
$x('P2_CHARGEABLE_COST').value =
getVal('P2_COST_PER_KG') * getVal('P2_CHARGABLE_WEIGHT');
</script>
My question is can someone please help me pull the correct value from my rates table on my "Cost Per KG" based on the "Supplier Name" Item Name and "Destination" Item Name?
See application:
Username: demo
password: demo
http://apex.oracle.com/pls/otn/f?p=27562:1:1757574860234267:::::
You need to create an OnDemand Process (PL/SQL) to get the description from your DB and an piece of Javascript to call that process (AJAX style).
You can code everything yourself - there are numerous examples out there.
Or use Scott's "AJAX Code Generator" on http://htmldb.oracle.com/pls/otn/f?p=33867:2
BTW : In APEX 4.0 this can all be done declarative...no coding of ondemand process, javascript etc necessary..
Similar Messages
-
SKF transactional values based on company code
Can anybody let me know the logic how we can seggregate transactional value passed to statistical key figure based on company code or is there anytable where we can direclty find SKF transactions involved based on company code ?
Need to upload SKF transactional figures from one SAP system to another.Hence require process for extraction and uploading of the sameHi Amogh
Hope you are looking for actual SKF quantities posted. kindly check s_alr_87013611 CC report, I think on the lower part this comes. This time I am not in front of system so you please check.
Regards
Rajneesh -
Determination of default characteristics values based on Company Code/Plant
Hi All,
We are using batch management and classification. We have defined various Characteristics and maintained values for it.
As per our business process, we create Purchase Order (which may contain many line items) and after that we receive the Goods thru MIGO.
At the time of MIGO user need to enter all the Characteristics of the batch. Out of no. of characteristics few are mandatory and also have got same value (depends on Company Code/Plant).
Currently there is no provision to maintain default values of the characteristics at Company Code / Plant level. Due to this user have to maintain same values again and again at the time of MIGO for each line item/batch. So please suggest us the solution where user need not to enter same values for respective characteristics during MIGO and we can save lot of time and it will help to improve the efficiency.
We also tried to explore the provision of making u201CDefault Valueu201D in CT04, but then that value was getting applied for all the Company Code / Plant which we donu2019t want.
Regards
Nileshyou have to valuate the characteristics with Object Dependencies
http://help.sap.com/saphelp_bw/helpdata/en/24/4766d4416711d189ec0000e81ddfac/frameset.htm -
XSl formula for pulling values based on parameters or query strings
Hello,
I have a custom list in SharePoint
List Column/Fields (any time a new item is created these are the fields that need values)
Machine = ID2
SpecLabel = text string value
SpecValue = text string value
Using DataFormWebPart
I Filter values by Machine by creating a parameter with a query string as its source.
And pull the values
<xsl:value-of select="@SpecLabel" />
<xsl:value-of select="@SpecValue" />
On the browser I add the parameter to the URL sting to filter each machine ID.
?=Machine=1
Back in the XSL i use the same parameter to pull the value of the string as my header title.
<xsl:value-of select="$paramMachine"/>
Problem
I need a formula that will pull just the the SpecValue data for a specific item.
Example: I have thee items below and I need to just pull the “SpecValue” for the Built Year which is 2014.
Machine = 1
SpecLabel = Speed
SpecValue = 10
Machine = 1
SpecLabel = Color
SpecValue = Red
Machine = 1
SpecLabel = Built YearSpecValue = 2014
Any Suggestion?Hi,
According to your post, my understanding is that you wanted to the formula to filter a list item.
You can create the formula similar like below.
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[@City = 'Abington']"/>
More reference:
http://sympmarc.com/2011/08/15/compound-filtering-in-data-view-web-parts-dvwps-with-sharepoint-designer/
http://blog.jussipalo.com/2012/01/sharepoint-filter-data-form-web-part.html
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Calculation based on Lookup code
Hello All,
We have many records in the DB for Look up code & VIN. EVtrip Dist & Trip Length are direct fields available in the DB.
I need to first calculate Avg EVtrip distance, Weekly average, EEMD & Cumulative EEMD based on millions of records.
How to do calculate considering 'N' no of records and because i need to compare, not next or previous records but several records between.
Please find the sample data.
Cumulative Estimated EMD
Sold in week
Wk
LOOKUPCODE
VIN
EV
TRIP
DIST
TRIP
LENGTH
Avg EV Trip Distance
Wkly Avg
EEMD
Cumulative EEMD
Week 1
80
Wk1
TRIP_INFO_ALERT
1FADP5CU5DL525753
114
251
214
165.75
13260
13260
TRIP_INFO_ALERT
1FADP5CU5DL525753
100
120
TRIP_INFO_ALERT
3FA6P0PU6DR310101
63
102
63
TRIP_INFO_ALERT
1FADP5CU8DL555376
120
215
120
TRIP_INFO_ALERT
3FA6P0SU1DR332367
266
780
266
(165.75 *80)
Week 2
100
Wk2
TRIP_INFO_ALERT
1FADP5CU5DL525753
97
97
97
88.5
15930
29190
TRIP_INFO_ALERT
3FA6P0PU6DR310101
131
200
131
TRIP_INFO_ALERT
1FADP5CU8DL555376
39
39
39
TRIP_INFO_ALERT
3FA6P0SU1DR332367
87
87
87
Actual Number of vehicles that have been sold per that week
(88.5 *180)
(13260+15930)
Week1 -- Cumulative Estimated EMD = 13260
Week2 -- Cumulative Estimated EMD = 29190Hi Sandeep,
Are you comfortable with SQL?
I believe Crystal Reports is a top down compiler meaning formulas in the next line will not be applied to the current line. There is one workaround using the previous and next functions, but they only extend to the immediate previous or next line. It would cause errors if there were three of the same VIN #'s in a row. -
Trigger a process task based on Lookup Value
Hi Everyone,
We have a requirement like for one of the custom adaptors,we have
The Process form has the below five attributes
i)First Name----(String)
ii)Last Name----(String)
iii)Location----(Lookup)
iv)Address----(String)
V)Mobile-----(String)
The attribute Location is a lookup Field.
in Location we have
Code Decode
Chennai Chennai
Bangalore Bangalore
Delhi Delhi
Mumbai Mumbai
NOw if i select chennai in the location lookup.I want to trigger a seperate task from process definition.
How can this be achieved?
Regards,
Naveenyou can't achieve dynamicly using process task.
if the value of that lookup is limited and known then you can design like below(Static)
1. create a process task adapter which takes one string input(location) and return the same. update response for each location values
2. create task called Location updated or if this task is there for update location value in target system then leave as it is
3. create a new condiional task "call task based on location" . attach newly created adapter. pass location attribute as input and map return value with response code.
finally attach this task on the success response of "Location Updated" task
4. now you have response for all location . so attach respective task on each response.
Note: if there is no Location Updated task present then create "Location Updated " task and directly attach above adapter on this task.
--nayan -
Display Value/Description in Lookup During Request-Based Provision
Hello everyone! I'm currently using a lookup for a list of values during a request-based provision. I've created the request page, however, selecting the attributes isn't working the way I would like it to. For whatever reason, it's only displaying the Description or Decode value during the request. However, during direct-provisioning, I can see both, and when I choose one, the Value or Encode value is what is propagated to the OID. How can I configure my request-based lookup to show both the value and the description like it is shown during a direct provision? Here is the metadata I'm using:
<AttributeReference
available-in-bulk = "true"
length = "50"
widget = "text"
type = "String"
attr-ref = "UD_ULHOST"
name = "Unix Linux Hosts">
<AttributeReference
name = "Host"
attr-ref = "Host"
type = "String"
length = "50"
widget = "lookup"
available-in-bulk = "true"
lookup-code="ULHst">
</AttributeReference>Can I designate my lookup code in that, though?
I have a lookup named LKTst with the following
Encode Decode
ServerA Group1
ServerB Group1
ServerC Group2
Can I still reference this lookup from the query? And if so, how?
Thank you for your help! -
Lookup Code value switch automatically in case of same decode value
Hi,
We have create a simple Lookup type UDF on OIM user profile. The lookup value contains the different code value for same decode value like 1-->Project Manager, 2-->Project Manager, 3-->Project Manager. Now the issue is that if someone goes form the web console and edit the user (just click on edit and then save it back without making any change), this lookup field value switch to default code value for 'Project Manager'. Let's say if OIM internally assume 2 as default code value for 'Project Manager' (not sure how OIM maintains it internally), If we follow the edit process for a user who has '3' as code value then after save the value in the database change to '2'. The same happens for user with '1' as code value as well. Now mapping multiple code values to same decode is very common where you need to integrate OIM with legacy systems where multiple key values assigned to the Job title/positions with same description. Has anyone came across this scenerio in past and found any solution. Please help. We tried by using lookup querry as well but no luck. We are using 9102 BP02 OIM. ThanksFirst thing first
Why do you need 3 entries in the lookup for the same vaule? It's only a confusion to the end-user to select which one.
Now....
In case you have some compelling situation, just try to have some differentiation for the decode value; like 1~Project Manager, 2~Project Manager, 3~Project Manager. This way confusion may be obviated and so as the issue. -
Problem in populating lookup values based on the lookup query from database
HI all
I have problem of population look-up values based on look-up query
I am giving the details what i am trying
I need to populate the values from the UD_LDAP_USR table into the field of UD_USRGRPC_NisNetTriple of type lookup
i planned to set the properties of lookup as like this
look up query as select UD_LDAP_USR_COMMON_NAME as NisNetTriple from UD_LDAP_USR
ColumnNames as UD_LDAP_USR_COMMON_NAME
Column captions as UD_LDAP_USR_COMMON_NAME
Column width as 30
Lookup Column Name as UD_LDAP_USR_COMMON_NAME
But when i try to add ColumnName as wht i mentioned above i m getting invalid property exception,update failed
I am not sure about that are we able to use other Connector table prefix with UD into the another processFrom
Let me give update on this issue
Urgent,struck my work here
thanks
NagarajThanks for the reply raghav
I tried but it was not working
I gave like what u specified but no use
It is throwing exception like set look-up query for the field
Any one help me out on this issue
Edited by: Nagaraju Chowdary on Jan 21, 2013 3:41 AM
Edited by: Nagaraju Chowdary on Jan 21, 2013 3:42 AM -
Insert Value(s) in Lookup Flat Multi-valued Table with Java API
I've been looking in MDM Java API Library Reference Guide, MDM SP4 API JavaDoc, and SDN Forums for information on how to Insert/Update different values in a field in the Main Table of a given repository that belongs to a Lookup Flat Multi-valued Table using the Java API with no success.
I also haven't been successful in adding this values in the same way that I'll add a single value, using the MDM Java API, in a single-value Lookup Table (a2iFields.Add(new A2iField(FIELD_CODE,FIELD_VALUE)) for each value I want to add, like for example:
a2iFields.Add(new A2iField("Country","USA")
a2iFields.Add(new A2iField("Country","Mexico")
a2iFields.Add(new A2iField("Country","Germany")
Can anybody point me to the correct documentation that I need to read to fulfill this task? Or, even better, if someone can post a piece of code, I'll be more thankful.
Thanks for your help.HI,
little code example, where you add existing lookup values based on there record id:
int USA = 1;
int GERMANY = 2;
A2iValueArray countryArray = new A2iValueArray();
countryArray.Add(new Value(USA));
countryArray.Add(new Value(GERMANY));
A2iFields record = new A2iFields();
record.Add(new A2iField("Country", new Value(countryArray)));
Please reward points if helpful.
Regards,
Robert -
0HR_PY_PP_1 restricting based on Company Code
Hi ,
I am trying to use extractor HR_PY_PP_1. The extractor pulls all the CC data as it do not allow selection based on Company Code.
When we try to change in extractor in source system it does now show field for selection. So I changed the values in ROOSFIELD table .
Now I see CC for selection but still after making the company code selection , it do not select the data based on that particular company code.
Any idea in this direction will be much appreciated.Vamsi,
I think you do not want to allow to see the some FI user these Tcodes data for specific companies.
I think you have assigned more then one role to user and mentined 3 Tcodes are coming from multiple roles and the user buffer is having multiple entry for the . If this is the case please keep these Tcodes in one role only and restrict the user only in F_BKPF_BUK BUKRS.
If only one role is assigned to you then assigned the required company codes at Orgranisation Level only and it will populated at Authorisation Object F_BKPF_BUK BUKRS for company codes.
I would advise you not to modify the SAP standard object in SU24 because it can distrub the Standard Auth. Object.
Hope this will help.
Lokendra -
Automatic assignment of Partner Function (Dealer) based on Postal Code?
Hi Experts,
We are realizing a project in the Bathroom-Product Industry. Responsible for the service to the end-clients are authorized dealer. When creating a service ticket the responsible dealer has to be assigned automatically to the ticket on the basis of the postal code where the IBase (the product) is installed.
The process is:
1. The client is calling the Interaction Centre and first the IC Agent has to identify the account and the Installed Base (The installed base contains the postal code where the product of the client is installed) of this account.
2. An Interaction Record is created to record this inbound call.
3. Afterwards a Service Ticket is created as a follow-up Document of the Interaction Record. In the moment of the creation of the Service Ticket the correct dealer has to be assigned automatically to the Service Ticket (as a Partner Function not as a Service Organization) on the basis of the postal code of the installed base.
I have the following question! Which are the steps to assign automatically a Business Partner Function to a Service Ticket? We also need to create a Z-Table with the postal codes for which every dealer is responsible.
Example:
Dealer 1 is responsible for the postal codes: 08040 - 08045 and 08056 - 08059. If a client is calling and his product (Installed Base) is installed in Postal Code 08042 or 08054 the dealer 1 has to be assigned to the service ticket.
I hope I could make myself clear ;-)? Anybody can give me a hint how to do that? What are the basic steps?Slightly similiar, originally being an R/3 customer before implementing CRM our dealer equated to sales office.
In the CRM Org model (PPOMA_CRM) in the attributes of the sales office we entered the Regions & Postal codes for that dealer (pain in the arse to do) and in CRM the sales office in the org creates a BP.
We used a org rule for the IR record based on country, region, postal code to determine the appropriate sales org, DC, div, and sales office based onthe zip code. We created a custom partner function to represent the partner number of the BP from the org model. Then we configured a custom relationship "ZORG" "Is partner of sales office" and went into the BP master and assigned the actual dealer number as a partner to BP from the org model that = sales office. From that we configured a custom access sequence to pull the actual dealer number from the org model office relationships.
We looked at territory management, but our dealer is an "org BP" and territory management appeared to want to drive to a person BP number. -
How to change lookup code with Access Level as 'System'
Hi,
I need to append new lookup codes in a lookup type having access level as 'SYSTEM'. Is there any standard way to do the same or just updating the customization level column will do ? Please let me know if you have any solution for this.
Regards
GirishYou can also change the meaning on that value to something like "*** DO NOT USE***". This will make it obvious to the user that he/she should not choose it.
You can try to add a when-validate-record personalization to show error if someone selected a disabled value.
You can also try to modify the list of values associated with the field using personalizations.
If nothing else works, you can use a SQL to uncheck the enabled flag. The risks involved in this are well known.
Hope this answers your question
Sandeep Gandhi
Independent Consultant
513-325-9026 -
Decimal places adjustment based on company code or currency
Hi experts,
my requirement is i have to adjust the decimal places in amount fields of internal table based on company code or currency given by user.
suppose for example in my internal tables having 5 amount fields like 1.50 1.234 1.45 1.34, 1.67 for company code is in01
the same values for VN01 should be like this
150 1234 145 134 167 ....
can any body plz tell me any functional module is there to covert or abapcode?
Thanks in advance,
veena.That code is a bad idea. Why would you hard-code that type of action for currency/amount handling?
@poster: If the output is based on the local currency defined for the specified company code or one specified by the user, then use it. SAP handles amount output automatically with a currency specification because the currency definition identifies where/how the decimal is output.
Just use WRITE as Florian indicated but use the CURRENCY extension instead of DECIMALS. You can do this dynamically based on the company code easily...
A simple 3 line program shows you how this works:
PARAMETERS: p_wrbtr type wrbtr.
write:/ p_wrbtr CURRENCY 'USD'.
write:/ p_wrbtr CURRENCY 'JPY'.
Edited by: Brad Bohn on May 12, 2011 1:07 PM -
Limiting the values in a lookup table
Hello everyone.
I was wondering if it is possible to limit the selectable values in a lookup table based on certain criteria, foremost the content of a separate field.
Example:
A product has a measurement key that determines which sizes are valid for a given product.
Is it possible for MDM to read this key and filter the values of the table holding all the values for all keys?
Hope that was somewhat clear what I'm trying to do.
Best regards,
AndersHello Andres:
I believe that what you should do is to place all the products types into Categories. There, you can give different attributes to each product and therefore, limit what the user can choose as its values.
For instance, you have two products A and B. Each one would have a separate "Measure" field.
Create Categories:
Cat_A
Cat_B
with separate attributes:
Cat_A
|____ Measure_A
Cat_B
|____ Measure_B
And in each Measure <b>Attribute</b> (not field) you can specify the correct values for each category (i.e Product type)
When the user chooses Cat_A as the product type, the Measure_A will appear, with its values. The same will happend for Cat_B
I hope that helps
Regards
Alejandro
Maybe you are looking for
-
Update errors. Camera Raw, Bridge, & Extension Manager.
I have tried several times to update my adobe software, but I keep getting errors for three things- Bridge, Camera Raw, & Extension Manager. Photoshop updates fine. Mac. OS 10.7.5. Using Bridge CS6. Photoshop CS6. Lightroom5. I have tried updating so
-
RAC DB failover from one Datacenter to Standby site
Hi, I have 2 node 10gR2 RAC cluster running on Linux with ASM and E-business suite is configured with this 10gR2 RAC DB. Would like to setup standby site with single instance and not go with RAC for now until we procure additional hardware. Also no p
-
Weblogic server 5.1 startup error
I am using weblogic 5.1 on Solaris 8 (intel) for testing when I start up the server, the following error prompt out java.lang.UnsatisfiedLinkError: no jsafe in java.library.path at java.lang.Throwable.fillInStackTrace(Native Method) at java.lang.Thro
-
ABC Indicator of material master record
Hi, Please explain about the ABC indicator of material master record, use and in which tab it is found? Regards, Ashish
-
XD03 - maximum no. of search hits
Hi, When we search customer master (XD03) system by default is restricting the max. no. of entries to 5000. Do you know where I can get rid of it or extend this limit ? Actual issue is that user wants to see search term of all customers, but it is