why it doesnt save in table [message #599776] |
Mon, 28 October 2013 17:42 |
|
nataliafoster26
Messages: 64 Registered: October 2013
|
Member |
|
|
why doesnt it not save in my table s_sales_center
vCurrCode S_SALES_CENTER.inf_src_db%TYPE;--32276
IF pvGlobalReg = 'AUS' THEN --32276
vCurrCode := 'USD';
ELSIF pvGlobalReg = 'AEU' THEN
vCurrCode := 'BPS';
ELSIF pvGlobalReg = 'NULL' THEN
vCurrCode := 'BPS';
END IF;
**************************************
<TR>
<TD class="tablelabel">Base Currency:</TD>
<TD CLASS="tablelabel">
<INPUT TYPE="TEXT" MAXLENGTH="35" SIZE="35" disabled="true" tabindex="19" CLASS="reqinput1" value="'||Util_Pkg.pv(Get_Currency_Desc(vCurrCode))||'" >
</TD>
</TR>
here is get_currency_code
CREATE OR REPLACE FUNCTION RVELAZQUES.Get_Currency_Desc(pvCurrCd VARCHAR2) RETURN VARCHAR2 AS
CURSOR c_val IS
SELECT des1 AS ddesc
FROM sqltime.sy_curr_code
WHERE currency_code = pvCurrCd;
--
vret sqltime.sy_curr_code.des1%TYPE;
BEGIN
BEGIN
--
OPEN c_val;
FETCH c_val INTO vret;
CLOSE c_val;
--
EXCEPTION
WHEN OTHERS THEN
vret := NULL;
END;
RETURN vret;
--
END Get_Currency_Desc;
/
the problem is it saves in the input text but not in the table s_sales_center(collumn currency_code)
when i click save it saves it and im able to see the changes on the frontend,but on the table
it goes blank
|
|
|
|
Re: why it doesnt save in table [message #599778 is a reply to message #599777] |
Mon, 28 October 2013 18:03 |
|
nataliafoster26
Messages: 64 Registered: October 2013
|
Member |
|
|
yes i totally know that
what im trying to do is get
to default to the Sales Center's base currency
b) If INF_SRC_DB = AUS, will default to USD, otherwise default to BPS
and to save it when clicking on save on the table.
this is talbe sy_curr_code
CREATE TABLE SQLTIME.SY_CURR_CODE
(
CURRENCY_CODE VARCHAR2(3 BYTE) NOT NULL,
DES1 VARCHAR2(30 BYTE) NOT NULL,
CURRENCY_SYMBOL VARCHAR2(3 BYTE) NOT NULL
)
and talbe s_sales_center
CREATE TABLE PREMIER.S_SALES_CENTER
(
SALES_CENTER_ID NUMBER(12) NOT NULL,
CURRENCY_CODE VARCHAR2(3 BYTE),
MASTER_SALES_CENTER_ID NUMBER(12),
DISPATCH_PHONE_NUM VARCHAR2(20 BYTE),
INF_SRC_DB VARCHAR2(3 BYTE) NOT NULL,
COLLECT_RDP VARCHAR2(1 BYTE) DEFAULT 'Y',
)
|
|
|
|
|
|
Re: why it doesnt save in table [message #599805 is a reply to message #599781] |
Tue, 29 October 2013 02:27 |
|
Littlefoot
Messages: 21807 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
nataliafoster26 the problem is it saves in the input text but not in the table s_sales_center.
when i click save it saves it and im able to see the changes on the frontend,but on the table it goes blank
What tool do you use? What is "input text"? Where do you click "Save"? What does that button exactly do? Did you COMMIT? If not, you should have.
|
|
|