Strange select statement behavior in start routine during extraction
Hi, All..
I'm receiving some odd behavior from a select statment being processed in batch mode (specifically, when run in a normal BW extractor - start routine), the select yields no results .. sy-subrc = 4 and target itab is empty. however, when i run this same select statement in debug, i get sy-subrc = 0 and records are returned!! I tried putting the select statement in a standard abap program & it came back successfully in both foreground & background. something is strange when run in the BW extractor process?? anyone familiar with this?? any help is appreciated!! Thanks!!
Thanks everyone for the comments!
The code is in the start routine from 0BBP_CONF_TD_1 into 0BBP_CON.
-The select returns records when in debug
-I've tried running it open without the "for all entries" & it still fails in batch
-The select works during the delta but always fails on the initial load
The select is a join:
DATA: BEGIN of t_JOIN1 OCCURS 0,
CONNUM LIKE /BI0/ABBP_CON00-BBP_CON_ID,
CONITEM LIKE /BI0/ABBP_CON00-BBP_COITEM,
PONUM LIKE /BI0/ABBP_PO00-BBP_PO_ID,
POITEM LIKE /BI0/ABBP_PO00-BBP_POITEM,
ACGUID LIKE /BI0/ABBP_PO00-BBP_ACGUID,
SCNUM LIKE /BI0/ABBP_SC00-BBP_SC_ID,
SCITEM LIKE /BI0/ABBP_SC00-BBP_SCITEM,
REQSTR LIKE /BI0/ABBP_SC00-BBP_REQSTR.
DATA: END of t_JOIN1.
SELECT a~BBP_CON_ID
a~BBP_COITEM
a~BBP_PO_ID
a~BBP_POITEM
b~BBP_ACGUID
c~BBP_SC_ID
c~BBP_SCITEM
c~BBP_REQSTR
INTO TABLE t_JOIN1
FROM /BI0/ABBP_CON00 as a
INNER JOIN /BI0/ABBP_PO00 as b
ON aBBP_PO_ID = bBBP_PO_ID AND
aBBP_POITEM = bBBP_POITEM
INNER JOIN /BI0/ABBP_SC00 as c
ON bBBP_SC_ID = cBBP_SC_ID
AND bBBP_SCITEM = cBBP_SCITEM
FOR ALL ENTRIES IN DATA_PACKAGE
WHERE a~BBP_CON_ID = DATA_PACKAGE-BBP_CON_ID AND
a~BBP_COITEM = DATA_PACKAGE-BBP_COITEM AND
a~BBP_COITEM <> 0 AND
b~BBP_ACGUID <> '0000' AND
c~BBP_SCITEM <> 0.
Similar Messages
-
Select statement in a sub routine(For Sapscript)
Hi,
M unable to write select statement for my reqirement in Sap-script in Sub routine.
My requirement is 1)"Your correspondent for quality" in main window of my form.
For dis rule is as below
"Get the 'changed by' value resord in table QCPR field AENDERER.For the same value found in tabe USR21 fiels BNAME,pick up the PERSUNUM value.For dis PERSUNUM value, found in ADRP feild NAME_TEXT the value for "Your Correspondent for Quality".
2) For this PERSUNUM value found in ADCP-TEL_NUMBER the vakue for "Ph".
3)For this PERSUNUM value found in ADCP-FAX_NUMBER the vakue for "FAX".
4For this PERSUNUM value found in ADR6-SMTP_ADDR the vakue for "EMAIL".
Please help me out it's urgent for me.I wil b waiting 4 ur reply.READ TABLE in_par WITH KEY 'QCPR-AENDERER'.
CHECK sy-subrc = 0.
MOVE in_par-value TO V_aenderer
. READ TABLE in_par WITH KEY 'USR21-BNAME.
CHECK sy-subrc = 0.
MOVE in_par-value TO V_bname
SELECT SINGLE persnumber addrnumber
INTO wa_usr21-persnumber wa_usr21-addrnumber
FROM usr21
WHERE bname = V_bname
and <b>check field for this</b> = V_aenderer.
CHECK sy-subrc = 0.
SELECT SINGLE tel_number fax_number
INTO adcp-tel_number adcp-fax_number
FROM adcp
WHERE addrnumber = usr21-addrnumber
AND persnumber = usr21-persnumber.
CHECK sy-subrc = 0.
READ TABLE out_par WITH KEY 'ADCP-TEL_NUMBER'.
CHECK sy-subrc = 0.
out_par-value = adcp-tel_number.
MODIFY out_par INDEX sy-tabix.
READ TABLE out_par WITH KEY 'ADCP-FAX_NUMBER'.
CHECK sy-subrc = 0.
out_par-value = adcp-fax_number.
MODIFY out_par INDEX sy-tabix.
SELECT SINGLE smtp_addr
INTO adr6-smtp_addr
FROM adr6
WHERE addrnumber = usr21-addrnumber
AND persnumber = usr21-persnumber.
READ TABLE out_par WITH KEY 'ADR6-SMTP_ADDR'.
CHECK sy-subrc = 0.
out_par-value = adr6-smtp_addr.
MODIFY out_par INDEX sy-tabix.
Regards -
Help on Select statement behavior
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
"CORE 10.2.0.4.0 Production"
TNS for Linux: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
DM_SUBSCRIPTION table and Dm_Process_Instance_Fs_Fact both has Consultant_Staff_Id .
DM_SUBSCRIPTION .Consultant_Staff_Id =0
Dm_Process_Instance_Fs_Fact.Consultant_Staff_Id =8436
Select Distinct Pf.Process_Instance_Id,
Consultant_Staff_Id
From Fldm.Dm_Process_Instance_Fs_Fact Pf
LEFT OUTER JOIN FLDM.DM_PROCESS_INSTANCE_SUB pis
ON PIS.PROCESS_INSTANCE_ID = pf.process_instance_id
INNER JOIN FLDM.DM_SUBSCRIPTION s
On S.Subscription_Id = Pis.Subscription_Id
Where Pf.Process_Instance_Id=496628
if i use fully qualified name like pf.Consultant_Staff_Id query is returning correct value
but if i remove table before the column it is returning 0 .
My question is why am i not receiving error like "column ambiguously defied " ,
with out fully qualified name.what is the reason for this behaviourEdited by: vijayp on Jan 21, 2011 5:53 PMI can not tell you why ... but I can tell you that in the Best Practice for SQL and PL/SQL white paper written by Bryn Llewellyn he advises always fully qualifying names.
So rather than wondering how to not use "best practice" use it as then the problem goes away.
Please do also keep in mind that your database version is so old it is in desupport and based on your version number could use a good patching if nothing else. -
Start routine in transformation
Hi,
I need to read master data in a start routine only once.If I write a select statement in the start routine , the select is executed for every data package.I want the select to be executed only once and data can be used by all data packages.I tried keeping the code in the global section of the start routine class and that didn't help either.
Any ideas.
Thanks in advanceHi Siva,
Then..Use Static Internal table...
Structured Static Internal Table Definition
- STATICS itab TYPE tabtype [WITH HEADER LINE].
- STATICS itab TYPE tabkind OF linetype
[WITH [UNIQUE|NON-UNIQUE] keydef]
[INITIAL SIZE n] [WITH HEADER LINE].
- STATICS itab LIKE tabkind OF lineobj
[WITH [UNIQUE|NON-UNIQUE] keydef]
[INITIAL SIZE n] [WITH HEADER LINE].
- STATICS itab TYPE linetype OCCURS n [WITH HEADER LINE].
- STATICS itab LIKE lineobj OCCURS n [WITH HEADER LINE].
- STATICS: BEGIN OF itab OCCURS n,
END OF itab [VALID BETWEEN f1 AND f2].
STATICS itab TYPE RANGE OF type.
STATICS itab LIKE RANGE OF f
@@@@@@@@@@@@@22
Logic: make flag variable as static variable in global area.
First data package...
IF flag EQ ' '.
Read Master data table and put in STATIC internal TABLE.
So the next time(next data package)..not read from master data table
flag = 'X'.
ENDif.
LOOP DATA_PACKAGE.
ENDLOOP.
@@@@@@@@@@@@2
Regards,
San!
Message was edited by:
Sandeep Khatri(San!) -
Hi Friends !
Facing a bit strange issue. When I run the DTP with selection for all AC_DOC_NO, start routine works fine & I am getting the expected result. But when I run the DTP without selection, result is not as expected. During debugging also I can see the correct records. Please advise.
With Regards
RekhaHi,
If you are loading to DSO, I am sure there could be some overwrite is happening where u r missing the expected records.
if this is the scenario then try to add keyfield in DSO to overcome from overwrite. -
Raising cx_rsrout_abort exception in Start Routine of Transformations
Hello Abap OO Gurus:
This is likely a very simple question but I'm brand new to Abap OO and despite reading and searching, I cannot convert some old abap code used in the start routine of business content in BW to be used in the Transformation start routine in SAP BI.
My Start Routine inside a BI 7.0 transformation rule has a method declared like this:
<b>METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.</b>
The Exception "cx_rsrout_abort" has replaced what used to be a simple ABORT data field. The <u>old code I want to replace was just "abort = 1'.</u>
But now it seems like I have to use TRY... ENDTRY statement to raise Exception "cx_rsrout_abort". I am inside the abap code of the Method "start routine"
METHOD start_routine.
*=== Segments ===
Could some kind soul educate me as to how to raise the Exception "cx_rsrout_abort" inside the Method start routine?
thanks in advance, DavidTx HDev:
we are almost there... I have that PDF but never got thru to the rest of the Appendix B as my project is just too crazy...
When try what Appenix B suggest..
<u>"raise exception type CX_RSROUT_SKIP_RECORD."</u>
I get the following Warning msg which makes sense...
<b>"W:The exception CX_RSROUT_SKIP_RECORD is neither caught nor is it
declared in the RAISING clause of "START_ROUTINE".</b>
The METHOD statement in the start routine never declares another exception other than cx_rsrout_abort as seen below:
METHODS
start_routine
IMPORTING
request type rsrequest
datapackid type rsdatapid
EXPORTING
monitor type rstr_ty_t_monitors
CHANGING
SOURCE_PACKAGE type tyt_SC_1
RAISING
cx_rsrout_abort.
Maybe NW2004s has a bug here... I'm hoping that a SAP Developer reads this posting and can enlighten us all... otherwise I'll have to post a OSS msg
So the mystery is still how to do
"raise exception type CX_RSROUT_ABORT" and make this equal to ABORT = 1
which makes the start routine skip a record
tx again, David -
Deleting records in start routine
Dear Experts,
We have infoObject ZCADRE which stotes list of all trainees. Cube ZCUBE_01 contains transactional data
of all the employees. Now, there is a transformation between cube ZCUBE_01 and cube ZCUBE_02.
Requirement is cube ZCUBE_C02 will be loaded with transactional data of only those employees who are
present in infoobject ZCADRE.
So, basically we need to write codes for selective deletion in the start routine.
ZCADRE has following records:-
ZCADRE BATCH
====== =====
1111 2005
2222 2008
3333 2007
ZCUBE_01 has following records:-
employee actiontype calday actcnt
1111 Z1 01.03.2011 1
2222 Z1 01.04.2011 1
3333 Z2 01.06.2011 1
4444 Z3 01.02.2011 1
5555 Z1 01.04.2011 1
6666 Z2 01.03.2011 1
After the data loading from cube ZCUBE_01 to ZCUBE_02, ZCUBE_02 should have the following records:-
employee actiontype calday actcnt
1111 Z1 01.03.2011 1
2222 Z1 01.04.2011 1
3333 Z2 01.06.2011 1
Please suggest codes for the same.
Your help will be appreciated.
Regards,
PrakashThanks Rahul, for your quick response. The logic for codes that you have suggested is giving following error:-
E:In the OO context either an INTO or an ASSIGNING specification or the
addition "TRANSPORTING NO FIELDS" must be used. addition "TRANSPORTING
NO FIELDS" must be used. and " E:Tables with headers are no longer supported in the OO context.
I was using following codes:-
=============================================================================
DATA: wa_zcadre TYPE standard table of /bic/pzcadre with header line, idx type sy-tabix.
SELECT * FROM /bic/pzcadre INTO table wa_zcadre.
sort wa_zcadre by zcadre.
LOOP AT SOURCE_PACKAGE.
idx = sy-tabix.
read table wa_zcadre with key zcadre = SOURCE_PACKAGE-employee binary search.
if sy-subrc <> 0.
DELETE SOURCE_PACKAGE index idx.
ENDIF.
ENDLOOP.
===============================================================================================
Following codes solved my problem:-
===============================================================================================
DATA: idx type sy-tabix.
DATA: wa_source_package type tys_sc_1.
DATA: ZCADRE TYPE /BIC/PZCADRE-/BIC/ZCADRE.
LOOP AT SOURCE_PACKAGE into wa_SOURCE_PACKAGE.
CLEAR : ZCADRE.
SELECT SINGLE /BIC/ZCADRE FROM /BIC/PZCADRE INTO ZCADRE WHERE
/BIC/ZCADRE = WA_SOURCE_PACKAGE-EMPLOYEE.
idx = sy-tabix.
if sy-subrc <> 0.
DELETE SOURCE_PACKAGE index idx.
endif
ENDLOOP.
===========================================================================================
Regards,
Prakash -
Strange select behavior in batch (bw extractor)
Hi, All..
I'm receiving some odd behavior from a select statment being processed in batch mode (specifically, when run in a normal BW extractor - start routine), the select yields no results .. sy-subrc = 4 and target itab is empty. however, when i run this same select statement in debug, i get sy-subrc = 0 and records are returned!! I tried putting the select statement in a standard abap program & it came back successfully in both foreground & background. something is strange when run in the BW extractor process?? anyone familiar with this?? any help is appreciated!! Thanks!!Thanks everyone for the comments!
The code is in the start routine from 0BBP_CONF_TD_1 into 0BBP_CON.
-The select returns records when in debug
-I've tried running it open without the "for all entries" & it still fails in batch
-The select works during the delta but always fails on the initial load
The select is a join:
DATA: BEGIN of t_JOIN1 OCCURS 0,
CONNUM LIKE /BI0/ABBP_CON00-BBP_CON_ID,
CONITEM LIKE /BI0/ABBP_CON00-BBP_COITEM,
PONUM LIKE /BI0/ABBP_PO00-BBP_PO_ID,
POITEM LIKE /BI0/ABBP_PO00-BBP_POITEM,
ACGUID LIKE /BI0/ABBP_PO00-BBP_ACGUID,
SCNUM LIKE /BI0/ABBP_SC00-BBP_SC_ID,
SCITEM LIKE /BI0/ABBP_SC00-BBP_SCITEM,
REQSTR LIKE /BI0/ABBP_SC00-BBP_REQSTR.
DATA: END of t_JOIN1.
SELECT a~BBP_CON_ID
a~BBP_COITEM
a~BBP_PO_ID
a~BBP_POITEM
b~BBP_ACGUID
c~BBP_SC_ID
c~BBP_SCITEM
c~BBP_REQSTR
INTO TABLE t_JOIN1
FROM /BI0/ABBP_CON00 as a
INNER JOIN /BI0/ABBP_PO00 as b
ON aBBP_PO_ID = bBBP_PO_ID AND
aBBP_POITEM = bBBP_POITEM
INNER JOIN /BI0/ABBP_SC00 as c
ON bBBP_SC_ID = cBBP_SC_ID
AND bBBP_SCITEM = cBBP_SCITEM
FOR ALL ENTRIES IN DATA_PACKAGE
WHERE a~BBP_CON_ID = DATA_PACKAGE-BBP_CON_ID AND
a~BBP_COITEM = DATA_PACKAGE-BBP_COITEM AND
a~BBP_COITEM <> 0 AND
b~BBP_ACGUID <> '0000' AND
c~BBP_SCITEM <> 0. -
Index used or not for selecting data from ODS in a start routine
Dear friends,
In the start routine of the update rules to a cube, I am reading some data of an ODS in to an internal table .
The ODS is indexed. But, I am not sure if the index is at all used in the Select statement (that gets the data from ODS to the internal table in the start routine) while loading data to the cube.
Any help is highly appreciated.
regards,
atlajHi Atlaj
You can findout this is display execution plan for SQL statement in DB02.
Goto DB02. and under diagnostic, you find explain. Select that and enter your query. Make sure that everything here is in capital format. Below is a sample query which I have entered.
SELECT "CRM_SALORG" "SALESORG" FROM "/BI0/QORGUNIT"
WHERE "SALESORG" = ? AND "OBJVERS" = ? AND "DATETO" >= ?
AND "DATEFROM" <= ?
The select parameters should be inside qoutes and in caps and even the from table. Once you enter your query in this format, click on explain. It will show the index scan if the index is present. the output for my query will be something like
0 SELECT STATEMENT ( Estimated Costs = 1,348E+01 [timerons] )
1 (COOR) RETURN
2 ( 0) TQ
3 ( 0) FETCH /BI0/QORGUNIT
4 ( 0) IXSCAN /BI0/QORGUNIT~Z1
Where my last statement (line 4) is showing index scan and the name of index read is Z1.
Hope this helps.
Please let me know if you have any problems entering the query in the specified format and u get any error.
Regards
Sriram -
Can we use Perform statement in start routine ,Form and endform.
Hi,
Can we use Perform statement in start routine ? Then write the ABAP code between Form and Endform.
Example : Can I use Perform ABC in start routine. Then define ABC at the end of start routine.
Form ABC,
......<ABAP> code .....
Endform.Hi,
In BI 7.0 we have start routines defined using Class where you might be able to create your own performs, but in case of BW3.5 Start routines are defined using Form so there I don't think it will allow you to create one more form.
But you can surely try both the approaches.
Reards,
Durgesh. -
Performance with select in Start routine
Hi,
I open a request because i have some troubles in a update rules.
In this update rule i have several select function on master data and i takes just 3-4 minutes by packets (which is OK for my daily extraction). But my users needs now a data taht i need to extract from SD invoice ODS. and in this ODS i have 3 000000 lines.
I made the test and it takes too many times.
I try several solutions as :
Select.... into internal table --> too many times
Select ... for all entries .... into internal table...--> Too many times
I tried to create a small ODS with just the key level and data i need for my start routine based on invoice ODS. And i now from 3000000 to 300000 records. but now it takes 15 minutes by packets.
My question is do you have any idea to improve performance ?
What is the max size or number of records for an internal tables ?
Thanks
CyrilReading that much, you might have some memory issue.
"Data objects that are defined either with the data type of an internal table, or directly as an internal table, are always fully defined in respect of their line type, key and access method. However, the number of lines is not fixed. Thus internal tables are dynamic data objects, since they can contain any number of lines of a particular type. The only restriction on the number of lines an internal table may contain are the limits of your system installation. The maximum memory that can be occupied by an internal table (including its internal administration) is 2 gigabytes. A more realistic figure is up to 500 megabytes. An additional restriction for hashed tables is that they may not contain more than 2 million entries. The line types of internal tables can be any ABAP data types - elementary, structured, or internal tables. The individual lines of an internal table are called table lines or table entries. Each component of a structured line is called a column in the internal table."
if you need the link to the above doc....
http://help.sap.com/saphelp_47x200/helpdata/en/fc/eb3660358411d1829f0000e829fbfe/frameset.htm
thanks.
Wond -
Short dump during select statement
hi,
i have to display 1 alv list output using REUSE_ALV_HIERSEQ_LIST_DISPLAY function module...so i have populated the data using select statement
select EXIDV
brgew meabm
vegr1 erlkz vhilm erdat aenam
ernam from vekp
into corresponding fields of table gt_master
up to gs_test-select_amount rows.
so the data is also getting populated to gt_master table before the function module...but after executing the function module..it is giving short dump...due to some standard program....any ideahi,
my coding is
Report : ZBCALV *
Author : *
SAP-User : *
Requester : *
Date : *
Specification: *
Description : *
Changes : *
Change No : *
Author : *
SAP-User : *
Date : *
Reason / Desc: *
REPORT ZBCALV.
**& Report BCALV_TEST_HIERSEQ_LIST_EVENTS *
*report bcalv_test_hierseq_list_events.
types: g_ty_t_exidv type standard table of vekp,
g_ty_t_brgew type standard table of vekp,
g_ty_t_vegr1 type standard table of vekp,
g_ty_t_vekp type standard table of vekp,
g_ty_t_curr type standard table of alv_cur,
g_ty_s_vekp type alv_t_t2,
g_ty_s_exidv type alv_tab,
g_ty_s_brgew type alv_tab,
g_ty_s_vegr1 type alv_chck,
g_ty_s_vekp type vekp,
g_ty_s_curr type alv_cur.
constants:
*con_vekp type lvc_fname value 'ALV_T_T2',
con_scarr type lvc_fname value 'ALV_TAB', "#EC *
con_spfli type lvc_fname value 'ALV_CHCK', "#EC *
con_vekp type lvc_fname value 'VEKP',
con_scurx type lvc_fname value 'ALV_CUR'. "#EC *
DATA *
tables: sscrfields. " for processing the FCODEs in Selektion screens
type-pools: slis, kkblo.
class lcl_events_d1001 definition deferred.
types: begin of g_ty_s_test,
select_amount type i,
selected_recs_m type i,
selected_recs_s type i,
no_info_popup type char1,
info_popup_once type char1,
events type lvc_fname occurs 0,
events_exit type slis_t_event_exit,
events_info_popup type lvc_fname occurs 0,
list_append type char1,
list_amount type i,
list_append_status type i,
layo_expand_field type char1,
layo_expand_all type char1,
vari_default type char1,
vari_save type char1,
bypassing_buffer type char1,
buffer_active type char1,
end of g_ty_s_test,
begin of g_ty_s_evt_exit.
include type slis_event_exit.
types: text type string,
end of g_ty_s_evt_exit,
g_ty_t_evt_exit type standard table of g_ty_s_evt_exit.
constants: con_true type char1 value 'X',
con_ok type sy-ucomm value 'OK',
con_exit type sy-ucomm value 'EXIT',
con_canc type sy-ucomm value 'CANC',
con_back type sy-ucomm value 'BACK',
con_event_01 type lvc_fname value 'PF_STATUS_SET',
con_event_02 type lvc_fname value 'USER_COMMAND',
con_event_03 type lvc_fname value 'CALLER_EXIT',
con_event_04 type lvc_fname value 'LIST_MODIFY',
con_event_05 type lvc_fname value 'BEFORE_LINE_OUTPUT',
con_event_06 type lvc_fname value 'AFTER_LINE_OUTPUT',
con_event_07 type lvc_fname value 'SUBTOTAL_TEXT',
con_event_08 type lvc_fname value 'REPREP_MODIFY',
con_event_09 type lvc_fname value 'TOP_OF_PAGE',
con_event_10 type lvc_fname value 'END_OF_PAGE',
con_event_11 type lvc_fname value 'TOP_OF_LIST',
con_event_12 type lvc_fname value 'END_OF_LIST',
con_event_13 type lvc_fname value 'TOP_OF_COVERPAGE',
con_event_14 type lvc_fname value 'END_OF_COVERPAGE',
con_event_15 type lvc_fname value 'TOP_OF_FOREIGN_PAGE',
con_event_16 type lvc_fname value 'END_OF_FOREIGN_PAGE',
con_event_17 type lvc_fname value 'GROUPLEVEL_CHANGE',
con_event_18 type lvc_fname value 'ITEM_DATA_EXPAND'.
data: gs_test type g_ty_s_test.
data: g_okcode type sy-ucomm.
data: g_repid type sy-repid.
data: gt_evt_exit type g_ty_t_evt_exit.
data: gr_container_d1001 type ref to cl_gui_custom_container,
gr_grid_d1001 type ref to cl_gui_alv_grid,
gr_events_d1001 type ref to lcl_events_d1001.
data: g_start_listinfo type slis_lineinfo.
*addition for extra
DATA: fieldcatalog TYPE slis_t_fieldcat_alv with header line.
types : BEGIN OF gt_output ,
EXIDV TYPE VEKP-EXIDV,
VGBEL TYPE LIPS-VGBEL,
BRGEW TYPE VEKP-BRGEW,
VEGR1 TYPE VEKP-VEGR1,
MEABM TYPE VEKP-MEABM,
ERLKZ TYPE VEKP-ERLKZ,
VSTAT TYPE NAST-VSTAT,
VHILM TYPE VEKP-VHILM,
ERDAT TYPE VEKP-ERDAT,
AENAM TYPE VEKP-AENAM,
VBELN TYPE VBELN_GEN,
ERNAM TYPE VEKP-ERNAM,
END OF gt_output.
data: ls_output type gt_output,
lt_output type gt_output occurs 0 WITH HEADER LINE .
types : BEGIN OF gt_item_output ,
EXIDV TYPE VEKP-EXIDV,
BRGEW TYPE VEKP-BRGEW,
vEGR1 TYPE VEKP-VEGR1,
TARAG TYPE VEKP-TARAG,
NTGEW TYPE VEKP-NTGEW,
MEABM TYPE VEKP-MEABM,
BREIT TYPE VEKP-BREIT,
HOEHE TYPE VEKP-HOEHE,
ANW_STATUS TYPE VEKP-ANW_STATUS,
MATNR TYPE VEPO-MATNR,
VEGR2 TYPE VEKP-VEGR2,
VSTEL TYPE VEKP-VSTEL,
WERKS TYPE VEKP-WERKS,
END OF gt_item_output.
data: ls_ITEM_output type gt_ITEM_output,
lt_ITEM_output type gt_ITEM_output occurs 0 with header line.
types: begin of g_ty_s_master.
include type gt_output.
types: box type char1,
lights type char1,
checkbox type char1,
expand type char1,
help type i,
end of g_ty_s_master,
g_ty_t_master type standard table of g_ty_s_master,
begin of g_ty_s_slave.
include type gt_item_output.
types: box type char1,
lights type char1,
checkbox type char1,
expand type char1,
help type i,
end of g_ty_s_slave,
g_ty_t_slave type standard table of g_ty_s_slave.
data: gt_master type g_ty_t_master with header line,
gt_slave type g_ty_t_slave with header line,
gs_master type g_ty_s_master.
CLASS lcl_events_d1001 DEFINITION
class lcl_events_d1001 definition.
public section.
methods:
data_changed for event data_changed
of cl_gui_alv_grid
importing er_data_changed
e_onf4
e_onf4_before
e_onf4_after,
data_changed_finished
for event data_changed_finished
of cl_gui_alv_grid.
endclass. "lcl_events_d1001 DEFINITION
CLASS lcl_events_d1001 IMPLEMENTATION
class lcl_events_d1001 implementation.
method data_changed.
endmethod. "data_changed
method data_changed_finished.
endmethod. "data_changed_finished
endclass. "lcl_events_d1001 IMPLEMENTATION
SELECTION-SCREEN *
selection-screen begin of block gen with frame.
parameters:
p_amount type i default 30.
selection-screen end of block gen.
at selection-screen.
AT SELECTION-SCREEN *
case sscrfields-ucomm.
when 'PB01'.
call screen 1001 starting at 1 1 ending at 80 20.
endcase.
START-OF-SELECTION *
start-of-selection.
g_repid = sy-repid.
gs_test-select_amount = p_amount.
END-OF-SELECTION *
end-of-selection.
perform f01_call_list.
*& Form f01_call_list
text
form f01_call_list.
data: l_callback_program type sy-cprog, "#EC NEEDED
ls_layo type slis_layout_alv,
lt_fcat type slis_t_fieldcat_alv,
ls_keyinfo type slis_keyinfo_alv.
data: ls_master type g_ty_s_master,
ls_slave type g_ty_s_slave.
l_callback_program = sy-repid.
perform f01_alv_get_outtab.
perform f01_alv_set_layout changing ls_layo.
perform f01_alv_set_fcat changing lt_fcat.
perform f01_alv_set_keyinfo changing ls_keyinfo.
if gs_test-list_append_status ne 0.
ls_layo-list_append = gs_test-list_append.
endif.
call function 'REUSE_ALV_HIERSEQ_LIST_DISPLAY'
exporting
i_callback_program = g_repid
is_layout = ls_layo
it_fieldcat = lt_fcat
i_tabname_header = 'GT_MASTER'
i_tabname_item = 'GT_SLAVE'
is_keyinfo = ls_keyinfo
tables
t_outtab_header = gt_master
t_outtab_item = gt_slave
exceptions
program_error = 1
others = 2.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
endform. " f01_call_list
FORM f01_alv_set_fcat
form f01_alv_set_fcat changing ct_fcat type slis_t_fieldcat_alv.
data: lt_fcat_master type slis_t_fieldcat_alv,
lt_fcat_slave type slis_t_fieldcat_alv.
clear ct_fcat[].
perform f01_alv_set_fcat_master changing lt_fcat_master.
perform f01_alv_set_fcat_slave changing lt_fcat_slave.
append lines of lt_fcat_master to ct_fcat.
append lines of lt_fcat_slave to ct_fcat.
endform. " F01_ALV_SET_FCAT
*& Form f01_alv_set_fcat_master
text
form f01_alv_set_fcat_master changing ct_fcat type slis_t_fieldcat_alv.
data: ls_fcat type slis_fieldcat_alv,
l_char(3) type c.
get fieldcatalog
fieldcatalog-fieldname = 'EXIDV'. "Field name in itab
fieldcatalog-seltext_l = 'HU-NR'. "Column text
FIELDCATALOG-KEY = 'X'.
FIELDCATALOG-TECH = 'X'.
fieldcatalog-col_pos = 1. "Column position
fieldcatalog-ref_tabname = 'VEKP'.
fieldcatalog-outputlen = 05. "Column width
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VGBEL'.
fieldcatalog-seltext_L = 'SALES ORDER'.
fieldcatalog-outputlen = 15.
fieldcatalog-ref_tabname = 'LIPS'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'BRGEW'.
fieldcatalog-seltext_l = 'WEIGHT'.
FIELDCATALOG-KEY = 'X'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 3.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MEABM'.
fieldcatalog-seltext_l = 'DIMENSION'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 4.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VEGR1'.
fieldcatalog-seltext_l = 'IPPC NR'.
fieldcatalog-outputlen = 15.
FIELDCATALOG-KEY = 'X'.
fieldcatalog-col_pos = 5.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'ERLKZ'.
fieldcatalog-seltext_l = 'STATUS'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 6.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VSTAT'.
fieldcatalog-seltext_l = 'PRINT STATUS'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 7.
fieldcatalog-ref_tabname = 'VSTAT'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VHILM'.
fieldcatalog-seltext_l = 'PACKING MATERIAL'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 8.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'ERDAT'.
fieldcatalog-seltext_l = 'CREATED FROM'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 9.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'AENAM'.
fieldcatalog-seltext_l = 'LAST CHANGE'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 10.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VBELN'.
fieldcatalog-seltext_l = 'DELIVERY'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 11.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'ERNAM'.
fieldcatalog-seltext_l = 'CREATED BY'.
fieldcatalog-outputlen = 12.
fieldcatalog-col_pos = 8.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
ls_fcat-tabname = 'GT_MASTER'.
modify ct_fcat from ls_fcat transporting tabname
where tabname ne ls_fcat-tabname.
loop at ct_fcat into ls_fcat.
if ls_fcat-fieldname eq 'BRGEW'.
or ls_fcat-fieldname eq ''.
*§1.Set status of columns PLANETYPE and SEATSOCC to editable.
ls_fcat-edit = 'X'.
modify ct_fcat from ls_fcat.
endif.
endloop.
endform. " f01_alv_set_fcat_master
*& Form f01_alv_set_fcat_slave
text
form f01_alv_set_fcat_slave changing ct_fcat type slis_t_fieldcat_alv.
data: ls_fcat type slis_fieldcat_alv,
l_char(3) type c.
fieldcatalog-fieldname = 'EXIDV'. "Field name in itab
fieldcatalog-seltext_l = 'HU-NR'. "Column text
FIELDCATALOG-KEY = 'X'.
FIELDCATALOG-TECH = 'X'.
fieldcatalog-col_pos = 1. "Column position
fieldcatalog-ref_tabname = 'VEKP'.
fieldcatalog-outputlen = 05. "Column width
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'TARAG'. "Field name in itab
fieldcatalog-seltext_l = 'HU-NR'. "Column text
fieldcatalog-col_pos = 1. "Column position
fieldcatalog-ref_tabname = 'VEKP'.
fieldcatalog-outputlen = 05. "Column width
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'NTGEW'.
fieldcatalog-seltext_L = 'WEIGHT HU'.
fieldcatalog-outputlen = 15.
fieldcatalog-ref_tabname = 'VEKP'.
fieldcatalog-col_pos = 2.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'BRGEW'.
fieldcatalog-seltext_l = 'WEIGHT'.
FIELDCATALOG-KEY = 'X'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 3.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'LAENG'.
fieldcatalog-seltext_l = 'LENGTH'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 4.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'BREIT'.
fieldcatalog-seltext_l = 'WIDTH'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 5.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'HOEHE'.
fieldcatalog-seltext_l = 'HEIGHT'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 6.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VEGR1'.
fieldcatalog-seltext_l = 'HU GR1'.
FIELDCATALOG-KEY = 'X'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 7.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VEGR2'.
fieldcatalog-seltext_l = 'HU GR2'.
FIELDCATALOG-KEY = 'X'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 8.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'MATNR'.
fieldcatalog-seltext_l = 'MAT NO'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 9.
fieldcatalog-ref_tabname = 'VEPO'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'VSTEL'.
fieldcatalog-seltext_l = 'SHIPPING'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 10.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
fieldcatalog-fieldname = 'WERKS'.
fieldcatalog-seltext_l = 'PLANT'.
fieldcatalog-outputlen = 15.
fieldcatalog-col_pos = 11.
fieldcatalog-ref_tabname = 'VEKP'.
APPEND fieldcatalog TO ct_fcat.
CLEAR fieldcatalog.
ls_fcat-tabname = 'GT_SLAVE'.
modify ct_fcat from ls_fcat transporting tabname
where tabname ne ls_fcat-tabname.
endform. " f01_alv_set_fcat_slave
FORM f01_alv_set_layout
form f01_alv_set_layout changing cs_layout type slis_layout_alv.
*... Display options
cs_layout-colwidth_optimize = con_true.
cs_layout-no_colhead = space.
cs_layout-no_hotspot = space.
cs_layout-zebra = space.
cs_layout-no_vline = space.
cs_layout-cell_merge = space.
cs_layout-no_min_linesize = space.
cs_layout-min_linesize = space.
cs_layout-max_linesize = space.
cs_layout-window_titlebar = space.
cs_layout-no_uline_hs = space.
cs_layout-no_sumchoice = space.
cs_layout-no_totalline = space.
cs_layout-totals_before_items = space.
cs_layout-totals_only = space.
cs_layout-totals_text = space.
cs_layout-no_subchoice = space.
cs_layout-no_subtotals = space.
cs_layout-subtotals_text = space.
cs_layout-numc_sum = space.
cs_layout-no_unit_splitting = space.
*... Interaction
cs_layout-box_fieldname = 'BOX'.
cs_layout-box_tabname = space.
cs_layout-box_rollname = space.
if gs_test-layo_expand_field eq con_true.
cs_layout-expand_fieldname = 'EXPAND'.
endif.
cs_layout-hotspot_fieldname = space.
cs_layout-f2code = space.
cs_layout-key_hotspot = space.
cs_layout-flexible_key = space.
cs_layout-reprep = space.
cs_layout-group_buttons = space.
cs_layout-no_keyfix = space.
cs_layout-get_selinfos = con_true.
cs_layout-group_change_edit = con_true.
cs_layout-no_scrolling = space.
cs_layout-expand_all = gs_test-layo_expand_all.
*... Detailed screen
cs_layout-detail_popup = space.
cs_layout-detail_initial_lines = space.
cs_layout-detail_titlebar = space.
*... PF-status
cs_layout-def_status = space.
*... Display variants
cs_layout-header_text = space.
cs_layout-item_text = space.
cs_layout-default_item = space.
*... colour
cs_layout-info_fieldname = space.
cs_layout-coltab_fieldname = space.
*... others
cs_layout-list_append = space.
endform. " F01_ALV_SET_LAYOUT
*& Form f01_alv_set_keyinfo
text
form f01_alv_set_keyinfo changing cs_keyinfo type slis_keyinfo_alv.
cs_keyinfo-header01 = 'EXIDV'.
cs_keyinfo-item01 = 'EXIDV'.
cs_keyinfo-header02 = 'BRGEW'."'CARRID'.
cs_keyinfo-item02 = 'BRGEW'."."'CARRID'.
cs_keyinfo-header03 = 'VEGR1'."'CONNID'.
cs_keyinfo-item03 = 'VEGR1'."'CONNID'.
cs_keyinfo-header04 = space.
cs_keyinfo-item04 = 'VEGR2'."'FLDATE'.
cs_keyinfo-header05 = space.
cs_keyinfo-item05 = space.
endform. " f01_alv_set_keyinfo
FORM f01_alv_event_pf_status_set
form f01_alv_event_pf_status_set using rt_extab type slis_t_extab.
"#EC *
data: l_event type lvc_fname. "#EC NEEDED
if gs_test-info_popup_once eq con_true.
read table gs_test-events_info_popup into l_event
with key table_line = 'PF_STATUS_SET'.
if sy-subrc ne 0.
insert 'PF_STATUS_SET' into gs_test-events_info_popup index 1.
message i000(0k) with text-t01.
endif.
elseif gs_test-no_info_popup eq space.
message i000(0k) with text-t01.
endif.
set pf-status 'STANDARD' excluding rt_extab.
set titlebar 'STANDARD'.
endform. " F01_ALV_EVENT_PF_STATUS_SET
*& Form F01_ALV_EVENT_BEFORE_LINE_OUTP
text
form f01_alv_event_before_line_outp
using rs_lineinfo type slis_lineinfo. "#EC *
data: l_event type lvc_fname. "#EC NEEDED
if gs_test-info_popup_once eq con_true.
read table gs_test-events_info_popup into l_event
with key table_line = 'BEFORE_LINE_OUTPUT'.
if sy-subrc ne 0.
insert 'BEFORE_LINE_OUTPUT' into gs_test-events_info_popup
index 1.
message i000(0k) with text-t05.
endif.
elseif gs_test-no_info_popup eq space.
message i000(0k) with text-t05.
endif.
format color off
intensified off
inverse off
hotspot off
input off.
if rs_lineinfo-tabname eq 'GT_MASTER'.
if
gs_master-exidv ne gt_master-exidv or
gs_master-brgew ne gt_master-brgew.
write: / text-t05.
write: /
gt_master-exidv,
gt_master-brgew.
gs_master = gt_master.
endif.
if gs_test-selected_recs_m eq rs_lineinfo-tabindex.
clear gs_master.
endif.
endif.
endform. " F01_ALV_EVENT_BEFORE_LINE_OUTP
*& Form f01_alv_get_outtab
text
form f01_alv_get_outtab .
field-symbols: .
select
exidv BRGEW VEGR1
TARAG NTgew meabm BREIT HOEHE VEGR2 VSTEL weRKS
from
(con_vekp) into corresponding fields of table
lt_slave up to gs_test-select_amount rows
where
exidv eq <ls_master>-exidv and
brgew eq -vegr1.
append lines of lt_slave to gt_slave.
endloop.
sort gt_slave by exidv brgew vegr1.
endif.
describe table gt_master lines gs_test-selected_recs_m.
describe table gt_slave lines gs_test-selected_recs_s.
clear gt_master.
clear gt_slave.
endform. " f01_alv_get_outtab
*& Module d1001_pbo OUTPUT
text
module d1001_pbo output.
perform d1001_pbo.
endmodule. " d1001_pbo OUTPUT
*& Module d1001_pai INPUT
text
module d1001_pai input.
perform d1001_pai.
endmodule. " d1001_pai INPUT -
DTP selection criteria in start routine
Hi,
I have a code in the start routine where a variable lv_date gets the date from the DTP selections...
DATA : i_filter TYPE rsbk_th_range,
wa_filter TYPE rsbk_s_range.
READ TABLE i_filter INTO wa_filter WITH KEY
fieldnm = 'ACT_GI_DTE '.
IF sy-subrc EQ 0.
lv_date = wa_filter-low.
ELSE.
But now my problem is that we are no more giving the range, instead we are giving the single value. so now my code should read the single value ( lv_date = wa_filter-low) instead of the low value of the range. So how can I achieve this?
I mean my lv_date should get the single value populated in the DTP selections instead of the low value of the range values.
How can i achieve this??
Regards,
Shreesh.Hi,
When you give range in any variable, it lower value is captured in low whereas upper value is captured in high of the variable.
Now that you are no more giving range but only single values, it would be enough if your code reads the data from low of the variable. -
Hello Experts,
I am working on PM module where I am preparing a report for ATPCHECK.
My select statement is not working.
I have to select all the active status from jest table.
select STAT from JEST into itab-STAT where objnr = ITAB-objnr
AND INACT eq 'X'.
But than I need to apply a check where I just need 2 active status 'I0002' and 'I0340'.
Is there a way to select all active status fields and than just these 2 active fields.
Thanks and Regrds,
Nikhil.SELECT pobjnr ppspnr pvbukr ppost1 pzzmattermanager pzzclient qstat qinact
INTO TABLE gt_proj_temp
FROM ( proj AS p INNER JOIN jest AS q ON pobjnr = qobjnr )
WHERE zzmattermanager IN so_pernr AND
( qstat = 'E0010' OR qstat = 'E0015') AND q~inact = ' '.
IF sy-subrc = 0.
SELECT kunnr name1
INTO TABLE gt_kna1
FROM kna1
FOR ALL ENTRIES IN gt_proj_temp
WHERE kunnr = gt_proj_temp-zzclient.
LOOP AT gt_proj_temp INTO gs_proj_temp.
READ TABLE gt_kna1 INTO gs_kna1 WITH KEY kunnr = gs_proj_temp-zzclient.
IF sy-subrc = 0.
gs_proj-objnr = gs_proj_temp-objnr.
gs_proj-pspnr = gs_proj_temp-pspnr.
gs_proj-vbukr = gs_proj_temp-vbukr.
gs_proj-post1 = gs_proj_temp-post1.
gs_proj-zzmattermanager = gs_proj_temp-zzmattermanager.
gs_proj-kunnr = gs_kna1-kunnr.
gs_proj-name1 = gs_kna1-name1.
APPEND gs_proj TO gt_proj.
CLEAR gs_proj.
ENDIF.
ENDLOOP.
ENDIF.
IF gv_lines = 0.
MESSAGE e003(z01).
ENDIF.
IF NOT gt_proj[] IS INITIAL.
SELECT pernr ename FROM pa0001 INTO TABLE gt_pa0001
FOR ALL ENTRIES IN gt_proj
WHERE pernr = gt_proj-zzmattermanager.
ENDIF.
ENDIF.
IF NOT gt_proj[] IS INITIAL.
SELECT objnr stat INTO TABLE gt_jest FROM jest
FOR ALL ENTRIES IN gt_proj
WHERE objnr = gt_proj-objnr AND stat = 'I0046' AND inact = ' '.
ENDIF. -
SQL insert with select statement having strange results
So I have the below sql (edited a bit). Now here's the problem.
I can run the select statement just fine, i get 48 rows back. When I run with the insert statement, a total of 9062 rows are inserted. What gives?
<SQL>
INSERT INTO mars_aes_data
(rpt_id, shpdt, blno, stt, shpr_nad, branch_tableS, csgn_nad,
csgnnm1, foreign_code, pnt_des, des, eccn_no, entity_no,
odtc_cert_ind, dep_date, equipment_no, haz_flag, schd_no,
schd_desc, rec_value, iso_ulti_dest, odtc_exempt, itn,
liscence_no, liscence_flag, liscence_code, mblno, mot,
cntry_load, pnt_load, origin_state, airline_prefix, qty1, qty2,
ref_val, related, routed_flag, scac, odtc_indicator, seal_no,
line_no, port_export, port_unlading, shipnum, shprnm1, veh_title,
total_value, odtc_cat_code, unit1, unit2)
SELECT 49, schemaP.tableS.shpdt, schemaP.tableS.blno,
schemaP.tableS.stt, schemaP.tableS.shpr_nad,
schemaP.tableM.branch_tableS, schemaP.tableS.csgn_nad,
schemaP.tableS.csgnnm1, schemaP.tableD.foreign_code,
schemaP.tableS.pnt_des, schemaP.tableS.des,
schemaP.tableD.eccn_no, schemaP.tableN.entity_no,
schemaP.tableD.odtc_cert_ind, schemaP.tableM.dep_date,
schemaP.tableM.equipment_no, schemaP.tableM.haz_flag,
schemaP.tableD.schd_no, schemaP.tableD.schd_desc,
schemaP.tableD.rec_value,
schemaP.tableM.iso_ulti_dest,
schemaP.tableD.odtc_exempt, schemaP.tableM.itn,
schemaP.tableD.liscence_no,
schemaP.tableM.liscence_flag,
schemaP.tableD.liscence_code, schemaP.tableS.mblno,
schemaP.tableM.mot, schemaP.tableS.cntry_load,
schemaP.tableS.pnt_load, schemaP.tableM.origin_state,
schemaP.tableM.airline_prefix, schemaP.tableD.qty1,
schemaP.tableD.qty2,
schemaC.func_getRefs@link (schemaP.tableS.ptt, 'ZYX'),
schemaP.tableM.related, schemaP.tableM.routed_flag,
schemaP.tableM.scac, schemaP.tableD.odtc_indicator,
schemaP.tableM.seal_no, schemaP.tableD.line_no,
schemaP.tableM.port_export,
schemaP.tableM.port_unlading, schemaP.tableS.shipnum,
schemaP.tableS.shprnm1, schemaP.tableV.veh_title,
schemaP.tableM.total_value,
schemaP.tableD.odtc_cat_code, schemaP.tableD.unit1,
schemaP.tableD.unit2
FROM schemaP.tableD@link,
schemaP.tableM@link,
schemaP.tableN@link,
schemaP.tableS@link,
schemaP.tableV@link
WHERE tableM.answer IN ('123', '456')
AND SUBSTR (tableS.area, 1, 1) IN ('A', 'S')
AND entity_no IN
('A',
'B',
'C',
'D',
'E',
AND TO_DATE (SUBSTR (tableM.time_stamp, 1, 8), 'YYYYMMDD')
BETWEEN '01-Mar-2009'
AND '31-Mar-2009'
AND tableN.shipment= tableD.shipment(+)
AND tableN.shipment= tableS.shipnum
AND tableN.shipment= tableM.shipment(+)
AND tableN.shipment= tableV.shipment(+)
<SQL>
Edited by: user11263048 on Jun 12, 2009 7:23 AM
Edited by: user11263048 on Jun 12, 2009 7:27 AMCan you change this:
BETWEEN '01-Mar-2009'
AND '31-Mar-2009'To this:
BETWEEN TO_DATE('01-Mar-2009', 'DD-MON-YYYY')
AND TO_DATE('31-Mar-2009','DD-MON-YYYY')That may make no difference but you should never rely on implicit conversions like that, they're always likely to cause you nasty surprises.
If you're still getting the discrepancy, instead of and INSERT-SELECT, can you try a CREATE TABLE AS SELECT... just to see if you get the same result.
Maybe you are looking for
-
IPod cannot be synced. Required file not found?
I havent had any trouble syncing my ipod until last week when i purchased a song. When i dragged the song to a playlist on my ipod, it appeared grey in my playlist (because it was still loading) and then disappeared. I repeated this until i gave up a
-
GIS Integration on Win 8 - Work manager 6.1
I understand that OpenUI API can be used to write native code ( .NET) to integrate GIS app wih Agentry app on Windows. If someone has implemented this on Windows, Please provide insights on this. I know that one can implement the GetExtensionString(S
-
I couldn't find an answer so here is my post. I bought an Airport Extreme card from a guy and can't get it to work in both an iMac G5 and an eMac G4. It doesn't show up in the System Profiler. The guy claims it only works with older Apple Powerbook I
-
Vlaues comparison error when using 'lt'
Dear all, I have a little problem with the comparison functions (lt, gt, eq, ne). Given the following XML document: <root> <node id='10,3,4,12'/> <node id='5,4,6'/> <node id='0,1,3'/> </root> I want to return only nodes having a number less than 3 in
-
Secondry Resource confirmation
Dear All. We are using Process Order, for some phases we have assigned secondry resources. If my yield quantity is 100 Kg then i require 10 Hr in phase & also in secondry resources while confirmation of phase if i do partial confirmation for 50 Kg sy