Change the value of column from select and insert different
Hi All,
I have written a procedure where i am selecting values from some table and inserting in a new table. The code is below
If you see the line 54 in code, you will find the combined_bu_code is is coming from one procedure and the value of BU is stored in prod.SEM_BACKLOG_LOG table. I have to check, if the combined_bu_code is coming as PWR then insert as POWER in BACKLOG_OTD_NEW table not as PWR.
Looking for a help on this. Thanks in advance
Regards
Edited by: User_Apex on Jun 23, 2011 3:03 AM
Edited by: User_Apex on Jun 23, 2011 3:53 AM
Hi Martin,
sorry i wrote wrong at that time
If you see my code you will find alias of prod.SEM_BACKLOG_LOG is 'a' not 'b' and BU is coming from 'a'
I just want a if startement to be written in this column "SMTC_OTD_CHART.get_combined_bu_code (a.BU)COMBINED_BU_CODE" that if the a.BU is PWR insert as POWER in the BACKLOG_OTD_NEW table
Regards
Edited by: User_Apex on Jun 23, 2011 3:02 AM
Similar Messages
-
CWB-Need to change the eligible salary column from yearly to monthly
Hi All,
I need to change the eligible salary column from yearly to monthly at Employee Allocation from Compensation Workbench.
Kindly help me guys
Regards,
SajidYou can change the activity reference period in the Plan Form - > Not In Program tab from annually to monthly. However, it will impact all the calcuations as it will use monthly values for everything. Please be careful of this. I would suggest testing this (along with posting back the increases to ensure they are annual amounts) before proceeding with this.
-
Change the Value of column of the internal table at run time
Hello Experts,
With the below code i am able to determine the value hold
by internal table at run time for a sepcific column but i am not getting the way
of how to update the internal if one of the value is changed,
lr_desc_table ?= cl_abap_typedescr=>describe_by_data( itab ).
lr_desc_struc ?= lr_desc_table->get_table_line_type( ).
loop at itab assigning <fs_data>.
loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
assign component <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
lv_excel_row = <fs_field>.
CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
EXPORTING
INTEXT = lv_excel_row
IMPORTING
OUTTEXT = lv_excel_row.
assign lv_excel_row to <fs_field>. "this is not changing the value actually hold in internal table
endloop.
endloop.Hi,
Resolved this issue with the code mentioned below.
Code:
loop at lt_export_items assigning <fs_data>.
ls_data = <fs_data>.
loop at lr_desc_struc->components ASSIGNING <fs_comp_wa>.
assign component <fs_comp_wa>-name of structure <fs_data> to <fs_field>.
lv_excel_row = <fs_field>.
CALL FUNCTION 'SCP_REPLACE_STRANGE_CHARS'
EXPORTING
INTEXT = lv_excel_row
IMPORTING
OUTTEXT = lv_excel_row.
concatenate 'ls_data-' <fs_comp_wa>-name into lv_var.
assign (lv_var) to <fs_var>.
<fs_var> = lv_excel_row.
endloop.
modify lt_export_items from ls_data .
clear:ls_data.
endloop.
Take care,
Sanju -
How to get the value of column from previous row to current row?
Hi All,
I am facing a critical problem in SQL query (for reporting purpose (COGNOS)). please reply to my query.
REQUIREMENT: i want to retrive value of a column (this is not a table column, this will be calculated based expression) from previous row to current row.
EXAMPLE:
TABLE NAME: i have to join multiple tables. so, i am not mentioning table names here.
DISPLAY COLUMNS in the report: item, loc, sku, beginval (not table column), endval (not table column, this will calculated based on some expressions), etc. Here, first time the value of BEGINVAL will be taken from some x column name of x table. ENDVAL will calculated based on the expression. For the next row onwards, BEGINVAL will become the value of ENDVAL and the value of ENDVAL will be calculated based on the expression and this expression uses the value of BEGINVAL.
my report will look like below.
ITEM LOC SKU BEGINVAL ENDVAL
1 HYD 1-HYD 10 10+1+2 (13)
2 HYD 2-HYD 13 13+1+2 (16)
3 SEC 3-SEC 16 16+1+2 (19)
4 SEC 4-SEC 19 19+1+2 (22)
etc....
in the above output, BEGINVAL and ENDVAL columns are not part of any table. they are alias column names.if you observe intially BEGINVAL will be assigned to some value, but from subsequent rows, BEGINVAL will become the ENDVAL of previous row.
Please help me on how to write this query?Hi, please find the detail description of the problom.
DDL (table scripts)
ITEM
CREATE TABLE ITEM
ITEM VARCHAR2(50 CHAR) NOT NULL,
DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
UOM VARCHAR2(50 CHAR)
SKU
CREATE TABLE SKU
ITEM VARCHAR2(50 CHAR) NOT NULL,
LOC VARCHAR2(50 CHAR) NOT NULL,
OH float
SKUPROJSTATIC
CREATE TABLE SKUPROJSTATIC
ITEM VARCHAR2(50 CHAR) NOT NULL,
LOC VARCHAR2(50 CHAR) NOT NULL,
STARTDATE DATE
VehicleLoad
CREATE TABLE VEHICLELOAD
LOADID VARCHAR2(50 CHAR) NOT NULL,
DESCR VARCHAR2(50 CHAR) DEFAULT ' ' NOT NULL,
SHIPDATE DATE DEFAULT TO_DATE('01/01/1970','MM/DD/YYYY') NOT NULL,
ARRIVDATE DATE
VEHICLELOADLINE
CREATE TABLE VEHICLELOADLINE
LOADID VARCHAR2(50 CHAR) NOT NULL,
ITEM VARCHAR2(50 CHAR) NOT NULL,
QTY float(126)
DML scripts
I can't provide the the DML scripts, because its very huge data.
Main QUERY is below.
below is the query which i have to write and execute.
select
i.item,
i.descr,
i.unitsperpallet,
sp.loc,
sp.startdate,
'Crucial_IND',
LAG (EndBal,1,0) OVER (ORDER BY STARTDATE) BeginBal,
SP.FCSTCUSTORDERS CustOrders,
SP.COMMITINTRANSOUT,
SP.RECARRIV,
SP.TOTINTRANSIN,
(BeginBal - sp.FCSTCUSTORDERS - sp.COMMITINTRANSOUT + sp.TOTINTRANSIN ) EndBal,
'CuttingQty',
VLL.QTY,
vl.source,
vl.arrivdate,
vl.shipdate,
vl.loadid,
s.oh
from item i, skuprojstatic sp, sku s, VehicleLoad vl, VehicleLoadLine vll
where sp.item = i.item
and s.item=i.item
and sp.item =s.item (+)
and sp.loc = s.loc (+)
and vll.item = s.item
and vll.loadid = vl.loadid
and to_char(sp.startdate ,'mm/dd/yyyy') = to_char(vl.arrivdate,'mm/dd/yyyy')
and sp.loc = vl.dest (+)
order by sp.startdate
problem description: in the above query, BeginBal and EndBal is what i am looking for. when i execute this query, oracle throwing an error saying that alias names can't be used as expressions. For the first row, the BeginBal should be the value sku.OH and for the subsequent rows, this value will be the previous row value of EndBal. -
Forall change the values of columns in his order
Hi all,
I have a problem by using the forall-clause.
In the example you can see, that I declare a collection type which is based on a table structure with rowtype.
A select-statement fill my collection-type correctly.
After executing a insert with the forall-clause, a follwing select-statement shows me, that the values of my data are not in the correct column. The values of 3 columns are changed in there order.
But I know that the data correctly stored in the collection-type
How it can be? Actually, I cant believe that.
Who can help me?
Example
declare
type foo_type is table of my_tab%rowtype;
foo foo_type;
begin
execute immediate 'select * from any_table'
bulk collect into foo;
forall i in foo.first..foo.last
insert into my_tab
values foo(i);
end;
Thanks in advanced for any help.
MichaelHi,
the tables are only fictitious.
any_table can have
any_col1 number,
any_col2 varchar2(10)
any_col3 number
my_tab can have
my_col1 number,
my_col2 varchar2(10)
my_col3 number
In the program-code the structure of the collection-type is the same of the table in that I want to write the data.
Thanks
Michael -
How to Change the Value Field Type of a Value Field
Hi,
How can I change the value field type from Currency to Quantity of a value field? I have tried to do it in KEA6. I can change the value field and its description, but not the value field type from currency to qty. If I change this config, is there any other changes that I need to make so there is no side issue of this change?Hi Prem,
Once you created value field as quantity or currency, you can not change this nature of value field. Based on this, system creates lots of data and tables. For this reason system will not allow any changes in quantity or currency.
Alternative way is to remove the old value field and create a new value field assign to operating concern and put all your seetings.
Please let me know if you require any clarifications.
Thank you,
Regards,
Santosh
Reward points if helpful. -
Itunes 10.6.1.7 problem: when I change the file "media type" from 'Music' to 'Podcast' the file disapears from ITUNES. I do this via (1) right click, (2) select 'Get Info', (3) select 'options' tab, and (4) change media type. What is the problem?
Hi Memalyn
Essentially, the bare issue is that you have a 500GB hard drive with only 10GB free. That is not sufficient to run the system properly. The two options you have are to move/remove files to another location, or to install a larger hard drive (eg 2TB). Drive space has nothing to do with SMC firmware, and usually large media files are to blame.
My first recommendation is this: download and run the free OmniDiskSweeper. This will identify the exact size of all your folders - you can drill down into the subfolders and figure out where your largest culprits are. For example, you might find that your Pictures folder contains both an iPhoto Library and copies that you've brought in from a camera but are outside the iPhoto Library structure. Or perhaps you have a lot of purchased video content in iTunes.
If you find files that you KNOW you do not need, you can delete them. Don't delete them just because you have a backup, since if the backup fails, you will lose all your copies.
Don't worry about "cleaners" for now - they don't save much space and can actually cause problems. Deal with the large file situation first and see how you get on.
Let us know what you find out, and if you manage to get your space back.
Matt -
Probleme changing the value of a variable in movieclip from my scene
Hello,
i have a probleme changing the value of a variable in movieclip from my scene. i explain: I have combobox on my scene containing categories, and in the scene i load an xml file containing links to php files that work with the combobox.
Also on the scene i have a movieclip "filmstrip", inside this movieclip on the first frame i have a script loading the php file selected in the scene . i use a load() function with a variable "theUrl" inside like this : T.load(theUrl);.
In my scene i want to change the value of "theUrl" inside the movieClip filmstrip. I tried filmstrip.theUrl = url; But it doesnt work
the xml file
<?xml version="1.0" encoding="ISO-8859-1"?>
<slideshow>
<area title1="10 Last updated" link1="link1.php"/>
<area title1="special" link1="link2.php"/>
</slideshow>
here is the code on my scene:
var link1:Array = new Array();
var LINK:String;
var url:String;
var whoOn:Number;
whoOn=0;
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for (i=0; i<photos.length; i++) {
_root.link1.push(photos[i].attributes.link1);
url=link1[whoOn];
filmstrip.theUrl=url;//<<--HERE
x.load("category.xml");
var cbListener:Object = new Object();
cbListener.change = function(event_obj:Object) {
trace(select.selectedItem.label);
if (select.selectedItem.label == "Last updated") {
whoOn=0;
} else if (select.selectedItem.label == "Special") {
whoOn=1;
url=link1[whoOn];
filmstrip.theUrl=url; //<<-----HERE
select.addEventListener("change",cbListener);
here is the code inside the movie clip "filmstrip"
var T:XML = new XML();
T.ignoreWhite = true;
T.onLoad = function(xml) {
etc etc etc }
T.load(theUrl); //<<---HERE it still undefinedYESSSS . Thanks you very much Kglad it wotk i put all in a function inside the filmstrip function Tload(theUrl){etc ect}and in the root i call it like this filmstrip.Tload(theUrl); and it works
code in the root var link1:Array = new Array();
var LINK:String;
var url:String;
var whoOn:Number;
whoOn=0;
var x:XML = new XML();
x.ignoreWhite = true;
x.onLoad = function(success) {
var photos:Array = this.firstChild.childNodes;
for (i=0; i<photos.length; i++) {
_root.link1.push(photos[i].attributes.link1);
url=link1[whoOn];
theUrl=url;
filmstrip.Tload(theUrl);//<<--HERE
x.load("category.xml");
var cbListener:Object = new Object();
cbListener.change = function(event_obj:Object) {
trace(select.selectedItem.label);
if (select.selectedItem.label == "Last updated") {
whoOn=0;
} else if (select.selectedItem.label == "Special") {
whoOn=1;
url=link1[whoOn];
theUrl=url;
filmstrip.Tload(theUrl);//<<-----HERE
select.addEventListener("change",cbListener); -
Can we change the value of a variable in the driver program from sapscript?
Hello Experts,
I am currently developing a form wherein I need to change the value of a variable defined in the standard
driver program through the sapscript form. Unfortunately, I cannot customize this standard program since this is used by many other
subsidiaries. So, is there anyway that I can change a variable defined in the driver program via sapscript?
I tried to use a PERFORM to change its value but it is not working.
I hope you can help me guys. Thank you and take care!SAP SCRIPT:
/: PERFORM GET_ATTNDEE_INFO IN PROGRAM ZHR_TRNG
/: USING &PPVAR-EOBJD&
/: CHANGING &ATTND&
/: ENDPERFORM
Executable Prog.:
REPORT ZHR_TRNG.
FORM GET_ATTNDEE_INFO TABLES IN_PAR STRUCTURE ITCSY
OUT_PAR STRUCTURE ITCSY.
DATA : LOC_CODE(8),
WF_NAME LIKE PA0001-ENAME, "----Location Code
WF_SOBID LIKE HRP1001-SOBID. "----Business Event Code
DATA: BEGIN OF ITAB_ECODE OCCURS 0,
ECODE(8),
END OF ITAB_ECODE.
DATA: NAME1 TYPE STRING.
READ TABLE IN_PAR INDEX 1.
LOC_CODE = IN_PAR-VALUE.
SELECT SOBID FROM HRP1001 INTO WF_SOBID
WHERE OBJID = LOC_CODE AND OTYPE ='E' AND PLVAR = '01' AND SCLAS = 'P'.
APPEND WF_SOBID TO ITAB_ECODE .
ENDSELECT.
IF SY-SUBRC = 0.
LOOP AT ITAB_ECODE.
SELECT SINGLE ENAME FROM PA0001 INTO WF_NAME
WHERE PERNR = ITAB_ECODE-ECODE ." AND ENDDA >= '31.12.9999' .
CONCATENATE 'Mr ' WF_NAME ',' NAME1 INTO NAME1.
IF SY-SUBRC = 0 .
OUT_PAR-NAME = 'ATTND'.
OUT_PAR-VALUE = NAME1.
APPEND OUT_PAR.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. "GET_USR_INFO -
I cannot change the value in about:newtab from "newtab" to "blank." The dialog is displayed but when I click Ok, the value is not changed.
===Answer===
Comment on usual method and solution, by a forum Moderator.
As long as there are no confounding factors, such as certain extensions, or a user.jsfile the procedure is as follows
# Open a new tab and type "about:config" in the address bar.
# In the Search bar type: "newtab"
# Locate and double click "browser.newtab.url"
# In the "Enter String Value" box change "'''about:newtab'''" to "'''about:blank'''" and click OK.
# Verify that the value has changed and now all new tabs will be blank.
See post under by ''pirate048'' [/questions/976589?page=2#answer-509482] ~J99Have to say that I rather agree with Mark..all we want is a simple, unadorned clean page that doe not track and show usage!! WHY NOT!! Is it too simple for developers..we aren't all (nor do we want to be!) software experts! Come on Mozilla..tidy up and clean up..it might be a quicker programme too!!
-
How do I change the number of columns within a text box? I need to go from 3 columns to 1. The insert column is highlighted and column break does not work for this.
Pages '09 does not seem to allow layout breaks in Textboxes.
Pages 5.2 has the same limitation.
Use multiple linked Textboxes in Pages '09 to get the layout you want or create your layout in a Word Processing template in the document layer.
Peter -
How to change the values of Map Region Column "REGION_NAME"
Hi guys,
To correspond with the values in my "CITY" column, I have to change the values of Region_name column in the map..
region_name column contains the name of the territories in English
but City column in my table contains the names of the territories in Arabic.
To enable the link of the map, the values of both column ( CITY in my table, REGION_NAME in the map region ) should be identical.
How can I change the values of REGION_NAME COLUMN ???
This is the first time for me I deal with maps, and I hope my question is clear..
Regards,
FatehSolved by using the following code
var particulars = this.parent.COURSENAME.resolveNode("#items");
this will bring the dropdown list into the variable particulars
then
for (var i = 1; i < particulars.nodes.length; i++)
p = particulars.nodes.item(i);
here p.value will have the dropdown line by line;
add your valdiations etc -
Just setting up iCloud on my iMac 10.9.2, my problem is when trying to sign out/off from iCloud it comes up with a verification code that is being sent to my land line, I'd changed the numbers in my Apple ID and they show as changed but the land line number still shows as number that the verification code is being sent, I prompt "Don't have access to this phone" and that's no help at all. The only way I can sign out /off from iCloud is to uncheck everything that I wanted to keep in the cloud????
Thanks in advance for any help.Skip the iCloud sign in for now.
Once you reach the home page, go to settings and sign out of FaceTime and Messages. This should also sign you out of iCloud.
Go to iCloud in settings and sign in with the correct Apple ID.
If that does not work
Skip the iCloud sign in
Go to Apple ID.apple.com and sign in
Change your Apple ID to the old one
Delete iCloud account on your device with the old Apple ID and the same password.
Go back to the website, change your Apple ID back to the current one. You will receive an email to verify the account. Verify first.
Sign into iCloud on your device with the correct Apple ID and password -
In PC I have changed the default app location from (c:/users/username/My Music/iTunes) to other (d:iTunes) and copied the previous content to new location and changed the Default location in Edit preference. Now in iTunes, my previous apps are not visible. Is there any solution to this?
wjosten - thanks very much for the detailed instructions. I'll try this as soon as I get my replacement and it looks like you'll probably end up getting the green tick
-
How to change the value from one input control to another input control?
Hi Experts,
I want to change the value from one input control to another input control. For Example if i change month in first tab. it should reflect in second tab also. How should we acheive through input control or some other option.
Here I attached screen shot.Please help me for thisHi,
It is not possible to have Input controll in all tabs that will be set from another .
But There is one workaround .
Follow the link below .
http://davidlai101.com/blog/2013/08/13/web-intelligence-input-control-that-affects-all-tabs/
Maybe you are looking for
-
Unexpected synonym creation via a materialized view DDL statement
While I was doing some testing for a future materialized view creation I did this... create materialized view yes as select empno, ename from emp;Oracle created a table called "YES" and a materialized view called "YES". Then I did this... create mate
-
HT4623 UPDATING MY IOS TO 5.0
i am trying to update my ios to 5.0 so i can use certain apps. i go to settings/general, but the option for updating isnt there, im not tech savey so step by step on how i can update would be nice. thank you
-
How do I send shape behind text?
I see where the options are to "Send backward" or "send forward" but they're not highlighted, meaning I can't click on them. I'm trying to make a colored square go behind my text for a poster. Please help!
-
Data Warehouse using MSSQL - SSIS : Installation best practices
Hi All, I am working on a MSSQL - 2008 R2 , based data warehouse building. The requirement is to read source data from files, put it in stage database and perform data cleansing etc .. and then move the data to data warehouse db .. Now the
-
How to pin sequences in the shared pool for RAC?
We have a RAC environment with two instances. I want to pin some sequences in the shared pool to boost the performance. Do I need to pin them in both of the instances or just pin them in one instance? Thanks in advance