Plz. Help in query. (Urgnet)
Hi, I have a table in which records are as follows
Invoice Nbr. Item Rate Amount
946862 Bis-20 735 2940
946862 Bis-20 504 5040
I want to wirte the query to display the records like
Invoice Nbr. Item Rate Amount Rate Amount946862 CAR20 735 2940 504 5040
Means If same item exists with different rates in same invoice they should display like above
How possible with SQL only
Thanks
Hassan
Hi all,
I am replying this for your information. I used analytical functions and create an in line view. the query gave me the required results. This would help a lot of you. And if there is an error in my query i also would like to correct that.
select a.invoice_id, a.titem_id,
sum(decode(a.seq_no,1,rate_charged,0)) rate1, sum(decode(a.seq_no,1,amount,0)) amount1,
sum(decode(a.seq_no,2,rate_charged,0)) rate2, sum(decode(a.seq_no,2,amount,0)) amount2,
sum(decode(a.seq_no,3,rate_charged,0)) rate3, sum(decode(a.seq_no,3,amount,0)) amount3 ,
sum(decode(a.seq_no,4,rate_charged,0)) rate4, sum(decode(a.seq_no,4,amount,0)) amount4,
sum(decode(a.seq_no,5,rate_charged,0)) rate5, sum(decode(a.seq_no,5,amount,0)) amount5
from (
select invoice_id, ii.titem_id,ii.rate_charged,amount,
row_number() over(partition by equse_gkey order by ii.trate_rate ) seq_no
from invoice_detail ii
where ii.invoice_id in (947753)
and ii.titem_id in (select Id from rates where tserv_id='BIS-20')) a
group by a.invoice_id, a.titem_id
Thanks
Similar Messages
-
Plz help selection screen desplay issue
Hi experts
plz help
small query
i have two fields
dateto and date from in my selection screen
i ill have to use parameter for both the feilds i cannot use select-options here
but wen i m using parameter its coming line by line
like
p_dateto "i/o feild"
but i want like we get in select option
p_dateto "i/o feild" p_datfrm "i/o feild"
plz help me doin this .
thanx i9n advance.hey,
why dont u use select-options?
but if u want parameters only,
u can do like below.
selection-screen begin of screen <scrno>.
selecion-screen begin of line.
parameters: date_from type sy-datum,
date_to type sy-datum.
selection-screen end of line.
selection-screen end of screen <scrno>.
Message was edited by:
Hymavathi Oruganti -
Plz help don't know how to create a query and link it to a UDF
hi,
i am new to business one and however hard i am trying to use a query to link it to a UDF, it is not working. i think i am doing the whole thing wrong,so ill just post one problem i have and if any one of u can explain to me in steps i may be able to learn to link other queries and UDFs.so plz help me out .
problem:
i want to display the account balance of every customer/vendor whenvever i open a marketing document. i have created a UDF for the marketing documents in the title with name and description 'account balance'.
Now how do i link the customer/vendor name field to this UDF so that the query generated will show the account balance of the corresponding customer/vendor.plz tell me in steps as to what tables to choose ,what fields to choose, what conditions and relatoins to use in a query wizard
thank youhi,
A/R invoice
for name UDF:
SELECT T0.CardName FROM OCRD T0 WHERE T0.CardCode = $[OINV.CardCode]
for balance UDF:
SELECT T0.Balance FROM OCRD T0 WHERE T0.CardCode = $[OINV.CardCode]
A/P invoice
for name UDF:
SELECT T0.CardName FROM OCRD T0 WHERE T0.CardCode = $[OPCH.CardCode]
for balance UDF:
SELECT T0.Balance FROM OCRD T0 WHERE T0.CardCode = $[OPCH.CardCode]
FOR OTHER FORMS ONLY CHANGE THE END OF THE QUERY FOR Example
$[OPCH.CardCode]
OPCH is the table name, change it to other table.
save the query and set it to customer code for refresh in A/R invoice
save the query and set it to Vendor code for refresh in A/P invoice
regards
sandip -
Hi Friends
Here is my query,
I am changing the tcode FBL3N to add one extra field into it and to display data in the name1 field for the spcific entries in the selection screen,
After selecting the All item radio button and giving the range in the select-options when i am pressing F8 it is giving me the correct output,after that when i am trying to display the name1 field by selecting the ctrl+f8 button and pressing the apply button it is giving me the error as
"An internal error has arisen in the form routine ANALYZE_ACT_FIELDCAT
for program RFITEM_INC.
This is due to inconsistencies between table T021S (special fields) and
structure RFPOSEXT."
I changed everything to Y* but still it is giving the error.
Plz help me in this if someone face the same prob or someone having idea on this.
Thanks a lot in Advance
Mrutyun^Hi Mrutyunjaya,
Did you manage to resolve this error?
Thanks and Regards
Pras -
Plz help in tuning this query......
SELECT "LAN","VEF_REF_NO","VF_TYPE_CODE","APPLICANT_TYPE","MANDATORY","OPTIONAL","COMPLETE","DT_COMPLETED","REFIRENO","ROLE","USER_ID","DT_LASTUPDATED","TEMPLATEFIRED"
FROM T_VER_STRATEGY_DETAILS M
WHERE VF_TYPE_CODE =1 AND
APPLICANT_TYPE ='A' AND
DT_LASTUPDATED=
(SELECT MAX(DT_LASTUPDATED)
FROM T_VER_STRATEGY_DETAILS
WHERE LAN = M.LAN AND
VF_TYPE_CODE =1 AND APPLICANT_TYPE ='A')
This seems to be a correlated query.
i tried using combined index on
(VF_TYPE_CODE ,APPLICANT_TYPE ,DT_LASTUPDATED)
and another index on
(LAN,VF_TYPE_CODE ,APPLICANT_TYPE ) but the plan or cost remains unchained.
plz help[url http://forums.oracle.com/forums/thread.jspa?threadID=501834&tstart=0]When your query takes too long...
-
hi
guys
Here is my query regarding the ABAPQuery.
I have create an infoset named ZPMPLN_ITEM under that there is three tables MPLA,MPOS
I want to display some fields from MPOS TABLE IN MPLA TABLE , how can i achieve this .
i have already joined both the table using SQ02 but i am not getting the procedure to insert the field from one table to another table .
Plz help me if anybody having any idea on this.
thanks a lot
mrutyun^Thanks Jeff - you pointed me in the right direction. It was the Auto-Synchronize
setting on the window layout.
Nicky. -
Plz help prob with a query and.. a trigger
hi..
1)i've created a view.gave the commit..
now when i execute this query i get no rows selected...
sql>select text from user_views where view_name='d1_v';even when i give sql>select * from user_views; all i see are column names and nothing else..
do i need to grant my user any privilige. my user has create any view privilige.
2)
is it possible for me to create a trigger that updates records by itself for every 6 months by adding 1000 to the sal field
i tried
create or replace trigger after logon on emp ..............like that
but i receive an error saying system triggers cannot be based on tables or views..
plz help me out..
thank u
rajiv1. Try "select text from user_views where view_name='D1_V';
BTW, no need to use "commit", CREATE VIEW is a DDL command, and DDLs do implicit commit.
2. Why do you want to use triggers ? You can do that in at least two other ways : cron jobs and Oracle jobs. -
Plz help Either new idea nor tune this query
Hi,
I had two queries like below(1 &2).And As per my requirement i need to merge two queries to as one query and i wrote that one using decode(please see Resulted query3).But it's taking too much time .PLease help to tune the
3rd query or suggest me a new idea.
1)
select ts.institution_id,tsd.test_alias,count(1) from test_detail td,test_session_detail tsd,test_session ts where td.test_detail_id=tsd.test_detail_id and tsd.test_session_id=ts.test_session_id and TRUNC(test_start_date) BETWEEN to_date('02/01/2009', 'MM/DD/YYYY') AND to_date('08/04/2009', 'MM/DD/YYYY') group by ts.institution_id,tsd.test_alias
2)
select a.INST_SITE_ID, a.INSTITUTION_ID_DISPLAY, a.institution_name, a.SITE_ID_DISPLAY, a.site_name, a.region_name,CASE WHEN a.state_name = 'Other' THEN a.OTHER ELSE a.state_name END state_name from vueinstitutionsite a,(select distinct institution_id from test_session a,test_session_detail b where a.test_session_id=b.test_session_id and trunc(test_start_date) between to_date('08/01/2009','MM/DD/YYYY') and to_date('08/04/2009','MM/DD/YYYY'))b where a.inst_site_id=b.institution_id order by a.INSTITUTION_ID_DISPLAY
Resulted query
*3)*
SELECT max(a.institution_id_display)institution_id
,max(a.institution_name)institution_name,max(a.site_id_display)site_id,
max(a.site_name)site_name,max(a.region_name)region_name,
count(decode(tsd.test_alias,'rd',tsd.test_alias))rd,
count(decode(tsd.test_alias,'ss',tsd.test_alias))ss,
count(decode(tsd.test_alias,'resk',tsd.test_alias))resk,
count(decode(tsd.test_alias,'snmn',tsd.test_alias))snmn,
count(decode(tsd.test_alias,'clm',tsd.test_alias))clm,
count(decode(tsd.test_alias,'lgus',tsd.test_alias))lgus,
count(decode(tsd.test_alias,'loeplis',tsd.test_alias))loeplis,
count(decode(tsd.test_alias,'arit',tsd.test_alias))arit,
count(decode(tsd.test_alias,'alge',tsd.test_alias))alge,
count(decode(tsd.test_alias,'wp_i3',tsd.test_alias))wp_i3,
count(decode(tsd.test_alias,'wp_esl',tsd.test_alias))wp_esl,
count(decode(tsd.test_alias,'css',tsd.test_alias))css,
count(decode(tsd.test_alias,'crd',tsd.test_alias))crd,
count(decode(tsd.test_alias,'carit',tsd.test_alias))carit,
count(decode(tsd.test_alias,'calge',tsd.test_alias))calge,
count(decode(tsd.test_alias,'cclm',tsd.test_alias))cclm,
count(decode(tsd.test_alias,'cresk',tsd.test_alias))cresk,
count(decode(tsd.test_alias,'csnmn',tsd.test_alias))csnmn,
count(decode(tsd.test_alias,'clgus',tsd.test_alias))clgus,
count(decode(tsd.test_alias,'csp',tsd.test_alias))csp,
count(decode(tsd.test_alias,'cspb',tsd.test_alias))cspb,
count(decode(tsd.test_alias,'localtest',tsd.test_alias))localtest
FROM test_detail td,test_session_detail tsd,test_session ts,vueinstitutionsite a
WHERE td.test_detail_id = tsd.test_detail_id
AND tsd.test_session_id = ts.test_session_id
and a.inst_site_id = ts.institution_id
AND TRUNC(test_start_date) BETWEEN to_date('08/27/2009', 'MM/DD/YYYY') AND to_date('09/02/2009', 'MM/DD/YYYY')
GROUP BY ts.institution_id
order by institution_id
Plz help me ASAP
thanks,
RajI'm posting DDL scripts as a two posts due to maximum exceeding length
*5 tables are in Underlying view*
1)INSTITUTION
CREATE TABLE "CATTEMP"."INSTITUTION"
( "INSTITUTION_ID" NUMBER NOT NULL ENABLE,
"LEVEL_TYPE_ID" NUMBER NOT NULL ENABLE,
"REGION_CODE" VARCHAR2(4 BYTE) NOT NULL ENABLE,
"BELONGS_TO" NUMBER NOT NULL ENABLE,
"NAME" VARCHAR2(200 BYTE) NOT NULL ENABLE,
"DESCRIPTION" VARCHAR2(200 BYTE),
"ADDRESS_1" VARCHAR2(100 BYTE),
"ADDRESS_2" VARCHAR2(100 BYTE),
"CITY" VARCHAR2(30 BYTE),
"STATE" VARCHAR2(30 BYTE),
"ZIP" VARCHAR2(20 BYTE),
"COUNTRY" VARCHAR2(30 BYTE),
"LOCATION" VARCHAR2(30 BYTE),
"PHONE" VARCHAR2(20 BYTE),
"FAX" VARCHAR2(20 BYTE),
"OTHER" VARCHAR2(30 BYTE),
"INSTITUTION_CATEGORY" VARCHAR2(100 BYTE),
"INSTITUTION_TYPE" VARCHAR2(30 BYTE),
"IS_CB_MEMBER" CHAR(1 BYTE),
"ATB_TESTING" CHAR(1 BYTE),
"HOW_DID_YOU_HEAR" VARCHAR2(100 BYTE),
"FIRST_LOGIN_DATE" DATE,
"ACTIVE_STATUS" VARCHAR2(20 BYTE),
"AVAILABLE_TEST_UNITS" NUMBER,
"STUDENT_BODY_SIZE" VARCHAR2(30 BYTE),
"CREATED_ON" DATE DEFAULT SYSDATE,
"MODIFIED_ON" DATE DEFAULT SYSDATE,
"CREATED_BY" NUMBER,
"MODIFIED_BY" NUMBER,
"ACCUPLACER_USER" CHAR(1 BYTE),
"RESEND_MAIL_DATE" DATE,
"LAST_ACTIVITY_DATE" DATE,
"ACCT_ACTIVATION_DATE" DATE,
"INSTITUTION_ID_DISPLAY" VARCHAR2(10 BYTE),
"LAST_CB_UPDATE" DATE,
CONSTRAINT "PK_INSTITUTION" PRIMARY KEY ("INSTITUTION_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8001"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8002"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8003"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8004"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8005"
TABLESPACE "CAT_IDX_TB5") ENABLE,
CONSTRAINT "UK_INSTITUTION" UNIQUE ("INSTITUTION_ID_DISPLAY")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ENABLE,
CONSTRAINT "FK_INSTITUTION1" FOREIGN KEY ("LEVEL_TYPE_ID")
REFERENCES "CATTEMP"."LEVEL_TYPE_MASTER" ("LEVEL_TYPE_ID") ENABLE,
CONSTRAINT "FK_INSTITUTION2" FOREIGN KEY ("REGION_CODE")
REFERENCES "CATTEMP"."REGION" ("REGION_CODE") ENABLE,
CONSTRAINT "FK_INSTITUTION3" FOREIGN KEY ("BELONGS_TO")
REFERENCES "CATTEMP"."INSTITUTION" ("INSTITUTION_ID") ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA"
PARTITION BY HASH ("INSTITUTION_ID")
(PARTITION "SYS_P8001"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8002"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8003"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8004"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8005"
TABLESPACE "CAT_DATA") ;
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."LEVEL_TYPE_ID" IS 'IDENTIFIES WHETHER THIS IS AN INSTITUTION OR SITE';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."REGION_CODE" IS 'REGION TO WHICH THE INSTITUTION BELONGS TO';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."PHONE" IS 'PHONE NUMBER';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."FAX" IS 'FAX NUMBER';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."HOW_DID_YOU_HEAR" IS 'HOW DID YOU HEAR INFORMATION';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."FIRST_LOGIN_DATE" IS 'USED TO FIND FIRST LOGIN DATE INFORMATION';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."ACTIVE_STATUS" IS 'CURRENT ACTIVATION STATUS';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."AVAILABLE_TEST_UNITS" IS 'AVAILABLE TEST UNITS WITH THE INSITUTION';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."STUDENT_BODY_SIZE" IS 'STUDENT SIZE UNDER THE INSTITUTION';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."CREATED_ON" IS 'INSITUTION CREATION DATE';
COMMENT ON COLUMN "CATTEMP"."INSTITUTION"."MODIFIED_ON" IS 'LAST MODIFIED DATE';
COMMENT ON TABLE "CATTEMP"."INSTITUTION" IS 'USED TO STORE THE DETAILS OF AN INSTITUTE (INSTITUTION, SITE)';
CREATE INDEX "CATTEMP"."FK_INSTITUTION1_I" ON "CATTEMP"."INSTITUTION" ("LEVEL_TYPE_ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
CREATE INDEX "CATTEMP"."FK_INSTITUTION2_I" ON "CATTEMP"."INSTITUTION" ("REGION_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
CREATE INDEX "CATTEMP"."INSTITUTION_IDX1" ON "CATTEMP"."INSTITUTION" ("BELONGS_TO", "LEVEL_TYPE_ID", "ACTIVE_STATUS")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
CREATE INDEX "CATTEMP"."INSTI_ID_NAME_COUN_DISP_IDX" ON "CATTEMP"."INSTITUTION" ("INSTITUTION_ID", "NAME", "COUNTRY", "INSTITUTION_ID_DISPLAY")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA" ;
CREATE INDEX "CATTEMP"."INSTUTITION_NC_IDX" ON "CATTEMP"."INSTITUTION" ("NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA" ;
CREATE INDEX "CATTEMP"."INST_ID_DISP_IDX" ON "CATTEMP"."INSTITUTION" (SUBSTR("INSTITUTION_ID_DISPLAY",8,3))
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA" ;
CREATE UNIQUE INDEX "CATTEMP"."PK_INSTITUTION" ON "CATTEMP"."INSTITUTION" ("INSTITUTION_ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8001"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8002"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8003"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8004"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8005"
TABLESPACE "CAT_IDX_TB5") ;
CREATE UNIQUE INDEX "CATTEMP"."UK_INSTITUTION" ON "CATTEMP"."INSTITUTION" ("INSTITUTION_ID_DISPLAY")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;2)COUNTRY
CREATE TABLE "CATTEMP"."COUNTRY"
( "COUNTRY_CODE" VARCHAR2(10 BYTE) NOT NULL ENABLE,
"COUNTRY_NAME" VARCHAR2(30 BYTE),
"CREATED_ON" DATE DEFAULT SYSDATE,
"MODIFIED_ON" DATE DEFAULT SYSDATE,
"CREATED_BY" NUMBER,
"MODIFIED_BY" NUMBER,
CONSTRAINT "PK_COUNTRY" PRIMARY KEY ("COUNTRY_CODE")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P7936"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P7937"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P7938"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P7939"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P7940"
TABLESPACE "CAT_IDX_TB5") ENABLE,
CONSTRAINT "UK_COUNTRY" UNIQUE ("COUNTRY_NAME")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA"
PARTITION BY HASH ("COUNTRY_CODE")
(PARTITION "SYS_P7936"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P7937"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P7938"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P7939"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P7940"
TABLESPACE "CAT_DATA") ;
CREATE UNIQUE INDEX "CATTEMP"."PK_COUNTRY" ON "CATTEMP"."COUNTRY" ("COUNTRY_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P7936"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P7937"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P7938"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P7939"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P7940"
TABLESPACE "CAT_IDX_TB5") ;
CREATE UNIQUE INDEX "CATTEMP"."UK_COUNTRY" ON "CATTEMP"."COUNTRY" ("COUNTRY_NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
3)REGION
CREATE TABLE "CATTEMP"."REGION"
( "REGION_CODE" VARCHAR2(4 BYTE) NOT NULL ENABLE,
"REGION_NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"CREATED_ON" DATE DEFAULT SYSDATE,
"MODIFIED_ON" DATE DEFAULT SYSDATE,
"CREATED_BY" NUMBER,
"MODIFIED_BY" NUMBER,
CONSTRAINT "PK_REGION" PRIMARY KEY ("REGION_CODE")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8101"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8102"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8103"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8104"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8105"
TABLESPACE "CAT_IDX_TB5") ENABLE,
CONSTRAINT "UK_REGION" UNIQUE ("REGION_NAME")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA"
PARTITION BY HASH ("REGION_CODE")
(PARTITION "SYS_P8101"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8102"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8103"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8104"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8105"
TABLESPACE "CAT_DATA") ;
CREATE UNIQUE INDEX "CATTEMP"."PK_REGION" ON "CATTEMP"."REGION" ("REGION_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8101"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8102"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8103"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8104"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8105"
TABLESPACE "CAT_IDX_TB5") ;
CREATE UNIQUE INDEX "CATTEMP"."UK_REGION" ON "CATTEMP"."REGION" ("REGION_NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
4)
LEVEL_TYPE_MASTER
CREATE TABLE "CATTEMP"."LEVEL_TYPE_MASTER"
( "LEVEL_TYPE_ID" NUMBER NOT NULL ENABLE,
"LEVEL_TYPE_NAME" VARCHAR2(50 BYTE) NOT NULL ENABLE,
"DESCRIPTION" VARCHAR2(100 BYTE),
"CREATED_ON" DATE DEFAULT SYSDATE,
"MODIFIED_ON" DATE DEFAULT SYSDATE,
"CREATED_BY" NUMBER,
"MODIFIED_BY" NUMBER,
CONSTRAINT "PK_LEVEL_TYPE_MASTER" PRIMARY KEY ("LEVEL_TYPE_ID")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8031"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8032"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8033"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8034"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8035"
TABLESPACE "CAT_IDX_TB5") ENABLE,
CONSTRAINT "UK_LEVEL_TYPE_MASTER" UNIQUE ("LEVEL_TYPE_NAME")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA"
PARTITION BY HASH ("LEVEL_TYPE_ID")
(PARTITION "SYS_P8031"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8032"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8033"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8034"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8035"
TABLESPACE "CAT_DATA") ;
CREATE UNIQUE INDEX "CATTEMP"."PK_LEVEL_TYPE_MASTER" ON "CATTEMP"."LEVEL_TYPE_MASTER" ("LEVEL_TYPE_ID")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8031"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8032"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8033"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8034"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8035"
TABLESPACE "CAT_IDX_TB5") ;
CREATE UNIQUE INDEX "CATTEMP"."UK_LEVEL_TYPE_MASTER" ON "CATTEMP"."LEVEL_TYPE_MASTER" ("LEVEL_TYPE_NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
5)STATE
CREATE TABLE "CATTEMP"."STATE"
( "STATE_NAME" VARCHAR2(30 BYTE) NOT NULL ENABLE,
"STATE_CODE" VARCHAR2(10 BYTE),
"COUNTRY_CODE" VARCHAR2(10 BYTE) NOT NULL ENABLE,
"REGION_CODE" VARCHAR2(4 BYTE),
"CREATED_ON" DATE DEFAULT SYSDATE,
"MODIFIED_ON" DATE DEFAULT SYSDATE,
"CREATED_BY" NUMBER,
"MODIFIED_BY" NUMBER,
CONSTRAINT "PK_STATE" PRIMARY KEY ("STATE_NAME", "COUNTRY_CODE")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8131"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8132"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8133"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8134"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8135"
TABLESPACE "CAT_IDX_TB5") ENABLE,
CONSTRAINT "UK_STATE" UNIQUE ("STATE_CODE")
USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ENABLE,
CONSTRAINT "FK_STATE1" FOREIGN KEY ("COUNTRY_CODE")
REFERENCES "CATTEMP"."COUNTRY" ("COUNTRY_CODE") ENABLE,
CONSTRAINT "FK_STATE2" FOREIGN KEY ("REGION_CODE")
REFERENCES "CATTEMP"."REGION" ("REGION_CODE") ENABLE
) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA"
PARTITION BY HASH ("STATE_NAME","COUNTRY_CODE")
(PARTITION "SYS_P8131"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8132"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8133"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8134"
TABLESPACE "CAT_DATA",
PARTITION "SYS_P8135"
TABLESPACE "CAT_DATA") ;
CREATE INDEX "CATTEMP"."FK_STATE1_I" ON "CATTEMP"."STATE" ("COUNTRY_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
CREATE INDEX "CATTEMP"."FK_STATE2_I" ON "CATTEMP"."STATE" ("REGION_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
CREATE UNIQUE INDEX "CATTEMP"."PK_STATE" ON "CATTEMP"."STATE" ("STATE_NAME", "COUNTRY_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "SYS_P8131"
TABLESPACE "CAT_IDX_TB1",
PARTITION "SYS_P8132"
TABLESPACE "CAT_IDX_TB2",
PARTITION "SYS_P8133"
TABLESPACE "CAT_IDX_TB3",
PARTITION "SYS_P8134"
TABLESPACE "CAT_IDX_TB4",
PARTITION "SYS_P8135"
TABLESPACE "CAT_IDX_TB5") ;
CREATE INDEX "CATTEMP"."STATE_NAME_CODE_IDX" ON "CATTEMP"."STATE" ("STATE_NAME", "STATE_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA" ;
CREATE INDEX "CATTEMP"."STATE_NAME_STATE_IDX" ON "CATTEMP"."STATE" ("STATE_NAME")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT_DATA" ;
CREATE UNIQUE INDEX "CATTEMP"."UK_STATE" ON "CATTEMP"."STATE" ("STATE_CODE")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
TABLESPACE "CAT" ;
-
Plz help to make this query......very urgent
I ve two tables <br>
<br>
First one is <b>grn_dtl</b> containing following fields <br> <br> <br>
<u><b>
item_code ent_dt qty doc_no </u></b><br>
11001318 09/09/2003 5 56300501 <br>
11001318 11/09/2004 9 56300502 <br>
11001318 12/05/2005 2 56300503 <br>
11001319 22/06/2004 0 56300504 <br>
11001320 09/06/2005 0 56300505 <br>
11001320 11/08/2004 8 56300506 <br>
11001320 30/05/2005 4 56300507 <br>
11001320 21/06/2003 1 56300508 <br>
11001321 25/09/2004 1 56300509 <br>
11001321 15/07/2004 1 56300510 <br>
11001321 01/08/2004 2 56300511 <br>
11001322 02/06/2004 1 56300512 <br>
11001322 22/06/2004 2 56300513 <br>
11001323 12/09/2004 1 56300514 <br>
11001323 08/05/2004 4 56300515 <br>
11001323 17/08/2004 5 56300516 <br>
11001323 28/06/2004 2 56300517 <br>
<br><br>
second one is <b>item_mst</B> containing following fields <br>
<br>
<u><b>
item_code description leadtim kanbandate</u></b><br>
11001318 aaaaaaaaaaa 15 22/04/2004<br>
11001319 aaaaaaaaaaa 15 02/12/2004<br>
11001320 aaaaaaaaaaa 15 14/07/2005<br>
11001321 aaaaaaaaaaa 15 23/02/2004<br>
11001322 aaaaaaaaaaa 15 05/10/2004<br>
11001323 aaaaaaaaaaa 15 17/05/2004<br>
11001324 aaaaaaaaaaa 15 27/12/2004<br>
11001325 aaaaaaaaaaa 15 07/08/2004<br>
<br><br><br><b>
From the above two tables I want the combine SQL query which will display item_code its description ,kanbandate from item_mst table and will also display the minimum ent_dt of each corresponding item_code alongwith the qty and doc_no.the item_code should not be repeated .<br>
I want to run the query from sql query analyzer</b><br><br>
the result should be like this<br><br>
<b></u>item_code desc ent_dt qty doc_no</b></u>
<br>
11001318 aaaaaaaaaaa 09/09/2003 5 56300501<br>
11001319 aaaaaaaaaaa 22/06/2004 0 56300504<br>
11001320 aaaaaaaaaaa 21/06/2003 1 56300508<br>
11001321 aaaaaaaaaaa 15/07/2004 1 56300510<br>
11001322 aaaaaaaaaaa 02/06/2004 1 56300513<br>
11001323 aaaaaaaaaaa 08/05/2004 4 56300515<br>
<br>
<br>
plz help me out ASAP
null
Message was edited by:
aanchal_2008can you try this,
SELECT DISTINCT im.item_code,
im.descR,
gd.ent_dt,
gd.qty,
gd.doc_no
FROM item_mst im,
grn_dtl gd
WHERE im.item_code = gd.item_code (+)
AND NOT EXISTS (
SELECT 'later detail'
FROM grn_dtl gd2
WHERE gd2.item_code = gd.item_code
AND gd2.ent_dt > gd.ent_dt)
ITEM_CODE DESCR ENT_DT QTY DOC_NO
11001318 aaaaaaaaaaa 2/12/2005 6 563005
11001319 aaaaaaaaaaa 6/22/2004 0 563005
11001320 aaaaaaaaaaa 6/9/2005 0 563005
11001321 aaaaaaaaaaa 12/5/2005 5 563005
11001322 aaaaaaaaaaa 6/22/2004 2 563005
11001323 aaaaaaaaaaa 9/12/2004 1 563005
11001324 aaaaaa
11001325 aaaaaa
8 rows selected -
Error in variables,plz help me
I created a variable del_var.The sql query assosiated with this variable is.
Delete from schema.file_name_table where rownum=1;
After refreshing it.it is deleting first row in the table.But it is resulting in an error
"17003 : null : java.sql.SQLException: Invalid column index java.sql.SQLException: Invalid column index "
Plz help meHi,
You can't use a 'Delete" command at a refreshing variable because at a refresch the variable need to receive a value back and the delete doesn't return value.
Change the command to "select....."
Does it make sense to you? -
Urgent plz help me......plz
Am very nem to jsp.
am doing my final year project in jsp.
I want to retreive value in the textbox depending on the selectino made in the dropdown.
in the dropdown menu i retrieve employee id frm backend. n in the textbox i shuld get employee name depending on the selection made in the dropdown list. that is data in the textbox shuld change depending on the selectin made in dropdown.
here is my code which i tired but in the textbox the value is alwys remaning the last record value n it is not changing depending on slectino made in dropdwon list
<%@ page import="java.util.*" %>
<%@ page language="java" %>
<%@ page import="java.sql.*" %>
<HTML>
FAQ
Category choice
<FORM ACTION="selection.jsp" METHOD="POST">
<%
String nameselection = null;%>
<SELECT NAME="Category" id= Category >
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection conn=DriverManager.getConnection("jdbc:odbc:man","scott","tiger");
Statement statement = conn.createStatement();
ResultSet rs = statement.executeQuery("SELECT DISTinCT empid FROM employee" );%>
<OPTION VALUE='nochoice'>Please choose a category</OPTION>";
<%while(rs.next()) {
nameselection = rs.getString("empid");%>
<OPTION value ="optcategory"><%out.println(nameselection);%>
</OPTION>
<% } %>
</SELECT>
Question selection
<%
String password = null;%>
<%ResultSet m1 = statement.executeQuery("SELECT * FROM employee WHERE empid = ( '" + nameselection + "')");
String mm1;
while(m1.next()){%>
<input type =text name=mm value="<%= m1.getString(2) %>">
<%}%>
</FORM>
</HTML>
plz help me....
am very new to it.
Thanx in advancehi manisha
good try & sorry for late reply
To say the truth i'm too new to jsp
i'll give u my code see it for reference.. if u have any doubts in that pls don't forget to ask me
function display()
var index=document.form1.drug.value;
document.form1.hid.value=index;
form1.submit();
function refresh()
var indexOfcombobox = document.form1.drughid.value;
sel = document.form1.drug;
for (i=0; i<sel.options.length; i++) {
if (sel.options.text ==indexOfcombobox ) {
sel.selectedIndex = i;
<form name="form1" method="post" action="">
<body onload="refresh() ">
<select name="drug" id="drug" value="hid" onChange="display()">
<option value="" selected> </option>
<%
while(rs.next())
%>
<OPTION VALUE="<%=rs.getString("DrugName")%>"><%=rs.getString("DrugName") %></OPTION>
<%
%>
</select>
<input type="hidden" name="hid">
</div></td>
</tr>
<tr>
<td>NDC code #</td>
<td>
<%
//query for selecting the values from the database
String sql1 = "SELECT ProductCode,DrugName,Dosageform from ProductMaster where DrugName='"+request.getParameter("hid")+"' ";
rs=stm.executeQuery(sql1);
%>
<% while (rs.next())
String val1=rs.getString("ProductCode");
String val2=rs.getString("DrugName");
String val3=rs.getString("Dosageform");
out.println (val1 +"</td>");
out.println ("<input type=hidden name=ndc value='" + val1 + "'>");
out.println ("<input type=hidden name=drughid value='" + val2 + "'>");
out.println("<td>Dosageform : "+val3);
}Regards
kalai -
Binary addition,subtraction and modulus...plz help urgent
plz help me on this query...
i need to pass two 512 bit number as string,then convert them to binary and
then perform binary addition,subtraction,modulus operations on those two numbers.finally convert result to integer.
i designed a code which doesnt work correct.it is:
* To change this template, choose Tools | Templates
* and open the template in the editor.
package bytearrayopeations;
import java.math.BigInteger;
* @author sheetalb
public class binaryadding {
public static void main(String[] args) {
BigInteger a = new BigInteger("123456");
BigInteger b = new BigInteger("5121");
String bb1 = a.toString(2);
String bb2 = b.toString(2);
String ss1 = null;
String ss2 = null;
String result = "";
String carry="0";
System.out.println("first value=" +bb1);
System.out.println("second value=" +bb2);
int k=bb1.length();
int h=bb2.length();
System.out.println("length 1="+ k);
System.out.println("length 2=" +h);
int p=h-k;
//System.out.println("difference=" +p);
int q=k-h;
//System.out.println("difference 2=" +q);
if(h==k)
else if(h>k)
for(int i=0;i<p;i++)
bb1="0"+bb1;
System.out.println("new value of first=" +bb1);
else if(h<k)
for(int i=0;i<q;i++)
bb2="0"+bb2;
System.out.println("new value of second=" +bb2);
StringBuffer sb1=new StringBuffer(bb1);
StringBuffer sb2=new StringBuffer(bb2);
bb1=sb1.reverse().toString();
bb2=sb2.reverse().toString();
//System.out.println("rev. buffer1=" +bb1);
//System.out.println("rev. buffer2=" +bb2);
for(int i=0;i<bb1.length();i++)
ss1=bb1.substring(i,i+1);
ss2=bb2.substring(i,i+1);
System.out.println("value1=" + ss1 + " " + "value2=" + ss2);
if (ss1.equals("0") && ss2.equals("0"))
if (carry.equals("0"))
result+="0";
else
result+="1";
else if (ss1.equals("1") && ss2.equals("1"))
if (carry.equals("0"))
result+="0";
carry="1";
else
result+="1";
carry="1";
else if (ss1.equals("0") && ss2.equals("1"))
if (carry.equals("0"))
result+="1";
carry="0";
else
result+="0";
carry="1";
else if (ss1.equals("1") && ss2.equals("0"))
if (carry.equals("0"))
result+="1";
carry="0";
else
result+="0";
carry="1";
System.out.println("sum=" +result + " " + "carry" + carry);
result+=carry;
StringBuffer sb3=new StringBuffer(result);
result=sb3.reverse().toString();
System.out.println("result is " +result);
System.out.println("Binary = "+ result + ", Decimal = "+Integer.parseInt(result,2));
}plz provide me or email me if possible java coding for all three operations as soon.
[email protected]One thread is enough. Continue here:[http://forums.sun.com/thread.jspa?threadID=5373720&messageID=10643157#10643157]
-
I Have designned a simple report in PLD which consist of two fields. The Customer Name and the Dates on which he is delivered goods. The Query base PLD By default shows the Report like:
Customer Delivery Date
Crest 01/05/2007
Crest 05/08/2007
Crest 06/09/2007
What I want is that I want to show the name of the Customer only once (possibly somewhere in header and in repetative area only Delivery Dates would be shown). i.e. the report should be like:
Customer : Crest
Delivery Dates:
01/05/2007
05/08/2007
06/09/2007
How Can I do this plz help someone.....Hi
Highlight the repetitive area. Print Layout Designer>Repetitive Area>Sort. Sort on Cust Code, tick Summary.
Print Layout Designer>Group>Group1. Now add a formula field in Repetitive Area -
SortValue().
Now your report will group on the Customer code (displayed in Repetitive Area (Header). Make the Customer Code field in Repetitive Area not visible)
Daan -
Hi all,
i attended a interview, these are the qes..plz help me with ans..
1. is it possible without using function modules in
bdc(open, insert,close) data transferring? how ...
2. which one is better session/call transection? why?
3. in LSMW what r the methods u r using?
4. in LSMW otherthan recording any method is there? what are they?
5. in LSMW where are u doing field validation? in which step, can u explain?
6. is it possible to run smartform without using
" ssf_function_module_name", how ?
7. how will display secondary list in ALV.
8. how will u call back to secondary lists to base list?
9. how u r printing secondary list in interactive reports?
10. what are the events used in u r ALV reports?
11. how will u access data in secondary list?
12. what is diff b/w bapi created fm and standered bapi fm?
13. in ALE in which programm worked either standalone or any other?
here what is standalone?i know change pointer..Hi
10. what are the events used in u r ALV reports?
Events in alv and their FM The main events in alv and their FM and why we use these:
1. SLIS_PRINT_ALV.
2. SLIS_T_LISTHEADER.
3. SLIS_T_EVENT.
4. SLIS_T_SORTINFO_ALV.
5. SLIS_T_LAYOUT_ALV.
6. SLIS_T_FIELDCAT_ALV.
and in classic reports what is the sequence of events: === Events are
At selection-screen output.
Initialization.
At selection-screen on field
At selection-screen on end of field
At selection-screen on Radiobutton Group R1. (If you have any radio buttons)
At selection-screen on block b1. (If you have any blocks)
Start-of-selection.
Get node. (if the data is retreived from a logical database)
Get node late. (if the data is retreived from a logical database)
Top-of-page. (if the write statement is in the end-of-selection event or we can say that before the first write statement)
end-of-selection.
and fuction modules are
LISTHEADER - Is used to print the header information in the ALV List. Name, Date, Time, ALV Name and other details are called as Header information. EVENT - Basically this is the FM to handle Event's. When the user needs to do some event operation like when double clicking the a particular field we need to perform some operation. These events are captured by this FM. LAYOUT - This FM is used to define the layout of the List. There are many options available in this FM to define the Layout style. FIELDCAT - These are used to populate the List header. We can change them according to our req.
User-defined Text Output Event
Application
print_end_of_list
Define output text to be printed at the end of the entire list
print_top_of_list
Define output text to be printed at the beginning of the entire list
print_end_of_page
Define output text to be printed at the end of each page
print_top_of_page
Define output text to be printed at the beginning of each page
subtotal_text
Define self-defined subtotals texts
Mouse-controlled Actions in the Grid Control Event
Application
button_click
Query a click on a pushbutton in the ALV Grid Control
double_click
Query a double-click on a cell of the ALV Grid control
hotspot_click
Query a hotspot click on columns defined for this purpose in advance
onDrag
Collect information when elements of the ALV Grid Control are dragged
onDrop
Process information when elements of the ALV Grid Control are dropped
onDropComplete
Perform final actions after successful Drag&Drop
onDropGetFlavor
Distinguish between options for Drag&Drop behavior
Processing of Self-defined and Standard Functions Event
Application
before_user_command
Query self-defined and standard function codes
user_command
Query self-defined function codes
after_user_command
Query self-defined and standard function codes
Definition of Self-defined Functions Event
Application
toolbar
Change, delete or add GUI elements in the toolbar
menu_button
Define menus for menu buttons in the toolbar
context_menu_request
Change context menu
onf1
Define self-defined F1 help
All of these can be found under type group SLIS.
Events
SLIS_EV_ITEM_DATA_EXPAND TYPE SLIS_FORMNAME VALUE 'ITEM_DATA_EXPAND',
SLIS_EV_REPREP_SEL_MODIFY TYPE SLIS_FORMNAME VALUE 'REPREP_SEL_MODIFY', SLIS_EV_CALLER_EXIT_AT_START TYPE SLIS_FORMNAME VALUE 'CALLER_EXIT',
SLIS_EV_USER_COMMAND TYPE SLIS_FORMNAME VALUE 'USER_COMMAND',
SLIS_EV_TOP_OF_PAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_PAGE',
SLIS_EV_DATA_CHANGED TYPE SLIS_FORMNAME VALUE 'DATA_CHANGED',
SLIS_EV_TOP_OF_COVERPAGE TYPE SLIS_FORMNAME VALUE 'TOP_OF_COVERPAGE',
SLIS_EV_END_OF_COVERPAGE TYPE SLIS_FORMNAME VALUE 'END_OF_COVERPAGE',
SLIS_EV_FOREIGN_TOP_OF_PAGE TYPE SLIS_FORMNAME
VALUE 'FOREIGN_TOP_OF_PAGE', SLIS_EV_FOREIGN_END_OF_PAGE TYPE SLIS_FORMNAME
VALUE 'FOREIGN_END_OF_PAGE',
SLIS_EV_PF_STATUS_SET TYPE SLIS_FORMNAME VALUE 'PF_STATUS_SET',
SLIS_EV_LIST_MODIFY TYPE SLIS_FORMNAME VALUE 'LIST_MODIFY',
SLIS_EV_TOP_OF_LIST TYPE SLIS_FORMNAME VALUE 'TOP_OF_LIST',
SLIS_EV_END_OF_PAGE TYPE SLIS_FORMNAME VALUE 'END_OF_PAGE',
SLIS_EV_END_OF_LIST TYPE SLIS_FORMNAME VALUE 'END_OF_LIST',
SLIS_EV_AFTER_LINE_OUTPUT TYPE SLIS_FORMNAME VALUE 'AFTER_LINE_OUTPUT', SLIS_EV_BEFORE_LINE_OUTPUT TYPE SLIS_FORMNAME VALUE 'BEFORE_LINE_OUTPUT',
SLIS_EV_SUBTOTAL_TEXT TYPE SLIS_FORMNAME VALUE 'SUBTOTAL_TEXT' -
URGENT: Date format in Reports Giving me trouble...plz help me out
Hi guru's Can any one help me out
I
n the front end apps we are getting the date value as
BOM_SRS_DATETIME_STANDARD
Where we are entering the date value as MM/DD/RRRR HH24:MI:SS
The date format set in the company is like RRRR/MM/DD HH24:MI:SS
SO I format masked the date parameter in .RDF to RRRR/MM/DD HH24:MI:SS format.
While the actual date format in the data base is like DD/MM/RRRR HH24:MI:SS.
I checked all the old reports and the date format is like they masked the date format to company format and used the afterparameter trigger like bellow:
if :P_SENT_DATE_FROM is not null and :P_SENT_DATE_TO is null then
:P_SENT_DATE_TO := :P_SENT_DATE_FROM;
end if;
if (:P_SENT_DATE_FROM = :P_SENT_DATE_TO) and (:P_SENT_DATE_FROM is not null) then
:WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE = '||' to_date('''||:P_SENT_DATE_FROM||''''||','||'''DD-MON-RR'')';
else
if :P_SENT_DATE_FROM is not null then
:WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE >= '||' to_date('''||:P_SENT_DATE_FROM ||''''||','||'''DD-MON-RR'')';
end if;
if :P_SENT_DATE_TO is not null then
:WHERE_SQL := :WHERE_SQL || ' AND CREATION_DATE <= '||' to_date('''||:P_SENT_DATE_TO ||''''||','||'''DD-MON-RR'')';
end if;
end if;
I tried this but i couldnt get the output either.
I am pretty much confused.
Plz help me out...If you want to use a dynamic where caluse in your report query you can use a Reference Cursor using REF CUR QUERY tool in your report like this :
function QR_1RefCurDS return DEF_CURSORS.CHARACT_REFCUR is
temp_CHARACT DEF_CURSORS.CHARACT_refcur;
begin
IF :FROM_NO IS NULL AND :TO_NO IS NULL THEN
open temp_CHARACT for SELECT ACCT_CODE, ACCT_NAME
FROM CHARACT
ORDER BY ACCT_CODE;
ELSIF :TO_NO IS NULL AND :FROM_NO IS NOT NULL THEN
open temp_CHARACT for select ACCT_CODE, ACCT_NAME
FROM CHARACT
WHERE ACCT_CODE=:FROM_NO
ORDER BY ACCT_CODE;
ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NOT NULL THEN
open temp_CHARACT for select ACCT_CODE, ACCT_NAME
FROM CHARACT
WHERE ACCT_CODE BETWEEN :FROM_NO AND :TO_NO
ORDER BY ACCT_CODE;
ELSIF :TO_NO IS NOT NULL AND :FROM_NO IS NULL THEN
open temp_CHARACT for select ACCT_CODE, ACCT_NAME
FROM CHARACT
WHERE ACCT_CODE<=:TO_NO
ORDER BY ACCT_CODE;
END IF;
return temp_CHARACT;
end;
But first you have to declare a cursor type in a package -
Hello Friends,
I need some help from u,
i have table like below
table name A
Details Debit Credit
aa 100 200
bb 50 30
cc 25 150
i try "select SUM(Debit),SUM(Credit) from A"
But
how can i get the diff between Debit Sum & Credit Sum ,
can any1 suggest me query,
i want to use this in resultset, in java servlet
if any1 can help me plz, help me out,
thank you,SQL> select * from a;
DETAILS DEBIT CREDIT
aa 100 200
bb 50 30
cc 25 150
SQL> select SUM(Debit),SUM(Credit) from A;
SUM(DEBIT) SUM(CREDIT)
175 380
SQL> select SUM(Debit) - SUM(Credit) diff from A;
DIFF
-205
Maybe you are looking for
-
Hey all! Recently got an IPad Mini. Already have a Macbook. I have a folder full of songs(lyrics and chords) on the Mac. The file type inside the folder are all "Web Archive". I am trying to transfer this folder to my Mini, via Bluetooth. It won't al
-
Iphoto says albums are currently sychronizing and wont quit.
Iphoto says albums are currently synchronizing and wont quit. Force quit doesn't work either, what can I do?
-
Downloads and Podcasts count numbers/fields are blank
The number field that is next to podcasts (the number of unplayed episodes in library) is blank... just an empty oval. The same thing is true of my Downloads count. If I were to open the Podcasts or Download windows, everything shows up, but under th
-
My Mail is not working properly. Some messages are being deleted without me deleting them. Some peoples' emails are not showing up in the column on the left but show up on the right under other peoples' threads. My deleted messages are not showing up
-
ORA-27211: Failed to load Media Management Library after Update to HP DP 6
Hi, after an Upgrade to Version 6.0 from the Backupsoftware HP Dataprotector i can't run RMAN Backup's anymore, because something is wrong with Linking of the MML. BS: SLES 8 / Kernel 2.4.21-251-smp Oracle: 9.2.0.5 I try this RMAN Statement: RMAN> ru