How to suppress spaces in spool file

Hi,
i want to generate a sqlplus spoolfile, but trim doesn't suppress leading spaces. What do i make wrong?
For example the value in column 4 is 9 not " 9" . It's a char(1) column
SQL> SELECT STICHTAG||';',
2 KONTO_LIEFERID||';',
3 KONTONUMMER||';',
4 TRIM(ARBEITSZIFFER)||';'
5 FROM av_abst_mp_ifrs
6 WHERE stichtag='20081230'
7 AND kontonummer='9851674900'
8 /
20081230; K01; 9851674900; 9;
20081230; K01; 9851674900; 9;
20081230; K01; 9851674900; 9;
20081230; K01; 9851674900; 9;
20081230; K01; 9851674900; 9;
20081230; K01; 9851674900; 9;
20081230; K01; 9851674900; 9;
20081230; K01; 9851674900; 9;

Hi,
The spaces at the output is the spaces for the columns (Not spaces for the column values), you can concat all values at one column, like this...
SQL> SELECT STICHTAG||';'||
2 KONTO_LIEFERID||';'||
3 KONTONUMMER||';'||
4 TRIM(ARBEITSZIFFER)||';'
5 FROM av_abst_mp_ifrs
6 WHERE stichtag='20081230'
7 AND kontonummer='9851674900'
8 /Not Tested.
Other option (without concat all columns) at sqlplus you can use "COLSEP". like this...
sql> SELECT 'DATE', SYSDATE
  2  FROM DUAL;
'DAT SYSDATE
DATE 29/01/09
1 row selected.
sql> SELECT 'DATE'||SYSDATE
  2  FROM DUAL;
'DATE'||SYSD
DATE29/01/09
1 row selected.
-- "OR"
sql> SET COLSEP ''
sql> SELECT 'DATE', SYSDATE
  2  FROM DUAL;
'DATSYSDATE
DATE29/01/09
1 row selected.Edited by: dask99 on Jan 29, 2009 9:14 AM
Added new option.

Similar Messages

  • How to set an output spool file size

    hi experts,
    now i am run a output spool file transaction, if i run in a small volumn, it is only give one output spool file which is ok for me, but if in a full volumn run, it will give a multiple output spool file which is not what i want, so i was wondering if the output spool file size can be set somewhere and only give me only one output spool file when in the full volum run.
    thanks.

    Hi,
    Have you tried transaction SP01O.
    Regards,
    Atish

  • How to avoid spaces in csv file at the time of spooling

    Hi all,
    I am spooling 30 query results into one CSV file ,I am getting two empty rows for each query.
    Can any one suggest me how to avoid these spaces.
    Thanks & Regards,
    P Prakash
    this is the script i am using to generate csv file .
    SET linesize 12000
    SET pagesize 10000
    SET pause off
    SET termout off
    SET feed off
    SET head off
    SPOOL c:\tes111.csv replace
    SELECT 'ISA01,ISA02,ISA03,ISA04,ISA05,ISA06,ISA07,ISA08,ISA09,ISA11,ISA12,ISA13,ISA14,ISA15,ISA16,GS01,GS02,GS03,GS04,GS05,GS06,GS07,GS08,ST01,ST02,ST03,BHT01,BHT02,BHT03,BHT04,BHT06,trnsctn_segment_count,included_trnsctn_sets_count,included_fnctnl_groups_count,input_acknwldgmnt_sid'
    FROM DUAL;
    SELECT ptr.athrztn_infrmtn_qlfr
    || ','
    || ptr.athrztn_infrmtn
    || ','
    || ptr.scrty_infrmtn_qlfr
    || ','
    || ptr.scrty_infrmtn
    || ','
    || ptr.intrchng_sndr_idntfr_qlfr
    || ','
    || ptr.intrchng_sndr_idntfr
    || ','
    || ptr.intrchng_rcvr_idntfr_qlfr
    || ','
    || ptr.intrchng_rcvr_idntfr
    || ','
    || ptr.intrchng_date
    || ','
    || ptr.intrchng_cntrl_stndrds_idntfr
    || ','
    || ptr.intrchng_cntrl_vrsn_nmbr
    || ','
    || ptr.intrchng_cntrl_nmbr
    || ','
    || ptr.acknwldgmnt_rqstd_indctr
    || ','
    || ptr.usg_indctr
    || ','
    || ptr.cmpnt_elmnt_sprtr
    || ','
    || ptr.fnctnl_idntfr_code
    || ','
    || ptr.aplctn_sndr_code
    || ','
    || ptr.applctn_rcvr_code
    || ','
    || ptr.fnctnl_grp_crtn_date
    || ','
    || ptr.fnctnl_grp_crtn_date
    || ','
    || ptr.grp_cntrl_nmbr
    || ','
    || ptr.rspnsbl_agncy_code
    || ','
    || ptr.vrsn_rls_indstry_idntfr_code
    || ','
    || ptr.trnsctn_set_idntfr_code
    || ','
    || ptr.trnsctn_set_cntrl_nmbr
    || ','
    || ptr.implementation_guide_vrsn_name
    || ','
    || ptr.hierarchical_structure_code
    || ','
    || ptr.trnsctn_set_purpose_lkpcd
    || ','
    || ptr.sbmtr_trnsctn_idntfr
    || ','
    || ptr.trnsctn_set_creation_date
    || ','
    || ptr.trnsctn_type_code
    || ','
    || ptr.trnsctn_segment_count
    || ','
    || ptr.included_trnsctn_sets_count
    || ','
    || ptr.included_fnctnl_groups_count
    || ','
    || ia.input_acknwldgmnt_sid
    || ','
    FROM pa_transaction_request ptr, input_acknwldgmnt ia, input_batch_file ibf
    WHERE ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    SELECT 'pa_rqst_sid,NM01,NM02,NM108,NM109'
    FROM DUAL;
    SELECT pr.pa_rqst_sid
    || ','
    || pr.entity_idntfr_lkpcd
    || ','
    || pr.entity_type_qlfr
    || ','
    || pr.payer_idntfctn_code_qlfr
    || ','
    || pr.payer_idntfctn_code
    || ','
    FROM pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    SELECT 'meta_data_cid,data_value,iteration_number,Created_by,modified_by'
    FROM DUAL;
    SELECT prs.meta_data_cid
    || ','
    || prs.data_value
    || ','
    || prs.iteration_number
    || ','
    || prs.created_by
    || ','
    || prs.modified_by
    || ','
    FROM pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request_situational prs
    WHERE pr.pa_rqst_sid = prs.pa_rqst_sid
    AND prs.stnl_target_table_cid = 100
    AND prs.target_table_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    SELECT 'NM101 ,NM103,NM104,NM105,NM108,NM109,PER02,PER04,PER05,PER06,PER07 ,PER08'
    FROM DUAL;
    SELECT pr.pa_rqst_sid
    || ','
    || prpl.pa_rqst_x_prvdr_lctn_sid
    || ','
    || prpl.rqstr_entity_idntfr_lkpcd
    || ','
    || prpl.last_name
    || ','
    || prpl.first_name
    || ','
    || prpl.middle_name
    || ','
    || prpl.idntfr_type_cid
    || ','
    || prpl.prvdr_lctn_iid
    || ','
    || prpl.rqstr_contact_name
    || ','
    || prpl.cmnctn_nmbr_1
    || ','
    || prpl.cmnctn_nmbr_2
    || ','
    || prpl.cmnctn_nmbr_type_lkpcd_1
    || ','
    || prpl.cmnctn_nmbr_type_lkpcd_2
    || ','
    || prpl.cmnctn_nmbr_type_lkpcd_3
    FROM pa_request_x_provider_location prpl,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prpl.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat'
    AND prpl.pa_prvdr_type_lkpcd = 'RR';
    SELECT 'meta_data_cid,data_value,iteration_number,Created_by,modified_by'
    FROM DUAL;
    SELECT prs.meta_data_cid
    || ','
    || prs.data_value
    || ','
    || prs.iteration_number
    || ','
    || prs.created_by
    || ','
    || prs.modified_by
    || ','
    FROM pa_request_x_provider_location prpl,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request_situational prs
    WHERE prpl.pa_rqst_sid = prs.pa_rqst_sid
    AND prs.stnl_target_table_cid = 102
    AND prs.target_table_sid = prpl.pa_rqst_x_prvdr_lctn_sid
    AND prpl.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat'
    AND prpl.pa_prvdr_type_lkpcd = 'RR';
    -- 4. Subscriber
    NM103 Name Last or Organization Name
    NM104 Name First
    NM108 Identification Code Qualifier
    NM109 Identification Code
    DMG02 Date Time Period birth date
    DMG03 Gender Code
    SELECT ' NM103,NM104,NM108,NM109,DMG02,DMG03'
    FROM DUAL;
    SELECT prxm.last_name
    || ','
    || prxm.first_name
    || ','
    || prxm.idntfr_type_cid
    || ','
    || prxm.mbr_idntfr
    || ','
    || prxm.birth_date
    || ','
    || prxm.gender_lkpcd
    || ','
    FROM pa_request_x_member prxm,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prxm.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- 5. Subscriber Situational Info
    NM102 Entity Type Qualifier
    NM105 Name Middle
    NM107 Name Suffix
    REF01 Reference Identification Qualifier
    REF02 Reference Identification
    N301 Address Information
    N302 Address Information
    N401 City Name
    N402 State or Province Code
    N403 Postal Code
    N407 Country Subdivision Code
    SELECT 'meta_data_cid,data_value,iteration_number,Created_by,modified_by'
    FROM DUAL;
    SELECT prs.meta_data_cid
    || ','
    || prs.data_value
    || ','
    || prs.iteration_number
    || ','
    || prs.created_by
    || ','
    || prs.modified_by
    || ','
    FROM pa_request_x_member prxm,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request_situational prs
    WHERE prxm.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND prs.stnl_target_table_cid = 101
    AND prs.target_table_sid = prxm.pa_rqst_x_mbr_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- 6. Patient Event Level
    TRN02 Reference Identification
    TRN03 Originating Company Identifier
    TRN04 Reference Identification
    UM01 Request Category Code
    UM02 Certification Type Code
    UM03 Service Type Code
    UM04-1 Facility Code Value
    UM04-2 Facility Code Qualifier
    UM06 Level of Service Code
    UM07 Current Health Condition Code
    UM08 Prognosis Code
    UM09 Release of Information Code
    UM10 Delay Reason Code
    SELECT 'TRN02,TRN03,TRN04,UMO1,UMO2,UM04_1,UM04_2,UM06,UM07,UM08,UM09,UM10,'
    FROM DUAL;
    SELECT prd.patient_event_tracking_number
    || ','
    || prd.orginating_company_identifier
    || ','
    || prd.trace_assigning_entity_idntfr
    || ','
    || prs.rqst_ctgry_lkpcd
    || ','
    || prs.rqst_crtfctn_type_lkpcd
    || ','
    || prs.x12_pa_srvc_type_code
    || ','
    || prs.facility_type_code
    || ','
    || prs.unfrm_blng_facility_type_code
    || ','
    || prs.srvc_rqd_lkpcd
    || ','
    || prs.current_health_cndtn_lkpcd
    || ','
    || prs.prognosis_lkpcd
    || ','
    || prs.rls_of_info_lkpcd
    || ','
    || prs.delay_reason_lkpcd
    || ','
    FROM pa_request_service prs,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request_detail prd
    WHERE prs.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND pr.pa_rqst_sid = prd.pa_rqst_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    --Patient Event Level situational information
    SELECT 'meta_data_cid,data_value,iteration_number,Created_by,modified_by'
    FROM DUAL;
    SELECT prs.meta_data_cid
    || ','
    || prs.data_value
    || ','
    || prs.iteration_number
    || ','
    || prs.created_by
    || ','
    || prs.modified_by
    || ','
    FROM pa_request_service prsv,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request_situational prs
    WHERE prsv.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND prs.stnl_target_table_cid = 103
    AND prs.target_table_sid = prsv.pa_rqst_srvc_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    ---Diagnosis
    HI01 Health Care Code Information
    HI01-1 Code List Qualifier Code
    HI01-2 Industry Code
    HI01-3 Date Time Period Format Qualifier
    HI01-4 Date Time Period
    SELECT 'HI01_1,HI01_2,HI01_3'
    FROM DUAL;
    SELECT prd.pa_diagnosis_type_lkpcd
    || ','
    || prd.diagnosis_iid
    || ','
    || prd.from_date
    || ','
    FROM pa_request_x_diagnosis prd,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prd.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- Request detail
    TRN02 Reference Identification
    TRN03 Originating Company Identifier
    TRN04 Reference Identification
    SELECT 'TRN02,TRN03,TRN04'
    FROM DUAL;
    SELECT prd.patient_event_tracking_number
    || ','
    || prd.orginating_company_identifier
    || ','
    || prd.trace_assigning_entity_idntfr
    || ','
    FROM pa_request_detail prd,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prd.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- ambulance Transaportation
    CR101 Unit or Basis for Measurement Code
    CR102 Weight
    CR103 Ambulance Transport Code
    CR104 Ambulance Transport Reason Code
    CR105 Unit or Basis for Measurement Code
    CR106 Quantity
    CR109 Description
    CR110 Description
    SELECT 'CR101,CR102,CR103,CR104,CR105,CR106,CR109,CR110'
    FROM DUAL;
    SELECT pat.weight_uom_code
    || ','
    || pat.patient_weight
    || ','
    || pat.amblnc_transport_type_lkpcd
    || ','
    || pat.amblnc_transport_rsn_lkpcd
    || ','
    || pat.distance_uom_code
    || ','
    || pat.trnsprtn_distance
    || ','
    || pat.round_trip_purpose_desc
    || ','
    || pat.stretcher_purpose_desc
    || ','
    FROM pa_request_ambulance_transport pat,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE pat.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- 2000F SV1
    SV101-1 Product/Service ID Qualifier Change values
    SV101-2 Product/Service ID Need to change label to Procedure Code.
    SV101-3 Procedure Modifier No change required to PA screen
    SV101-4 Procedure Modifier No change required to PA screen
    SV101-5 Procedure Modifier No change required to PA screen
    SV101-6 Procedure Modifier No change required to PA screen
    SV101-7 Description No change required to PA screen. Will map to the Remarks field on the Screen
    SV102 Monetary Amount
    SV103 Unit or Basis for Measurement Code
    SV104 Quantity
    SV107 Composite Diagnosis Code Pointer
    SV107-1 Diagnosis Code Pointer
    SV107-2 Diagnosis Code Pointer
    SV107-3 Diagnosis Code Pointer
    SV107-4 Diagnosis Code Pointer
    SV111 Yes/No Condition or Response Code
    SV120 Level of Care Code
    SELECT 'TRN_Reference_Identif,TRN_Originating_CMP_Identif,TRN_Reference_IdentiReference Identiff,Reference_Identif,Reference_Identification,Reference_Identif,Product/Service_ID_Qualifier,Product/Service_ID,Procedure_Modifier,Procedure_Modifier,Procedure_Modifier,Procedure_Modifier,Description'
    FROM DUAL;
    SELECT prp.srvc_trace_nmbr_1
    || ','
    || prp.trace_asgn_enty_adtnl_idntfr_1
    || ','
    || prp.trace_asgn_enty_adtnl_idntfr_1
    || ','
    || prp.trace_asgn_enty_adtnl_idntfr_2
    || ','
    || prp.prvs_rvw_athrztn_nmbr
    || ','
    || prp.prvs_administrative_rfrnc_nmbr
    || ','
    || prp.x12_code_list_qlfr_lkpcd
    || ','
    || prp.procedure_iid
    || ','
    || prp.mdfr_code
    || ','
    || prp.mdfr2_code
    || ','
    || prp.mdfr3_code
    || ','
    || prp.mdfr4_code
    || ','
    || prp.drug_desc
    || ','
    FROM pa_request_procedure prp,
    pa_request_service prs,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prp.pa_rqst_srvc_sid = prs.pa_rqst_srvc_sid
    AND prs.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HHIPAA.165760000.20110518I001.278_GC04-3.dat';
    SV2 SV201 Product/Service ID
    SV2 SV202 Composite Medical Procedure Identifier
    SV2 SV202-1 Product/Service ID Qualifier
    SV2 SV202-2 Product/Service ID
    SV2 SV202-3 Procedure Modifier
    SV2 202-4 Procedure Modifier
    SV2 SV202-5 Procedure Modifier
    SV2 SV202-6 Procedure Modifier
    SV2 SV202-7 Description
    SV2 SV202-8 Product/Service ID
    SV2 SV203 Monetary Amount
    SV2 SV204 Unit or Basis for Measurement Code
    SV2 SV205 Quantity
    SV2 SV206 Unit Rate
    SV2 SV209 Nursing Home Residential Status Code
    SELECT 'Product/Service ID,Product/Service ID Qual,Product/Service ID,Product Modifier,Product Modifier,Product Modifier,Product Modifier,Description,Unit Rate,'
    FROM DUAL;
    SELECT prp.revenue_iid ||','||
    prp.x12_code_list_qlfr_lkpcd ||','||
    prp.procedure_iid ||','||
    prp.mdfr_code ||','||
    prp.mdfr2_code ||','||
    prp.mdfr3_code ||','||
    prp.mdfr4_code ||','|| prp.drug_desc ||','||
    prp.srvc_line_rate ||','
    FROM pa_request_procedure prp,
    pa_request_service prs,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prp.pa_rqst_srvc_sid = prs.pa_rqst_srvc_sid
    AND prs.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- 2000F SV3
    SV301 Composite Medical Procedure Identifier
    SV301-1 Product/Service ID Qualifier
    SV301-2 Product/Service ID
    SV301-3 Procedure Modifier
    SV301-4 Procedure Modifier
    SV301-5 Procedure Modifier
    SV301-6 Procedure Modifier
    SV301-7 Description
    SV301-8 Product/Service ID
    SV302 Monetary Amount
    SV304 Oral Cavity Designation
    SV304-1 Oral Cavity Designation Code
    SV304-2 Oral Cavity Designation Code
    SV304-3 Oral Cavity Designation Code
    SV304-4 Oral Cavity Designation Code
    SV304-5 Oral Cavity Designation Code
    SV305 Prosthesis, Crown or Inlay Code
    SV306 Quantity
    SV307 Description
    select 'Product/Service ID Qual,Product/Service ID,Procedure Modifier,Procedure Modifier,Procedure Modifier,Procedure Modifier,Description,Oral Cavity Designation Code,Oral Cavity Designation Code,Oral Cavity Designation Code,Oral Cavity Designation Code,ProsthesisCrown Inlay Code,Description' from dual;
    SELECT prp.x12_code_list_qlfr_lkpcd
    || ','
    || prp.procedure_iid
    || ','
    || prp.mdfr_code
    || ','
    || prp.mdfr2_code
    || ','
    || prp.mdfr3_code
    || ','
    || prp.mdfr4_code
    || ','
    || prp.drug_desc
    || ','
    || prp.oral_cavity_dsgntn2_cid
    || ','
    || prp.oral_cavity_dsgntn3_cid
    || ','
    || prp.oral_cavity_dsgntn4_cid
    || ','
    || prp.oral_cavity_dsgntn5_cid
    || ','
    || prp.prosthesis_crown_inlay_code
    || ','
    || prp.remark
    || ','
    FROM pa_request_procedure prp,
    pa_request_service prs,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prp.pa_rqst_srvc_sid = prs.pa_rqst_srvc_sid
    AND prs.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- 2000F TOO pending Prakash to Write
    --Tooth Information
    SELECT 'Industry Code,Tooth Surface,TOO03-1_Tooth Surface Code,TOO03-2_Tooth Surface Code,TOO03-3_Tooth Surface Code,TOO03-4_Tooth Surface Code,'
    FROM DUAL;
    SELECT prp.tooth_number_cid
    || ','
    || prp.tooth_surface_cid
    || ','
    || prp.tooth_surface2_cid
    || ','
    || prp.tooth_surface3_cid
    || ','
    || prp.tooth_surface4_cid
    || ','
    || prp.tooth_surface5_cid
    || ','
    FROM pa_request_procedure prp,
    pa_request_service prs,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prp.pa_rqst_srvc_sid = prs.pa_rqst_srvc_sid
    AND prs.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    --tooth SItuational  Information
    select 'Monetary Amount,Quantity' from dual;
    SELECT prpt.rqst_prcdr_amt||','|| prpt.rqst_prcdr_units||','
    FROM pa_rqst_prcdr_transaction prpt,
    pa_request_procedure prp,
    pa_request_service prs,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prpt.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND prp.pa_rqst_srvc_sid = prs.pa_rqst_srvc_sid
    AND prs.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- pa_rqst_prcdr_x_prvdr_lctn
    select 'pa_rqst_prcdr_sid,pa_rqst_x_prvdr_lctn_sid' from dual;
    SELECT prppl.pa_rqst_prcdr_sid||','|| prppl.pa_rqst_x_prvdr_lctn_sid||','
    FROM pa_rqst_prcdr_x_prvdr_lctn prppl,
    pa_request_procedure prp,
    pa_request_service prs,
    pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf
    WHERE prppl.pa_rqst_prcdr_sid = prp.pa_rqst_prcdr_sid
    AND prp.pa_rqst_srvc_sid = prs.pa_rqst_srvc_sid
    AND prs.pa_rqst_sid = pr.pa_rqst_sid
    AND pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    -- error Details
    --Header level error details
    SELECT 'pa_rqst_sid,pa_error_nmbr,pa_error_sid,reject_reason_lkpcd,follow_up_action_lkpcd,aaa_segment_loop_nmbr,run_nmbr,'
    FROM DUAL;
    SELECT prre.pa_rqst_sid
    || ','
    || pe.pa_error_nmbr
    || ','
    || pe.pa_error_sid
    || ','
    || ped.reject_reason_lkpcd
    || ','
    || ped.follow_up_action_lkpcd
    || ','
    || ped.aaa_segment_loop_nmbr
    || ','
    || prre.run_nmbr
    || ','
    FROM pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request_run_error prre,
    pa_error pe,
    pa_error_detail ped
    WHERE pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND pr.pa_rqst_sid = prre.pa_rqst_sid
    AND prre.pa_error_sid = pe.pa_error_sid
    AND pe.pa_error_sid = ped.pa_error_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    ---Line Level Error Details
    SELECT 'pa_rqst_sid,pa_error_nmbr,pa_error_sid,reject_reason_lkpcd,follow_up_action_lkpcd,aaa_segment_loop_nmbr'
    FROM DUAL;
    SELECT pr.pa_rqst_sid
    || ','
    || pe.pa_error_nmbr
    || ','
    || pe.pa_error_sid
    || ','
    || ped.reject_reason_lkpcd
    || ','
    || ped.follow_up_action_lkpcd
    || ','
    || ped.aaa_segment_loop_nmbr
    || ','
    FROM pa_request pr,
    pa_transaction_request ptr,
    input_acknwldgmnt ia,
    input_batch_file ibf,
    pa_request_service prs,
    pa_request_procedure prp,
    pa_request_procedure_run_error prpre,
    pa_error pe,
    pa_error_detail ped
    WHERE pr.pa_trnsctn_rqst_sid = ptr.pa_trnsctn_rqst_sid
    AND ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND pr.pa_rqst_sid = prs.pa_rqst_sid
    AND prs.pa_rqst_srvc_sid = prp.pa_rqst_srvc_sid
    AND prp.pa_rqst_prcdr_sid = prpre.pa_rqst_prcdr_sid
    AND prpre.pa_error_sid = pe.pa_error_sid
    AND pe.pa_error_sid = ped.pa_error_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    SPOOL off
    SET head on
    SET feed on
    SET termout on
    SET pause on

    833560 wrote:
    Hi all,
    I am spooling 30 query results into one CSV file ,I am getting two empty rows for each query.
    Can any one suggest me how to avoid these spaces.
    Thanks & Regards,
    P Prakash
    this is the script i am using to generate csv file .
    SET linesize 12000
    SET pagesize 10000
    SET pause off
    SET termout off
    SET feed off
    SET head off
    SPOOL c:\tes111.csv replace
    SELECT 'ISA01,ISA02,ISA03,ISA04,ISA05,ISA06,ISA07,ISA08,ISA09,ISA11,ISA12,ISA13,ISA14,ISA15,ISA16,GS01,GS02,GS03,GS04,GS05,GS06,GS07,GS08,ST01,ST02,ST03,BHT01,BHT02,BHT03,BHT04,BHT06,trnsctn_segment_count,included_trnsctn_sets_count,included_fnctnl_groups_count,input_acknwldgmnt_sid'
    FROM DUAL;
    SELECT ptr.athrztn_infrmtn_qlfr
    || ','
    || ptr.athrztn_infrmtn
    || ','
    || ptr.scrty_infrmtn_qlfr
    || ','
    || ptr.scrty_infrmtn
    || ','
    || ptr.intrchng_sndr_idntfr_qlfr
    || ','
    || ptr.intrchng_sndr_idntfr
    || ','
    || ptr.intrchng_rcvr_idntfr_qlfr
    || ','
    || ptr.intrchng_rcvr_idntfr
    || ','
    || ptr.intrchng_date
    || ','
    || ptr.intrchng_cntrl_stndrds_idntfr
    || ','
    || ptr.intrchng_cntrl_vrsn_nmbr
    || ','
    || ptr.intrchng_cntrl_nmbr
    || ','
    || ptr.acknwldgmnt_rqstd_indctr
    || ','
    || ptr.usg_indctr
    || ','
    || ptr.cmpnt_elmnt_sprtr
    || ','
    || ptr.fnctnl_idntfr_code
    || ','
    || ptr.aplctn_sndr_code
    || ','
    || ptr.applctn_rcvr_code
    || ','
    || ptr.fnctnl_grp_crtn_date
    || ','
    || ptr.fnctnl_grp_crtn_date
    || ','
    || ptr.grp_cntrl_nmbr
    || ','
    || ptr.rspnsbl_agncy_code
    || ','
    || ptr.vrsn_rls_indstry_idntfr_code
    || ','
    || ptr.trnsctn_set_idntfr_code
    || ','
    || ptr.trnsctn_set_cntrl_nmbr
    || ','
    || ptr.implementation_guide_vrsn_name
    || ','
    || ptr.hierarchical_structure_code
    || ','
    || ptr.trnsctn_set_purpose_lkpcd
    || ','
    || ptr.sbmtr_trnsctn_idntfr
    || ','
    || ptr.trnsctn_set_creation_date
    || ','
    || ptr.trnsctn_type_code
    || ','
    || ptr.trnsctn_segment_count
    || ','
    || ptr.included_trnsctn_sets_count
    || ','
    || ptr.included_fnctnl_groups_count
    || ','
    || ia.input_acknwldgmnt_sid
    || ','
    FROM pa_transaction_request ptr, input_acknwldgmnt ia, input_batch_file ibf
    WHERE ptr.input_acknwldgmnt_sid = ia.input_acknwldgmnt_sid
    AND ia.input_batch_file_sid = ibf.input_batch_file_sid
    AND ibf.original_file_name =
    'HIPAA.165760000.20110518I001.278_GC04-3.dat';
    SELECT 'pa_rqst_sid,NM01,NM02,NM108,NM109'
    FROM DUAL;
    Hi ,
    Save your query in a file and execute that file
    SQL>@a.aqlHope this helps
    Regards,
    Achyut

  • How to handle spaces in Sender File

    I have sender file and it is reading wrongly as it is not reading spaces. It is fixed file lengthe with no seperator.
    Following r the parameters I am using but still it is not picking up spaces.
    ignoreRecordsetName                                 true
    Record.fieldSeparator                                   nl
    Record.endSeparator                                    nl
    Record.additionalLastFields                        ignore
    Record.missingLastfields                            ignore
    Record.fieldContentFormatting                    nothing
    Record.fixedLengthTooShortHandling           ignore
    Record.fieldFixedLengths                           15,25,9,1,15,20,15,1,3,15,1,3,9,50,100,50,100,100,15
    Record.fieldNames                                      15,25,9,1,15,20,15,1,3,15,1,3,9,50,100,50,100,100,15
    Record.keepIncompleteFields                           YES
    My file format looks like as follows....there r 2 recods and u see psaces after each line they r part of particular field. Please help how to handle this..
    GLPRMS         Other                    20-MAR-09A               30800845237527018000000000000000000.000000000000011241.34020-MAR-09260IN0103-616714                                                                                260IN0103-616714                                                                                REFR1 - 000000 / REFR2 - 000000 / REFR3 - SUMRY           / TRANSFERS FROM
    GLPRMS         Other                    20-MAR-09A               30800845237527018000000000000000000.000000000000000305.60020-MAR-09260IN0103-616714                                                                                260IN0103-616714                                                                                REFR1 - 000000 / REFR2 - 549944 / REFR3 - 7691            / TRANSFERS FROM
    Thanks in advance
    Ria
    Edited by: ria sen on Mar 25, 2009 4:00 AM

    Hi Ria,
    Use the parameter Record.fieldContentFormatting = nothing
    If you dont specify this parameter trim is taken as a default value hence you are not gettign the spaces.
    This parameter should help you .
    Regards,
    Rajesh

  • How to handle space in incoming file during fcc

    Hi all,
    I have a scenario of file to proxy. In this case the incomming file is space delimited and it  begins with space too i.e. every new line item has a space in the begining I have to remove that space. How can i handle it...please help.
    The fcc I am using is mentioned below:
    Record.fieldSeparator      '0x32'
    Record.fieldNames           a,b,c,d
    Record.endSeparator       'nl'
    Record.additionalLastFields  ignore
    ignoreRecordsetName        true.
    Thanks
    Shivangi

    This is my input payload
    <?xml version="1.0" encoding="utf-8" ?>
    - <ns:BRItemPrice_MT xmlns:ns="urn:test">
    - <Record>
      <VendNum>888700 0611593 0046.0800 00000838081 00014</VendNum>
      <CCITEM>0033861</CCITEM>
      </Record>
    - <Record>
      <VendNum>888700 0611597 0048.0000 00000838084 00014</VendNum>
      <CCITEM>0033869</CCITEM>
      </Record>
    - <Record>
      <VendNum>888700 0611599 0046.0800 00000838085 00014</VendNum>
      <CCITEM>0033887</CCITEM>
      </Record>
    </nstest_MT>
    And the fcc iI'm using is as below:
    Record.fieldSeparator     '0x32'
    Record.fieldNames     VendNum,CCITEM,CCCOST,HSITM,UPC
    Record.beginSeparator     '0x32'
    Record.endSeparator     'nl'
    Record.additionalLastFields     ignore
    ignoreRecordsetName     true
    Please help.
    Thanks

  • Printing a spool file

    how can i print a spool file in which i have some data info on SunOS saved in SQL>
    hope my question is clear
    Thank you in advance

    there you go :)
    and 1 for the doctor for being funny
    Ivo

  • How to spool out put of multiple scripts and get a single spool file output

    Hi,
    I have one master script that calls three other scripts. The three scripts each produce their own spool files. But I would like to have the master script also produce one single output (in addition to the three indiviual output I mean). How to do that? Can you please help.
    Following are the scripts:
    --m.sql (master script)
    spool c:\m.log
    @1.sql
    @2.sql
    @3.sql
    spool off
    --1.sql
    spool c:\1.log
    insert into test values(1);
    commit;
    spool off
    --2.sql
    spool c:\2.log
    insert into test values(2);
    commit;
    spool off
    spool c:\3.log
    insert into test values(3);
    commit;
    spool off
    --table used
    SQL> desc test
    Name                                      Null?    Type
    A                                                  NUMBERWhen I run the above script m.sql it does produce the other 3 log files (1.log,2.log etc) but m.log (which is master log file which should have output of each of the three calling script) is empty file with 0 byte!
    Thanks
    Edited by: orausern on May 1, 2011 3:17 AM

    I have one master script that calls three other scripts. The three scripts each produce their own spool files. But I would like to have the master script also produce one single output (in addition to the three indiviual output I mean). How to do that? Can you please help. Not sure if that's possible directly with sqlplus spool option
    When you spool to a different file in a single session, sqlplus stops writing to earlier spool file and redirects the output to the file specified in last spool command.
    at the end of the script, however, below may help
    host type c:\1.log >> c:\m.log
    host type c:\2.log >> c:\m.log
    host type c:\3.log >> c:\m.log

  • How to suppress the Acknowledgement  Error in IDOC to File scenario?

    Hi -
    I got the status in SXMB_MONI as 'Processed Successfully' for the IDOC to File scenario but the Acknoledgement status throws an error saying 'Acknowledgement not possible'.
    I read one of the documents in the forums on how to suppress the acknowledgement using a table on R/3 side using IDXNOALE,
    i tried that option but i still get the 'Acknowledgement not possible' error.
    Is there any other way to suppress this error?
    Thanks,
    Tirumal

    Hi Tirumal,
    Receiver adapters that run on the Adapter Engine support system acknowledgments if they are requested by the sender. Acknowledgements are triggered when a message is successfully processed by the adapter or if an error occurs while it is being processed. Receiver adapters do not support application acknowledgments. The RNIF and CIDX adapters are exceptions to this rule, since they also support scenario-dependent application acknowledgments. Sender adapters of the Adapter Engine do not request any acknowledgments.
    This means, JDBC adapter does only send system acks, however IDoc adapter is requesting application acks. Therefore as mentioned by the previous poster, you have to disable acks for this scenario using report IDX_NOALE.
    Also go through these documents for any further help:
    http://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/xi/xi-how-to-guides/how to handle acknowledgments for idoc.pdf
    http://help.sap.com/saphelp_nw04/helpdata/en/6a/e6194119d8f323e10000000a155106/content.htm
    Regards,
    abhy

  • I have very little space left on the hard drive on my macbook, on my storage report it says "other" is taking up more than two thirds of the space on the hardrive. How can I identify what these files are?

    I have very little space left on the hard drive on my macbook, on my storage report it says "other" is taking up more than two thirds of the space on the hardrive. How can I identify what these files are?

    Hello,
    There is free software you can download that gives you a graphical image of what files are used on your hard drive. http://www.derlien.com/
    This may help you clean down your hard drive for more space.
    Best of luck

  • How do I find out what program / file is using 100 GB of space on my Hard drive?  Once I find the problem  how do I delete the specific files to increase GB of space?

    How do I find out what program / file is using 100 GB of space on my Hard drive?  Once I find the problem  how do I delete the specific files to increase GB of space?

    Use OmniDiskSweeper
    Once you find file, it can be deleted from within OmniDiskSweeper
    Allan

  • I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with   - how can I change this?

    I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with %20  - how can I change this?

    Click on the below link :
    https://get.adobe.com/flashplayer/otherversions/
    Step 1: select Mac OS  X 10.6-`0.`0
    Step 2 : Safari and FIrefox
    Then click on " Download Now"  button.

  • How to get the number of rows written to the header of the spool file.

    Hi
    I need to create a header line for the spool file .
    the header line should include fixed length values .
    The header should include the number of records found in the table with a maximum begin date (begin_date is the column of the table)
    To get the header in the spool file , i wrote a select query has :-
    --SPOOL 'C:\Documents and Settings\abc\Desktop\output.TXT'
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school
    group by sysdate;
    SPOOL OFF
    which gets me all the rows in the table , but i only want the rows with the latest school_begin_date .
    how can i achieve that ...
    I know that a subquery should be written in the from clause to get the number of rows found with a maximum school_begin_date.
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000') ||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) ||
    rpad(' ',76,' ')
    from dad.school where
    select rownum from dad.school
    where school_begin_date = max(school_begin_date) ;
    the error i get is
    ORA-00934: group function is not allowed here
    I NEED HELP ..IN GETTING THE ROWNUM JUST FOR THE LATEST BEGIN_DATE ?
    PLS HELP ME IN WRITING THE QUERY .
    THANKS IN ADVANCE .

    Try this:
    select 'W'||to_char(sysdate,'MM/DD/YYYYMi:HH:SS')||lpad(max(rownum),9,'000000000')||'R'||max(to_char(school_from_date,'MM/DD/YYYY')) || rpad(' ',76,' ')
      from dad.school
    where school_begin_date = (select max(school_begin_date)
                                  from dad.school);

  • How to spool file to where start script file located

    I'm writing a sqlplus script, eg. runMe.sql, which is going to run in customer env, will generate some data files eg. result.csv.
    By specify location such as 'spool /certain/path/on/disk/result.csv', I can spool to any path I want. However, my concern is  below:
    1. We gets many customers and the script might be run under different location.
    2. I don't know where customer would save the script, furthermore, I don't want customer to input location manually every time.
    3. Generally, customer would run the script something like "sqlplus username/password@sid @/certain/path/on/disk/runMe.sql". They don't want to pass any parameter at run time.
    4. I wanna spool file to "/certain/path/on/disk" automatically, as a result, result.csv file would appear under same path with runMe.sql.
    5. I tried "spool ./result.csv" but it navigate to where sqlplus session is running.
    6. Also tried &0 etc, but make no sense.
    Can anyone tell me how to obtain start running script file path in sqlplus script(runMe.sql) ? Just like access command parameters under Linux.
    $0 is the name of the command
    $1 first parameter
    $2 second parameter
    $3 third parameter etc. etc
    $# total number of parameters
    $@ all the parameters will be listed
    Thanks in advance.

    Are you looking for SQLPATH ?
    A good and clear example by Paul @ https://forums.oracle.com/message/3727891
    In this way your customer has to set one environment variable SQLPATH=/location/of/script/file/where/they/put/your/runMe.sql and just say :
    spool %sqlpath%\result.csv
    in your runMe.sql.  So, runMe.sql and result.csv will be on SQLPATH location.
    Regards
    Girish Sharma

  • Exporting photos for UHDTV or Native 4K TV, what are the best settings ? (File: Quality File: Color Space, Image Sizing and resolution)   Or in other words; How can I get the smallest files but keep good quality for display on new UHDTV

    Exporting photos for UHDTV or Native 4K TV, what are the best settings ? (File: Quality File: Color Space, Image Sizing and resolution)   Or in other words; How can I get the smallest files but keep good quality for display on new UHDTV

    You're welcome, and thank you for the reply.
    2) Yesterday I made the subclips with the In-Out Points and Command-U, the benefit is that I've seen the clip before naming it. Now I'm using markers, it's benefit is that I can write comment and (the later) clip name at once, the drawback is that I have to view to the next shot's beginning before knowing what the shot contains.
    But now I found out that I can reconnect my clips independently to the format I converted the master clip to. I reconnected the media to the original AVI file and it worked, too! The more I work with, the more I'm sold on it... - although it doesn't seem to be able to read and use the date information within the DV AVI.
    1) Ok, I tried something similar within FCE. Just worked, but the file size still remains. Which codec settings should I use? Is the export to DV in MOV with a quality of 75% acceptable for both file size and quality? Or would be encoding as H.264 with best quality an option for archiving, knowing that I have to convert it back to DV if I (maybe) wan't to use it for editing later? Or anything else?
    Thank's in advance again,
    André

  • How to send generated Spool file through e-mail

    Hi,
    We have a ABAP report which generates a spool file. Now there is a requirement to send this spool file to our clients external mail boxes.
    Also we would like to automate this so that whenever a spool file is generated, the system should automatically send it as an attachment to user mail inboxes.
    Any idea how I can achieve this. Thanks is advance!
    Regards,
    Vikrant.

    Hi Vikrant,
       Have a look at this code...
    z_send_email_fax_global
    FUNCTION-POOL z_gfaian_mail_fax.            "MESSAGE-ID ..
    WORK TABLE AREAS
    TABLES: tsp01.
    INTERNAL TABLES
    DATA: lt_rec_tab LIKE STANDARD TABLE OF soos1 WITH HEADER LINE,
          lt_note_text   LIKE STANDARD TABLE OF soli  WITH HEADER LINE,
          lt_attachments LIKE STANDARD TABLE OF sood5 WITH HEADER LINE.
    DATA: lt_objcont LIKE STANDARD TABLE OF soli WITH HEADER LINE,
          lt_objhead LIKE STANDARD TABLE OF soli WITH HEADER LINE.
    DATA: pdf_format LIKE STANDARD TABLE OF tline WITH HEADER LINE.
    TYPES: BEGIN OF y_files,
           file(60) TYPE c,
           END OF y_files.
    DATA: lt_files TYPE STANDARD TABLE OF y_files WITH HEADER LINE.
    DATA: l_objcont     LIKE soli OCCURS 0 WITH HEADER LINE.
    DATA: l_objhead     LIKE soli OCCURS 0 WITH HEADER LINE.
    STRUCTURES
    DATA: folder_id      LIKE soodk,
          object_id      LIKE soodk,
          link_folder_id LIKE soodk,
          g_document     LIKE sood4,
         g_header_data  LIKE sood2,
          g_folmem_data  LIKE sofm2,
          g_header_data  LIKE sood2,
          g_receive_data LIKE soos6,
          g_ref_document LIKE sood4,
          g_new_parent   LIKE soodk,
          l_folder_id    LIKE sofdk,
          v_email(50).
    DATA: hd_dat  like sood1.
    VARIABLES
    DATA: client  LIKE tst01-dclient,
          name    LIKE tst01-dname,
          objtype LIKE rststype-type,
          type    LIKE rststype-type.
    DATA: numbytes TYPE i,
          arc_idx LIKE toa_dara,
          pdfspoolid LIKE tsp01-rqident,
          jobname LIKE tbtcjob-jobname,
          jobcount LIKE tbtcjob-jobcount,
          is_otf.
    DATA: outbox_flag LIKE sonv-flag VALUE 'X',
          store_flag  LIKE sonv-flag,
          delete_flag LIKE sonv-flag,
          owner       LIKE soud-usrnam,
          on          LIKE sonv-flag VALUE 'X',
          sent_to_all LIKE sonv-flag,
          g_authority LIKE sofa-usracc,
          w_objdes    LIKE sood4-objdes.
    DATA: c_file LIKE rlgrap-filename,
          n_spool(6) TYPE n.
    DATA: cancel.
    DATA: desired_type  LIKE sood-objtp,
          real_type LIKE sood-objtp,
          attach_type LIKE sood-objtp,
          otf LIKE sood-objtp VALUE 'OTF', " SAPscript Ausgabeformat
          ali LIKE sood-objtp VALUE 'ALI'. " ABAP lists
    CONSTANTS
    CONSTANTS: ou_fol LIKE sofh-folrg              VALUE 'O',
               c_objtp    LIKE g_document-objtp    VALUE 'RAW',
               c_file_ext LIKE g_document-file_ext VALUE 'TXT'.
    =================================================================================
    z_send_email_fax2
    FUNCTION z_faian_mail_fax2.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(FAX_MAIL_NUMBER) TYPE  SO_NAME
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"     REFERENCE(OBJECT_TYPE) TYPE  SO_ESCAPE
    *"  TABLES
    *"      LT_BODY_EMAIL STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
    Fist part: Verify if the spool really exists
      SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
      IF sy-subrc NE 0.
        RAISE err_no_abap_spooljob. "doesn't exist
      ELSE.
        client = tsp01-rqclient.
        name   = tsp01-rqo1name.
        CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
             EXPORTING
                  authority     = 'SP01'
                  client        = client
                  name          = name
                  part          = 1
             IMPORTING
                  type          = type
                  objtype       = objtype
             EXCEPTIONS
                  fb_error      = 1
                  fb_rsts_other = 2
                  no_object     = 3
                  no_permission = 4
                  OTHERS        = 5.
        IF objtype(3) = 'OTF'.
          desired_type = otf.
        ELSE.
          desired_type = ali.
        ENDIF.
        CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
             EXPORTING
                  rqident              = src_spoolid
                  desired_type         = desired_type
             IMPORTING
                  real_type            = real_type
             TABLES
                  buffer               = l_objcont
             EXCEPTIONS
                  no_such_job          = 14
                  type_no_match        = 94
                  job_contains_no_data = 54
                  no_permission        = 21
                  can_not_access       = 21
                  read_error           = 54.
        IF sy-subrc EQ 0.
          attach_type = real_type.
        ENDIF.
        CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
             EXPORTING
                  owner     = sy-uname
                  region    = ou_fol
             IMPORTING
                  folder_id = l_folder_id
             EXCEPTIONS
                  OTHERS    = 5.
    fill out informations about the header of the email
        CLEAR: g_document.
        g_document-foltp     = l_folder_id-foltp.
        g_document-folyr     = l_folder_id-folyr.
        g_document-folno     = l_folder_id-folno.
        g_document-objtp     = c_objtp.
        g_document-objdes    = header_mail.
        g_document-file_ext  = c_file_ext.
        g_header_data-objdes    = header_mail.
        CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
             EXPORTING
                  method      = 'SAVE'
                  office_user = sy-uname
             IMPORTING
                  authority   = g_authority
             TABLES
                  objcont     = lt_body_email
                  attachments = lt_attachments
             CHANGING
                  document    = g_document
                  header_data = g_header_data
             EXCEPTIONS
                  OTHERS      = 1.
        folder_id-objtp = l_folder_id-foltp.
        folder_id-objyr = l_folder_id-folyr.
        folder_id-objno = l_folder_id-folno.
        object_id-objtp = c_objtp.
        object_id-objyr = g_document-objyr.
        object_id-objno = g_document-objno.
        link_folder_id-objtp = l_folder_id-foltp.
        link_folder_id-objyr = l_folder_id-folyr.
        link_folder_id-objno = l_folder_id-folno.
        REFRESH lt_rec_tab.
       CLEAR lt_rec_tab.
       lt_rec_tab-sel        = 'X'.
       lt_rec_tab-recesc     = object_type.   "This field for FAX/MAIL
       lt_rec_tab-recnam     = 'U-'.
       lt_rec_tab-deliver    = 'X'.
       lt_rec_tab-not_deli   = 'X'.
       lt_rec_tab-read       = 'X'.
       lt_rec_tab-mailstatus = 'E'.
       lt_rec_tab-adr_name   = fax_mail_number.
       lt_rec_tab-sortfield  = fax_mail_number.
       lt_rec_tab-recextnam  = fax_mail_number.
       lt_rec_tab-sortclass  = '5'.
       APPEND lt_rec_tab.
          lt_rec_tab-recextnam = fax_mail_number.
          lt_rec_tab-recesc = object_type.
          lt_rec_tab-sndart = 'INT'.
          lt_rec_tab-sndpri = 1.
          APPEND lt_rec_tab.
        lt_files-file = c_file.
        APPEND lt_files.
    begin of insertion by faianf01
        hd_dat-objdes = header_mail.
        CALL FUNCTION 'SO_ATTACHMENT_INSERT'
             EXPORTING
                  object_id                  = object_id
                  attach_type                = attach_type
                  object_hd_change           = hd_dat
                  owner                      = sy-uname
             TABLES
                  objcont                    = l_objcont
                  objhead                    = l_objhead
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  object_type_not_exist      = 17
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  x_error                    = 1000.
        IF sy-subrc > 0.
        ENDIF.
    end of insertion by faianf01
    send email from SAPOFFICE
        CALL FUNCTION 'SO_OBJECT_SEND'
             EXPORTING
                  folder_id                  = folder_id
                  object_id                  = object_id
                  outbox_flag                = outbox_flag
                  link_folder_id             = link_folder_id
                  owner                      = sy-uname
                 check_send_authority       = 'X'
             TABLES
                  receivers                  = lt_rec_tab
                 note_text                  = lt_note_text
             EXCEPTIONS
                  active_user_not_exist      = 35
                  communication_failure      = 71
                  component_not_available    = 1
                  folder_no_authorization    = 5
                  folder_not_exist           = 6
                  forwarder_not_exist        = 8
                  object_no_authorization    = 13
                  object_not_exist           = 14
                  object_not_sent            = 15
                  operation_no_authorization = 21
                  owner_not_exist            = 22
                  parameter_error            = 23
                  substitute_not_active      = 31
                  substitute_not_defined     = 32
                  system_failure             = 72
                  too_much_receivers         = 73
                  user_not_exist             = 35.
      ENDIF.
    ENDFUNCTION.
    =================================================================================
    z_send_email_fax
    FUNCTION ZCBFS_SEND_MAIL.
    ""Interface local:
    *"  IMPORTING
    *"     REFERENCE(SRC_SPOOLID) LIKE  TSP01-RQIDENT
    *"     REFERENCE(HEADER_MAIL) TYPE  SO_OBJ_DES
    *"  TABLES
    *"      LIST_FAX_MAIL_NUMBER STRUCTURE  SOLI
    *"  EXCEPTIONS
    *"      ERR_NO_ABAP_SPOOLJOB
      DATA: vg_achou(1) TYPE n.
    Fist part: Verify if the spool really exists
      vg_achou = 1.
      DO 60 TIMES.
        SELECT SINGLE * FROM tsp01 WHERE rqident = src_spoolid.
        IF sy-subrc IS INITIAL.
          CLEAR vg_achou.
          EXIT.
        ELSE.
          WAIT UP TO 1 SECONDS.
        ENDIF.
      ENDDO.
      IF vg_achou = 1.
        RAISE err_no_abap_spooljob. "doesn't exist
      ENDIF.
      client = tsp01-rqclient.
      name   = tsp01-rqo1name.
      CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
           EXPORTING
                authority     = 'SP01'
                client        = client
                name          = name
                part          = 1
           IMPORTING
                type          = type
                objtype       = objtype
           EXCEPTIONS
                fb_error      = 1
                fb_rsts_other = 2
                no_object     = 3
                no_permission = 4
                OTHERS        = 5.
      IF objtype(3) = 'OTF'.
        desired_type = otf.
      ELSE.
        desired_type = ali.
      ENDIF.
      CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
           EXPORTING
                rqident              = src_spoolid
                desired_type         = desired_type
           IMPORTING
                real_type            = real_type
           TABLES
                buffer               = l_objcont
           EXCEPTIONS
                no_such_job          = 14
                type_no_match        = 94
                job_contains_no_data = 54
                no_permission        = 21
                can_not_access       = 21
                read_error           = 54.
      IF sy-subrc EQ 0.
        attach_type = real_type.
      ENDIF.
      CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
           EXPORTING
                owner     = sy-uname
                region    = ou_fol
           IMPORTING
                folder_id = l_folder_id
           EXCEPTIONS
                OTHERS    = 5.
    fill out informations about the header of the email
      CLEAR: g_document.
      g_document-foltp     = l_folder_id-foltp.
      g_document-folyr     = l_folder_id-folyr.
      g_document-folno     = l_folder_id-folno.
      g_document-objtp     = c_objtp.
      g_document-objdes    = header_mail.
      g_document-file_ext  = c_file_ext.
      g_header_data-objdes    = header_mail.
      CALL FUNCTION 'SO_DOCUMENT_REPOSITORY_MANAGER'
           EXPORTING
                method      = 'SAVE'
                office_user = sy-uname
           IMPORTING
                authority   = g_authority
           TABLES
                attachments = lt_attachments
           CHANGING
                document    = g_document
                header_data = g_header_data
           EXCEPTIONS
                OTHERS      = 1.
      folder_id-objtp = l_folder_id-foltp.
      folder_id-objyr = l_folder_id-folyr.
      folder_id-objno = l_folder_id-folno.
      object_id-objtp = c_objtp.
      object_id-objyr = g_document-objyr.
      object_id-objno = g_document-objno.
      link_folder_id-objtp = l_folder_id-foltp.
      link_folder_id-objyr = l_folder_id-folyr.
      link_folder_id-objno = l_folder_id-folno.
      REFRESH lt_rec_tab.
      LOOP AT LIST_FAX_MAIL_NUMBER.
        lt_rec_tab-recextnam = LIST_FAX_MAIL_NUMBER-LINE.
        lt_rec_tab-recesc = 'U'.
        lt_rec_tab-sndart = 'INT'.
        lt_rec_tab-sndpri = 1.
        APPEND lt_rec_tab.
      ENDLOOP.
      lt_files-file = c_file.
      APPEND lt_files.
      hd_dat-objdes = header_mail.
      CALL FUNCTION 'SO_ATTACHMENT_INSERT'
           EXPORTING
                object_id                  = object_id
                attach_type                = attach_type
                object_hd_change           = hd_dat
                owner                      = sy-uname
           TABLES
                objcont                    = l_objcont
                objhead                    = l_objhead
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                object_type_not_exist      = 17
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                x_error                    = 1000.
      IF sy-subrc > 0.
      ENDIF.
    send email from SAPOFFICE
      CALL FUNCTION 'SO_OBJECT_SEND'
           EXPORTING
                folder_id                  = folder_id
                object_id                  = object_id
                outbox_flag                = outbox_flag
                link_folder_id             = link_folder_id
                owner                      = sy-uname
           TABLES
                receivers                  = lt_rec_tab
                note_text                  = lt_note_text
           EXCEPTIONS
                active_user_not_exist      = 35
                communication_failure      = 71
                component_not_available    = 1
                folder_no_authorization    = 5
                folder_not_exist           = 6
                forwarder_not_exist        = 8
                object_no_authorization    = 13
                object_not_exist           = 14
                object_not_sent            = 15
                operation_no_authorization = 21
                owner_not_exist            = 22
                parameter_error            = 23
                substitute_not_active      = 31
                substitute_not_defined     = 32
                system_failure             = 72
                too_much_receivers         = 73
                user_not_exist             = 35.
    ENDFUNCTION.
    Regards,
    Santosh

Maybe you are looking for

  • I tried downloading ios 6 in my ipad after sometime only the itune icon comes

    i got a notification to in my ipad settings that do you what to change to ios 6 so i pressed update i left it and went to sleep  next day the home screen dose not come only the itunes icon comes with an arrow mark down with a usb plug

  • File Sharing directories for Fileupload

    I want to use a seperate machine to hold images that are uploaded via my jsp page. Can I create a shared folder on a machine other than my server for images to be uploaded to? I am using Tomcat, Mysql and JSP Thanks for any help mc1392

  • JAVA execution consumed significant database time

    Dear all, DB 11. on solaris.. I have a time consuming package.. this package unloads data in the current db and loads data from another remote db in the same network. below is the recommendation from Oracle ADDM report. This session is a work flow se

  • To fetch from CDHDR and CDPOS using FM CHANGEDOCUMENT_READ_RANGES

    Hi all, Please let me know how to fetch the Details from  CDHDR and CDPOS using Function Module  CHANGEDOCUMENT_READ_RANGES. If possible Clear me with an Example. It has to fetch the datas of Table KNVV KNV1 etcc.... Separately for the Corresponding

  • Wep app search result show on the same product page(product large view).

    I tried the web app search result show on the same product page. e.g checking the postcode which built as web app on the product page, to check availability to ship the user's area. so the result show on the same page(doesn't necessary to lose the pr