Problem in deleting queries..........
Hi,
When I trying to delete the query
I am getting message that these query has been used in the work books
.
When I am trying to see these workbooks, I couldnt find these two in the role.
When I checked in transport connection it is showing these two objects there.
Could you please tell me how to delete those workbooks? So that these queries can be deleted.
Bye,
Jeetu
Hi,
First why do u want to delete this query?
If the query is being used in workbook, on which(workbook) you don't have authorizantion you cannot see the workbook.
The query used by some others in workbook, so cannot delete the query.
If it is useful assign points.
Regards,
Senthil Kumar.P
Similar Messages
-
Problem :ALV:Deletion Flags not showing in output
hi all !
I have a alv program which displays customer data.there are three deletion flags columns in the output.
First deletion flag will be: KNA1-LOEVM
Second deletion flag will be: KNB1-LOEVM
Third deletion flag will be: KNVV-LOEVM
earlier all three were showing.but now no one is showing.i'm pasting my code here if any expert can have a look and find out the BUG.
CODE STARTS----
report zqsdcap_cust.
INCLUDE DECLARATIONS
include:
ziabapcapph_macros. "Holcim Useful Macros
TABLE DECLARATIONS
tables:
tvko, "Org. Unit: Sales Organizations
t001, "Company codes
kna1, "Customer Master
knvv, "Customer master sales
knvi, "Customer tax classificat'n
knb1, "Customer master company code
<<CR003-DEVK949538 start ins
adr6. "SMTP numbers
<<CR003-DEVK949538 end ins
TYPE DECLARATIONS
type-pools:
slis.
STRUCTURE DECLARATIONS
Define structure for keep data in ALV list
data: begin of gs_output_list,
vkorg like knvv-vkorg, "Sales organization
ktokd like kna1-ktokd, "Customer A/C grp
kunnr like kna1-kunnr, "Customer number
vtweg like knvv-vtweg, "Distribution channel
name1 like kna1-name1, "Name1
name3 like kna1-name3, "Name3
name4 like kna1-name4, "Name4
stras like kna1-stras, "Street
cityc like kna1-cityc, "City
bezei1 like t005h-bezei, "Sales office
land1 like kna1-land1, "Country
regio like kna1-regio, "Region
bezei2 like t005u-bezei, "Region decription
kdgrp like knvv-kdgrp, "Customer group
ktext like t151t-ktext, "Cust grp name
bzirk like knvv-bzirk, "Sales district
bztxt like t171t-bztxt, "Description
zterm like knvv-zterm, "Payment term
lzone like kna1-lzone, "Transport zone
vtext like tzont-vtext, "Description
erdat like kna1-erdat, "Creation date
end of gs_output_list.
Internal table for customer tax data
data: begin of gs_output_tax,
vkorg like knvv-vkorg, "Sales organization
kunnr like kna1-kunnr, "Customer number
vtweg like knvv-vtweg, "Distribution channel
name1 like kna1-name1, "Name1
name3 like kna1-name3, "Name3
name4 like kna1-name4, "Name4
ort01 like kna1-ort01, "City
stcd1 like kna1-stcd1, "STD code
spart like knvv-spart, "Division
taxkd like knvi-taxkd, "Tax classific'n
tatyp like knvi-tatyp, "Tax category
vtext like tskdt-vtext, "Tax description
end of gs_output_tax.
Internal table for HVL customer master
data: begin of gs_output_hvl,
kunnr like kna1-kunnr, "Customer number
stceg like kna1-stceg, "VAT registration no
telfx like kna1-telfx, "Fax number
telf1 like kna1-telf1, "First telephone number
stras like kna1-stras, "House number and stret
ort02 like kna1-ort02, "District
cityc like kna1-cityc, "City code
bezei like t005h-bezei, "City description
regio like kna1-regio, "Region
ort01 like kna1-ort01, "City
name2 like kna1-name2, "Name2
name1 like kna1-name1, "Name1
bzirk like knvv-bzirk, "Sales district
spart like knvv-spart, "Division
vtweg like knvv-vtweg, "Distribution channel
vkorg like knvv-vkorg, "Sales organization
end of gs_output_hvl.
Internal table for customer database CRM
data: begin of gs_output_crm,
vkorg like knvv-vkorg, "Sales organization
vtweg like knvv-vtweg, "Distribution channel
bzirk like knvv-bzirk, "Sales district
kunnr like kna1-kunnr, "Customer number
name1 like kna1-name1, "Name1
name2 like kna1-name2, "Name2
stras like kna1-stras, "House number street
ort01 like kna1-ort01, "City
ort02 like kna1-ort02, "District
pstlz like kna1-pstlz, "Postal code
cityc like kna1-cityc, "City code
telf1 like kna1-telf1, "First telephone number
telfx like kna1-telfx, "Fax number
vkbur like knvv-vkbur, "Sales office
regio like kna1-regio, "Region
vkgrp like knvv-vkgrp, "Sales group
kdgrp like knvv-kdgrp, "Customer group
kvgr3 like knvv-kvgr3, "Customer group 3
altkn like knb1-altkn, "Previous record number
erdat like knvv-erdat, "Creation date
found_dat like zcrm_bp_ext-found_dat, "Found date
<<CR000-DEVK943142 start del
versg like knvv-versg, "Customer statistic grp
bukrs like knb1-bukrs, "Company code
<<CR000-DEVK943142 end del
end of gs_output_crm.
Internal table for customer information
data: begin of gs_output_info,
kunnr like kna1-kunnr, "Customer number
vkorg like knvv-vkorg, "Sales organization
vtweg like knvv-vtweg, "Distribution channel
stcd2 like kna1-stcd2, "Tax code
name1 like kna1-name1, "Name1
name2 like kna1-name2, "Name2
<<CR002-DEVK944835 start ins
name3 like kna1-name3, "Name3
<<CR002-DEVK944835 end ins
stras like kna1-stras, "House number street
ort01 like kna1-ort01, "City
ort02 like kna1-ort02, "District
pstlz like kna1-pstlz, "Postal code
regio like kna1-regio, "Region
land1 like kna1-land1, "Country code
cityc like kna1-cityc, "City code
telf1 like kna1-telf1, "First telephone number
telfx like kna1-telfx, "Fax number
<<CR001-DEVK944239 start ins
bzirk like knvv-bzirk, "Sales District
vkbur like knvv-vkbur, "Sales Office
kdgrp like knvv-kdgrp, "Customer group
<<CR001-DEVK944239 end ins
vkgrp like knvv-vkgrp, "Sales group
kvgr3 like knvv-kvgr3, "Customer group 3
versg like knvv-versg, "Customer stat grp
kdkg2 like kna1-kdkg2, "Customer condition gp2
kdkg1 like kna1-kdkg1, "Customer condition gp1
<<CR001-DEVK944239 start del
kdgrp like knvv-kdgrp, "Customer group
<<CR001-DEVK944239 end del
altkn like knb1-altkn, "Previous record#
erdat like knvv-erdat, "Creation date
note_text(200) type c, "<<CR003-DEVK949538 ins
smtp_addr like adr6-smtp_addr, "<<CR003-DEVK949538 ins
loevm1 like kna1-loevm, "Deletion flag all
loevm2 like knb1-loevm, "Deletion flag Cd
loevm3 like knvv-loevm, "Deletion flag sal
end of gs_output_info.
ALV Grid Declaration
data:
gs_fieldcat type slis_fieldcat_alv,
gs_layout type slis_layout_alv,
gs_event type slis_t_event,
gs_variant like disvariant,
gs_sort_info type slis_sortinfo_alv,
gs_exit_caused_by_user type slis_exit_by_user,
gs_tabname type slis_tabname,
gs_header type slis_entry.
INTERNAL TABLE DECLARATIONS
Define internal table for keep data in ALV list
data:
gt_output_list like table of gs_output_list,
gt_output_tax like table of gs_output_tax,
gt_output_hvl like table of gs_output_hvl,
gt_output_crm like table of gs_output_crm,
gt_output_info like table of gs_output_info,
<<CR003-DEVK949538 start ins
gv_text like tline occurs 0 with header line,
<<CR003-DEVK949538 start ins
ALV Grid Declaration
gt_fieldcat type slis_t_fieldcat_alv,
gt_list_top_of_page type slis_t_listheader,
gt_list_top_of_page2 type slis_t_listheader,
gt_sort_info type slis_t_sortinfo_alv.
VARIABLE DECLARATIONS
data:
ALV Grid Declaration
gv_save,
gv_exit_caused_by_caller,
gv_repid type sy-repid,
gv_user_command type slis_formname value 'USER_COMMAND',
gv_top_of_page type slis_formname value 'TOP_OF_PAGE',
gv_top_of_list type slis_formname value 'TOP_OF_LIST',
gv_end_of_list type slis_formname value 'END_OF_LIST',
lv_store like thead-tdname, "<<CR003-DEVK949538 ins
lv_id like thead-tdid, "<<CR003-DEVK949538 ins
lv_lines type i. "<<CR003-DEVK949538 ins
SELECTION SCREEN DECLARATIONS
Define selection-screen of query
selection-screen: begin of block blk with frame title text-001.
select-options: s_vkorg for knvv-vkorg "Sales org
obligatory
memory id vko,
s_bzirk for knvv-bzirk, "Sales district
s_vtweg for knvv-vtweg, "Dist channel
s_spart for knvv-spart "Division
default 'CM',
s_taxkd for knvi-taxkd, "Tax classific'n
s_kunnr for kna1-kunnr, "Customer number
s_regio for kna1-regio, "Region
s_kdgrp for knvv-kdgrp, "Customer group
s_vkgrp for knvv-vkgrp, "Sales group
s_vkbur for knvv-vkbur, "Sales office
s_lzone for kna1-lzone, "Zone
s_erdat for kna1-erdat, "Creation date
s_zuawa for knb1-zuawa, "Key for sorting
s_ktokd for kna1-ktokd, "Customer A/C grp
s_altkn for knb1-altkn, "Previous rec no
s_bukrs for knb1-bukrs "Company code
obligatory
memory id buk,
s_loevm1 for kna1-loevm, "Deletion flag all
s_loevm2 for knb1-loevm, "Deletion flag Cd
s_loevm3 for knvv-loevm. "Deletion flag sal
selection-screen: end of block blk.
selection-screen: begin of block b2 with frame title text-002.
parameters: pr_cust1 radiobutton group a1
default 'X'
user-command bkg,
pr_cust2 radiobutton group a1,
pr_cust3 radiobutton group a1,
pr_cust4 radiobutton group a1,
pr_cust5 radiobutton group a1.
selection-screen: end of block b2.
AT SELECTION-SCREEN ON S_VKORG
at selection-screen on s_vkorg.
select vkorg
into tvko-vkorg
from tvko
where vkorg in s_vkorg.
authorization check for sales org.
authority-check object 'V_VBRK_VKO'
id 'VKORG' field tvko-vkorg
id 'ACTVT' field '03'.
check sy-subrc ne 0.
message e002(zgen) with 'No authorization for sales org.'
tvko-vkorg.
endselect.
AT SELECTION-SCREEN ON S_BUKRS
at selection-screen on s_bukrs.
if pr_cust4 eq 'X' or
pr_cust5 eq 'X'.
select bukrs
into t001-bukrs
from t001
where bukrs in s_bukrs.
authorization check for plant and company code
authority-check object 'A_S_WERK'
id 'BUKRS' field t001-bukrs
id 'WERKS' dummy.
check sy-subrc ne 0.
message e002(zgen) with 'No authorization for this company code.'
t001-bukrs.
endselect.
endif.
AT SELECTION-SCREEN OUTPUT
at selection-screen output.
loop at screen .
if pr_cust1 eq 'X'.
if screen-name = 'S_VTWEG-LOW' or
screen-name = 'S_VTWEG-HIGH' or
screen-name = 'S_SPART-LOW' or
screen-name = 'S_SPART-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH' or
screen-name = 'S_BUKRS-LOW' or
screen-name = 'S_BUKRS-HIGH' or
screen-name = 'S_ERDAT-LOW' or
screen-name = 'S_ERDAT-HIGH' or
screen-name = 'S_ALTKN-LOW' or
screen-name = 'S_ALTKN-HIGH' or
screen-name = 'S_VKBUR-LOW' or
screen-name = 'S_VKBUR-HIGH' or
screen-name = 'S_LOEVM1-LOW' or
screen-name = 'S_LOEVM1-HIGH' or
screen-name = 'S_LOEVM2-LOW' or
screen-name = 'S_LOEVM2-HIGH' or
screen-name = 'S_LOEVM3-LOW' or
screen-name = 'S_LOEVM3-HIGH'.
screen-input = 0.
endif.
elseif pr_cust2 eq 'X'.
if screen-name = 'S_BZIRK-LOW' or
screen-name = 'S_BZIRK-HIGH' or
screen-name = 'S_KDGRP-LOW' or
screen-name = 'S_KDGRP-HIGH' or
screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_KTOKD-LOW' or
screen-name = 'S_KTOKD-HIGH' or
screen-name = 'S_ERDAT-LOW' or
screen-name = 'S_ERDAT-HIGH' or
screen-name = 'S_KTOKD-LOW' or
screen-name = 'S_KTOKD-HIGH' or
screen-name = 'S_ALTKN-LOW' or
screen-name = 'S_ALTKN-HIGH' or
screen-name = 'S_VKBUR-LOW' or
screen-name = 'S_VKBUR-HIGH' or
screen-name = 'S_LOEVM1-LOW' or
screen-name = 'S_LOEVM1-HIGH' or
screen-name = 'S_LOEVM2-LOW' or
screen-name = 'S_LOEVM2-HIGH' or
screen-name = 'S_LOEVM3-LOW' or
screen-name = 'S_LOEVM3-HIGH' or
screen-name = 'S_BUKRS-LOW' or
screen-name = 'S_BUKRS-HIGH' or
screen-name = 'S_VKGRP-LOW' or
screen-name = 'S_VKGRP-HIGH'.
screen-input = 0.
endif.
elseif pr_cust3 eq 'X'.
if screen-name = 'S_BZIRK-LOW' or
screen-name = 'S_BZIRK-HIGH' or
screen-name = 'S_KDGRP-LOW' or
screen-name = 'S_KDGRP-HIGH' or
screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_ERDAT-LOW' or
screen-name = 'S_ERDAT-HIGH' or
screen-name = 'S_KTOKD-LOW' or
screen-name = 'S_KTOKD-HIGH' or
screen-name = 'S_SPART-LOW' or
screen-name = 'S_SPART-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH' or
screen-name = 'S_REGIO-LOW' or
screen-name = 'S_REGIO-HIGH' or
screen-name = 'S_ALTKN-LOW' or
screen-name = 'S_ALTKN-HIGH' or
screen-name = 'S_VKBUR-LOW' or
screen-name = 'S_VKBUR-HIGH' or
screen-name = 'S_LOEVM1-LOW' or
screen-name = 'S_LOEVM1-HIGH' or
screen-name = 'S_LOEVM2-LOW' or
screen-name = 'S_LOEVM2-HIGH' or
screen-name = 'S_LOEVM3-LOW' or
screen-name = 'S_LOEVM3-HIGH' or
screen-name = 'S_BUKRS-LOW' or
screen-name = 'S_BUKRS-HIGH' or
screen-name = 'S_VKGRP-LOW' or
screen-name = 'S_VKGRP-HIGH' or
screen-name = 'S_VTWEG-LOW' or
screen-name = 'S_VTWEG-HIGH'.
screen-input = 0.
endif.
elseif pr_cust4 eq 'X'.
if screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH' or
screen-name = 'S_REGIO-LOW' or
screen-name = 'S_REGIO-HIGH' or
screen-name = 'S_ZUAWA-LOW' or
screen-name = 'S_ZUAWA-HIGH'.
screen-input = 0.
endif.
else.
if screen-name = 'S_LZONE-LOW' or
screen-name = 'S_LZONE-HIGH' or
screen-name = 'S_TAXKD-LOW' or
screen-name = 'S_TAXKD-HIGH'.
screen-input = 0.
endif.
endif.
modify screen.
endloop.
INITIALIZATION
initialization.
perform deactivate_program using sy-cprog.
START OF SELECTION
start-of-selection.
Customized function to get data from database table
perform get_data.
<<CR003-DEVK949538 start ins
perform get_internal_note_text tables gt_output_info.
<<CR003-DEVK949538 end ins
Create sort of ALV list
perform build_sort.
Send data to ALV list to display
if pr_cust1 eq 'X'.
gs_tabname = text-003.
gs_header = text-004.
perform write_alv_report tables gt_output_list
gt_sort_info.
elseif pr_cust2 eq 'X'.
gs_tabname = text-005.
gs_header = text-006.
perform write_alv_report tables gt_output_tax
gt_sort_info.
elseif pr_cust3 eq 'X'.
gs_tabname = text-007.
gs_header = text-008.
perform write_alv_report tables gt_output_hvl
gt_sort_info.
elseif pr_cust4 eq 'X'.
gs_tabname = text-009.
gs_header = text-010.
perform write_alv_report tables gt_output_crm
gt_sort_info.
else.
gs_tabname = text-011.
gs_header = text-012.
perform write_alv_report tables gt_output_info
gt_sort_info .
endif.
FORM EVENTTAB_FIELD
Fill Event tab, for ALV Grid Display
form eventtab_field using gs_events type slis_t_event.
data:
ls_event type slis_alv_event.
call function 'REUSE_ALV_EVENTS_GET'
exporting
i_list_type = 0
importing
et_events = gs_events.
read table gs_events with key name = slis_ev_top_of_page
into ls_event.
if sy-subrc = 0.
move gv_top_of_page to ls_event-form.
append ls_event to gs_events.
endif.
endform. " eventtab_field
FORM TOP_OF_PAGE
Write at Top of Page of ALV grid
form top_of_page.
call function 'REUSE_ALV_COMMENTARY_WRITE'
exporting
it_list_commentary = gt_list_top_of_page.
endform. "top_of_page
FORM COMMENT_BUILD
Write header of ALV grid
form comment_build using lt_top_of_page type slis_t_listheader
gs_header.
data:
lv_tdate(10),
lv_fdate(10),
ls_line type slis_listheader.
clear: ls_line.
ls_line-typ = 'H'.
ls_line-info = gs_header.
append ls_line to lt_top_of_page.
endform. "comment_build
FORM INIT_FIELDCAT
Fill Field Catalog for ALV Grid
form init_fieldcat using gs_tabname.
refresh: gt_fieldcat.
use this function to get the all fields in the structure.
call function 'REUSE_ALV_FIELDCATALOG_MERGE'
exporting
i_program_name = gv_repid
i_internal_tabname = gs_tabname
i_inclname = gv_repid
changing
ct_fieldcat = gt_fieldcat.
if sy-subrc eq 0.
clear mark for key field to set color of key column
gs_fieldcat-key = ''.
modify gt_fieldcat from gs_fieldcat transporting key
where fieldname ne space.
read table gt_fieldcat with key fieldname = 'FOUND_DAT'
into gs_fieldcat.
gs_fieldcat-seltext_l = text-013.
modify gt_fieldcat from gs_fieldcat
transporting seltext_l
where fieldname = 'FOUND_DAT'.
<<CR003-DEVK949538 start ins
read table gt_fieldcat with key fieldname = 'NOTE_TEXT'
into gs_fieldcat.
gs_fieldcat-seltext_l = text-014.
modify gt_fieldcat from gs_fieldcat
transporting seltext_l
where fieldname = 'NOTE_TEXT'.
<<CR003-DEVK949538 start ins
endif.
endform. "init_fieldcat
FORM INIT_LAYOUT
Layout initial
form init_layout using gs_layout type slis_layout_alv.
gs_layout-info_fieldname = 'LINECOLOR'.
gs_layout-colwidth_optimize = 'X'.
gs_layout-zebra = 'X'.
endform. " init_layout
FORM WRITE_ALV_REPORT
form write_alv_report tables gt_output
gt_sort_info.
ALV Grid display
clear: gv_repid,
gv_save.
gv_repid = sy-repid.
gs_variant-report = gv_repid.
gv_save = 'A'.
Build fieldcatalog
perform init_fieldcat using gs_tabname.
Build list events
perform eventtab_field using gs_event.
Show in ALV Grid form
perform init_layout using gs_layout.
Build comments
perform comment_build using gt_list_top_of_page[]
gs_header.
call function 'REUSE_ALV_GRID_DISPLAY'
exporting
i_buffer_active = ' '
i_callback_program = gv_repid
is_layout = gs_layout
i_save = gv_save
is_variant = gs_variant
it_events = gs_event[]
it_sort = gt_sort_info[]
it_fieldcat = gt_fieldcat[]
importing
e_exit_caused_by_caller = gv_exit_caused_by_caller
es_exit_caused_by_user = gs_exit_caused_by_user
tables
t_outtab = gt_output
exceptions
program_error = 1
others = 2.
endform. "write_alv_report
FORM GET_DATA
form get_data.
Get customer list
if pr_cust1 eq 'X'.
select knvv~vkorg
kna1~ktokd
kna1~kunnr
knvv~vtweg
kna1~name1
kna1~name3
kna1~name4
kna1~stras
kna1~cityc
kna1~regio
kna1~land1
knvv~kdgrp
knvv~bzirk
knvv~zterm
kna1~lzone
kna1~erdat
from kna1 join knvv
on kna1kunnr = knvvkunnr
into corresponding fields of table gt_output_list
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~bzirk in s_bzirk
and kna1~regio in s_regio
and knvv~kdgrp in s_kdgrp
and kna1~lzone in s_lzone
and kna1~erdat in s_erdat
and kna1~ktokd in s_ktokd.
loop at gt_output_list into gs_output_list.
Get City decsription
perform get_city_description using gs_output_list-cityc
changing gs_output_list-bezei1.
Get Region description
select single bezei
from t005u
into gs_output_list-bezei2
where bland = gs_output_list-regio
and land1 = gs_output_list-land1"<<CR000-DEVK942345 ins
and spras = sy-langu.
Get customer group description
select single ktext
from t151t
into gs_output_list-ktext
where kdgrp = gs_output_list-kdgrp
and spras = sy-langu.
Get sales district description
select single bztxt
from t171t
into gs_output_list-bztxt
where bzirk = gs_output_list-bzirk
and spras = sy-langu.
Get zone decription
select single vtext
from tzont
into gs_output_list-vtext
where zone1 = gs_output_list-lzone
and spras = sy-langu.
modify gt_output_list from gs_output_list index sy-tabix
transporting bezei1
bezei2
ktext
bztxt
vtext.
clear gs_output_list.
endloop.
Get customer tax data
elseif pr_cust2 eq 'X'.
select kna1~kunnr
kna1~name1
kna1~name3
kna1~name4
kna1~ort01
kna1~stcd1
knvv~vkorg
knvv~spart
knvv~vtweg
knvi~taxkd
knvi~tatyp
from kna1 join knvv
on kna1kunnr = knvvkunnr
join knvi
on kna1kunnr = knvikunnr
into corresponding fields of table gt_output_tax
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~vtweg in s_vtweg
and knvv~spart in s_spart
and kna1~regio in s_regio
and knvi~taxkd in s_taxkd.
Get customer tax description
loop at gt_output_tax into gs_output_tax.
select single vtext
from tskdt
into gs_output_tax-vtext
where tatyp = gs_output_tax-tatyp
and taxkd = gs_output_tax-taxkd
and spras = sy-langu.
if sy-subrc eq 0.
modify gt_output_tax from gs_output_tax index sy-tabix
transporting vtext.
clear gs_output_tax.
endif.
endloop.
Get customer HVL data
elseif pr_cust3 eq 'X'.
select kna1~kunnr
kna1~stceg
kna1~telfx
kna1~telf1
kna1~stras
kna1~ort02
kna1~cityc
kna1~regio
kna1~ort01
kna1~name2
kna1~name1
knvv~bzirk
knvv~spart
knvv~vtweg
knvv~vkorg
from kna1 join knvv
on kna1kunnr = knvvkunnr
into corresponding fields of table gt_output_hvl
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg.
loop at gt_output_hvl into gs_output_hvl.
Get city description.
perform get_city_description using gs_output_hvl-cityc
changing gs_output_hvl-bezei.
if sy-subrc eq 0.
modify gt_output_hvl from gs_output_hvl index sy-tabix
transporting bezei.
clear gs_output_hvl.
endif.
endloop.
Get cust CRM data
elseif pr_cust4 eq 'X'.
select kna1~kunnr
knvv~versg "<<CR000-DEVK943142 del
knvv~vkorg
knvv~vtweg
knvv~bzirk
knvv~vkgrp
knvv~kdgrp
knvv~vkbur
kna1~name1
kna1~name2
kna1~ort01
kna1~pstlz
kna1~regio
kna1~stras
kna1~telf1
kna1~telfx
kna1~ort02
kna1~cityc
knvv~kvgr3
knb1~altkn
knb1~bukrs "<<CR000-DEVK943142 del
knvv~erdat
zcrm_bp_ext~found_dat
from kna1 join knvv
on kna1kunnr = knvvkunnr
join knb1
on knvvkunnr = knb1kunnr
join zcrm_bp_ext
on knb1kunnr = zcrm_bp_extkunnr
into corresponding fields of table gt_output_crm
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~vtweg in s_vtweg
and knvv~spart in s_spart
and knvv~bzirk in s_bzirk
and knvv~kdgrp in s_kdgrp
and knvv~vkgrp in s_vkgrp
and knvv~vkbur in s_vkbur
and knvv~erdat in s_erdat
and kna1~ktokd in s_ktokd
and kna1~loevm in s_loevm1
and knb1~loevm in s_loevm2
and knvv~loevm in s_loevm3
and knb1~bukrs in s_bukrs
and knb1~altkn in s_altkn.
else.
Get customer information
<<CR001-DEVK944342 start del
select kna1~kunnr
knvv~vkorg
knvv~vtweg
kna1~stcd2
kna1~name1
kna1~name2
kna1~ort01
kna1~land1
kna1~pstlz
kna1~regio
kna1~stras
kna1~telf1
kna1~telfx
knvv~bzirk "<<CR001-DEVK944239 ins
knvv~vkbur "<<CR001-DEVK944239 ins
kna1~ort02
kna1~cityc
knvv~vkgrp
knvv~kvgr3
knvv~versg
kna1~kdkg2
kna1~kdkg1
knvv~kdgrp
knb1~altkn
knvv~erdat
kna1~loevm
knb1~loevm
knvv~loevm
<<CR001-DEVK944342 end del
<<CR001-DEVK944342 start ins
select kna1~kunnr
knvv~vkorg
knvv~vtweg
kna1~stcd2
kna1~name1
kna1~name2
kna1~name3 "<<CR002-DEVK944835 ins
kna1~stras
kna1~ort01
kna1~ort02
kna1~pstlz
kna1~regio
kna1~land1
kna1~cityc
kna1~telf1
kna1~telfx
knvv~bzirk
knvv~vkbur
knvv~kdgrp
knvv~vkgrp
knvv~kvgr3
knvv~versg
kna1~kdkg2
kna1~kdkg1
knb1~altkn
knvv~erdat
kna1~loevm
knb1~loevm
knvv~loevm
<<CR001-DEVK944342 end ins
from kna1 join knvv
on kna1kunnr = knvvkunnr
join knb1
on kna1kunnr = knb1kunnr
<<CR001-DEVK944252 start del
into corresponding fields of table gt_output_info
<<CR001-DEVK944252 end del
<<CR003-DEVK949538 start del
into table gt_output_info "<<CR001-DEVK944342 ins
<<CR003-DEVK949538 end del
<<CR003-DEVK949538 start ins
into corresponding fields of table gt_output_info
<<CR003-DEVK949538 end ins
where kna1~kunnr in s_kunnr
and knvv~vkorg in s_vkorg
and knvv~vtweg in s_vtweg
and knvv~spart in s_spart
and knvv~bzirk in s_bzirk
and knvv~kdgrp in s_kdgrp
and knvv~vkgrp in s_vkgrp
and knvv~vkbur in s_vkbur
and knvv~erdat in s_erdat
and kna1~ktokd in s_ktokd
and kna1~regio in s_regio
<<CR001-DEVK944252 start del
and kna1~loevm in s_loevm1
and knb1~loevm in s_loevm2
and knvv~loevm in s_loevm3
<<CR001-DEVK944252 end del
<<CR001-DEVK944252 start ins
and ( kna1~loevm in s_loevm1
or knb1~loevm in s_loevm2
or knvv~loevm in s_loevm3 )
<<CR001-DEVK944252 end ins
and knb1~zuawa in s_zuawa
and knb1~bukrs in s_bukrs
and knb1~altkn in s_altkn.
<<CR003-DEVK949538 start ins
loop at gt_output_info into gs_output_info.
select single adrnr
into kna1-adrnr
from kna1
where kunnr = gs_output_info-kunnr.
check sy-subrc eq 0.
select single smtp_addr
into adr6-smtp_addr
from adr6
where addrnumber = kna1-adrnr.
check sy-subrc eq 0.
gs_output_info-smtp_addr = adr6-smtp_addr.
modify gt_output_info from gs_output_info.
endloop.
<<CR003-DEVK949538 end ins
endif.
<<CR003-DEVK949538 start ins
loop at gt_output_info into gs_output_info.
lv_store = gs_output_info-loevm1.
endloop.
<<CR003-DEVK949538 end ins
endform.
FORM BUILD_SORT
form build_sort.
if pr_cust1 eq 'X' or
pr_cust2 eq 'X'.
clear gs_sort_info.
gs_sort_info-fieldname = 'VKORG'.
gs_sort_info-spos = 1.
gs_sort_info-up = 'X'.
append gs_sort_info to gt_sort_info.
endif.
clear gs_sort_info.
gs_sort_info-fieldname = 'KUNNR'.
gs_sorhi shivaji!
thx for the reply.
can u chk whether there is any problem with the queries or not.
regards
sachin -
Concurrent delete queries on one table
Hi folks,
I just recently started working with SQL server. I did my research and I guess that the post http://social.msdn.microsoft.com/Forums/en-US/7fe7499e-10a5-4371-84a4-aa1df8187a04/can-i-prevent-deadlock-during-concurrent-delete?forum=transactsql hits and somehow
sovles my problem 100%.
I am glad to have my issue resolved but I am also interested in understanding what went wrong deep inside as much as learn what I might do better. My scenario:
4 processes updating disjunct entries at different intervals within the same table and issuing delete queries on that table. Sometimes (maybe once a day) that gives me a deadlock. colums: value, mainclass, subclass, timestamp with a clustered index at timestamp
(My statement is of the form "delete from table where maintype=sth and subtype=sth and timestamp=st")
I'll append a sample deadlock graph. My main questions, which I couldn't answer so far:
1. Is this expected behaviour or should SQL Server be able to handle such requests, or to put it right do I have to care for structures that avoid the above scenario, do I have to reconfigure or is there sth else to look at?
2. Is this a configuration problem?
3. I also do not understand why the report states that the processes fought for page ids when the lock escalation type was set to table.
4. As far as I got to know until now having a clustered index on the timestamp colum is likely to boost my problem rather than solving it?
I am really looking forward to any insights you can give.
Bye,
Lamu
<deadlock>
<victim-list>
<victimProcess id="process56d746188" />
</victim-list>
<process-list>
<process id="process56d746188" taskpriority="0" logused="0" waitresource="PAGE: 5:1:210559 " waittime="3120" ownerId="2642852343" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.683" XDES="0x5a36bd740" lockMode="U" schedulerid="4" kpid="3204" status="suspended" spid="72" sbid="1" ecid="4" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.990" lastbatchcompleted="2014-09-05T11:16:12.683" lastattention="1900-01-01T00:00:00.683" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="6504" isolationlevel="read committed (2)" xactid="2642852343" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]<@3 </frame>
<frame procname="adhoc" line="1" sqlhandle="0x02000000e1914b015d3b4d5ca54af4b548f2990acfe909ec0000000000000000000000000000000000000000">
DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </frame>
</executionStack>
<inputbuf>
DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </inputbuf>
</process>
<process id="process7edeee188" taskpriority="0" logused="0" waitresource="PAGE: 5:1:196655 " waittime="3124" ownerId="2642852343" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.683" XDES="0x8747f1740" lockMode="U" schedulerid="2" kpid="7108" status="suspended" spid="72" sbid="1" ecid="2" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.990" lastbatchcompleted="2014-09-05T11:16:12.683" lastattention="1900-01-01T00:00:00.683" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="6504" isolationlevel="read committed (2)" xactid="2642852343" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]<@3 </frame>
<frame procname="adhoc" line="1" sqlhandle="0x02000000e1914b015d3b4d5ca54af4b548f2990acfe909ec0000000000000000000000000000000000000000">
DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </frame>
</executionStack>
<inputbuf>
DELETE from statisticlog where ((statisticid='node.temperatur') and (storageid='17:85:00:00:1a:18.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </inputbuf>
</process>
<process id="process7edeefc38" taskpriority="0" logused="0" waitresource="PAGE: 5:1:196655 " waittime="3119" ownerId="2642852529" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.973" XDES="0x87f3ddbb0" lockMode="U" schedulerid="2" kpid="5216" status="suspended" spid="62" sbid="1" ecid="2" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]<@3 </frame>
<frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </frame>
</executionStack>
<inputbuf>
DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </inputbuf>
</process>
<process id="process681871868" taskpriority="0" logused="0" waitresource="PAGE: 5:1:210559 " waittime="3118" ownerId="2642852529" transactionname="user_transaction" lasttranstarted="2014-09-05T11:16:12.973" XDES="0x87bb39740" lockMode="U" schedulerid="1" kpid="8088" status="suspended" spid="62" sbid="1" ecid="3" priority="0" trancount="0" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]<@3 </frame>
<frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </frame>
</executionStack>
<inputbuf>
DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </inputbuf>
</process>
<process id="process6e959f0c8" taskpriority="0" logused="10000" waittime="3087" schedulerid="4" kpid="6624" status="suspended" spid="62" sbid="1" ecid="0" priority="0" trancount="2" lastbatchstarted="2014-09-05T11:16:12.980" lastbatchcompleted="2014-09-05T11:16:12.973" lastattention="1900-01-01T00:00:00.973" clientapp="WIRELESS LOCALIZATION SYSTEM 1.15.0" hostname="S-ITCS-ORTUNG" hostpid="1308" loginname="LocSystem" isolationlevel="read committed (2)" xactid="2642852529" currentdb="5" lockTimeout="4294967295" clientoption1="671088672" clientoption2="128056">
<executionStack>
<frame procname="adhoc" line="1" stmtstart="94" sqlhandle="0x020000008e714d2c0ee98fc35b8a7712a719321f42c9366a0000000000000000000000000000000000000000">
DELETE [statisticlog] WHERE [statisticid]=@1 AND [storageid]=@2 AND [timest]<@3 </frame>
<frame procname="adhoc" line="1" sqlhandle="0x02000000dd48f433f7e565ecccaaf5283c2e99548dd371d20000000000000000000000000000000000000000">
DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </frame>
</executionStack>
<inputbuf>
DELETE from statisticlog where ((statisticid='GWConnect') and (storageid='17:85:00:00:19:c8.0')) AND timest < {ts '1970-01-01 01:00:00.000' } </inputbuf>
</process>
</process-list>
<resource-list>
<pagelock fileid="1" pageid="210559" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock707200480" mode="U" associatedObjectId="72057594045464576">
<owner-list>
<owner id="process6e959f0c8" mode="U" />
</owner-list>
<waiter-list>
<waiter id="process56d746188" mode="U" requestType="wait" />
</waiter-list>
</pagelock>
<pagelock fileid="1" pageid="196655" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock6ddb9e400" mode="U" associatedObjectId="72057594045464576">
<owner-list>
<owner id="process681871868" mode="U" />
</owner-list>
<waiter-list>
<waiter id="process7edeee188" mode="U" requestType="wait" />
</waiter-list>
</pagelock>
<pagelock fileid="1" pageid="196655" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock6ddb9e400" mode="U" associatedObjectId="72057594045464576">
<owner-list>
<owner id="process7edeee188" mode="U" requestType="wait" />
</owner-list>
<waiter-list>
<waiter id="process7edeefc38" mode="U" requestType="wait" />
</waiter-list>
</pagelock>
<pagelock fileid="1" pageid="210559" dbid="5" subresource="FULL" objectname="LocSystem.LocSystem.statisticlog" id="lock707200480" mode="U" associatedObjectId="72057594045464576">
<owner-list>
<owner id="process56d746188" mode="U" requestType="wait" />
</owner-list>
<waiter-list>
<waiter id="process681871868" mode="U" requestType="wait" />
</waiter-list>
</pagelock>
<exchangeEvent id="Pipe59935a700" WaitType="e_waitPipeGetRow" nodeId="1">
<owner-list>
<owner id="process7edeefc38" />
<owner id="process681871868" />
</owner-list>
<waiter-list>
<waiter id="process6e959f0c8" />
</waiter-list>
</exchangeEvent>
</resource-list>
</deadlock>>1. Is this expected behaviour or should SQL Server be able to handle such requests, or to put it right do I have to >care for structures that avoid the above scenario, do I have to reconfigure or is there sth else to look at?
Basically yes. Because your queries are non-trivial the DELETE query plans for different queries may conflict.
>2. Is this a configuration problem?
It's influenced by your table indexing, and especially how well your DELETE statements are supported by the physical data structures in your table. The bigger and more complicated the physical design, the more likely that concurrent DELETES will conflict.
>3. I also do not understand why the report states that the processes fought for page ids when the lock escalation >type was set to table.
Page locks are never the result of lock escalation. Row locks escalate to Table locks. Period. When a query uses Page locks it's an optimization to avoid taking lots of row locks to begin with. But this comes at the possible cost
of some concurrency. The
ROWLOCK query hint, possibly along with the READPAST hint can force more granular locking.
>4. As far as I got to know until now having a clustered index on the timestamp colum is likely to boost my problem >rather than solving it?
You minimize the locking conflicts by ensuring that it's very simple to find the rows affected by your DELETE. There's not enough information here to speculate on which physical design (partition scheme, clustered index, non-clustered indexes...) is optimal
for this.
A threshold question is whether you really _need_ these deletes to run concurrently on the table. If not, then you can simply serialize them (eg with TABLOCK).
David
David http://blogs.msdn.com/b/dbrowne/ -
Hi, the problem of deleting files / videos seeds desktop to go into Terminal and then sudo rm-rf ~ /. Trash Pohangina the answers I've had e of someone in her forum but when I write procedures line in Terminal as the Krever my password and it can not write anything there, I write but nothing comes and my problem is not löst.När I want to delete the movie / video image Frin desktop still arrive Finder wants to make changes.Type your password to allow this. But even that I type my password file / video is left I need help in an easier way or another set-even those on the terminal that I can not type my password to solve the problem Regards Toni
If you want to preserve the data on the boot drive, you must try to back up now, before you do anything else.
There are several ways to back up a Mac that isn't fully working. You need an external hard drive to hold the backup data.
1. Boot from the Recovery partition or from a local Time Machine backup volume (option key at startup.) Launch Disk Utility and follow the instructions in this support article, under “Instructions for backing up to an external hard disk via Disk Utility.”
2. If you have access to a working Mac, and both it and the non-working Mac have FireWire or Thunderbolt ports, boot the non-working Mac in target disk mode. Use the working Mac to copy the data to another drive. This technique won't work with USB, Ethernet, Wi-Fi, or Bluetooth.
3. If the internal drive of the non-working Mac is user-replaceable, remove it and mount it in an external enclosure or drive dock. Use another Mac to copy the data. -
Problem of Delete and Overwrite XLS file on Application Server
Hi Experts,
I want to transfer file on application server using below code and try to delete after successfully transfer on application file to other location.
I have problem during deleting file and overwrite file.
DATA: G_S_FILE TYPE EPSFILNAM,
G_S_DIR TYPE EPSDIRNAM,
G_T_FILE TYPE EPSFILNAM,
G_T_DIR TYPE EPSDIRNAM.
DATA : DELFILE(60).
G_S_FILE = '1400000051.XLS'.
G_S_DIR = '\\Dev\PO\'.
G_T_FILE = '1400000051.XLS'.
G_T_DIR = '\\Dev\PO\bkup'.
DELFILE = '\\Dev\PO\1400000051.XLS'.
CALL METHOD CL_CTS_LANGUAGE_FILE_IO=>COPY_FILES_LOCAL
EXPORTING
IM_SOURCE_FILE = G_S_FILE
IM_SOURCE_DIRECTORY = G_S_DIR
IM_TARGET_FILE = G_T_FILE
IM_TARGET_DIRECTORY = G_T_DIR
IM_OVERWRITE_MODE = 'S'
EXCEPTIONS
OPEN_INPUT_FILE_FAILED = 1
OPEN_OUTPUT_FILE_FAILED = 2
WRITE_BLOCK_FAILED = 3
READ_BLOCK_FAILED = 4
CLOSE_OUTPUT_FILE_FAILED = 5
OTHERS = 6.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
OPEN DATASET DELFILE FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF SY-SUBRC = 0.
DELETE DATASET DELFILE.
ELSE.
WRITE / 'File not found'.
ENDIF.
Thanks,
Himanshu Patel.Write a Java program using Apache POI that reads in a tab delimited file and outputs an xls file (in what they call Horrible Spread Sheet Format. Create your tab delimited file and then run your Java program using appropriate OS commands.
Jelena Perfiljeva wrote:
In all honesty, I find it hard to believe other application can't accept any other format. It's actually seems rather unreasonable to expect an ERP system to create a file in an outdated format of a desktop software. Even Excel itself can open many formats, so this just doesn't make any sense.
This.
Unless you can explain exactly why the destination must be xls and no other format is acceptable, I'm going to close the thread. What is this third party tool? Why can it only read the obsolete xls file format.
I'm going through this thread and rejecting all the responses that attempt a solution that isn't xls.
I'm surprised that the OP thought that simply saving with an xls file extension would cause some magic to happen and produce an actual Excel file. -
Please don't refer me to the innumeras delete folder solutions available in the SDN. None of them has come to my help.
I need to delete a folder. Well, codes are available everywhere, I run it, it successfully deletes the folder specified.
But the requirement is, I need to make a zip of the folder, then I'll delete the original folder. I am pasting the code here. The zip part is working, the delete part is not! if you comment the line calling zip, it deletes the folder, but after zipping, it cannot delete.
Is there some lock present? How to check and remove that? Please help.
* Created on Jan 16, 2006
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
package com.ibm.eis.printapi;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintStream;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
* @author localusr
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
class PrintUtils {
static String folderName = "EISMENU_bak";
static String path = "c:\\samik";
static String outFilename = "outfile.zip";
public static void main(String args[]) throws IOException {
File inFileName = new File(path + "\\" + folderName);
//make the zip file
makeZip(inFileName, path, outFilename);
//Now, delete the directory
File inFileName2 = new File(path + "\\" + folderName);
inFileName2.renameTo(new File(path + "\\" + "aaa"));
deleteDir(inFileName2);
public static void makeZip(File inFile, String path, String outFile) throws IOException {
File[] filenames = inFile.listFiles();
byte b[] = new byte[512];
ZipOutputStream out = null;
try {
out = new ZipOutputStream(new FileOutputStream(path + "\\" + outFilename));
for (int i = 0; i < filenames.length; i++) {
if (filenames.isFile()) {
InputStream in = new FileInputStream(filenames[i]);
ZipEntry e = new ZipEntry(filenames[i].toString().replace(File.separatorChar, '/'));
out.putNextEntry(e);
int len = 0;
while ((len = in.read(b)) != -1) {
out.write(b, 0, len);
print(e);
} catch (IOException ioe) {
ioe.printStackTrace();
} finally {
out.close();
out = null;
filenames = null;
b = null;
public static void print(ZipEntry e) {
PrintStream sop = System.out;
sop.print("added " + e.getName());
if (e.getMethod() == ZipEntry.DEFLATED) {
long size = e.getSize();
if (size > 0) {
long csize = e.getCompressedSize();
long ratio = ((size - csize) * 100) / size;
sop.println(" (deflated " + ratio + "%)");
} else {
sop.println(" (deflated 0%)");
} else {
sop.println(" (stored 0%)");
public static boolean deleteDir(File dir) {
boolean deleted = false;
try {
if (dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
boolean success = deleteDir(new File(dir, children[i]));
if (!success) {
deleted = false;
} else {
deleted=true;
// The directory is now empty so delete it
//System.out.println(dir.canRead())
deleted = dir.delete();
} catch (Exception e) {
System.out.println("error: " + e);
return deleted;Thanks it worked.
The problem was, the folder I was trying to delete had .classpath, .project, .websettings files. It was encountering problem to delete these files because it internally also uses files of same name.
May be that was the reason.
I tried with any other folder, it worked. -
Problem in Delete Time Quota Compensation
Hi,
There is a problem in Infotype- 416 (Time Quota Compensation) with subtype - Workmen SL Encashment.
When I click on delete button, it goes in nexr screen - Delete Time Quota Compensation. From here, in Absence quotas, i want to delete 1 line item.
There is a one problem in deleting this.. system shows the message Change before earliest retro. date 01.04.2009 acc. to control rec. to py area WK.
Please let me know, what it is???
Regards..What is the beginning date of the infotype record you are trying to delete?
Please delete the payroll control record and re-create (by checking my prev message) so that the payroll period and retro period are in line with the start date of the IT.
e.g. if IT record is 01.01.2009 - 31.12.2009 --> So create the payroll record for 01.2009 period and 01.2009 retro period. Make sure status is Rel for correction.
As the infotype you're trying to delete belongs to a prior payroll period, control record acts as a shield to changes on this data since it is already used for a prior payroll calculation.
Dilek -
Problem in delete adjecent duplicates
Hi All,
i have a problem in delete adjacent duplicate in an internal table .
when i use it i want that the records which are getting doubled to be removed
but i also want that if the value in that field is empty for which i am comparing , to be ignored means i dont want the records
to be deleted in which the field value is empty for which i am comparing.
snippet of my code
delete ADJACENT DUPLICATES FROM xkomv COMPARING KSCHL.
so if theere is no value in KSCHL THAT RECORD NOT TO BE DELETED .
waiting for your reply..
Thanks in advanceTry the following,
"delete ADJACENT DUPLICATES FROM xkomv COMPARING KSCHL.
Before using the above statement do the following,
u201C decalare a temporary table for u2018xkomvu2019 say u2018t_xkomvu2019, and copy the data.
Refresh t_xkomv[].
t_xkomv[] = xkomv[].
Delete t_xkomv where KSCHL <> u2018 u2018.
Delete xkomv where KSCHL = u2018 u2018.
u201C Sort xkomv and then use delete adjacent duplicates.
And after this append data from t_xkomv to xkomv.
Hope it helps you,
Regards,
Abhijit G. Borkar -
<p>Hi All<br>I have this problem in deletion of a member.<br>When I try to delete the member, i get an error saying that it isused in the form.<br>I checked the form and see this member is not attached to thatform.<br>please suggest to tackle this problem.<br>thanks in advance.<br></p>
Hi guys Just a quick question, we use a relational database for metadata of planning. if that is the case than what does essbase has to do with planning? That thing is bothering me alot guys. I have a nice document on planning but I dont know the answer for this. Can somebody plz explain it to me I would really appreciate your effort guys, Thanks a million in advance.
-
Problem in deleting the message after reading
Hi
I m having some problem to delete the message after reading.
i read the FAQ, and there is only one question regarding to delete that i have tried but its not working
As my application required that message should be deleted after the processing.
Please help me out asap
Thank in advance.now here is the protocol trace from starting to the end point
with the settings of
session.setDebug(true);
and
folder.close(true);
POP3: connecting to host "172.xx.xx.xx", port 110
S: +OK Microsoft Exchange Server 2003 POP3 server version 6.5.6944.0 (xxxxx.xyz.com) ready.
C: USER test1
S: +OK
C: PASS Password
S: +OK User successfully logged on.
C: STAT
S: +OK 1 548
Total messages = 1
New messages = 0
================================
C: TOP 1 0
S: +OK
Received: from yyyyyy ([172.xx.xx.xx]) by xxxxx.xyz.com with Microsoft SMTPSVC(6.0.3790.3959);
Thu, 11 Sep 2008 12:21:14 +0530
Message-ID: <3373112.1221115884647.JavaMail.284528@yyyyyy>
From: [email protected]
To: [email protected]
Subject: testing
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Return-Path: [email protected]
X-OriginalArrivalTime: 11 Sep 2008 06:51:14.0500 (UTC) FILETIME=[C8892840:01C913DA]
Date: 11 Sep 2008 12:21:14 +0530
C: LIST 1
S: +OK 1 548
------------STARTING LINE------------
MESSAGE #1:
From: [email protected]
To: [email protected]
Subject: testing
SendDate: Thu Sep 11 12:21:14 IST 2008
CONTENT-TYPE: text/plain
This is plain text
------------TEXT------------
C: RETR 1
S: +OK
Received: from yyyyyy ([172.xx.xx.xx]) by xxxxx.xyz.com with Microsoft SMTPSVC(6.0.3790.3959);
Thu, 11 Sep 2008 12:21:14 +0530
Message-ID: <3373112.1221115884647.JavaMail.284528@yyyyyy>
From: [email protected]
To: [email protected]
Subject: testing
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Return-Path: [email protected]
X-OriginalArrivalTime: 11 Sep 2008 06:51:14.0500 (UTC) FILETIME=[C8892840:01C913DA]
Date: 11 Sep 2008 12:21:14 +0530
------------TEXT------------
******************MESSAGE ENDING LINE*****************
C: QUIT
S: +OK Microsoft Exchange Server 2003 POP3 server version 6.5.6944.0 signing off. -
Problem in deleting the orders under Custom category.
Hi friends,
I am facing some problem in deleting the Orders which were created under custom category. In fact we are creating Intransits under Standard category "EI" as well as Custom Category "ZP". I am able to modify the intransits created under "EI" but when I tried to change or delete the orders created under Category "ZP", I am getting a messag triggered by BAPI as " Order can not be changed". atleast I need to delete the order if change is not possible. I am using the BAPI "BAPI_SLSRVAPS_CREATEINTRANS" to create intransits under "EI" and i am using the same BAPI with BADI implementation to "SAPAPO_DM_PO_CHANGE" to create intransits under "ZP". Based on the condition I am changing the am changing the category from EI to ZP in the BADI.
I am able to change or delete the orders created under the EI but when I tried to change or delete the orders under ZP its giving me a message as Order can not be changed.
One more thing is If I go to Tcode /SAPAPO/RLCDEL trying to delete all the orders based on category. I am able to see all the orders under created under EI. If I tried to delete the orders based on Custom category ZI it is giving me the message as "No Orders exists in Live cache". But I am able to see the orders in tcode "SAPAPO/RRP3".
Can any one help me out in making this done. Please help me out in this.
Thanks & Regards,
Ramana.Hi Visu,
I really appreciate your gr8 help. Hope you can understand my problem that I am not a SCM person. Still you are responding to my questions with great patience.
Here what I found is I found the record in OM19 transaction in the object "/SAPAPO/OM_ORDER_EXT_STR". But the interesting is its giving me the GUID as blank . there is empty value in that field. where as the program "/SAPAPO/OM_DELETE_INCON_ORDERS" is asking for the "order GUID".
can you help me out in finding the order guid and deleting this order.
Regards,
Ramana. -
Problem in deletion of data from DSO
Hi All,
We are facing a problem in deleting data from Data Store Object.I am trying to delete data by using right click option on DSO -->Delete Data.It is saying "The system has not finished loading request no : XYZ".
I have tried to trace that request and found that request is running in background and the related process chain was deleted.Also no jobs of that request are available.
Now i want to delete one field from that particular DSO and it is not allowing because we are unable to delete data.Actually no data is present in Active table but we have data in Change Log table which we are unable to delete.
Thanks in Advance.
Regards,
Jaya.Hi,
Any way u r deleted that processchain if it is there u can kill that job through process chain by killing that job,if it is not possible
u should ask ur BASIS people in SM50 or SMICM tcode we can kill our job but ask the basis people.
once u deleted that then delete the data in hange log then (other once the data is there through that DTP it will not allow u to delete so u delete the data) then go for deleting that DTP also.
Thanks & regards
sathsih -
Problems to delete big *.tif files
I have problems to delete big *.tif filese.
At first Windows delete it, but if i pressed F5 then the files are not deleted. I have tryed to delete it with and without Shift + Del its always the same.
When i delete this file many times then it would be deleted.
A other Problem with this big files is that windows open a dialogbox and calculate the time that needed to delete the tif file.
But i can wait 2 hours and more, nothing is done by windows. In the dialogbox dosn`t change anything.
Have anyone an Idea?
Thank you in advanced.
DanielHi,
Does it happen to other files, just *.tif files? Generally speaking, When deleting a folder, the calculation time depends on not only the
file size but the file numbers of the folder. So you can delete sub-folders separately.
Also, you can try to use a popular methods to fix the issue. Here is the steps:
1. Right click on the file.
2. Click Properties
3. Click
Advanced
4. Under File Attributes uncheck
Allow this file to have contents indexed in addition to file.
Also, you can take the following steps to fix this issue:
Step 1:
You may try creating a new user profile to see if the same problem occurs. If not then it could be a corruption/permissions problem
of the old user profile.
To create a new user account
http://windows.microsoft.com/en-us/Windows7/Create-a-user-account
Step 2:
If the new user account works fine then the previous account was corrupt, you may follow the link given below to fix the corrupt
user profile.
Fix a corrupted user profile
http://windows.microsoft.com/en-US/Windows7/Fix-a-corrupted-user-profile
In addition, the issue can be related to third-party components, especially file system filter drivers, such as anti-virus drivers. In this situation,
I suggest you can delete the files on Safe Mode. If on Safe Mode It works fine, you could perform
clean boot to check the result.
Hope it helps.
Regards,
Alex Zhao
Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. -
Problem of deletion of rows in jtable, table refreshing too
Hi,
I have a table with empty rows in the beginning with some custom properties( columns have fixed width...), later user would be adding to the rows to this table and can delete, I've a problem while deleting the rows from table,
When a selected row is deleted the model is also deleting the data but the table(view) is not refreshed.
Actually i'm selecting a cell of a row, then hitting the delete button.
So the model is deleting the information, but i'm not able to c the fresh data in table( especially when the last cell of last row is selectd and hit the delete button, i am getting lots of exception)
Kindly copy the below code and execute it, and let me know,
* AuditPanel.java
* Created on August 30, 2002, 3:05 AM
import javax.swing.*;
import java.awt.*;
import javax.swing.table.*;
import java.awt.event.*;
import javax.swing.event.*;
import java.util.Vector;
* @author yaman
public class AuditPanel extends javax.swing.JPanel {
// These are the combobox values
private String[] acceptenceOptions;
private Vector colNames;
private Color rowSelectionBackground = Color.yellow;
private int rowHeight = 20;
private int column0Width =70;
private int column1Width =96;
private int column2Width =327;
private javax.swing.JPanel jPanel2;
private javax.swing.JPanel jPanel1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton1;
private javax.swing.JScrollPane jScrollPane1;
private javax.swing.JTable jTable1;
/** Creates new form AuditPanel */
public AuditPanel() {
public void renderPanel(){
initComponents();
public String[] getAcceptenceOptions(){
return acceptenceOptions;
public void setAcceptenceOptions(String[] acceptenceOptions){
this.acceptenceOptions = acceptenceOptions;
public Vector getColumnNames(){
return colNames;
public void setColumnNames(Vector colNames){
this.colNames = colNames;
public Vector getData(){
Vector dataVector = new Vector();
/*dataVector.add(null);
dataVector.add(null);
dataVector.add(null);
return dataVector;
/** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
private void initComponents() {
java.awt.GridBagConstraints gridBagConstraints;
jPanel2 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jPanel1 = new javax.swing.JPanel();
jTable1 = new javax.swing.JTable();
setLayout(new java.awt.GridBagLayout());
setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
jPanel2.setLayout(new java.awt.GridBagLayout());
jPanel2.setBorder(new javax.swing.border.EmptyBorder(0,0,0,0));
jButton1.setText("Add");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;
gridBagConstraints.ipadx = 8;
gridBagConstraints.insets = new java.awt.Insets(0, 1, 5, 0);
gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
jPanel2.add(jButton1, gridBagConstraints);
jButton2.setText("Delete");
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 1;
gridBagConstraints.anchor = java.awt.GridBagConstraints.EAST;
jPanel2.add(jButton2, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
gridBagConstraints.insets = new java.awt.Insets(0, 5, 0, 0);
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
add(jPanel2, gridBagConstraints);
jPanel1.setLayout(new java.awt.GridBagLayout());
jPanel1.setBorder(new javax.swing.border.BevelBorder(javax.swing.border.BevelBorder.LOWERED, Color.black, Color.gray) );
jTable1.setModel(new javax.swing.table.DefaultTableModel(getData(), getColumnNames()));
// get all the columns and set the column required properties
java.util.Enumeration enum = jTable1.getColumnModel().getColumns();
while (enum.hasMoreElements()) {
TableColumn column = (TableColumn)enum.nextElement();
if( column.getModelIndex() == 0 ) {
column.setPreferredWidth(column0Width);
column.setCellEditor( new ValidateCellDataEditor(true) );
if( column.getModelIndex() == 1) {
column.setPreferredWidth(column1Width);
column.setCellEditor(new AcceptenceComboBoxEditor(getAcceptenceOptions()));
// If the cell should appear like a combobox in its
// non-editing state, also set the combobox renderer
//column.setCellRenderer(new AcceptenceComboBoxRenderer(getAcceptenceOptions()));
if( column.getModelIndex() == 2 ) {
column.setPreferredWidth(column2Width); // width of column
column.setCellEditor( new ValidateCellDataEditor(false) );
jScrollPane1 = new javax.swing.JScrollPane(jTable1);
jScrollPane1.setPreferredSize(new java.awt.Dimension(480, 280));
jTable1.setMinimumSize(new java.awt.Dimension(60, 70));
//jTable1.setPreferredSize(new java.awt.Dimension(300, 70));
//jScrollPane1.setViewportView(jTable1);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.anchor = java.awt.GridBagConstraints.NORTH;
jPanel1.add(jScrollPane1, gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
add(jPanel1, gridBagConstraints);
// set the row height
jTable1.setRowHeight(rowHeight);
// set selection color
jTable1.setSelectionBackground(rowSelectionBackground);
// set the single selection
jTable1.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
// avoid table header to resize/ rearrange
jTable1.getTableHeader().setReorderingAllowed(false);
jTable1.getTableHeader().setResizingAllowed(false);
// Table header font
jTable1.getTableHeader().setFont( new Font( jTable1.getFont().getName(),Font.BOLD,jTable1.getFont().getSize() ) );
jButton1.setMnemonic(KeyEvent.VK_A);
// action of add button
jButton1.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent actionEvent){
// If a button press is the trigger to leave a JTable cell and save the data in model
if(jTable1.isEditing() ){
//System.out.println("table is edition ");
String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
jTable1.getCellEditor().cancelCellEditing();
// find out total available rows
int totalRows = jTable1.getRowCount();
int cols = jTable1.getModel().getColumnCount();
if( jTable1.getModel() instanceof DefaultTableModel ) {
((DefaultTableModel)jTable1.getModel()).addRow(new Object[cols]);
int newRowCount = jTable1.getRowCount();
// select the first row
jTable1.getSelectionModel().setSelectionInterval(newRowCount-1,newRowCount-1);
jButton2.setMnemonic(KeyEvent.VK_D);
// action of Delete button
jButton2.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent actionEvent){
int totalRows = jTable1.getRowCount();
// If there are more than one row in table then delete it
if( totalRows > 0){
int selectedOption = JOptionPane.showConfirmDialog(null,"Are you sure you want to delete this audit row?","Coeus", JOptionPane.YES_NO_OPTION);
// if Yes then selectedOption is 0
// if No then selectedOption is 1
if(0 == selectedOption ){
// get the selected row
int selectedRow = jTable1.getSelectedRow();
System.out.println("Selected Row "+selectedRow);
if( selectedRow != -1 ){
DefaultTableModel dm= (DefaultTableModel)jTable1.getModel();
java.util.Vector v1=dm.getDataVector();
System.out.println("BEFOE "+v1);
v1.remove(selectedRow);
jTable1.removeRowSelectionInterval(selectedRow,selectedRow);
System.out.println("After "+v1);
}else{
// show the error message
JOptionPane.showMessageDialog(null, "Please Select an audit Row", "Coeus", JOptionPane.ERROR_MESSAGE);
} // end of initcomponents
class AcceptenceComboBoxRenderer extends JComboBox implements TableCellRenderer {
public AcceptenceComboBoxRenderer(String[] items) {
super(items);
public Component getTableCellRendererComponent(JTable table, Object value,
boolean isSelected, boolean hasFocus, int row, int column) {
if (isSelected) {
setForeground(table.getSelectionForeground());
super.setBackground(rowSelectionBackground);
} else {
setForeground(table.getForeground());
setBackground(table.getBackground());
// Select the current value
setSelectedItem(value);
return this;
class AcceptenceComboBoxEditor extends DefaultCellEditor {
public AcceptenceComboBoxEditor(String[] items) {
super(new JComboBox(items));
} // end editor class
public class ValidateCellDataEditor extends AbstractCellEditor implements TableCellEditor {
// This is the component that will handle the editing of the
// cell value
JComponent component = new JTextField();
boolean validate;
public ValidateCellDataEditor(boolean validate){
this.validate = validate;
// This method is called when a cell value is edited by the user.
public Component getTableCellEditorComponent(JTable table, Object value,
boolean isSelected, int rowIndex, int vColIndex) {
if (isSelected) {
component.setBackground(rowSelectionBackground);
// Configure the component with the specified value
JTextField tfield =(JTextField)component;
// if any vaidations to be done for this cell
if(validate){
//tfield.setDocument(new JTextFieldFilter(JTextFieldFilter.NUMERIC,4));
tfield.setText( ((String)value));
// Return the configured component
return component;
// This method is called when editing is completed.
// It must return the new value to be stored in the cell.
public Object getCellEditorValue() {
return ((JTextField)component).getText();
// This method is called just before the cell value
// is saved. If the value is not valid, false should be returned.
public boolean stopCellEditing() {
String s = (String)getCellEditorValue();
return super.stopCellEditing();
public void itemStateChanged(ItemEvent e) {
super.fireEditingStopped();
}//end of ValidateCellDataEditor class
public static void main(String args[]){
JFrame frame = new JFrame();
AuditPanel auditPanel = new AuditPanel();
frame.getContentPane().add(auditPanel);
auditPanel.setAcceptenceOptions(new String[]{"Accepted", "Rejected", "Requested"} );
java.util.Vector colVector = new java.util.Vector();
colVector.add("Fiscal Year");
colVector.add("Audit Accepted");
colVector.add("Comment" );
auditPanel.setColumnNames( colVector);
auditPanel.renderPanel();
frame.pack();
frame.show();Hi,
I've got the solution for it. As when the cursor is in cell of
a row and hit the delete button, the data in that cell is not saved,
So i'm trying to save the data first into the model then firing the action event by doing this ..
jButton2.addActionListener( new ActionListener(){
public void actionPerformed(ActionEvent actionEvent){
// If a button press is the trigger to leave a JTable cell and save the data in model
if(jTable1.isEditing() ){
String text=((javax.swing.text.JTextComponent)jTable1.getEditorComponent()).getText();
jTable1.setValueAt(text,jTable1.getSelectedRow(),jTable1.getSelectedColumn()) ;
jTable1.getCellEditor().cancelCellEditing();
// HERE DO THE DELETE ROW OPERATION
<yaman/> -
I how problems with delete/ fix alias
I how problems with delete/fix alias. Somehow, I am trying to delete or fix alias by clicking the icon it show a pop-up saying to click "delete alias" or "fix alias." When I click "delete alias", it wouldn't let me. When I click "fix alias" I could not find what I am looking for. I try clicking different icon, but is show a pop-up saying "it could not be found (error code-43). Can someone help out????
Moved to InDesign forum.
You can start by telling us what the problem is.
Maybe you are looking for
-
MacBook Pro (Early 2011) - Windows 8.1 Bootcamp
Hey, Just wanted to share with you some information if you have this version of MacBook Pro and you want to install Windows 8.1 in NON-EUFI mode. (The reason you might want to do this is because the graphics and sound drivers have problems in EUFI mo
-
On the fifa 14 iTunes app it won't let me turn on device music, how can I get this to work? I have bought full access to it.
-
Migrate the document from database to Content Server
Dear All; There is a ECC6 using for 5 years and I am setting up a External Content Server which link to this ECC6 server, from now on the new incoming documents like scanned document, email etc will save to Content Server. However, for the past 5 ye
-
Preserving Safari history for use in a new iMac installation
My Mother is ready for a new iMac but has a strong afinity to using the Safari history for browsing sites she's accessed previously. Reading about Safari history has alerted me to the "plist" file that the history is saved in. I need to determine h
-
I have 2 participants. P1 is in role a - parametric value 1 P2 is in role a - parametric value 2 So I have 2 participants in two different roles. I want to let P1 view P2's Work Items in the Workspace. I have a read only screen flow to facilitate thi