Help to catch the output of a Transaction
Hi,
I have this issue and need help, I have a program lets say "ZPROGRAM", this programs calls a RFC "ZFUNC" this function must be able to send the parameters to execute a SAP standard transaction for example MB51, the function must send the plant number, storage location, and material number, then this RFC must catch the output of the report into an internal table so that i can work with the output in "ZPROGRAM", in other words what I see on screen as result of MB51 I need it in an internal table so that I can manupulate the data.
I hope someone could tell me how to accomplish this.
Thanks in advice.
Hi,
Pls try
DATA list_tab TYPE TABLE OF abaplist.
DATA vlist LIKE table of LISTZEILE WITH HEADER LINE.
submit RM07DOCS
with XXX
EXPORTING LIST TO MEMORY
and return .
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
CALL FUNCTION 'LIST_TO_ASCI'
EXPORTING
list_index = -1
TABLES
listasci = vlist
listobject =list_tab
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
Regards,
Pole
Edited by: Pole li on Jul 17, 2008 3:57 AM
Similar Messages
-
Report to see the output of VLPOD transaction
Hi Gurus
I have configured Proof of delivery concept to caputre loss of Quantity due to moisture. can any body tell me about standard report to see the output of VLPOD transaction.Full points for the correct solution.Hi,
Try the t-code VLPODL, hope can help you!
Good day
Tao -
Can anyone help me find the output option in Bridge CC?
Can anyone help me find the output option in Bridge CC?
http://helpx.adobe.com/bridge/kb/install-output-module-bridge-cc.html
-
Catch the output of the WL server if WL is running as a service
Hi,
Is there any way to catch the output of the WLS in case it is running as an
NT service?
If I use the startWeblogic.cmd, I can append something like this to the
starting command:
[...]weblogic.Server >config\mydomain\logs\out.log 2>&1
But it's not working for the service.
I've tried to change the registry setting even:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\myserver\Parameters
But when I put >filename in the registry, it stops working.If I remove the
filename from the registry, it's ok again.I need the output as this is the only way to keep the possible JVM runtime
errors.
BR,
AdamI forgot to mention the details:
- Weblogic v6.1SP3
- WinXP Prof SP1 -
Problem with the Output Type and Transaction ME9F
Hi,
I have an Output Type (xyz) and Program (abc).
If for ME21N i give the output type ( xyz ) the n am able to get the Spool and
Printout.
If for ME9F i give the output type ( pqr) then am able to get the Spool and
Printout.
Problem is :---
when am using O/P Type ( xyz ) for ME9F then am abel to process but am
not able to get the spool and not even printout.
I want to know where it can be wrong.
It's a high priority object.
Kindly help me out.
Thanks,
Zia.hi Zakir,
1.check the output type under
apllications 'EF' IN transaction NACE.
2.select that ef and press the push button output types .
3. now check ur output for is present here or not ..
just click the position button and give ur output type ..
4. when u find ur output type .. select that o/p type and click processing routined on the left side where u will see ..
when u do this
u ll see the details like
output type . the output type "
application . 'EF'
and the mode of medium .
1. print out
2. fax .
6. edi etc.
this is the way to check what are the mediums present for the output type ..
check whether u r <b>entries (xyz) and (pqr) are having medium 1.</b>
if its missing then assign it ..
regards,
VIjay -
Storing the output of a transaction
I have a requirement where i need to run the transaction stad on a daily basis for a particular id for the preceeding 24 hrs and send the output through an email to two particular persons. I have written the wrapper program for the transaction but how do we store the output in a file.
Hi,
Why don't you create and schedule a job (SM36) to run program RSSTAT20 with defining spool list recipient to send out the output file?
First, you need to setup distribution list with all user email address (SBWP) which like to receive the output report. Then you can attach the distribution list to the above spool list recipient.
Regards,
Ferry Lianto -
Hi, Is there a way to export the output of a transaction to Memeory .
Dear All , Here is the question
SUBMIT ws_monitor_outb_del_free
WITH it_vkorg = r_vkorg
WITH it_vtweg IN svtweg
WITH it_spart IN sspart
WITH it_kunag = kna1-kunnr SIGN 'I'
WITH it_wbstk NE 'C'
EXPORTING LIST TO MEMORY
AND RETURN.
This is possible and fine ?
Is this possible Similarly
SET PARAMETER ID 'VAG' FIELD kna1-kunnr.
SET PARAMETER ID 'KUN' FIELD space.
SET PARAMETER ID 'MAT' FIELD space.
SET PARAMETER ID '0BT' FIELD 'X '.
SET PARAMETER ID 'VON' FIELD space.
SET PARAMETER ID 'BIS_VA05' FIELD sy-datum.
SET PARAMETER ID 'VC2' FIELD 'X'.
CALL TRANSACTION 'VA05' AND SKIP FIRST SCREEN [ <b>EXPORTING LIST TO MEMEORY</b> ].
Hope its Clear i want the output to be saved in memory not to be displayed.
Note : you cannot use the program triggered by VA05 and submit it as i have done in the first case because it is not a executable prog.
With Best Regards.
Md Iqbaluse this
in the calling program
declare
DATA : listobject LIKE abaplist OCCURS 0 WITH HEADER LINE.
after submit use this
IMPORT listobject FROM MEMORY ID '%_LIST'.
to fetch the data to memory.
regards,
vijay -
Help needed in the output file
Hi
Here is my query,
DECLARE
vProduct VARCHAR2(100) := 'Prints';
vProduct1 VARCHAR2(100) := 'Pk';
vName VARCHAR2(100) := 'Photos';
vName1 VARCHAR2(100) := 'B';
BEGIN
DBMS_OUTPUT.PUT_LINE('Product '||' '||'Name');
DBMS_OUTPUT.PUT_LINE('----------------------');
DBMS_OUTPUT.PUT_LINE(vProduct ||' '||vName);
DBMS_OUTPUT.PUT_LINE(vProduct1 ||' '||vName1);
END;
Product Name
Prints Photos
Pk B
But i need the output as like this
Product Name
Prints Photos
Pk B
With a tab space between each values even i have different lengths in the value.
Is this possible ?Ok Rob Thanks..........
Its worked fine -
Help in interpreting the output of explain plan
Hi,
I have written a query in two different ways and then run an explain plan on both of them. Both these queries give same result. I want to know which one will be more efficient. I am giving the output of explain plan for both the queries:
The second plan has a lower cost but has much higher consistent gets !!
Please advise.
Plan 1:
Execution Plan
0 SELECT STATEMENT Optimizer=HINT: FIRST_ROWS (Cost=8637 Card= 1 Bytes=10132)
1 0 SORT (ORDER BY) (Cost=8637 Card=1 Bytes=10132)
2 1 WINDOW (SORT) (Cost=8637 Card=1 Bytes=10132)
3 2 COUNT (STOPKEY)
4 3 VIEW (Cost=8635 Card=1 Bytes=10132)
5 4 SORT (ORDER BY) (Cost=8635 Card=1 Bytes=862)
6 5 WINDOW (SORT) (Cost=8635 Card=1 Bytes=862)
7 6 MAT_VIEW ACCESS (FULL) OF 'PRD_SEARCH_MVW' (MAT_VIEW) (Cost=8633 Card=1 Bytes=862)
Statistics
577 recursive calls
0 db block gets
39202 consistent gets
34798 physical reads
0 redo size
72348 bytes sent via SQL*Net to client
4295 bytes received via SQL*Net from client
9 SQL*Net roundtrips to/from client
10 sorts (memory)
0 sorts (disk)
100 rows processed
Plan-2
Execution Plan
0 SELECT STATEMENT Optimizer=HINT: FIRST_ROWS (Cost=982 Card=1 Bytes=10145)
1 0 SORT (ORDER BY) (Cost=982 Card=1 Bytes=10145)
2 1 WINDOW (SORT) (Cost=982 Card=1 Bytes=10145)
3 2 COUNT (STOPKEY)
4 3 VIEW (Cost=980 Card=1 Bytes=10145)
5 4 SORT (ORDER BY) (Cost=980 Card=1 Bytes=10132)
6 5 WINDOW (SORT) (Cost=980 Card=1 Bytes=10132)
7 6 WINDOW (SORT) (Cost=980 Card=1 Bytes=10132)
8 7 VIEW (Cost=977 Card=1 Bytes=10132)
9 8 WINDOW (SORT PUSHED RANK) (Cost=977 Card=1 Bytes=889)
10 9 NESTED LOOPS (Cost=976 Card=1 Bytes=889)
11 10 HASH JOIN (Cost=305 Card=670 Bytes=18090)
12 11 HASH JOIN (Cost=23 Card=140 Bytes=2240)
13 12 INDEX (FAST FULL SCAN) OF 'GLCAT_GRP_TO_CAT_PK' (INDEX (UNIQUE)) (Cost=2 Card=52 Bytes=364)
14 12 MAT_VIEW ACCESS (FULL) OF 'GLCAT_CAT_TO_MCAT' (MAT_VIEW) (Cost=20 Card=1039 Bytes=9351)
15 11 INDEX (FAST FULL SCAN) OF 'PCITEM2GLCATMCAT_FK_IDS' (INDEX) (Cost=281 Card=16903 Bytes=185933)
16 10 MAT_VIEW ACCESS (BY INDEX ROWID) OF 'PRD_SEARCH_MVW' (MAT_VIEW) (Cost=1 Card=1 Bytes=862)
17 16 INDEX (UNIQUE SCAN) OF 'PK_PRD_SEARCH_ID' (INDEX (UNIQUE)) (Cost=0 Card=1)
Statistics
481 recursive calls
2 db block gets
195742 consistent gets
7516 physical reads
0 redo size
71567 bytes sent via SQL*Net to client
6629 bytes received via SQL*Net from client
9 SQL*Net roundtrips to/from client
15 sorts (memory)
1 sorts (disk)
100 rows processedRegards
Madhup
Message was edited by:
MadhupThanks a lot for you input. I am posting both the queries below. My requirements are following:
1) I have a products table
2) I have Created grouping hierarchy - Groups, Categories and then Micro-categories - and have setup a separate table for each of them in my database
3) Then I have mapping tables, i.e. a table that stores group to category mapping, another table that stores category to micro-category mapping.
4) Products are mapped directly to micro-categories and one product could be mapped to multiple micro-categories.
5) I have created a materialized view on product and store the mappings as comma separated list of IDs - I have three fields there, on to store comma separated group id, second to store comma separated category ids and third to store the comma separated micro category ids to which the product is mapped.
Now I want to write a query that will return a specified number of matches from this table based on user defined criterion. There are few other filter cirterion apart from Group/Category and Microcategory. These are Company Name, Country, Type of company etc.
This query when run on production will be accessed very frequently - I expect the access to be in the tune of around 5-10 times per second.
There are 50 records in the group table
There are 500 categories
There are 20000 micro-categories
Group to category mapping table has around 1000 records
Category to microcategory table has around 25000 records
The product table has around 100,000 products.
Product to microcategory mapping table has 350000 records
The product mview has the same number of records as that in products table.
The first query uses the single materialized view to access data, however, it always does a full table scan and does not use any index.
When I noticed this in the explain plan, then I tried to write the second query which is using JOINs to arrive at the same output.
The explain plan now says that it is using Index scans.
I did a sample run of both the queries on my production system and I had to withdraw both of them as both brought my system to grinding halt within few minutes of going live.
My system at present receives around 3000 requests per hour during peak load and around 600 requests per hour during off-peak hours.
And I was testing these queries in Off-peak hours !!
Here are the two sql queries just for reference - there are several variables plugged in where clause which are the key drivers of the query:
SQL-1
SELECT DECODE(:OPT,2,A.SC,(MAX(A.SC) OVER (PARTITION BY A.PRD_SEARCH_COMPANY))) AS SO,
A.SC, A.PRD_SEARCH_ID,
A.PRD_SEARCH_COMPANY_ID, A.PRD_SEARCH_COMPANY, A.PRD_SEARCH_COMPANYID_ENCRYPTED,
A.PRD_SEARCH_PCID, A.PRD_SEARCH_URL, A.PRD_SEARCH_PC_CLNT_HOME,
A.PRD_SEARCH_CLNT_ENABLED, A.PRD_SEARCH_CODE, A.PRD_SEARCH_NAME,
A.PRD_SEARCH_DESC_SMALL, A.PRD_SEARCH_DESC_DETAILED, A.PRD_SEARCH_DESC_HTML,
A.PRD_SEARCH_IMG_SMALL, A.PRD_SEARCH_IMG_LARGE, A.PRD_SEARCH_WEIGHT_ITEM,
A.PRD_SEARCH_MODIFIEDDATE, A.PRD_SEARCH_SIZE, A.PRD_SEARCH_LABEL1,
A.PRD_SEARCH_LABEL1_VALUE, A.PRD_SEARCH_LABEL2, A.PRD_SEARCH_LABEL2_VALUE,
A.PRD_SEARCH_LABEL3, A.PRD_SEARCH_LABEL3_VALUE, A.PRD_SEARCH_LABEL4,
A.PRD_SEARCH_LABEL4_VALUE, A.PRD_SEARCH_LABEL5, A.PRD_SEARCH_LABEL5_VALUE,
A.PRD_SEARCH_LABEL6, A.PRD_SEARCH_LABEL6_VALUE, A.PRD_SEARCH_CAT_ID,
A.PRD_SEARCH_CAT_NAME, A.PRD_SEARCH_CAT_FLNAME, A.PRD_SEARCH_NAVIGATION_TREE,
A.PRD_SEARCH_NAVIGATION_TREE_ID,A.PRD_SEARCH_CITY, A.PRD_SEARCH_STATE,
A.PRD_SEARCH_COUNTRY, A.PRD_SEARCH_PRICE_SALE, A.PRD_SEARCH_PC_CLNT_TYPE,
A.PRD_SEARCH_PC_CLNT_TYPE_DESC,
A.PRD_SEARCH_COMPANY_PHONE, A.PRD_SEARCH_COMPANY_MOBILE, A.PRD_SEARCH_COMPANY_FAX,
A.PRD_SEARCH_COMPANY_EMAIL, A.PRD_SEARCH_GLCAT_MCAT_ID_LIST, A.PRD_SEARCH_GLCAT_CAT_ID_LIST,
A.PRD_SEARCH_GLCAT_GRP_ID_LIST, A.PRD_SEARCH_GL_COUNTRY_ISO, A.PRD_SEARCH_GLUSR_USR_ID,
A.PRD_SEARCH_TRUSTSEAL_CODE, A.PRD_SEARCH_CUSTTYPE_ID, A.PRD_SEARCH_CUSTTYPE_NAME,
A.PRD_SEARCH_CUSTTYPE_WEIGHT, A.PRD_SEARCH_CUSTTYPE_WEIGHT_TZ, A.PRD_SEARCH_CUSTTYPE_RANK,
A.PRD_SEARCH_PC_ITEM_HOTNEW, A.RK
FROM
(SELECT /*+ FIRST_ROWS (500) */ DECODE(:S_MODE,2,1,3,to_number(to_char(PRD_SEARCH_MODIFIEDDATE,'yyyymmdd')),1) AS SC,
PRD_SEARCH_ID,
PRD_SEARCH_COMPANY_ID, PRD_SEARCH_COMPANY, PRD_SEARCH_COMPANYID_ENCRYPTED,
PRD_SEARCH_PCID, PRD_SEARCH_URL, PRD_SEARCH_PC_CLNT_HOME,
PRD_SEARCH_CLNT_ENABLED, PRD_SEARCH_CODE, PRD_SEARCH_NAME,
PRD_SEARCH_DESC_SMALL, PRD_SEARCH_DESC_DETAILED, PRD_SEARCH_DESC_HTML,
PRD_SEARCH_IMG_SMALL, PRD_SEARCH_IMG_LARGE, PRD_SEARCH_WEIGHT_ITEM,
PRD_SEARCH_MODIFIEDDATE, PRD_SEARCH_SIZE, PRD_SEARCH_LABEL1,
PRD_SEARCH_LABEL1_VALUE, PRD_SEARCH_LABEL2, PRD_SEARCH_LABEL2_VALUE,
PRD_SEARCH_LABEL3, PRD_SEARCH_LABEL3_VALUE, PRD_SEARCH_LABEL4,
PRD_SEARCH_LABEL4_VALUE, PRD_SEARCH_LABEL5, PRD_SEARCH_LABEL5_VALUE,
PRD_SEARCH_LABEL6, PRD_SEARCH_LABEL6_VALUE, PRD_SEARCH_CAT_ID,
PRD_SEARCH_CAT_NAME, PRD_SEARCH_CAT_FLNAME, PRD_SEARCH_NAVIGATION_TREE,
PRD_SEARCH_NAVIGATION_TREE_ID,PRD_SEARCH_CITY, PRD_SEARCH_STATE,
PRD_SEARCH_COUNTRY, PRD_SEARCH_PRICE_SALE, PRD_SEARCH_PC_CLNT_TYPE,
PRD_SEARCH_PC_CLNT_TYPE_DESC,
PRD_SEARCH_COMPANY_PHONE, PRD_SEARCH_COMPANY_MOBILE, PRD_SEARCH_COMPANY_FAX,
PRD_SEARCH_COMPANY_EMAIL, PRD_SEARCH_GLCAT_MCAT_ID_LIST, PRD_SEARCH_GLCAT_CAT_ID_LIST,
PRD_SEARCH_GLCAT_GRP_ID_LIST, PRD_SEARCH_GL_COUNTRY_ISO, PRD_SEARCH_GLUSR_USR_ID,
PRD_SEARCH_TRUSTSEAL_CODE, PRD_SEARCH_CUSTTYPE_ID, PRD_SEARCH_CUSTTYPE_NAME,
PRD_SEARCH_CUSTTYPE_WEIGHT, PRD_SEARCH_CUSTTYPE_WEIGHT_TZ, PRD_SEARCH_CUSTTYPE_RANK,
PRD_SEARCH_PC_ITEM_HOTNEW,
ROW_NUMBER() OVER (PARTITION BY PRD_SEARCH_COMPANY_ID
ORDER BY DECODE(:S_MODE,2,1,3,to_number(to_char(PRD_SEARCH_MODIFIEDDATE,'yyyymmdd')),1) DESC) AS RK
FROM PRD_SEARCH
WHERE DECODE(:GRP_ID_STR,NULL,1,REGEXP_INSTR(','||REPLACE(PRD_SEARCH_GLCAT_GRP_ID_LIST,' ','')||',',:MYGRP_ID_STR)) > 0
AND DECODE(:CAT_ID_STR,NULL,1,REGEXP_INSTR(','||REPLACE(PRD_SEARCH_GLCAT_CAT_ID_LIST,' ','')||',',:MYCAT_ID_STR)) > 0
AND DECODE(:MCAT_ID_STR,NULL,1,REGEXP_INSTR(','||REPLACE(PRD_SEARCH_GLCAT_MCAT_ID_LIST,' ','')||',',:MYMCAT_ID_STR)) > 0
AND DECODE(:ITEM_ID_STR,NULL,1,REGEXP_INSTR(','||PRD_SEARCH_ID||',',:MYITEM_ID_STR)) > 0
AND DECODE(:COUNTRY_ISO,NULL,1,REGEXP_INSTR(','||PRD_SEARCH_GL_COUNTRY_ISO||',',:COUNTRY_ISO)) > 0
AND DECODE(nvl(NULL,0),0,1,PRD_SEARCH_COMPANY_ID) = DECODE(nvl(NULL,0),0,1,NULL)
AND DECODE(nvl(NULL,0),0,1,PRD_SEARCH_GLUSR_USR_ID) = DECODE(nvl(NULL,0),0,1,NULL)
AND PRD_SEARCH_CLNT_ENABLED >= nvl(:LIST_TYPE,0)
AND NVL(Length(PRD_SEARCH_TRUSTSEAL_CODE),0) >= :TSONLY
ORDER BY SC DESC, PRD_SEARCH_CUSTTYPE_WEIGHT ASC, DBMS_RANDOM.RANDOM
) A
WHERE A.RK <= :MY_PRD_PER_COMP
AND ROWNUM <= :MYMAXREC
ORDER BY SO DESC, DECODE(:OPT,2,'1',A.PRD_SEARCH_COMPANY), A.RK ASC, DBMS_RANDOM.RANDOM
SQL-2
SELECT
DECODE(:OPT,2,SC,(MAX(SC) OVER (PARTITION BY PRD_SEARCH_COMPANY))) AS SO,
SC, PRD_SEARCH_ID,
PRD_SEARCH_COMPANY_ID, PRD_SEARCH_COMPANY, PRD_SEARCH_COMPANYID_ENCRYPTED,
PRD_SEARCH_PCID, PRD_SEARCH_URL, PRD_SEARCH_PC_CLNT_HOME,
PRD_SEARCH_CLNT_ENABLED, PRD_SEARCH_CODE, PRD_SEARCH_NAME,
PRD_SEARCH_DESC_SMALL, PRD_SEARCH_DESC_DETAILED, PRD_SEARCH_DESC_HTML,
PRD_SEARCH_IMG_SMALL, PRD_SEARCH_IMG_LARGE, PRD_SEARCH_WEIGHT_ITEM,
PRD_SEARCH_MODIFIEDDATE, PRD_SEARCH_SIZE, PRD_SEARCH_LABEL1,
PRD_SEARCH_LABEL1_VALUE, PRD_SEARCH_LABEL2, PRD_SEARCH_LABEL2_VALUE,
PRD_SEARCH_LABEL3, PRD_SEARCH_LABEL3_VALUE, PRD_SEARCH_LABEL4,
PRD_SEARCH_LABEL4_VALUE, PRD_SEARCH_LABEL5, PRD_SEARCH_LABEL5_VALUE,
PRD_SEARCH_LABEL6, PRD_SEARCH_LABEL6_VALUE, PRD_SEARCH_CAT_ID,
PRD_SEARCH_CAT_NAME, PRD_SEARCH_CAT_FLNAME, PRD_SEARCH_NAVIGATION_TREE,
PRD_SEARCH_NAVIGATION_TREE_ID,PRD_SEARCH_CITY, PRD_SEARCH_STATE,
PRD_SEARCH_COUNTRY, PRD_SEARCH_PRICE_SALE, PRD_SEARCH_PC_CLNT_TYPE,
PRD_SEARCH_PC_CLNT_TYPE_DESC,
PRD_SEARCH_COMPANY_PHONE, PRD_SEARCH_COMPANY_MOBILE, PRD_SEARCH_COMPANY_FAX,
PRD_SEARCH_COMPANY_EMAIL, PRD_SEARCH_GLCAT_MCAT_ID_LIST, PRD_SEARCH_GLCAT_CAT_ID_LIST,
PRD_SEARCH_GLCAT_GRP_ID_LIST, PRD_SEARCH_GL_COUNTRY_ISO, PRD_SEARCH_GLUSR_USR_ID,
PRD_SEARCH_TRUSTSEAL_CODE, PRD_SEARCH_CUSTTYPE_ID, PRD_SEARCH_CUSTTYPE_NAME,
PRD_SEARCH_CUSTTYPE_WEIGHT, PRD_SEARCH_CUSTTYPE_WEIGHT_TZ, PRD_SEARCH_CUSTTYPE_RANK,
PRD_SEARCH_PC_ITEM_HOTNEW, RK
FROM
SELECT
/*+ FIRST_ROWS (500) */ DECODE(:OPT,2,SC,(MAX(SC) OVER (PARTITION BY PRD_SEARCH_COMPANY))) AS SO,
SC,PRD_SEARCH_ID,
PRD_SEARCH_COMPANY_ID, PRD_SEARCH_COMPANY, PRD_SEARCH_COMPANYID_ENCRYPTED,
PRD_SEARCH_PCID, PRD_SEARCH_URL, PRD_SEARCH_PC_CLNT_HOME,
PRD_SEARCH_CLNT_ENABLED, PRD_SEARCH_CODE, PRD_SEARCH_NAME,
PRD_SEARCH_DESC_SMALL, PRD_SEARCH_DESC_DETAILED, PRD_SEARCH_DESC_HTML,
PRD_SEARCH_IMG_SMALL, PRD_SEARCH_IMG_LARGE, PRD_SEARCH_WEIGHT_ITEM,
PRD_SEARCH_MODIFIEDDATE, PRD_SEARCH_SIZE, PRD_SEARCH_LABEL1,
PRD_SEARCH_LABEL1_VALUE, PRD_SEARCH_LABEL2, PRD_SEARCH_LABEL2_VALUE,
PRD_SEARCH_LABEL3, PRD_SEARCH_LABEL3_VALUE, PRD_SEARCH_LABEL4,
PRD_SEARCH_LABEL4_VALUE, PRD_SEARCH_LABEL5, PRD_SEARCH_LABEL5_VALUE,
PRD_SEARCH_LABEL6, PRD_SEARCH_LABEL6_VALUE, PRD_SEARCH_CAT_ID,
PRD_SEARCH_CAT_NAME, PRD_SEARCH_CAT_FLNAME, PRD_SEARCH_NAVIGATION_TREE,
PRD_SEARCH_NAVIGATION_TREE_ID,PRD_SEARCH_CITY, PRD_SEARCH_STATE,
PRD_SEARCH_COUNTRY, PRD_SEARCH_PRICE_SALE, PRD_SEARCH_PC_CLNT_TYPE,
PRD_SEARCH_PC_CLNT_TYPE_DESC,
PRD_SEARCH_COMPANY_PHONE, PRD_SEARCH_COMPANY_MOBILE, PRD_SEARCH_COMPANY_FAX,
PRD_SEARCH_COMPANY_EMAIL, PRD_SEARCH_GLCAT_MCAT_ID_LIST, PRD_SEARCH_GLCAT_CAT_ID_LIST,
PRD_SEARCH_GLCAT_GRP_ID_LIST, PRD_SEARCH_GL_COUNTRY_ISO, PRD_SEARCH_GLUSR_USR_ID,
PRD_SEARCH_TRUSTSEAL_CODE, PRD_SEARCH_CUSTTYPE_ID, PRD_SEARCH_CUSTTYPE_NAME,
PRD_SEARCH_CUSTTYPE_WEIGHT, PRD_SEARCH_CUSTTYPE_WEIGHT_TZ, PRD_SEARCH_CUSTTYPE_RANK,
PRD_SEARCH_PC_ITEM_HOTNEW,
ROW_NUMBER() OVER (PARTITION BY PRD_SEARCH_COMPANY_ID
ORDER BY DECODE(:S_MODE,2,1,3,TO_NUMBER(TO_CHAR(PRD_SEARCH_MODIFIEDDATE,'YYYYMMDD')),1) DESC) AS RK
FROM
SELECT
DECODE(:S_MODE,2,1,3,TO_NUMBER(TO_CHAR(PRD_SEARCH_MODIFIEDDATE,'YYYYMMDD')),1) AS SC,
PRD_SEARCH_ID,
PRD_SEARCH_COMPANY_ID, PRD_SEARCH_COMPANY, PRD_SEARCH_COMPANYID_ENCRYPTED,
PRD_SEARCH_PCID, PRD_SEARCH_URL, PRD_SEARCH_PC_CLNT_HOME,
PRD_SEARCH_CLNT_ENABLED, PRD_SEARCH_CODE, PRD_SEARCH_NAME,
PRD_SEARCH_DESC_SMALL, PRD_SEARCH_DESC_DETAILED, PRD_SEARCH_DESC_HTML,
PRD_SEARCH_IMG_SMALL, PRD_SEARCH_IMG_LARGE, PRD_SEARCH_WEIGHT_ITEM,
PRD_SEARCH_MODIFIEDDATE, PRD_SEARCH_SIZE, PRD_SEARCH_LABEL1,
PRD_SEARCH_LABEL1_VALUE, PRD_SEARCH_LABEL2, PRD_SEARCH_LABEL2_VALUE,
PRD_SEARCH_LABEL3, PRD_SEARCH_LABEL3_VALUE, PRD_SEARCH_LABEL4,
PRD_SEARCH_LABEL4_VALUE, PRD_SEARCH_LABEL5, PRD_SEARCH_LABEL5_VALUE,
PRD_SEARCH_LABEL6, PRD_SEARCH_LABEL6_VALUE, PRD_SEARCH_CAT_ID,
PRD_SEARCH_CAT_NAME, PRD_SEARCH_CAT_FLNAME, PRD_SEARCH_NAVIGATION_TREE,
PRD_SEARCH_NAVIGATION_TREE_ID,PRD_SEARCH_CITY, PRD_SEARCH_STATE,
PRD_SEARCH_COUNTRY, PRD_SEARCH_PRICE_SALE, PRD_SEARCH_PC_CLNT_TYPE,
PRD_SEARCH_PC_CLNT_TYPE_DESC,
PRD_SEARCH_COMPANY_PHONE, PRD_SEARCH_COMPANY_MOBILE, PRD_SEARCH_COMPANY_FAX,
PRD_SEARCH_COMPANY_EMAIL, PRD_SEARCH_GLCAT_MCAT_ID_LIST, PRD_SEARCH_GLCAT_CAT_ID_LIST,
PRD_SEARCH_GLCAT_GRP_ID_LIST, PRD_SEARCH_GL_COUNTRY_ISO, PRD_SEARCH_GLUSR_USR_ID,
PRD_SEARCH_TRUSTSEAL_CODE, PRD_SEARCH_CUSTTYPE_ID, PRD_SEARCH_CUSTTYPE_NAME,
PRD_SEARCH_CUSTTYPE_WEIGHT, PRD_SEARCH_CUSTTYPE_WEIGHT_TZ, PRD_SEARCH_CUSTTYPE_RANK,
PRD_SEARCH_PC_ITEM_HOTNEW,
ROW_NUMBER() OVER (PARTITION BY P.PRD_SEARCH_ID ORDER BY P.PRD_SEARCH_ID) RK1
FROM
GLCAT_GRP_TO_CAT G2C, GLCAT_CAT_TO_MCAT C2M, PC_ITEM_TO_GLCAT_MCAT M, PRD_SEARCH P
WHERE
G2C.FK_GLCAT_CAT_ID = C2M.FK_GLCAT_CAT_ID
AND C2M.FK_GLCAT_MCAT_ID = M.FK_GLCAT_MCAT_ID
AND M.FK_PC_ITEM_ID = P.PRD_SEARCH_ID
AND DECODE(:MCAT_ID_STR, NULL, 1, INSTR(','||:MCAT_ID_STR||',',','||M.FK_GLCAT_MCAT_ID||',',1))> 0
AND DECODE(:CAT_ID_STR, NULL, 1, INSTR(','||:CAT_ID_STR||',',','||C2M.FK_GLCAT_CAT_ID||',',1)) > 0
AND DECODE(:GRP_ID_STR, NULL, 1, INSTR(','||:GRP_ID_STR||',',','||G2C.FK_GLCAT_GRP_ID||',',1)) > 0
AND DECODE(:ITEM_ID_STR,NULL,1,INSTR(','||:ITEM_ID_STR||',' , ','||P.PRD_SEARCH_ID||',')) > 0
AND DECODE(:COUNTRY_ISO,NULL,1,INSTR(','||:COUNTRY_ISO||',', ','||P.PRD_SEARCH_GL_COUNTRY_ISO||',')) > 0
AND DECODE(NVL(:COMPANY_ID,0),0,1,P.PRD_SEARCH_COMPANY_ID) = DECODE(NVL(:COMPANY_ID,0),0,1,:COMPANY_ID)
AND DECODE(NVL(:GLUSR_ID,0),0,1,P.PRD_SEARCH_GLUSR_USR_ID) = DECODE(NVL(:GLUSR_ID,0),0,1,:GLUSR_ID)
AND P.PRD_SEARCH_CLNT_ENABLED >= NVL(:LIST_TYPE,0)
AND NVL(LENGTH(P.PRD_SEARCH_TRUSTSEAL_CODE),0) >= :TSONLY
WHERE RK1=1
ORDER BY SC DESC, PRD_SEARCH_CUSTTYPE_WEIGHT ASC, DBMS_RANDOM.RANDOM
) A
WHERE A.RK <= :MY_PRD_PER_COMP
AND ROWNUM <= :MYMAXREC
ORDER BY A.SO DESC, DECODE(:OPT,2,'1', A.PRD_SEARCH_COMPANY), A.RK ASC, DBMS_RANDOM.RANDOMRegards
Madhup -
Help to edit the output of a method please
Hi
I have a piece of code which i need to change. Currently the method connects to a socket c, and reads in a string from a method called get(String), which returns a string, i however need to change this so that the method get(String) returns a list. I am not sure however how to go about changing this code so as to do this
public void run() {
try {
BufferedReader i = new BufferedReader(new InputStreamReader(c.getInputStream()));
DataOutputStream o = new DataOutputStream(c.getOutputStream());
try {
while (true) {
String s = i.readLine();
if (s.startsWith("GET")) {
StringTokenizer t = new StringTokenizer(s, " ");
t.nextToken(); // discard GET
String p = t.nextToken();
String response = get(p);
o.writeBytes("HTTP/1.0 200 OK\nContent-Type: text/plain\nContent-Length: "
+ (response.length() + 1)
+ "\n\n"
+ response + "\n");
break;
} catch (Exception x) {
System.err.println("Error: " + x);
x.printStackTrace();
o.writeBytes(SAYWHAT + "Error: " + x);
o.close();
} catch (Exception x) {
System.err.println("Error: " + x);
x.printStackTrace();
}Currently this method seperates the words in the string output by the get(String) method as far as i can see and writes this output to a HTTP address. I dont know how i could go about changing this so that instead of outputting a string, get(string) will output a list, which in turn will be output by this run() method to a HTTP address. I would welcome any help with this problem, as i dont know where to start.
ThanksThanks for the references, ive been looking through these for a while now but i cannot figure out how to do what i have to do. I have not been able to find a way to read in from an array, i found a ByteArrayInputStream but am not sure how this works. Does anybody know of a way to read in from an array using a BufferedReader or some similar construct?
-
Need help to format the output of the query.
First of all i would like to say I m newbi in oracle query
and of course thanks to read the thread.
I have a problem formatting a query output.
Actually the query is like the following :
select a1
,b1
,c1
from table
where id.table=1
UNION
select a2
,b2
,c2
from table2
where id.table2=1
order by 1;
exit;
my actual output
a1 b1 c1
a2 b2 c2
a1 b1 c1
a2 b2 c2
my desired output
a1 b1 c1
a2 b2 c2
a1 b1 c1
a2 b2 c2
So what i need is an empy row between the groups of results
and to shift the union query.
thanks in advanceSQL>select * from t1;
C1 C2 C3
1 2 3
2 3 4
3 4 5
SQL>select * from t2;
C1 C2 C3
30 40 50
20 30 40
10 20 30
SQL>select c1,c2,c3
2 from( select c1,c2,c3,1 flg
3 from t1
4 union all
5 select c1,c2,c3,2
6 from t2
7 union all
8 select null,null,null,1
9 from dual)
10 order by flg,c1,c2,c3 nulls last;
C1 C2 C3
1 2 3
2 3 4
3 4 5
<br>
10 20 30
20 30 40
30 40 50
7 rows selected.
Funny....... -
Plzz help me with the output of this code....
hi all..
plz check this code and tell me how to select one or more options from this Jlist and write the selected item into a text file....This code does that but the text file shows only one item (i tried using arry but din work) AND text file displays the item which is selected last time the code is interpreted..
import java.awt.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
public class mld extends JFrame implements ListSelectionListener, ActionListener
{private JFrame myframe = new JFrame("Select File");
private DefaultListModel listModel = new DefaultListModel();
private JList list= new JList(listModel);
private String selString = "select file name";
private JButton selButton;
public mld(){
super("mld");
addWindowListener(new WindowAdapter()
{ public void windowClosing(WindowEvent ev) {dispose();
System.exit(0);
listModel.addElement("prog1");
listModel.addElement("prog2");
listModel.addElement("prog3");
listModel.addElement("prog4");
listModel.addElement("prog5");
listModel.addElement("prog6");
listModel.addElement("prog7");
listModel.addElement("prog8");
listModel.addElement("prog9");
listModel.addElement("prog10");
listModel.addElement("prog11");
listModel.addElement("prog12");
list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
list.addListSelectionListener(this);
JScrollPane listScrollPane = new JScrollPane(list);
JButton selButton = new JButton(selString);
selButton.setActionCommand(selString);
selButton.addActionListener(this);
//Create a panel that uses FlowLayout (the default).
JPanel buttonPane = new JPanel();
buttonPane.add(selButton);
Container contentPane = getContentPane();
contentPane.add(listScrollPane, BorderLayout.CENTER);
contentPane.add(buttonPane, BorderLayout.SOUTH);
pack();
show();}
public void valueChanged(ListSelectionEvent e) {}
public void actionPerformed(ActionEvent e){
String tmp = new String(list.getSelectedValue().toString());
try{
FileOutputStream fileOut = new FileOutputStream("temp.txt");
fileOut.write(tmp.getBytes());
fileOut.close();}
catch (Exception e1)
{ e1.printStackTrace(); }
//*main method//
public static void main(String s[]) {
JFrame frame = new mld();
try {
Process p = Runtime.getRuntime().exec("notepad temp.txt ");
p.waitFor();
Process p1 = Runtime.getRuntime().exec("c:/Program Files/Microsoft Office/Office/outlook.EXE /c ipm.note /m [email protected] /a c:/temp.txt");
catch(Exception e)
{ e.printStackTrace(); }
Thanx in advance
bharthireplace
FileOutputStream fs = new FileOutputStream("filename");
with
FileOutputStream fs = new FileOutputStream("filename",true); -
Help in merging the output rtf/documents reports
Hi,
I am working with XML pub tool for a user requirement that 2 output reports(rtf documents) were genated using XML processor from 2 rtf templates, XML data files etc. No I need to merge the 2 output rtf/doc reports . Is there any function in XML publisher so that I can merge these output reports as one report.(Same as merging 2 documents in microsoft word)
Thanks
RajYou can merge/append 2 documents with a third party tools wihtout using XMLP publisher.
HTH
Shaun S -
Need help with disabling the output excution command
hey guys
i'm doing an assignment in which user can input multiple lines. I'm using the scanner class. The problem i'm facing is that when user gives their input in multiple lines then it displays the asking input line even though it doesn't ask for new input because the pervious input stored in the memory. Please help me to disable it somehow. I understand the logic and everything but i can't find a way to disable that line. Here's my code:
print("Please enter words to be converted into Swedish Chef or \"END\" to stop");
inputText = input.nextLine();
while (!inputText.equals ("END") ) {
// separate the text and punctuations
removePunctuations();
// translate all the input text
for (int i = 0; i < inputWOP.length; i++ ) {
translateText(inputWOP);
// display the translated text inculding all the punctuations
printTranslatedText();
System.out.println();
/** the problem is on this line, logically it make sense that
* this will be displayed until "END" isn't entered
* but i want this line not to excute if there's multiple line input
print("Please enter words to be converted into Swedish Chef or \"END\" to stop");
inputText = input.nextLine();
Please help me to solve this problem, thanks in advance!salubad,
Do you really understand your logic? This is a classic while !EOF loop gone wrong... Examine your own code I'm sure you'll get it.
/** the problem is on this line, //YEP
logically it make sense that
* this will be displayed until "END"
isn't entered //DOES IT REALLY?
* but i want this line not to excute if
there's multiple line input //yep, just make it so.
rint("Please enter words to be converted into Swedish
Chef or \"END\" to stop");
inputText = input.nextLine();
Keith. -
Need help to draw a graph from the output I get with my program please
Hi all,
I please need help with this program, I need to display the amount of money over the years (which the user has to enter via the textfields supplied)
on a graph, I'm not sure what to do further with my program, but I have created a test with a System.out.println() method just to see if I get the correct output and it looks fine.
My question is, how do I get the input that was entered by the user (the initial deposit amount as well as the number of years) and using these to draw up the graph? (I used a button for the user to click after he/she has entered both the deposit and year values to draw the graph but I don't know how to get this to work?)
Please help me.
The output that I got looked liked this: (just for a test!) - basically this kind of output must be shown on the graph...
The initial deposit made was: 200.0
After year: 1 Amount is: 210.00
After year: 2 Amount is: 220.50
After year: 3 Amount is: 231.53
After year: 4 Amount is: 243.10
After year: 5 Amount is: 255.26
After year: 6 Amount is: 268.02
After year: 7 Amount is: 281.42
After year: 8 Amount is: 295.49
After year: 9 Amount is: 310.27
After year: 10 Amount is: 325.78
After year: 11 Amount is: 342.07
After year: 12 Amount is: 359.17
After year: 13 Amount is: 377.13
After year: 14 Amount is: 395.99
After year: 15 Amount is: 415.79
After year: 16 Amount is: 436.57
After year: 17 Amount is: 458.40And here is my code that Iv'e done so far:
import javax.swing.*;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.RenderingHints;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.Math;
import java.text.DecimalFormat;
public class CompoundInterestProgram extends JFrame implements ActionListener {
JLabel amountLabel = new JLabel("Please enter the initial deposit amount:");
JTextField amountText = new JTextField(5);
JLabel yearsLabel = new JLabel("Please enter the numbers of years:");
JTextField yearstext = new JTextField(5);
JButton drawButton = new JButton("Draw Graph");
public CompoundInterestProgram() {
super("Compound Interest Program");
setSize(500, 500);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
amountText.addActionListener(this);
yearstext.addActionListener(this);
JPanel panel = new JPanel();
panel.setBackground(Color.white);
panel.add(amountLabel);
amountLabel.setToolTipText("Range of deposit must be 20 - 200!");
panel.add(amountText);
panel.add(yearsLabel);
yearsLabel.setToolTipText("Range of years must be 1 - 25!");
panel.add(yearstext);
panel.add(drawButton);
add(panel);
setVisible(true);
public static void main(String[] args) {
DecimalFormat dec2 = new DecimalFormat( "0.00" );
CompoundInterestProgram cip1 = new CompoundInterestProgram();
JFrame f = new JFrame();
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.getContentPane().add(new GraphPanel());
f.setSize(500, 500);
f.setLocation(200,200);
f.setVisible(true);
Account a = new Account(200);
System.out.println("The initial deposit made was: " + a.getBalance() + "\n");
for (int year = 1; year <= 17; year++) {
System.out.println("After year: " + year + " \t" + "Amount is: " + dec2.format(a.getBalance() + a.calcInterest(year)));
@Override
public void actionPerformed(ActionEvent arg0) {
// TODO Auto-generated method stub
class Account {
double balance = 0;
double interest = 0.05;
public Account() {
balance = 0;
interest = 0.05;
public Account(int deposit) {
balance = deposit;
interest = 0.05;
public double calcInterest(int year) {
return balance * Math.pow((1 + interest), year) - balance;
public double getBalance() {
return balance;
class GraphPanel extends JPanel {
public GraphPanel() {
public void paintComponent(Graphics g) {
Graphics2D g2 = (Graphics2D)g;
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
g2.setColor(Color.red);
}Your help would be much appreciated.
Thanks in advance.watertownjordan wrote:
http://www.jgraph.com/jgraph.html
The above is also good.Sorry but you need to look a bit more closely at URLs that you cite. What the OP wants is a chart (as in X against Y) not a graph (as in links and nodes) . 'jgraph' deals with links and nodes.
The best free charting library that I know of is JFreeChart from www.jfree.org.
Maybe you are looking for
-
1. Is it possible to make of Free Goods Receipt of material without PO generate? If yes how? 2. Also such free goods reciept if i made with Standard Price maintain in Material master so which account posting is made after GRN?
-
Hi All, I am creating a report in CRM regarding OPP. I am finding hard time locating tables for sales team of the OPP. I checked CRMD_ORDER_INDEX which gives me all the partner detail but i also want the PARTNER FUNCTION along with partner details. I
-
Can someone please help me to turn on debugging on ABAP WD. We recently moved to QA environment, before which I use to do the debugging in Dev without anu problem. I go thourgh the UTILITY menu and setup debugging from there, is there something that
-
Where to download CS5.5
Now that CS6 has been released, where can I download CS5.5? I can't find it anywhere on the Adobe website. Where can I download CS5.5? Thanks; Zach
-
Issues with the new IOS out!!! HELP
I have a 3GS and I updated my IOS and now have my stuff quit working or just shuts down, my screen freezes when I open it. safari and the apps store will not open. I have reset my phone three times. Email is spotty. Why cant they just drop the I5?