Query Tune Kindly Help
this query is giving high cost pls help.
SELECT DISTINCT
SI.ORG_ID
,SI.ID SI_NO
,JO.ID JOB_NO
,JO.BOOKING_REF_NO
,ORGSERPO.DESCRIPTION ETA_POL
,TSCH.VESSEL_1||TSCH.VOYAGE_1 VESSEL_VOYAGE_1
,TSCH.ETD_1
,ORGSERPO1.DESCRIPTION POD
,TSCH.ETA_1
,TSCH.VESSEL_2||TSCH.VOYAGE_2 VESSEL_VOYAGE_2
,TSCH.ETD_2
,ORGSERPO2.DESCRIPTION POD2
,TSCH.ETA_2
,TSCH.VESSEL_3||TSCH.VOYAGE_3 VESSEL_VOYAGE_3
,TSCH.ETA_3
,TSCH.ETD_3
,ORGSERPO3.DESCRIPTION POD3
,ORGSERPO4.DESCRIPTION FINAL_DESTINATION
,ORGP.SHORT_NAME CARRIER_SHORT_NAME
,ORGP1.SHORT_NAME CONSIGNEE_SHORT_NAME
,ORGP2.SHORT_NAME FACTORY_SHORT_NAME
,JO.SHIPMENT_TYPE
,SUBD.DESCRIPTION PRODUCT_TYPE ,
Pshm05.Get_SI_Forwarder(jo.org_id,jo.id) Forwarder,
JO.POL_TERMS||JO.POD_TERMS,
decode(po.ext_sys_ref_no,po.trans_id_1,po.id,po.ext_sys_ref_no),
SI.ORGP_ID,
pshm07.Get_Cont_count(pal.org_id,pal.id,'20F') f20,
pshm07.Get_Cont_count(pal.org_id,pal.id,'40F') f40,
pshm07.Get_Cont_count(pal.org_id,pal.id,'40H') h40,
pshm07.Get_Cont_count(pal.org_id,pal.id,'45F') f45,
sum(palcsi.qty) QTY,
sum(palcsi.gross_weight) WEIGHT,
sum(palcsi.volume) M3,
(si.instruction_1||si.instruction_2||si.instruction_3||si.instruction_4||si.instruction_5
||si.instruction_6||si.instruction_7||si.instruction_8||si.instruction_9||si.instruction_10) INSTRUCTIONS ,
TSCH.ETA_POL,
PAL.ID,
PAL.EXT_SYS_REF_NO
FROM TRANSPORT_SCHEDULES TSCH,
TRANSPORT_ORDERS SI,
JOB_ORDERS JO,
PURCHASE_ORDERS PO,
PACKING_LISTS PAL,
PALCS_ITEMS PALCSI,
ORG_SERVICE_POINTS ORGSERPO,
ORG_SERVICE_POINTS ORGSERPO1,
ORG_SERVICE_POINTS ORGSERPO2,
ORG_SERVICE_POINTS ORGSERPO3,
ORG_SERVICE_POINTS ORGSERPO4,
ORG_PARTIES ORGP,
ORG_PARTIES ORGP1,
ORG_PARTIES ORGP2,
SUBJECT_DOMAINS SUBD
WHERE TSCH.ORG_ID = JO.ORG_ID
AND TSCH.ID = JO.TSCH_ID
AND JO.ORG_ID = PAL.EXT_SYS_REF_ORG_ID
AND JO.ID = PAL.TRANS_ID_1
AND PAL.ORG_ID = PALCSI.PALCS_PAL_ORG_ID
AND PAL.ID = PALCSI.PALCS_PAL_ID
AND PALCSI.PALCS_PAL_ORG_ID = PO.ORG_ID
AND PALCSI.TRANS_ID_1 = PO.ID
AND JO.ORG_ID = SI.ORG_ID
AND JO.ID = SI.TRANS_ID_1
AND TSCH.ORG_ID = ORGSERPO.ORG_ID
AND TSCH.ORGSERPO_ID = ORGSERPO.ID
AND TSCH.ORG_ID = ORGSERPO1.ORG_ID
AND TSCH.ORGSERPO_ID_1 = ORGSERPO1.ID
AND TSCH.ORG_ID = ORGSERPO2.ORG_ID (+)
AND TSCH.ORGSERPO_ID_2 = ORGSERPO2.ID (+)
AND TSCH.ORG_ID = ORGSERPO3.ORG_ID (+)
AND TSCH.ORGSERPO_ID_3 = ORGSERPO3.ID (+)
AND TSCH.ORG_ID = ORGSERPO4.ORG_ID
AND TSCH.ORGSERPO_ID_4 = ORGSERPO4.ID
AND TSCH.ORG_ID = ORGP.ORG_ID
AND TSCH.ORGP_ID_5 = ORGP.ID
AND PAL.ORG_ID = ORGP1.ORG_ID
AND PAL.ORGP_ID_2 = ORGP1.ID
AND SI.ORG_ID = ORGP2.ORG_ID
AND SI.ORGP_ID = ORGP2.ID
AND PO.TRANS_TYPE = SUBD.ID
AND SUBD.SUB_ID = 'PRODUCT_TYPE'
AND SI.TRANS_TYPE = 'JO_FACT'
GROUP BY
SI.ORG_ID
,SI.ID
,JO.ID
,JO.BOOKING_REF_NO
,ORGSERPO.DESCRIPTION
,TSCH.VESSEL_1
,TSCH.VOYAGE_1
,TSCH.ETD_1
,ORGSERPO1.DESCRIPTION
,TSCH.ETA_1
,TSCH.VESSEL_2
,TSCH.VOYAGE_2
,TSCH.ETD_2
,ORGSERPO2.DESCRIPTION
,TSCH.ETA_2
,TSCH.VESSEL_3
,TSCH.VOYAGE_3
,TSCH.ETA_3
,TSCH.ETD_3
,ORGSERPO3.DESCRIPTION
,ORGSERPO4.DESCRIPTION
,ORGP.SHORT_NAME
,ORGP1.SHORT_NAME
,ORGP2.SHORT_NAME
,JO.SHIPMENT_TYPE
,SUBD.DESCRIPTION,
Pshm05.Get_SI_Forwarder(jo.org_id,jo.id),
JO.POL_TERMS,
JO.POD_TERMS,
decode(po.ext_sys_ref_no,po.trans_id_1,po.id,po.ext_sys_ref_no),
SI.ORGP_ID,
pshm07.Get_Cont_count(pal.org_id,pal.id,'20F'),
pshm07.Get_Cont_count(pal.org_id,pal.id,'40F'),
pshm07.Get_Cont_count(pal.org_id,pal.id,'40H'),
pshm07.Get_Cont_count(pal.org_id,pal.id,'45F'),
(si.instruction_1||si.instruction_2||si.instruction_3||si.instruction_4||si.instruction_5
||si.instruction_6||si.instruction_7||si.instruction_8||si.instruction_9||si.instruction_10,
TSCH.ETA_POL,
PAL.ID,
PAL.EXT_SYS_REF_NO)
i got PRE thanks
<Pre>
select *
from
v_si_schedule Where Rownum < 10
call count cpu elapsed disk query current rows
Parse 1 0.91 0.88 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 1 37.11 36.93 6202 7794 0 9
total 3 38.02 37.82 6202 7794 0 9
Misses in library cache during parse: 1
Optimizer goal: ALL_ROWS
Rows Row Source Operation
9 COUNT STOPKEY (cr=1745575 pr=6243 pw=0 time=60273765 us)
9 VIEW (cr=1745575 pr=6243 pw=0 time=60273759 us)
9 SORT UNIQUE STOPKEY (cr=1745575 pr=6243 pw=0 time=60273731 us)
24125 SORT GROUP BY (cr=1745575 pr=6243 pw=0 time=60177004 us)
99836 HASH JOIN (cr=7794 pr=6202 pw=0 time=3451945 us)
3953 TABLE ACCESS FULL ORG_SERVICE_POINTS (cr=61 pr=59 pw=0 time=233 us)
99836 HASH JOIN RIGHT OUTER (cr=7733 pr=6143 pw=0 time=3147141 us)
3953 TABLE ACCESS FULL ORG_SERVICE_POINTS (cr=61 pr=0 pw=0 time=36 us)
99836 HASH JOIN RIGHT OUTER (cr=7672 pr=6143 pw=0 time=2942252 us)
3953 TABLE ACCESS FULL ORG_SERVICE_POINTS (cr=61 pr=0 pw=0 time=49 us)
99836 HASH JOIN (cr=7611 pr=6143 pw=0 time=2637117 us)
3953 TABLE ACCESS FULL ORG_SERVICE_POINTS (cr=61 pr=0 pw=0 time=50 us)
99836 HASH JOIN (cr=7550 pr=6143 pw=0 time=2331803 us)
3953 TABLE ACCESS FULL ORG_SERVICE_POINTS (cr=61 pr=0 pw=0 time=48 us)
99836 HASH JOIN (cr=7489 pr=6143 pw=0 time=2026580 us)
3413 TABLE ACCESS FULL ORG_PARTIES (cr=122 pr=93 pw=0 time=100 us)
99836 HASH JOIN (cr=7367 pr=6050 pw=0 time=1719269 us)
6112 TABLE ACCESS FULL TRANSPORT_SCHEDULES (cr=248 pr=245 pw=0 time=6301 us)
100271 HASH JOIN (cr=7119 pr=5805 pw=0 time=1300940 us)
3413 TABLE ACCESS FULL ORG_PARTIES (cr=122 pr=1 pw=0 time=99 us)
100684 HASH JOIN (cr=6997 pr=5804 pw=0 time=1098029 us)
5655 TABLE ACCESS FULL TRANSPORT_ORDERS (cr=1067 pr=13 pw=0 time=22723 us)
84236 HASH JOIN (cr=5930 pr=5791 pw=0 time=1089549 us)
6415 TABLE ACCESS FULL JOB_ORDERS (cr=310 pr=307 pw=0 time=6611 us)
84236 HASH JOIN (cr=5620 pr=5484 pw=0 time=816414 us)
3413 TABLE ACCESS FULL ORG_PARTIES (cr=122 pr=0 pw=0 time=59 us)
84236 HASH JOIN (cr=5498 pr=5484 pw=0 time=557678 us)
17884 TABLE ACCESS FULL PACKING_LISTS (cr=1005 pr=1001 pw=0 time=18094 us)
93201 HASH JOIN (cr=4493 pr=4483 pw=0 time=462268 us)
25081 HASH JOIN (cr=1326 pr=1322 pw=0 time=102379 us)
8 TABLE ACCESS BY INDEX ROWID SUBJECT_DOMAINS (cr=7 pr=7 pw=0 time=178 us)
8 INDEX RANGE SCAN SUBD_PK (cr=2 pr=2 pw=0 time=97 us)(object id 198829)
25081 TABLE ACCESS FULL PURCHASE_ORDERS (cr=1319 pr=1315 pw=0 time=50367 us)
93201 TABLE ACCESS FULL PALCS_ITEMS (cr=3167 pr=3161 pw=0 time=93374 us)
unable to set optimizer goal
ORA-01986: OPTIMIZER_GOAL is obsolete
parse error offset: 33
Rows Execution Plan
0 SELECT STATEMENT GOAL: ALL_ROWS
9 COUNT (STOPKEY)
9 VIEW OF 'V_SI_SCHEDULE' (VIEW)
9 SORT (UNIQUE STOPKEY)
24125 SORT (GROUP BY)
99836 HASH JOIN
3953 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'ORG_SERVICE_POINTS' (TABLE)
99836 HASH JOIN (RIGHT OUTER)
3953 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'ORG_SERVICE_POINTS' (TABLE)
99836 HASH JOIN (RIGHT OUTER)
3953 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'ORG_SERVICE_POINTS' (TABLE)
99836 HASH JOIN
3953 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'ORG_SERVICE_POINTS' (TABLE)
99836 HASH JOIN
3953 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'ORG_SERVICE_POINTS' (TABLE)
99836 HASH JOIN
3413 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'ORG_PARTIES' (TABLE)
99836 HASH JOIN
6112 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'TRANSPORT_SCHEDULES' (TABLE)
100271 HASH JOIN
3413 TABLE ACCESS GOAL: ANALYZED (FULL) OF
'ORG_PARTIES' (TABLE)
100684 HASH JOIN
5655 TABLE ACCESS GOAL: ANALYZED (FULL)
OF 'TRANSPORT_ORDERS' (TABLE)
84236 HASH JOIN
6415 TABLE ACCESS GOAL: ANALYZED (FULL)
OF 'JOB_ORDERS' (TABLE)
84236 HASH JOIN
3413 TABLE ACCESS GOAL: ANALYZED
(FULL) OF 'ORG_PARTIES' (TABLE)
84236 HASH JOIN
17884 TABLE ACCESS GOAL: ANALYZED
(FULL) OF 'PACKING_LISTS' (TABLE)
93201 HASH JOIN
25081 HASH JOIN
8 TABLE ACCESS GOAL:
ANALYZED (BY INDEX ROWID) OF
'SUBJECT_DOMAINS' (TABLE)
8 INDEX GOAL: ANALYZED
(RANGE SCAN) OF 'SUBD_PK' (INDEX (UNIQUE))
25081 TABLE ACCESS GOAL:
ANALYZED (FULL) OF 'PURCHASE_ORDERS' (TABLE)
93201 TABLE ACCESS GOAL: ANALYZED
(FULL) OF 'PALCS_ITEMS' (TABLE)
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 14 1.84 1.81 3 21 0 0
Execute 16 0.00 0.00 0 0 0 6
Fetch 96 74.72 74.49 13598 15603 0 9113
total 126 76.56 76.30 13601 15624 0 9119
Misses in library cache during parse: 4
Misses in library cache during execute: 1
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 86 0.06 0.05 0 25 0 0
Execute 998985 25.06 23.86 38 617 0 0
Fetch 1000325 24.25 23.09 1782 3480045 0 980187
total 1999396 49.37 47.01 1820 3480687 0 980187
Misses in library cache during parse: 30
Misses in library cache during execute: 29
18 user SQL statements in session.
84 internal SQL statements in session.
102 SQL statements in session.
5 statements EXPLAINed in this session.
Sort options: default
1 session in tracefile.
18 user SQL statements in trace file.
84 internal SQL statements in trace file.
102 SQL statements in trace file.
36 unique SQL statements in trace file.
5 SQL statements EXPLAINed using schema:
schema.prof$plan_table
Default table was used.
Table was created.
Table was dropped.
2000131 lines in trace file.
<Pre>
Similar Messages
-
Creating a Report for the following Query u0096 Kindly help
Hi,
Using selection options we have to give the name of
1) Sales Organization -- VBAK -VKORG
2) Distribution Channel -- VBAK - VTWEG
3) Division -- VBAK -- SPART
4) Created Date -- VBAK -- ERDAT.
Once we select this the following list should be displayed.
1) Order no. -- VBAK - VBELN.
2) Created date -- VBAK - ERDAT
3) Sold To Party -- VBAK - KUNNR
4) Shipped to party -- VBPA -- KUNNR.
5) Item no -- VBAP -- POSNR
6) Material no. -- VBAP -- MATNR
7) Material Discription -- VBAP - ARKTX.
The out put should be like this
Sales Org : **********
Dist chan : **************
Division : *********
Created Date : ********
Orderno credate soltopar shiptopar itemno materiano materdes
and so.
Also When we click on the order no we should ge the transaction VA03.
With Select options i was able to get the sales organization distribution channel and division and the when we give the values it is showing Run time errors.
Kindly help me to proceed further.
Even if I am able to generate the order list it will be fine. Going on to VA03 I will manage some how If possible give the syntax for this also).
Regard,
SurjithHi,
Check the below code :
REPORT yvic_test_sales.
TABLES vbak.
TYPES:
BEGIN OF ty_sales_data,
vbeln TYPE vbeln_va,
erdat TYPE erdat,
kunnr TYPE kunag,
oid_ship TYPE kunwe,
posnr TYPE posnr_va,
matnr TYPE matnr,
END OF ty_sales_data.
DATA : gt_data TYPE STANDARD TABLE OF ty_sales_data.
CLASS gcl_handle_events DEFINITION
CLASS gcl_handle_events DEFINITION.
PUBLIC SECTION.
METHODS:
on_link_click FOR EVENT link_click OF cl_salv_events_table
IMPORTING row column.
ENDCLASS. "gcl_handle_events DEFINITION
SELECTION-SCREEN BEGIN OF BLOCK b1.
SELECT-OPTIONS:
s_vkorg FOR vbak-vkorg,
s_vtweg FOR vbak-vtweg,
s_spart FOR vbak-spart,
s_erdat FOR vbak-erdat.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
SELECT d1~vbeln
d1~erdat
d1~kunnr
d2~oid_ship
d2~posnr
d2~matnr
INTO TABLE gt_data
FROM vbak AS d1
JOIN vbap AS d2
ON d1vbeln = d2vbeln
WHERE d1~vkorg IN s_vkorg[]
AND d1~vtweg IN s_vtweg[]
AND d1~spart IN s_spart[]
AND d1~erdat IN s_erdat[].
CLASS gcl_handle_events IMPLEMENTATION
Subroutine call_transaction will get called
when user clicks on BELNR (Acounting document) or EBELN(PO)
CLASS gcl_handle_events IMPLEMENTATION.
METHOD on_link_click.
PERFORM call_transaction USING row column.
ENDMETHOD. "on_link_click
ENDCLASS. "gcl_handle_events IMPLEMENTATION
END-OF-SELECTION.
PERFORM display_data.
*& Form DISPLAY_DATA
text
--> p1 text
<-- p2 text
FORM display_data .
DATA:
lo_table TYPE REF TO cl_salv_table,"table object
lo_function TYPE REF TO cl_salv_functions,
lo_layout TYPE REF TO cl_salv_layout,
lo_columns TYPE REF TO cl_salv_columns_table,
lo_hotspot TYPE REF TO cl_salv_column_table,
lo_events_name TYPE REF TO cl_salv_events_table,
lo_click TYPE REF TO gcl_handle_events,
ls_key TYPE salv_s_layout_key,
lo_sorts TYPE REF TO cl_salv_sorts,
lo_aggregation TYPE REF TO cl_salv_aggregations,
lo_exception TYPE REF TO cx_root,"exception object
l_text TYPE string." to hold exception message
create a table object to display result table
TRY.
cl_salv_table=>factory( IMPORTING r_salv_table = lo_table
CHANGING t_table = gt_data ).
catch exception
CATCH cx_salv_msg INTO lo_exception.
get exception text and display it in message
l_text = lo_exception->get_text( ).
Message: & & & &
MESSAGE i000(zzz) WITH l_text.
ENDTRY.
get column object of the table created
lo_columns = lo_table->get_columns( ).
FOR HOTSPOT on Doc no
TRY.
lo_hotspot ?= lo_columns->get_column( 'VBELN' ).
lo_hotspot->set_cell_type( if_salv_c_cell_type=>hotspot ).
CATCH cx_salv_not_found INTO lo_exception.
get exception text and display it in message
l_text = lo_exception->get_text( ).
Message: & & & &
MESSAGE i000(zzz) WITH l_text.
ENDTRY.
lo_events_name = lo_table->get_event( ).
CREATE OBJECT lo_click.
SET HANDLER lo_click->on_link_click FOR lo_events_name.
lo_table->display( ).
ENDFORM. " DISPLAY_DATA
*& Form CALL_TRANSACTION
text
-->P_ROW text
-->P_COLUMN text
FORM call_transaction USING pa_row
pa_column.
DATA ls_final_data TYPE ty_sales_data.
IF pa_column = 'VBELN'.
CLEAR ls_final_data.
READ TABLE gt_data INTO ls_final_data INDEX pa_row.
IF NOT ls_final_data-vbeln IS INITIAL.
SET PARAMETER ID 'AUN' FIELD ls_final_data-vbeln.
CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
ENDIF.
ENDIF.
ENDFORM. " CALL_TRANSACTION
Reward if helpful..
Thanks -
Issue on the web query, pls kindly help.
Hi colleagues,
First, I execute a web query and all data shows perfectly. Then, i do some changes to the report, like deleting some column, and i use the "save view" button. However, the data of the new devised report does not shown and I am given a error message that "Could not find any data to display. This might be due to the current selection of variable or filter values".
When I look into it, the error really lies in the filter values, which has been automatically set when i save the view. For these set filter values, the report finds no data to display. Have some of you come across such kind of errors? great thanks.
BR, ClarkHi guru,
Thanks for your reply and it works after the patch installation.
BR,
Clark -
Sql query tunning, need help!
below is the sql that runs very very slow:
SELECT h.STAT_HIST_ID, h.WF_ACTN, h.USR_ACTN,
h.WF_CHNG_DATA, h.USR_CHNG_DATA, h.PRCSG_TM, h.UPD_LOGIN, h.UPD_DT,
RTRIM(c.LAST_NM || ', ' || c.FIRST_NM || ' ' || c.MIDDLE_INITIAL)
FROM WF_STAT_HIST h, CSE_USER_DATA_VW c WHERE h.WRK_ITM_ID = 'GT1MPTG01ATBZP'
AND h.UPD_LOGIN = c.USER_NM (+) ORDER BY h.UPD_DT ;Here is its index:
all_indexes:
SCGDBA WF_STAT_HIST_INDX_ARCH NORMAL SCGDBA WF_STAT_HIST TABLE NONUNIQUE DISABLED IMS_I
SCGDBA PK_WF_STAT_HIST NORMAL SCGDBA WF_STAT_HIST TABLE UNIQUE DISABLED SCG_I
SCGDBA WF_STAT_HIST_IDX1 NORMAL SCGDBA WF_STAT_HIST TABLE NONUNIQUE DISABLED SCG_I
all_ind_columns:
SCGDBA WF_STAT_HIST_INDX_ARCH SCGDBA WF_STAT_HIST ARCHIVEDT 1 7 0 ASC
SCGDBA PK_WF_STAT_HIST SCGDBA WF_STAT_HIST STAT_HIST_ID 1 22 0 ASC
SCGDBA WF_STAT_HIST_IDX1 SCGDBA WF_STAT_HIST WF_ACTN 1 50 50 ASC
SCGDBA WF_STAT_HIST_IDX1 SCGDBA WF_STAT_HIST USR_ACTN 2 50 50 ASCHere is its explain plan:
Plan hash value: 479056202
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 216 | 30456 | 70864 (2)| 00:14:11 |
| 1 | SORT ORDER BY | | 216 | 30456 | 70864 (2)| 00:14:11 |
|* 2 | HASH JOIN OUTER | | 216 | 30456 | 70863 (2)| 00:14:11 |
|* 3 | TABLE ACCESS FULL| WF_STAT_HIST | 216 | 24840 | 70857 (2)| 00:14:11 |
| 4 | TABLE ACCESS FULL| CSE_USER_DATA_VW | 1013 | 26338 | 6 (0)| 00:00:01 |
Predicate Information (identified by operation id):
2 - access("H"."UPD_LOGIN"="C"."USER_NM"(+))
3 - filter("H"."WRK_ITM_ID"='GT1MPTG01ATBZP')Could you guys take a look and tell me what the problem might be?
I can`t give you TKPROF, because I got no access to that trace files!
Any thoughts would be appreciated:-)
Edited by: PhoenixBai on Sep 27, 2009 3:13 PMPl post the output of the following
select count(*) from wf_stat_hist;
select count (distinct wrk_itm_id) from wf_stat_hist;
select count (distinct upd_login) from wf_stat_hist;Your code is performing poorly because your WHERE clause is searching on a column on WF_STAT_HIST that is not indexed. Hopefully the output of the above code will determine which column (WRK_ITM_ID or UPD_LOGIN) is a better candidate to be indexed on. If neither of these columns is a good candidate, you may have to change the WHERE clause to be more selective rather than do a full table scan as the plan indicates.
HTH
Srini -
HT1491 Unable to purchase songs album through I tunes, kindly help.
During purchase the song album in iTunes, error message is keep coming after selecting purchase as your purchase in not complete contact suport.
Huh?
You contacted them?
How?
What did they tell you?
They are the ones who can solve the issue. -
Hi Guru's
Can you please help me query tunning.
Database Version : Oracle 11g - 11.2.0.3
select distinct corporation_name custer_name,
glog_util.remove_domain(SHIP_BUY.SERVPROV_GID ) SCAC,
glog_util.remove_domain(ship_buy.shipment_gid) buy_shipment_gid,
F_Get_SELL_ID_STRING(SHIP_BUY.SHIPMENT_GID) sell_shipment_gid,
ship_buy.domain_name,
F_GET_ORDER_RELEASE_GID('B',SHIP_BUY.SHIPMENT_GID,0) ORDER_RELEASE_GID,
f_get_refnum_string('SHIPMENT', ship_buy.shipment_gid, 'MBOL_NUMBER_CLEANSED')MBOL_NUMBER,
F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) POD_RECEIVED_DATE,
f_get_exp_accrue_amt(ship_buy.shipment_gid,'SHIPMENT') Total_accrual_amount
from shipment ship_buy,
invoice inv,
invoice_shipment si,
--voucher v,
corporation corp
where corp.domain_name=ship_buy.domain_name
and corp.is_domain_master='Y'
and 1=1
AND ship_buy.domain_name like 'UPS/CP/DFP/%'
and F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
--and V.INVOICE_GID(+) = inv.invoice_gid
--and ship_buy.domain_name = 'UPS/CP/VZNB'
and si.shipment_gid(+) = SHIP_BUY.SHIPMENT_GID
AND SI.INVOICE_GID = INV.INVOICE_GID(+)
and SHIP_BUY.INSERT_DATE > '1-JAN-2007'
and SHIP_BUY.USER_DEFINED1_ICON_GID = 'ACCEPTED'
UNION
select distinct corporation_name custer_name,
glog_util.remove_domain(SHIP_BUY.SERVPROV_GID ) SCAC,
glog_util.remove_domain(ship_buy.shipment_gid) buy_shipment_gid,
F_GET_SELL_ID_STRING( SHIP_BUY.SHIPMENT_GID) sell_shipment_gid,
ship_buy.domain_name,
F_GET_ORDER_RELEASE_GID('B',SHIP_BUY.SHIPMENT_GID,0) ORDER_RELEASE_GID,
f_get_refnum_string('SHIPMENT', ship_buy.shipment_gid, 'MBOL_NUMBER_CLEANSED')MBOL_NUMBER,
F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) POD_RECEIVED_DATE,
f_get_exp_accrue_amt(inv.invoice_gid,'INVOICE') Total_accrual_amount
from shipment ship_buy,
invoice inv,
invoice_shipment si,
-- voucher v,
corporation corp
where corp.domain_name=ship_buy.domain_name
and corp.is_domain_master='Y'
and 1=1
AND ship_buy.domain_name like 'UPS/CP/DFP/%'
and F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
--AND INV.DOMAIN_NAME = 'UPS/CP/VZNB'
--and V.INVOICE_GID(+) = inv.invoice_gid
and si.shipment_gid(+) = SHIP_BUY.SHIPMENT_GID
AND SI.INVOICE_GID = INV.INVOICE_GID(+)
and SHIP_BUY.INSERT_DATE > '1-JAN-2007'
and INV.USER_DEFINED1_ICON_GID = 'ACCEPTED'
GROUP BY corporation_name,SHIP_BUY.SHIPMENT_GID,SHIP_BUY.SERVPROV_GID,ship_buy.domain_name,inv.invoice_gid
ORDER BY CUSTER_NAME, BUY_SHIPMENT_GID;
And I generated the execution plan :
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 3 | 448 | 415 (2)| 00:00:05 |
| 1 | SORT UNIQUE | | 3 | 448 | 414 (87)| 00:00:05 |
| 2 | UNION-ALL | | | | | |
| 3 | NESTED LOOPS OUTER | | 3 | 384 | 57 (0)| 00:00:01 |
|* 4 | HASH JOIN | | 3 | 294 | 54 (0)| 00:00:01 |
|* 5 | TABLE ACCESS BY INDEX ROWID | SHIPMENT | 3 | 195 | 40 (0)| 00:00:01 |
|* 6 | INDEX SKIP SCAN | IND_SHIP_DOM_ICON | 54 | | 25 (0)| 00:00:01 |
|* 7 | TABLE ACCESS FULL | CORPORATION | 4 | 132 | 14 (0)| 00:00:01 |
|* 8 | INDEX RANGE SCAN | IND_INVOICESHIP_SHP_GID | 1 | 30 | 1 (0)| 00:00:01 |
| 9 | HASH GROUP BY | | 1 | 192 | 356 (1)| 00:00:05 |
|* 10 | HASH JOIN | | 1 | 192 | 354 (1)| 00:00:05 |
| 11 | NESTED LOOPS | | | | | |
| 12 | NESTED LOOPS | | 1 | 159 | 339 (0)| 00:00:05 |
| 13 | NESTED LOOPS | | 145 | 13920 | 194 (0)| 00:00:03 |
| 14 | TABLE ACCESS BY INDEX ROWID| INVOICE | 145 | 5220 | 49 (0)| 00:00:01 |
|* 15 | INDEX SKIP SCAN | IDX_INV_TYP_ICON_NAM | 145 | | 17 (0)| 00:00:01 |
|* 16 | INDEX RANGE SCAN | UK_INVOICE_SHIPMENT | 1 | 60 | 1 (0)| 00:00:01 |
|* 17 | INDEX UNIQUE SCAN | PK_SHIPMENT | 1 | | 1 (0)| 00:00:01 |
|* 18 | TABLE ACCESS BY INDEX ROWID | SHIPMENT | 1 | 63 | 1 (0)| 00:00:01 |
|* 19 | TABLE ACCESS FULL | CORPORATION | 4 | 132 | 14 (0)| 00:00:01 |
Predicate Information (identified by operation id):
4 - access("CORP"."DOMAIN_NAME"="SHIP_BUY"."DOMAIN_NAME")
5 - filter("F_GET_POD_RECEIVED_DATE"("SHIP_BUY"."SHIPMENT_GID")<=TO_DATE(' 2013-07-31 00:00:00',
'syyyy-mm-dd hh24:mi:ss') AND "SHIP_BUY"."INSERT_DATE">TO_DATE(' 2007-01-01 00:00:00', 'syyyy-mm-dd
hh24:mi:ss'))
6 - access("SHIP_BUY"."USER_DEFINED1_ICON_GID"='ACCEPTED' AND "SHIP_BUY"."DOMAIN_NAME" LIKE
'UPS/CP/DFP/%')
filter("SHIP_BUY"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%' AND
"SHIP_BUY"."USER_DEFINED1_ICON_GID"='ACCEPTED')
7 - filter("CORP"."IS_DOMAIN_MASTER"='Y' AND "CORP"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%')
8 - access("SI"."SHIPMENT_GID"(+)="SHIP_BUY"."SHIPMENT_GID")
10 - access("CORP"."DOMAIN_NAME"="SHIP_BUY"."DOMAIN_NAME")
15 - access("INV"."USER_DEFINED1_ICON_GID"='ACCEPTED')
filter("INV"."USER_DEFINED1_ICON_GID"='ACCEPTED')
16 - access("SI"."INVOICE_GID"="INV"."INVOICE_GID")
17 - access("SI"."SHIPMENT_GID"="SHIP_BUY"."SHIPMENT_GID")
filter("F_GET_POD_RECEIVED_DATE"("SHIP_BUY"."SHIPMENT_GID")<=TO_DATE(' 2013-07-31 00:00:00',
'syyyy-mm-dd hh24:mi:ss'))
18 - filter("SHIP_BUY"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%' AND "SHIP_BUY"."INSERT_DATE">TO_DATE('
2007-01-01 00:00:00', 'syyyy-mm-dd hh24:mi:ss'))
19 - filter("CORP"."IS_DOMAIN_MASTER"='Y' AND "CORP"."DOMAIN_NAME" LIKE 'UPS/CP/DFP/%')
Statistics
246247 recursive calls
2 db block gets
1660067 consistent gets
13839 physical reads
0 redo size
592054 bytes sent via SQL*Net to client
6024 bytes received via SQL*Net from client
502 SQL*Net roundtrips to/from client
15296 sorts (memory)
0 sorts (disk)
7513 rows processedHmmm...why does this look familiar?
F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) <= to_char(to_date('31-JUL-2013', 'DD-MON-YYYY'), 'dd-mon-yyyy')
SHIP_BUY.INSERT_DATE > '1-JAN-2007'
Like I said in your other thread about this, these two lines need to be fixed and your function needs to be fixed so the return statement doesn't do an implicit date conversion.
Can't you see what that first line is doing? You're taking a character string, turning it into a date, then back to a character string.
If nothing else, these lines should be...
F_GET_POD_RECEIVED_DATE (ship_BUY.SHIPMENT_GID) <= to_date('31-JUL-2013', 'DD-MON-YYYY')
SHIP_BUY.INSERT_DATE > to_date('01-JAN-2007','DD-MON-YYYY')
(assuming insert_date is a proper date format, fingers crossed) -
how to transfer file from ipod touch to i tunes. i have files in my ipod , ut itunes is new so its telling if u sync the ipod all the files will be replaced but no files in the itunes.. so kindly help me how to transfer the files from i pod to itunes......
Some of the information below has subsequently appeared in a document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991
Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was designed for you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchased content.
iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only media purchased from iTunes Store
For transferring other items from an i-device to a computer you will have to use third party commercial software. Examples (check the web for others; this is not an exhaustive listing, nor do I have any idea if they are any good):
- Senuti - http://www.fadingred.com/senuti/
- Phoneview - http://www.ecamm.com/mac/phoneview/
- MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/
- Sharepod (free) - http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2 - Windows
- Snowfox/iMedia - http://www.mac-videoconverter.com/imedia-transfer-mac.html - Mac & PC
- iexplorer (free) - http://www.macroplant.com/iexplorer/ - Mac&PC
- Yamipod (free) - http://www.yamipod.com/main/modules/downloads/ - PC, Linux, Mac [Still updated for use on newer devices? No edits to site since 2010.]
- 2010 Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/message/11624224 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.
Syncing to a "New" Computer or replacing a "crashed" Hard Drive - https://discussions.apple.com/docs/DOC-3141 - dates from 2008 and some outdated information now.
Copying Content from your iPod to your Computer - The Definitive Guide - http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/ - Information about use in disk mode pertains only to older model iPods.
Get Your Music Off of Your iPod - http://howto.wired.com/wiki/Get_Your_Music_Off_of_Your_iPod - I am not sure but this may only work with some models and not newer Touch, iPhone, or iPad.
Additional information here https://discussions.apple.com/message/18324797 -
Creating a report for the following Query --Kindly help.
Here when we use select options
1) you have to use 4 different "Select Option" Statement to select this Below.
1) Sales Organisation -- VBAK -VKORG
2) Distribution Channel -- VBAK - VTWEG
3) Division -- VBAK -- SPART
4) Created Date -- VBAK -- ERDAT.
The following fields have to be displayed.
1) Order no. -- VBAK - VBELN.
2) Created date -- VBAK - ERDAT
3) Sold To Party -- VBAK - KUNNR
4) Shiped to party -- VBPA -- KUNNR.
5) Item no -- VBAP -- POSNR
6) Material no. -- VBAP -- MATNR
7) Material Discription -- VBAP - ARKTX.
By using the select options of Sales organisation, Distribution channnel and so on I am not able to get the out put of the order no , created date , sold to party , shipped to party (Which is in a different tableVBPA) and Item no Material No and material Discription which are in table VBAP.Here I am getting a run time error.
Kindly help and inform how to code this .
Also When we click the Order no in the list we have to get the screen VA03.
RegardHi John,
Use the following Select statement for Query :-
Code A )
SELECT vbak~vkorg
vbak~vtweg
vbak~spart
vbak~erdat
vbak~vbeln
vbak~erdat
vbak~kunnr
vbpa~kunnr
vbap~posnr
vbap~matnr
vbap~arktx
into corresponding fields of table ITAB
FROM ( vbak INNER JOIN vbap
ON vbakvbeln = vbapvbeln
INNER JOIN vbpa
ON vbakvbeln = vbpavbeln
WHERE vbak~vkorg IN s_vkorg
AND vbak~vtweg IN s_vtweg
and vbak~spart in s_spart
AND vbak~erdat in s_erdat.
And Use this part of the code to show the selected Sales order :-
code B)
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
CASE r_ucomm.
WHEN '&IC1'.
CASE rs_selfield-sel_tab_field.
WHEN 'ITAB-VBELN'.
CHECK NOT rs_selfield-value IS INITIAL.
SET PARAMETER ID 'AUN' FIELD rs_selfield-value.
CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
ENDCASE.
ENDCASE.
ENDFORM.
Award points if useful !
Regards
Hrishi -
I have bought used I phone 4s. I cloud fails to accept my apple ID, which is accepted by apple store and I tuned.
It says that I have already used maximum number of user accounts. Kindly help to resolve this problem.Hello Renvin29,
It sounds like you need to disable your iPhone remotely. I'm sorry to hear about your phone! The only way to do this with is Apple services is if you had Find my iPhone enabled. You have 2 options:
You can use this article to put the phone into Lost Mode and preserve your data on it, but prevent access to it:
iCloud: Use Lost Mode
http://support.apple.com/kb/PH2700
Or you can just erase it remotely outright:
iCloud: Erase your device
http://support.apple.com/kb/PH2701
You should also take a look at this article for additional info on what to do about this situation:
If your iPhone, iPad, or iPod touch is lost or stolen
http://support.apple.com/kb/HT5668
Thank you for using Apple Support Communities.
Take care,
Sterling -
Problem with select range for a character type field. Kindly Help! Urgent!
Hi Experts,
I have to write a report to pull data from a table BUT000 for a selected range of BPEXT field values in selection screen.
In the table BUT000, the BPEXT field is type char. Now what is happening is that if the user gives a range in selection screen from 1000 to 1010 the query pulls all the records where teh forst character starts from 1.
For example if the table has
BPEXT
1
10
100
101
1000
1001
1002
1005
1010
20
200
2000
Then my query pulls
BPEXT
101
1000
1001
1002
1005
1010
Instead it should pull only
BPEXT
1000
1001
1002
1005
1010
My guess this is because the BPEXT field is of CHAR type instead of numeric.
What shall i do to solve this problem? Kindly help please!
Thanks
Gopal
Message was edited by:
gopalkrishna baligaHi Chakradhar,
How to find the conversion exit for BPEXT field?
How to use the conversion exit in a select query in my ABAP report? Any sample code will be really helpfull.
Please help!
Thanks
Gopal -
Kindly help if u can...urgent
m yproblem is that i hav autonumber field user_id in my oracle table;
wen i insert sequence seq.nextval from oracle ide it workz fine...bt now i hav user profil nd i hav to make entries thru java code...nd wen i use
pt=con.prepareStatement("insert into user_basic(user_id,f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(seq.nextval,?,?,?,?,?,?,?,?,?,?)");
it gives null pointer exception....
i hav tried:
1.
"insert into user_basic(user_id,f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(?,?,?,?,?,?,?,?,?,?,?)");
pt.setString(1,null);
2.
"insert into user_basic(f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(?,?,?,?,?,?,?,?,?,?)");
pt.setString(1,fname);
pt.setString(2,mname);
ans so on all entries
bt diz way oracle leavez user_id blank.....
kindly help regarding usage of autonumber in prepared statement....thanxx....
code:
public boolean validate() throws Exception
Connection con=null;
PreparedStatement pt=null;
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds;Uid=SYSTEM;Pwd=manager");
pt=con.prepareStatement("insert into user_basic(user_id,f_name,m_name,l_name,email,password,pet_name,age,gender,mari,citizen) values(seq.nextval,?,?,?,?,?,?,?,?,?,?)");
pt.setString(1,fname);
pt.setString(2,mname);
pt.setString(3,lname);
pt.setString(4,em);
pt.setString(5,pwd);
pt.setString(6,petname);
pt.setInt(7,ag);
pt.setString(8,gender);
pt.setString(9,marital);
pt.setString(10,citizenship);
x=pt.executeUpdate();
pt.close();
catch(ClassNotFoundException ex)
{System.out.println(ex);
//out.println("Couldn't load database driver: " + ex.getMessage());
catch(SQLException ex){
System.out.println(ex);
//out.println("SQLException caught: " + ex.getMessage());
catch (Exception ex){System.out.println(ex);
// out.println(ex);
finally {
// Always close the database connection.
try {
if (con!= null)
con.close();
catch (SQLException ignored){
System.out.println(ignored);
if(x==1)
return true;}
else
{return false;}
}it is my first day in these forums...it takes time to get to know how things work sumwhere....but kind of response im getting is very discouraging....im sorry if i havent followed any rules....but my intentions arent bad in any way...all i can say is sorryy...nd if nobody can help me in my query and problem it is ok....1. Don't cross post. Many people especially the ones that answer a lot of questions do not like it. And I have never seen anyone that claimed that they liked it.
2. Use english as best that you can. Do NOT use sms type speech.
3. There is a big difference between being able to help you and wanting to help you. The two are not the same. -
Hi Experts,
I need your help in solving a query about F4 help. I would like to know whether it is possible to return more than one column value from a F4 help. I am working on a scenario where, consider i have a table control with 3 columns. I have F4 helps for two columns. The third column which does not have the F4 help is the primary key and the two columns which have F4 help has repeated values. Consider the following values in the F4 help internal table.
ColumnA ColumnB ColumnC
1 01 10.09.2009
2 01 10.09.2009
3 01 10.09.2009
Now consider the user selects first row '10.09.2009' in ColumnC and selects '01' from first row columnB from F4 help. I need to populate '1' in columnA of table control. For this i am using read statement in PBO of my screen. But the read statement fails since ColumnB and ColumnC have repeated values. Kindly provide a solution to fix this problem. Is it possible to get the row id of the row selected by the user from F4 help? I am using the Fm F4IF_INT_TABLE_VALUE_REQUEST. This Fm returns a return_tab. The return_tab has a field record_pos which is 001 always. So it is of no use. Pls help me with a proper suggestion.
Regards
Rohanhi
if u want an f4 help and get the other values in the row u need to write the code in process on values request.
in PVR
GET CURSOR LINE LINE.
IF TC-TOP_LINE > 1.
LINE = LINE + ( TC-TOP_LINE - 1 ).
ENDIF.
read table itab index line.
in that itab u will get the values . -
Elementary Search help with distinct values. Kindly help!
Hi Experts,
I have to create a search help for Plant field. The Plant field is in a custom table YPLANT_DET. Unfortunately the plant field in this table is not unique.
So the elementary search help will show duplicate plant entries.
How to customize the elementary search help so that I get only distict values on F4 help?
KIndly help!
Thanks
GopalHi,
You need to use Search help exit...
i am attaching below sample code..write the select query at appropriate location and pass the internal table to sub FM mentioned in the code..
Code Sample
BEGIN OF CODE SAMPLE -
BEGIN OF INCLUDE LZSHLPTOP -
FUNCTION-POOL zshlp. "MESSAGE-ID ..
TYPE-POOLS shlp.
TYPES:
BEGIN OF t_knvp,
kunnr TYPE kna1-kunnr,
name1 TYPE kna1-name1,
ort01 TYPE ort01_gp,
stras TYPE stras_gp,
kunn2 TYPE knvp-kunn2,
name1_2 TYPE kna1-name1,
END OF t_knvp.
DATA: i_knvp TYPE TABLE OF t_knvp,
wa_knvp TYPE t_knvp,
wa_selopt TYPE ddshselopt,
wa_fielddescr TYPE dfies.
DATA:
rc TYPE i,
v_tabix LIKE sy-tabix.
RANGES: r_ktokd FOR kna1-ktokd,
r_mcod1 FOR kna1-name1,
r_sortl FOR kna1-sortl,
r_kunnr FOR kna1-kunnr,
r_ort01 FOR kna1-ort01.
END OF INCLUDE LZSHLPTOP -
BEGIN OF FUNCTION MODULE Z_CUSTOM_SEARCH -
FUNCTION z_custom_search.
""Local interface:
*" TABLES
*" SHLP_TAB TYPE SHLP_DESCR_TAB_T
*" RECORD_TAB STRUCTURE SEAHLPRES
*" CHANGING
*" VALUE(SHLP) TYPE SHLP_DESCR_T
*" VALUE(CALLCONTROL) LIKE DDSHF4CTRL STRUCTURE DDSHF4CTRL
EXIT immediately, if you do not want to handle this step
CASE callcontrol-step.
STEP SELECT (Select values)
This step may be used to overtake the data selection completely.
To skip the standard seletion, you should return 'DISP' as following
step in CALLCONTROL-STEP.
Normally RECORD_TAB should be filled after this step.
WHEN 'SELECT'.
Change column header texts appearing on the search help hit list
LOOP AT shlp-fielddescr INTO wa_fielddescr.
v_tabix = sy-tabix.
CASE wa_fielddescr-fieldname.
WHEN 'KUNNR'.
wa_fielddescr-fieldtext = 'ShipToCustomer#'.
wa_fielddescr-reptext = 'ShipToCustomer#'.
wa_fielddescr-scrtext_s = 'ShipTo #'.
wa_fielddescr-scrtext_m = 'ShipToCustomer#'.
wa_fielddescr-scrtext_l = 'ShipToCustomer#'.
MODIFY shlp-fielddescr FROM wa_fielddescr
INDEX v_tabix TRANSPORTING fieldtext reptext scrtext_s
scrtext_m scrtext_l.
WHEN 'KUNN2'.
wa_fielddescr-reptext = 'BillToCustomer#'.
wa_fielddescr-fieldtext = 'BillToCustomer#'.
wa_fielddescr-scrtext_s = 'BillTo #'.
wa_fielddescr-scrtext_m = 'BillToCustomer #'.
wa_fielddescr-scrtext_l = 'BillToCustomer #'.
MODIFY shlp-fielddescr FROM wa_fielddescr
INDEX v_tabix TRANSPORTING fieldtext reptext scrtext_s
scrtext_m scrtext_l.
WHEN 'NAME1'.
wa_fielddescr-fieldtext = 'ShipToCustomer Name'.
wa_fielddescr-reptext = 'ShipToCustomer Name'.
wa_fielddescr-scrtext_s = 'ShipTo Name'.
wa_fielddescr-scrtext_m = 'ShipToCustomer Name'.
wa_fielddescr-scrtext_l = 'ShipToCustomer Name'.
MODIFY shlp-fielddescr FROM wa_fielddescr
INDEX v_tabix TRANSPORTING fieldtext reptext scrtext_s
scrtext_m scrtext_l.
ENDCASE.
ENDLOOP.
Select the Bill to party customer based on the select options
FREE: r_ktokd, r_kunnr, r_sortl, r_mcod1, r_ort01, i_knvp.
LOOP AT shlp-selopt INTO wa_selopt.
Build a Range for the 5 selection options of the search help
CASE wa_selopt-shlpfield.
WHEN 'KTOKD'.
r_ktokd-sign = wa_selopt-sign.
r_ktokd-option = wa_selopt-option.
r_ktokd-low = wa_selopt-low.
r_ktokd-high = wa_selopt-high.
APPEND r_ktokd.
CLEAR r_ktokd.
WHEN 'KUNNR'.
r_kunnr-sign = wa_selopt-sign.
r_kunnr-option = wa_selopt-option.
r_kunnr-low = wa_selopt-low.
r_kunnr-high = wa_selopt-high.
APPEND r_kunnr.
CLEAR r_kunnr.
WHEN 'SORTL'.
r_sortl-sign = wa_selopt-sign.
r_sortl-option = wa_selopt-option.
r_sortl-low = wa_selopt-low.
r_sortl-high = wa_selopt-high.
APPEND r_sortl.
CLEAR r_sortl.
WHEN 'MCOD1'.
r_mcod1-sign = wa_selopt-sign.
r_mcod1-option = wa_selopt-option.
r_mcod1-low = wa_selopt-low.
r_mcod1-high = wa_selopt-high.
APPEND r_mcod1.
CLEAR r_mcod1.
WHEN 'ORT01'.
r_ort01-sign = wa_selopt-sign.
r_ort01-option = wa_selopt-option.
r_ort01-low = wa_selopt-low.
r_ort01-high = wa_selopt-high.
APPEND r_ort01.
CLEAR r_ort01.
ENDCASE.
ENDLOOP.
Retrieve data from KNVP table for the above selected ranges
Doing query to retrieve data for the search help
SELECT knvp~kunnr
kna1~name1
kna1~ort01
kna1~stras
knvp~kunn2
INTO TABLE i_knvp
FROM knvp
INNER JOIN kna1
ON knvpkunnr = kna1kunnr
WHERE
knvp~parvw = 'RE' AND " Bill to Party
knvp~kunnr IN r_kunnr AND
kna1~ktokd IN r_ktokd AND
kna1~sortl IN r_sortl AND
kna1~mcod1 IN r_mcod1 AND
kna1~ort01 IN r_ort01.
CHECK sy-subrc = 0.
DELETE ADJACENT DUPLICATES FROM i_knvp.
Select the short text for kunn2 from kna1.
Move all the selected records to Record_Tab
LOOP AT i_knvp INTO wa_knvp.
v_tabix = sy-tabix.
SELECT SINGLE name1 FROM kna1
INTO wa_knvp-name1_2
WHERE kunnr = wa_knvp-kunnr.
MOVE wa_knvp TO record_tab-string.
APPEND record_tab.
CLEAR record_tab.
MODIFY i_knvp FROM wa_knvp INDEX v_tabix.
CLEAR wa_knvp.
ENDLOOP.
rc = 0.
IF rc = 0.
callcontrol-step = 'DISP'.
ELSE.
callcontrol-step = 'EXIT'.
ENDIF.
EXIT. "Don't process STEP DISP additionally in this call.
WHEN 'PRESEL1'.
WHEN 'DISP'.
WHEN OTHERS.
ENDCASE.
ENDFUNCTION.
END OF FUNCTION MODULE Z_CUSTOM_SEARCH -
END OF CODE SAMPLE -
Save and activate at every step.
Regards,
Chandra
(Award points if helpful) -
Include two new columns-kindly help
Hi all,
I have the following query with me
select case when F.ITEM_UOM = 'Cubic Feet' then
ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD))
when F.ITEM_UOM = 'Pound' then
ceil((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )
when F.item_uom='Gallon'
THEN ceil(ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*F.ITEM_PERCENT )
end MAT_ACT,E.MANUAL,
e.opn_job_desc,e.invoice_ref,e.invoice_ref_m,f.item_number,f.item_name,f.item_uom,f.description
FROM xxnp_opn_joblog_001 E,
XXNP_OPN_JOBLOG_EST_002 F,
XXNP_OPN_JOBLOG_STAGE_002 G,
XXNP_OPN_JOBLOG_SLURRY_003 H
WHERE E.OPN_JOB_DESC = E.OPN_JOB_DESC AND E.MANUAL='N'
AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
i require two columns col 1
(Cubicfeet*0.047 + pound *0.0005)
col 2
sum of cubic feet
kindly help
thanking in advance
regards,
oracleuser
Edited by: makdutakdu on Jan 26, 2010 1:22 PMHi,
This is the best i can do for lack of proper data and sample input
select (sum(case when item_UOM = 'Cubic Feet' then mat_act else 0)*0.047
+ sum(case when item_uom = 'Pound' then mat_Act else 0)*0.0005) col1
, opn_job_desc, sum(case when item_uom = 'Cubic Feet' then mat_act else 0) ol2
from (
select case when F.ITEM_UOM = 'Cubic Feet' then
ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/H.SLURRY_YIELD))
when F.ITEM_UOM = 'Pound' then
ceil((ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*94)*F.ITEM_PERCENT/100 )
when F.item_uom='Gallon'
THEN ceil(ROUND(((H.SLURRY_VOL_ACTUAL * 5.6146)/DECODE(H.SLURRY_YIELD,0,NULL,H.SLURRY_YIELD)))*F.ITEM_PERCENT )
end MAT_ACT,E.MANUAL,
e.opn_job_desc,e.invoice_ref,e.invoice_ref_m,f.item_number,f.item_name,f.item_uom,f.description
FROM xxnp_opn_joblog_001 E,
XXNP_OPN_JOBLOG_EST_002 F,
XXNP_OPN_JOBLOG_STAGE_002 G,
XXNP_OPN_JOBLOG_SLURRY_003 H
WHERE E.OPN_JOB_DESC = E.OPN_JOB_DESC AND E.MANUAL='N'
AND E.OPN_JOBLOG_001_ID = G.OPN_JOBLOG_001_ID
AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
AND G.OPN_JOBLOG_006_ID = H.OPN_JOBLOG_006_ID
AND H.OPN_JOBLOG_007_ID = F.OPN_JOBLOG_007_ID
) group by opn_job_descRegards
Anurag
PS: OOps posted the wrong query. I have made the changes please try again.
PS: Have not checked for accuracy and syntax error.
Edited by: Anurag Tibrewal on Jan 26, 2010 3:12 PM -
Hai
i found one my table PIV_MAX has been deleted by some process by some machine.
pls tell me the query to find the
1) what is the sql which truncated the table piv_max..? it should say the latest date.
2) from which machine it is done..?
Kindly help
Sif I can add ...
this is sort of for future accidents
if you turn on auditing, you can see exactly who touched your table, when and how (delete, insert, select, ....), you can also see exact SQL which ran on your table. I would start with Oracle Documentation, please note auditing is going to add overhead, also the auditing tables can grow quickly, although oracle documentation says that you should not move these tables from system tablespace, you can do it and I've never seen any issues with it. http://download.oracle.com/docs/cd/B10500_01/server.920/a96521/audit.htm
if you want to recover lost records, you can turn on flashback feature (this is I believe not available in standard database, you need enterprise option), it allows you to recover the data to exact point in time in the past http://www.oracle.com/technology/deploy/availability/htdocs/Flashback_Overview.htm
Maybe you are looking for
-
WildStar and Best Buy's Terrible Customer Support
To Anyone Who Might Read This: Because I can't seem to get a timely response from anyone through a private message in less than 3 days, because Best Buy phone reps feign ignorance and pass me along from rep to rep like a basketball (last call was for
-
How do I open a PDF file in Acrobat Reader?
I am having trouble opening PDF downloads. I keep getting error messages. What do I have to do?
-
Diff between Oracle 9i and 10g with date format MON in FRENCH language
Hi, With a session in FRENCH language, when i do: SQL> select to_char(sysdate,'dd-mon-yyyy') from dual; The result in 10g is: TO_CHAR(SYSDA 27-juil.-2005 The result in 9i is: TO_CHAR(SYS 28-jul-2005 Where is the problem and how can i have the same re
-
FlexConnect Access Point - Wired 802.1X or MAB Authentication
Hi all, We are piloting wired 802.1X but have hit a snag - FlexConnect AP switchport configuration requires the port be configured as trunk, with the native VLAN for management and access VLAN(s) for client data. I know 802.1X cannot be configured on
-
Hi , friends pls explain abap mapping and message mapping
1) pls explain abap mapping and message mapping send me screen shorts also.