EXPECTED OUTPUT:   here i need to get the count of 932 + 134 records = 1064

Hi Team,
could you pls suggest y iam getting wrong count.
select * from i_invoice_info_t_log_v invlog,invoice_header_t invhead
WHERE substr(invlog.tot_cust_no,1,7)=substr(invhead.acct_no,3,7)--------comparing tot_cust_no and acct_no for the other countries
and invhead.comp_code NOT in (2300) ----here when iam running this query i am getting the count of 932 records.
select * from i_invoice_info_t_log_v invlog,invoice_header_t invhead
where substr(invlog.tot_cust_no,3,7)=to_char(substr(invhead.acct_no,3,7))--------------comparing tot_cust_no and acct_no FOR THE COUNTRY 2300
and invhead.comp_code in (2300) ----Here when i am running this query i am getting the count of 134 records.
EXPECTED OUTPUT:   here i need to get the count of 932 + 134 records = 1064 records.
I am  using this query like below:
select * from  i_invoice_info_t_log_v invlog,invoice_header_t invhead
where
(substr(invlog.tot_cust_no,1,7)=substr(invhead.acct_no,3,7)
           and invhead.comp_code NOT in (2300)
          OR
          (substr(invlog.tot_cust_no,3,7)=to_char(substr(invhead.acct_no,3,7))
           and invhead.comp_code in (2300)
)---------------------------------------------------here when i am running this query i am getting the count of  18381 records which is incorrect.
Expected output: i need to get the data for the comp_code which are not in 2300 and which are in 2300... both

select  *
  from  i_invoice_info_t_log_v invlog,
        invoice_header_t invhead
  WHERE    (
                substr(invlog.tot_cust_no,1,7) = substr(invhead.acct_no,3,7) --comparing tot_cust_no and acct_no for the other countries
            and
                invhead.comp_code NOT in (2300) --here when iam running this query i am getting the count of 932 records.
        or (
                substr(invlog.tot_cust_no,3,7) = to_char(substr(invhead.acct_no,3,7)) --comparing tot_cust_no and acct_no FOR THE COUNTRY 2300
            and
                invhead.comp_code in (2300) --Here when i am running this query i am getting the count of 134 records.
/SY.

Similar Messages

  • Need to get the count based on the column availability

    You get a set of table names from a query, say
    select table_name from all_tab_columns where column_name like 'DC_I’;
    TABLE_NAME
    A
    B
    C
    Now, for the above set of tables (A,B and C), you need to get the count(*) for a single dc_i value (say XXX DC)
    In simple words, its like framing the following 4 separate queries into one single one:
    select table_name from all_tab_columns where column_name like 'DC_I’; (Based on this o/p, following 3 queries..)
    select count(*) from A where dc_i=XXX;
    select count(*) from B where dc_i=XXX;
    select count(*) from C where dc_i=XXX;
    Thanks

    Are you looking for this?
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    Elapsed: 00:00:01.04
    satyaki>
    satyaki>
    satyaki>
    satyaki>SELECT table_name,
      2         DBMS_XMLGEN.getxmltype ('SELECT Count(*) c FROM ' || table_name||' where '||column_name|
    |' = 10').EXTRACT ('//text()').getnumberval() tot_rows
      3  FROM all_tab_cols
      4  WHERE table_name in ('EMP', 'DEPT')
      5  and   column_name = 'DEPTNO';
    TABLE_NAME                       TOT_ROWS
    EMP                                     4
    DEPT                                    1
    Elapsed: 00:00:01.00
    satyaki>
    satyaki>
    satyaki>
    satyaki>select count(*) from emp where deptno = 10;
      COUNT(*)
             4
    Elapsed: 00:00:00.00
    satyaki>
    satyaki>
    satyaki>select count(*) from dept where deptno = 10;
      COUNT(*)
             1
    Elapsed: 00:00:00.00
    satyaki>Regards.
    Satyaki De.

  • Need to get the row selected in table control without ay action

    Dear Team,
    I have a requirement in which I need to pass the row selected of a table control to a variable.
    Here I need to get the row selected with out any other action
    then the action of selection of a row.
    Is it possible to read table control values using FM DYNP_VALUES_READ.
    thanks in advance,
    regards,
    Sai

    HI,
    Sai Kumar Potluri
    I tried in IDES it working.
    Here is the code.
    REPORT  ZPRA_TC_D.
    TABLES : SCARR.
    CONTROLS TC TYPE TABLEVIEW USING SCREEN 1.
    DATA : SELLINE TYPE I,
           SELINDEX TYPE I.
    DATA : ACT LIKE SCARR-CARRID,
           ANT LIKE SCARR-CARRNAME.
    DATA : ITAB LIKE SCARR OCCURS 0 WITH HEADER LINE.
    CALL SCREEN 1.
    *&      Module  STATUS_0001  OUTPUT
    *       text
    MODULE STATUS_0001 OUTPUT.
      SET PF-STATUS 'ME'.
    *  SET TITLEBAR 'xxx'.
    SELECT * FROM SCARR INTO TABLE ITAB.
    ENDMODULE.                 " STATUS_0001  OUTPUT
    *&      Module  MOV  OUTPUT
    *       text
    MODULE MOV OUTPUT.
      MOVE-CORRESPONDING ITAB TO SCARR.
    ENDMODULE.                 " MOV  OUTPUT
    *&      Module  USER_COMMAND_0001  INPUT
    *       text
    MODULE USER_COMMAND_0001 INPUT.
    CASE SY-UCOMM.
    WHEN 'BACK' OR 'UP' OR 'EXIT'.
      LEAVE PROGRAM.
    WHEN 'SEL'.
      GET CURSOR FIELD SCARR-CARRID LINE SELLINE.
      SELINDEX = TC-TOP_LINE + SELLINE - 1.
      READ TABLE ITAB INDEX SELINDEX.
      ACT = ITAB-CARRID.
      ANT = ITAB-CARRNAME.
    ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0001  INPUT
    In Flow Logic.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0001.
    LOOP AT ITAB WITH CONTROL TC.
      MODULE MOV.
    ENDLOOP.
    PROCESS AFTER INPUT.
    LOOP AT ITAB.
    ENDLOOP.
    MODULE USER_COMMAND_0001.

  • How to get the count of customers

    Hi all,
    We have a fact table, AR_F to which the dimensions Party_D and Fin_D are connected. Party-org_d is inturn connected to Party_d.
    party_org_D contains details of customers like Customer name and customer ID (Number)
    Fin_D contains ratings (Both -ve and +ve) of each customer.
    the rating range is as follows,
    good rating : >0
    OK Rating: Between 0 and -1.5
    Bad Rating: <-1.5
    Now i need to get the count of all customers falling in each range as separate measures.
    Kindly help me get a solution for this.
    Thank you.

    Hi,
    Try this....
    col 1
    case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end
    col 2
    case when (case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end)='Good' then count(customer_id)
    when (case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end)='Ok' then count(customer_id)
    when (case when Fin_D.ratings > 0 then 'Good'
    when Fin_D.ratings >= -1.5 and Fin_D.ratings <= 0 then 'Ok'
    when Fin_D.ratings < -1.5 then 'Bad' end)='Bad' then count(customer_id)
    end
    hope helps........

  • Sql statement to get the count of items in a group.

    i have a table  as follows
    group id   items
       1            item1
       1            item2
       1            item3
       2            item4
       2            item5
    i need to get the count of items for each group
    the out put should be like
    group = 1 count = 3
    group = 2 count = 2
    i wrote the following query
    select   group count( * )
       into     (group , lv_count)
      from     table1
      group by group.
      endselect.
    is it possible to write this query without using end select.
    when i am using the same query with into table addition the count is not coming.

    Hi,
    It will work, I tested just now, ofcourse with some other table.
    Like this:
    select group count( * )
    INTO TABLE ITAB
    from table1
    group by group.
    Regards,
    Amit Mittal.

  • My daughter is a college student. she needs to write and compile c programs on her mac for a class this semester. what is the best place for her to start to get the correct compiler etc. to use ? thanks

    my daughter is a college student. she needs to write and compile c programs on her mac for a class this semester. what is the best place for her to start to get the correct compiler etc. to use ? thanks

    If you know that you will not be asked to design GUI interfaces, and the C programming course will adhere to command line compilation environments, then get the Xcode command-line developer tools, and skip the extra complication of Xcode until you absolutely need it. Apple has kicked GNU C to the curb and is rightly so, using Clang/LLVM compiler technology.
    Sign up for a free Apple Developer account using your Apple ID, and then visit the Mac Dev Center, and towards the bottom of the page, you will see additional downloads. Click on the associated, all down loads link. Know your OS X version beforehand, as the command-line tool releases are tied to general operating system versions, and the most recent Xcode version.  That said, there are currently two March 9, 2015 command-line tools for Xcode 6.2 — one for OS X 10.9 Mavericks, and the other for OS X Yosemite.

  • Need to get the date's.

    Hi,
    I need to get the dates in interval of 7.
    My Scenario:
    When my user gives the date as 04/01/2013. My output should be like
    04/01/2013
    04/02/2013
    04/03/2013
    04/04/2103
    add of 4 dates. How can i acheive this in sql query? Could any one pls help me?
    Regards,
    Prasad k T,

    wilhelm wundt wrote:
    Hi,
    I need to get the dates in interval of 7.Your expected output is not talking about th einterval of 7 days..
    >
    My Scenario:
    When my user gives the date as 04/01/2013. My output should be like
    04/01/2013
    04/02/2013
    04/03/2013
    04/04/2103Is this date dd/mm or mm/dd
    If you need 4 consecutive dates, use
    select input_date+level-1
    from dual
    connect by level <= 4;>
    add of 4 dates. How can i acheive this in sql query? Could any one pls help me?
    Regards,
    Prasad k T,

  • Need to get the input dynamically and write the records

    hi everyone,
    iam having a doubt in scripts,
    1.i need to get the input from user
    (input is the table name)
    2.if the input matches with the tables in the database and the n it has to write the records in a csv format.
    3.the fields should be delimited by comma.
    is it possible to write a script or procedure.
    the script should be a generic one.
    thanks and Regards,
    R.Ratheesh

    hi
    ,,actually my column_names are.
    select T24_ACCOUNT_NUMBER||','||
    NULLIF(T24_CUSTOMER,NULL)||','||
    NULLIF(T24_CATEGORY,NULL)||','||
    NULLIF(T24_ACCOUNT_TITLE_1,'')||','||
    NVL(T24_ACCOUNT_TITLE_2,'')||','||
    NULLIF(T24_SHORT_TITLE,'')||','||
    NULLIF(T24_SHORT_TITLE,'')||','||
    NULLIF(T24_POSITION_TYPE,'')||','||
    NULLIF(T24_CURRENCY,'')||','||
    NULLIF(T24_LIMIT_REF,NULL)||','||
    NULLIF(T24_ACCOUNT_OFFICER,NULL)||','||
    NULLIF(T24_OTHER_OFFICER,NULL)||','||
    NULLIF(T24_POSTING_RESTRICT,NULL)||','||
    NULLIF(T24_RECONCILE_ACCT,'')||','||
    NULLIF(T24_INTEREST_LIQU_ACCT,NULL)||','||
    NULLIF(T24_INTEREST_COMP_ACCT,NULL)||','||
    NULLIF(T24_INT_NO_BOOKING,'')||','||
    NULLIF(T24_REFERAL_CODE,NULL)||','||
    NULLIF(T24_WAIVE_LEDGER_FEE,'')||','||
    NULLIF(T24_PASSBOOK,'')||','||
    NVL(TO_CHAR(T24_OPENING_DATE,'YYYYMMDD'),'')||','||
    NULLIF(T24_LIMK_TO_LIMIT,'')||','||
    NULLIF(T24_CHARGE_ACCOUNT,NULL)||','||
    NULLIF(T24_CHARGE_CCY,'')||','||
    NULLIF(T24_INTEREST_CCY,'')||','||
    NULLIF(T24_ALT_ACCT_IDa,NULL)||','||
    NULLIF(T24_PREMIUM_TYPE,'')||','||
    NULLIF(T24_PREMIUM_FREQ,'')||','||
    NULLIF(T24_JOINT_HOLDER,NULL)||','||
    NULLIF(T24_RELATION_CODE,NULL)||','||
    NULLIF(T24_JOINT_NOTES,'')||','||
    NULLIF(T24_ALLOW_NETTING,'')||','||
    NULLIF(T24_LEDG_RECO_WITH,NULL)||','||
    NULLIF(T24_STMT_RECO_WITH,NULL)||','||
    NULLIF(T24_OUR_EXT_ACCT_NO,'')||','||
    NULLIF(T24_RECO_TOLERANCE,NULL)||','||
    NULLIF(T24_AUTO_PAY_ACCT,NULL)||','||
    NULLIF(T24_ORIG_CCY_PAYMENT,'')||','||
    NULLIF(T24_AUTO_REC_CCY,'')||','||
    NULLIF(T24_DISPO_OFFICER,NULL)||','||
    NULLIF(T24_DISPO_EXEMPT,'')||','||
    NULLIF(T24_ICA_DISTRIB_RATIO,NULL)||','||
    NULLIF(T24_LIQUIDATION_MODE,'')||','||
    NULLIF(T24_INCOME_TAX_CALC,'')||','||
    NULLIF(T24_SINGLE_LIMIT,'')||','||
    NULLIF(T24_CONTINGENT_INT,'')||','||
    NULLIF(T24_CREDIT_CHECK,'')||','||
    NULLIF(T24_AVAILABLE_BAL_UPD,'')||','||
    NULLIF(T24_CONSOLIDATE_ENT,'')||','||
    NULLIF(T24_MAX_SUB_ACCOUNT,NULL)||','||
    NULLIF(T24_MASTER_ACCOUNT,'')||','||
    NULLIF(T24_FUND_ID,'') FROM T24_CACCOUNT;
    this is the order
    but while my output looks like
    SQL> set serveroutput on
    SQL> set verify off
    SQL> set heading off
    SQL> spool /emea/dbtest/tamdbin/bnk/bnk.run/DATA.BP/SAM_ACC.csv
    SQL> exec input_table('T24_CACCOUNT');
    declare cursor c2 is select
    rownum||','||T24_WAIVE_LEDGER_FEE||','||T24_PASSBOOK||','||T24_OPENING_DATE||','
    ||T24_LIMK_TO_LIMIT||','||T24_CHARGE_ACCOUNT||','||T24_CHARGE_CCY||','||T24_INTE
    REST_CCY||','||T24_ALT_ACCT_IDA||','||T24_PREMIUM_TYPE||','||T24_PREMIUM_FREQ||'
    ,'||T24_JOINT_HOLDER||','||T24_RELATION_CODE||','||T24_JOINT_NOTES||','||T24_ALL
    OW_NETTING||','||T24_LEDG_RECO_WITH||','||T24_STMT_RECO_WITH||','||T24_OUR_EXT_A
    CCT_NO||','||T24_RECO_TOLERANCE||','||T24_AUTO_PAY_ACCT||','||T24_ORIG_CCY_PAYME
    NT||','||T24_AUTO_REC_CCY||','||T24_DISPO_OFFICER||','||T24_DISPO_EXEMPT||','||T
    24_ICA_DISTRIB_RATIO||','||T24_LIQUIDATION_MODE||','||T24_INCOME_TAX_CALC||','||
    T24_SINGLE_LIMIT||','||T24_CONTINGENT_INT||','||T24_CREDIT_CHECK||','||T24_AVAIL
    ABLE_BAL_UPD||','||T24_CONSOLIDATE_ENT||','||T24_MAX_SUB_ACCOUNT||','||T24_MASTE
    R_ACCOUNT||','||T24_FUND_ID||','||T24_ACCOUNT_NUMBER||','||T24_CUSTOMER||','||T2
    4_CATEGORY||','||T24_ACCOUNT_TITLE_1||','||T24_ACCOUNT_TITLE_2||','||T24_SHORT_T
    ITLE||','||T24_MNEMONIC||','||T24_POSITION_TYPE||','||T24_CURRENCY||','||T24_LIM
    IT_REF||','||T24_ACCOUNT_OFFICER||','||T24_OTHER_OFFICER||','||T24_POSTING_RESTR
    ICT||','||T24_RECONCILE_ACCT||','||T24_INTEREST_LIQU_ACCT||','||T24_INTEREST_COM
    P_ACCT||','||T24_INT_NO_BOOKING||','||T24_REFERAL_CODE SRC from T24_CACCOUNT; r2
    c2%rowtype; begin for r2 in c2 loop dbms_output.put_line(r2.SRC); end loop;
    end;
    1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222284001,2222222,6001,,,,,TR,USD,,,,,,,,
    2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222384001,2222223,6001,,,,,TR,USD,,,,,,,,
    3,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222484001,2222224,6001,,,,,TR,USD,,,,,,,,
    4,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222584001,2222225,6001,,,,,TR,USD,,,,,,,,
    5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222684001,2222226,6001,,,,,TR,USD,,,,,,,,
    6,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222284001,2222222,6001,,,,,TR,USD,,,,,,,,
    7,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222384001,2222223,6001,,,,,TR,USD,,,,,,,,
    8,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222484001,2222224,6001,,,,,TR,USD,,,,,,,,
    9,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222584001,2222225,6001,,,,,TR,USD,,,,,,,,
    10,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222684001,2222226,6001,,,,,TR,USD,,,,,,,
    11,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222284001,2222222,6001,,,,,TR,USD,,,,,,,
    12,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222384001,2222223,6001,,,,,TR,USD,,,,,,,
    13,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222484001,2222224,6001,,,,,TR,USD,,,,,,,
    14,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222584001,2222225,6001,,,,,TR,USD,,,,,,,
    15,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,222222684001,2222226,6001,,,,,TR,USD,,,,,,,
    here if we look at the select statement the previous one ,its starts from middle and
    picking up the records.i dont know y.and also its not writing the records in the path (spool)which i have given..can u pls check it out if possible.
    thanks ,.
    R.Ratheesh

  • Need to get the Mail attachment name as it is to the receiver file adapter

    I am doing a Mail to File scenario. I need to get the attachment from the mail and store it on the file server. I am using the PayloadSwap bean in the sender mail adapter. My requirement is to carry forward the attachement name as it is to the receiver file adapter side and store the file with the same name.
    Did any one try doing this? I was looking at developing an adapter module but got struck as I could not find whether the attachement name is stored in the XI payload after it has got swapped using the swap bean.
    Any help would be appreciated.
    VJ

    Oops pressed the send key. Take two.
    This is becoming a damn nightmare. When I run the adapter I am getting ModuleExceptions. Can you pass your eyes over these Java config settings to see what I am doing wrong. Using NWDS CE 7.1 with PI 7.1 both at SP07. All the imports were taken from PI 7.1 after SP07 was applied. The build id of NWDS is
    SAP NetWeaver Developer Studio
    SAP NetWeaver 7.1 Composition Environment SP07 PAT0001
    Build id: 200901152336
    APPLICATION.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
    "http://java.sun.com/dtd/application_1_3.dtd">
    <application>
    <display-name>MailPOP_EAR</display-name>
    <description>EAR description</description>
    <module>
    <ejb>MailPOP_EJB.jar</ejb>
    </module>
    </application>
    APPLICATION-J2EE-ENGINE.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
    <application-j2ee-engine>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="service">engine.security.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">engine.j2ee14.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="service">com.sap.aii.af.svc.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="interface">com.sap.aii.af.ifc.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">com.sap.aii.af.lib.facade</reference-target>
    </reference>
    <reference reference-type="hard">
    <reference-target provider-name="sap.com" target-type="library">com.sap.base.technology.facade</reference-target>
    </reference>
    <fail-over-enable mode="disable" />
    </application-j2ee-engine>
    EJB-J2EE-ENGINE.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-j2ee-engine SYSTEM "ejb-j2ee-engine.dtd">
    <ejb-j2ee-engine>
    <enterprise-beans>
    <enterprise-bean>
    <ejb-name>GetMailAttachment</ejb-name>
    <jndi-name>GetMailAttachment</jndi-name>
    <session-props/>
    </enterprise-bean>
    </enterprise-beans>
    </ejb-j2ee-engine>
    EJB-JAR.XML
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
    2.0//EN"
    "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar>
    <description>EJB JAR description</description>
    <display-name>EJB JAR</display-name>
    <enterprise-beans>
    <session>
    <ejb-name>GetMailAttachment</ejb-name>
    <home>com.sap.aii.af.lib.mp.module.ModuleHome</home>
    <remote>com.sap.aii.af.lib.mp.module.ModuleRemote</remote>
    <local-home>com.sap.aii.af.lib.mp.module.ModuleLocalHome</local-home>
    <local>com.sap.aii.af.lib.mp.module.ModuleLocal</local>
    <ejb-class>sample.GetMailAttachment</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    </enterprise-beans>
    </ejb-jar>
    SENDER MAIL ADAPTER modules
    1 AF_Modules/PayloadSwapBean Local EB 1
    2 GetMailAttachment Local EB 2
    3 sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean Local EB 3
    1     swap.keyName          payload-name
    1     swap.keyValue          MailAttachment-1
    RECEIVER FILE MODULES
    1     localejbs/AF_Modules/DynamicConfigurationBean     Local Enterprise Bean     1
    2     localejbs/CallSapAdapter                    Local Enterprise Bean     2
    1     key.0          write http://sap.com/xi/XI/System/File FileName
    1     value.0          message.interface
    VARIABLE FILENAME SUBST WITH ASMA TURNED ON
    fName     message:interface_name
    JAVA SOURCE
    package sample;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import com.sap.aii.af.lib.mp.module.Module;
    import com.sap.aii.af.lib.mp.module.ModuleContext;
    import com.sap.aii.af.lib.mp.module.ModuleData;
    import com.sap.aii.af.lib.mp.module.ModuleException;
    import com.sap.engine.interfaces.messaging.api.Message;
    import com.sap.engine.interfaces.messaging.api.MessagePropertyKey;
    import com.sap.engine.interfaces.messaging.api.TextPayload;
    import com.sap.engine.interfaces.messaging.api.XMLPayload;
    import com.sap.aii.af.service.cpa.Channel;
    @ejbHome <{com.sap.aii.af.lib.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.lib.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.lib.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.lib.mp.module.ModuleRemote}>
    @stateless
    <code>GetMailAttachment</code>
    @SuppressWarnings("unused")
    public class GetMailAttachment implements SessionBean, Module {
         private static final long serialVersionUID = 7612238514043673502L;
         private SessionContext myContext;
         private MessagePropertyKey myFileName;
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
    @throws CreateException
         public void ejbCreate() throws CreateException {
         public void getMessageProperty(MessagePropertyKey FileName) {
              myFileName = FileName;
    @param moduleContext
               Contains data of the module processor that might be important
               for the module implementation such as current channel ID
    @param inputModuleData
               Contains the input XI message as principal data plus eventual
               set supplemental data
    @return ModuleData Contains the (changed) output XI message. Might be the
            response message if the module is the last in the chain.
    @exception ModuleException
                   Describes the cause of the exception and indicates whether
                   an retry is sensible or not.
         @SuppressWarnings("deprecation")
         public ModuleData process(ModuleContext moduleContext,
                   ModuleData inputModuleData) throws ModuleException {
              try {
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   TextPayload payload = msg.getDocument();
                   String contentType = payload.getContentType();
                   // Content Type could be something like
                   // text/plain;charset="UTF-8";name="file.txt"
                   contentType = contentType.replaceAll("\"", "");
                   int i = contentType.lastIndexOf("=") + 1;
                   String fileName = contentType.substring(i);
                   msg.setMessageProperty(myFileName, fileName);
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
              return inputModuleData;
    JAVA ERRORS
    2009-02-04 11:41:14     Information     Mail: calling the module processor for channel LMK_Common_Mail_Sender
    2009-02-04 11:41:14     Information     Swap: swapping by payload-name ? MailAttachment-1
    2009-02-04 11:41:14     Information     Swap: successfully swapped
    2009-02-04 11:41:14     Information     Mail: message leaving the adapter (call)
    2009-02-04 11:41:14     Information     The application tries to send an XI message asynchronously using connection AFW.
    2009-02-04 11:41:14     Information     Backward validation is enabled
    2009-02-04 11:41:14     Error     Unable to validate the message with message ID 8702df71-f254-11dd-9b9b-001a64a73518
    2009-02-04 11:41:14     Error     Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
    2009-02-04 11:41:14     Error     Mail: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: Content is not allowed in prolog.
    2009-02-04 11:41:14     Error     Mail: error occured: com.sap.aii.af.lib.mp.module.ModuleException

  • Need to get total count of a column in the given query

    Hi,
    I have the following query for which i need a total count of distinct concatenated_address. I am trying to use count(distinct adv.concatenated_address) in the below query but because of the group by it does not give me the expected result.
    I am not reusing the same query, in my program again, to get the count as it would affect the performance. This query takes really long to execute and so is there a way to incorporate the count in this single query itself without having to use it twice.
    SELECT DISTINCT (acv.customer_name||','||
    acv.customer_number||','||
    REPLACE(adv.concatenated_address, ',', ' ')||','||
    adv.postal_code||','||
    rct.interface_header_attribute1||','||
    rct.interface_header_attribute6||','||
    rct.creation_date||','||
    rct.trx_date||','||
    aps.due_date ||','||
    SUM(aps.amount_due_original)||','||
    SUM(aps.amount_due_remaining) ||','||
    rct.printing_count ||','||
    TO_DATE(rct.printing_last_printed)||','||
    TO_DATE(rct.printing_original_date)||',') str
    ,acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ') address
    FROM ar_customers_v acv
    ,ar_addresses_v adv
    ,hz_cust_site_uses hcsu
    ,ra_customer_trx rct
    ,ar_payment_schedules aps
    WHERE adv.customer_id = acv.customer_id
    AND hcsu.cust_acct_site_id = adv.address_id
    AND hcsu.site_use_code = 'BILL_TO'
    AND rct.bill_to_customer_id = acv.customer_id
    AND rct.bill_to_site_use_id = hcsu.site_use_id
    AND aps.customer_trx_id = rct.customer_trx_id
    GROUP BY acv.customer_name
    ,acv.customer_number
    ,adv.concatenated_address
    ,adv.postal_code
    ,rct.interface_header_attribute1
    ,rct.interface_header_attribute6
    ,rct.creation_date
    ,rct.trx_date
    ,aps.due_date
    ,rct.printing_count
    ,TO_DATE(rct.printing_last_printed)
    ,TO_DATE(rct.printing_original_date)
         ,acv.customer_id
    ORDER BY acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ')
    Thank you

    try this please
    SELECT COUNT(str),customer_id
    FROM
    (SELECT DISTINCT (acv.customer_name||','||
    acv.customer_number||','||
    REPLACE(adv.concatenated_address, ',', ' ')||','||
    adv.postal_code||','||
    rct.interface_header_attribute1||','||
    rct.interface_header_attribute6||','||
    rct.creation_date||','||
    RCT.TRX_DATE||','||
    aps.due_date ||','|| 
    SUM(aps.amount_due_original)||','||
    SUM(aps.amount_due_remaining) ||','||
    rct.printing_count ||','||
    TO_DATE(rct.printing_last_printed)||','||
    TO_DATE(rct.printing_original_date)||',') str
    ,acv.customer_id
    ,REPLACE(adv.concatenated_address, ',', ' ') address
    FROM ar_customers_v acv
    ,ar_addresses_v adv
    ,hz_cust_site_uses hcsu
    ,ra_customer_trx rct
    ,ar_payment_schedules aps
    WHERE adv.customer_id = acv.customer_id
    AND hcsu.cust_acct_site_id = adv.address_id
    AND hcsu.site_use_code = 'BILL_TO'
    AND rct.bill_to_customer_id = acv.customer_id
    AND rct.bill_to_site_use_id = hcsu.site_use_id
    AND aps.customer_trx_id = rct.customer_trx_id
    GROUP BY acv.customer_name
    ,acv.customer_number
    ,adv.concatenated_address
    ,adv.postal_code
    ,rct.interface_header_attribute1
    ,rct.interface_header_attribute6
    ,rct.creation_date
    ,rct.trx_date
    ,aps.due_date
    ,rct.printing_count
    ,TO_DATE(rct.printing_last_printed)
    ,TO_DATE(RCT.PRINTING_ORIGINAL_DATE)
    ,ACV.CUSTOMER_ID)

  • Need to get the exact time of each picture that I saved ( maybe as a excel sheet or word )

    Hi guys,
    I am actually a new labview user. I have successfullly been able to save pictures. But unfortunately I got two problems. The first one is that I need to use two cameras at the same time. The program I have so far is for one camera. The second problem is that I need to get the exact time for each picture saved in the profile.
    I would appreciate if someone can help me with that. Anyway plz find attached the subvi.
    Regards,
    Abbas
    Attachments:
    Abbas progress.vi ‏54 KB

    Hi Abbas,
    First, I notice that you are using IMAQ for USB.  Is there any particular reason you are not using IMAQdx?  This is the newer, supported driver for use with USB cameras that supports acquiring from multiple cameras at the same time. 
    Check these two articles:
    Can I Acquire from Multiple USB Cameras Simultaneously Using IMAQdx?
    Can I Acquire from Two USB Cameras Simultaneously with NI-IMAQ for USB Cameras 1.0?
    And also this example (if you camera does not support acquiring from multiple cameras at the same time):
    Toggle Between Multiple USB Cameras
    As for timestamps, some cameras output them with the frame timing.  However, usually this is not a feature of USB cameras; if it is not, you can look into timing options within LabVIEW.  Try playing with the property node for IMAQdx and the Acquisition Attributes.
    Cheers,
    Marti C
    Applications Engineer
    National Instruments
    NI Medical

  • HT1212 need to get the "iPad is disabled" off my iPad so I can use it

    need to get the "iPad is disabled" off my iPad so I can use it

    How can I unlock my iPad if I forgot the passcode?
    http://www.everymac.com/systems/apple/ipad/ipad-troubleshooting-repair-faq/ipad- how-to-unlock-open-forgot-code-passcode-password-login.html
    iOS: Device disabled after entering wrong passcode
    http://support.apple.com/kb/ht1212
    How can I unlock my iPad if I forgot the passcode?
    http://tinyurl.com/7ndy8tb
    How to Reset a Forgotten Password for an iOS Device
    http://www.wikihow.com/Reset-a-Forgotten-Password-for-an-iOS-Device
    Using iPhone/iPad Recovery Mode
    http://ipod.about.com/od/iphonetroubleshooting/a/Iphone-Recovery-Mode.htm
    Saw this solution on another post about an iPad in a school environment. Might work on your iPad so you won't lose everything.
    ~~~~~~~~~~~~~
    ‘iPad is disabled’ fix without resetting using iTunes
    Today I met my match with an iPad that had a passcode entered too many times, resulting in it displaying the message ‘iPad is disabled – Connect to iTunes’. This was a student iPad and since they use Notability for most of their work there was a chance that her files were not all backed up to the cloud. I really wanted to just re-activate the iPad instead of totally resetting it back to our default image.
    I reached out to my PLN on Twitter and had some help from a few people through retweets and a couple of clarification tweets. I love that so many are willing to help out so quickly. Through this I also learned that I look like Lt. Riker from Star Trek (thanks @FillineMachine).
    Through some trial and error (and a little sheer luck), I was able to reactivate the iPad without loosing any data. Note, this will only work on the computer it last synced with. Here’s how:
    1. Configurator is useless in reactivating a locked iPad. You will only be able to completely reformat the iPad using Configurator. If that’s ok with you, go for it – otherwise don’t waste your time trying to figure it out.
    2. Open iTunes with the iPad disconnected.
    3. Connect the iPad to the computer and wait for it to show up in the devices section in iTunes.
    4. Click on the iPad name when it appears and you will be given the option to restore a backup or setup as a new iPad (since it is locked).
    5. Click ‘Setup as new iPad’ and then click restore.
    6. The iPad will start backing up before it does the full restore and sync. CANCEL THE BACKUP IMMEDIATELY. You do this by clicking the small x in the status window in iTunes.
    7. When the backup cancels, it immediately starts syncing – cancel this as well using the same small x in the iTunes status window.
    8. The first stage in the restore process unlocks the iPad, you are basically just cancelling out the restore process as soon as it reactivates the iPad.
    If done correctly, you will experience no data loss and the result will be a reactivated iPad. I have now tried this with about 5 iPads that were locked identically by students and each time it worked like a charm.
    ~~~~~~~~~~~~~
    Try it and good luck. You have nothing more to lose if it doesn't work for you.
     Cheers, Tom

  • !!! I need to get the return value from a PL/SQL in Java.. How??? !!!

    Hi
    -- I have a PL/SQL in which it return an array value and I need to get the value using Java.... any idea how?
    thanks

    Check out CallableStatement:
    http://java.sun.com/j2se/1.5.0/docs/api/java/sql/CallableStatement.html

  • I saved photos from my Macbook Pro onto my Iphone (using itunes, 4 years ago). My macbook is now dead and I need to get the photos I saved off of my iphone 3GS transferred to a pc.  Any help...  From my PC I can only access "internal storage"

    I saved photos from my Macbook Pro onto my Iphone (using itunes, 4 years ago). My macbook is now dead and I need to get the photos I saved off of my iphone 3GS transferred to a pc.  Any help...  From my PC I can only access "internal storage"

    The iphone is not a storage/backup device.  The picture sycn is one way - computer to iphone.  The photos are also reduced in size when synced to iphone so they are not of the original quality
    It has always been very basic to always maintain a backup of your computer.
    Have you failed to do this?
    If so, not good at all, you can e-mail the pics to yourself - keep in mind they will never be of the original quality

  • I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. What is the best way to do this

    I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. Even when I save it, the image quality at minimum the file size is 10.9 MB. What is the best way to do this

    @Barbara – What purpose is that PDF for? Print? Web?
    If web purpose, you could convert CMYK images to sRGB. That would reduce the file size as well.
    A final resort to bring down file size is:
    1. Print to PostScript
    2. Distill to PDF
    That would bring file size down even more. About 20%, depending on the images and other contents you are using, compared with the Acrobat Pro method. If you like you could send me a personal message, so we could exchange mail addresses. I could test for you. Just provide the highres PDF without any downsampling and transparency intact. Best provide a PDF/X-4.
    I will place the PDF in InDesign, print to PostScript, distill to PDF.
    Uwe

Maybe you are looking for