Ad hoc issue

Hey
Setting up an ad hoc network on my mb is no problem at all. Getting my itouch (gen 2.0, firmware 3.0) connected to the ad hoc is not a problem either. However, when I try to surf on the net with my itouch I get this message
"Cannot Open Page
Safari cannot open the page because it is not connected to the Internet."
Help is extremely appreciated. I really want to be able surfing on my itouch, through ad hoc, at home.

What form of Internet connection do you have for your MB. You can only SHARE a wired connection.

Similar Messages

  • Creating Custom Fields on Ad-Hoc Issues in GRC PC

    Hello All -
    We have a requirement to create a custom field on ad-hoc issues in GRC Process Control 10.1.  I have created custom fields on test plans and controls previously, but have not created custom fields on ad-hoc issues.  I have not been able to find any SAP documentation that states whether or not custom fields can be created for ad-hoc issues.  Has anyone done this?  If yes, can you please share any documentation on how to create these custom fields for ad-hoc issues?  Thanks in advance!

    Hi Taylor,
    Procedure to add a Customer Defined Field (CDF) in any screen of Process control is same. You only need to change is..object name. Did you refer to the below SAP Note  which helps to define CDF?
    1655539 - Add user-defined fields
    If not, please review this and add the custom field in adhoc issue page. You can also review the below SAP Notes which has the latest fixes for this area once you are able to manage the CDF in the page.
    1934382
    1928603
    1924077
    Thanks & Regards
    Neeraj

  • Strange Ad-Hoc Issue

    I've been getting this Ad-Hoc warning on the WLSE, the name is PwC80211 and the MAC keeps changing on it except the manufacurer code. I've read where this is probably a Linux OS and it's scanning for other Ad-Hoc's to connect to. Has anyone else every seen this before?

    I knew of two laptops running Linux in the area of the reporting AP. I asked both users to please check their configurations and after that, I haven't had it reappear. I am assuming that one was incorrectly configured and was running in ad-hoc mode. I used location manager to gauge the general area of where the ad-hoc might be located. One laptop runs Linux exclusively, the other is a dual boot XP/Linux. I believe it was the Linux only laptop that was misconfigured. It either was a driver issue or configuration, the user fixed it, but if it ever reappears I'll know where to find it.
    My WLSE reported the same thing filling up the log with hundreds of incidents until I tracked it down. You will see the manufacturer part of the MAC never changes, that might help you find the culprit. If you have location manager setup, use the "TX Coverage By Signal Strength w/o Overlaps" to find the distance of the ad-hoc from the reporting access point(s).
    I had another instance last week where some consultants were doing an audit and had two laptops talking to one another using "hpsetup" and neither of them even knew it. I also found "tmobile" and "linksys" on one laptop. Here is a good article about it.
    http://www.nmrc.org/pub/advise/20060114.txt
    Good Luck

  • IPhone and Macbook ad-hoc issues

    I'm using file sharings apps for my iPhone. When there is no WIFI spot available I should be able to create a WIFI network spot from my Macbook Pro and then connect it to my iPhone.
    From the Airport menu I chose "Create Network..." and the WIFI bars will change to a triangle with a computer screen symbol. Then from my iPhone I'll select the new network and it says it's connected with full bars in the settings/wifi. But on the top of the iPhone the 3G-symbol still appears as if it's not connected to WIFI and only to 3G.
    And because of that I can't use my file transfer apps for the iPhone without a "real WIFI spot".
    What am I doing wrong??

    I had the same problem -- I tried using a Keynote Remote on an ad-hoc network created between my Macbook and the iPhone. Here's what worked for me:
    1. After creating the network and connecting the iPhone, I checked the iPhone's IP address. It was something like 169.254.30.55
    2. I went back to the Macbook Network Preference Pane and clicked "Advanced". In the TCP/IP tab, DHCP was enabled and I was getting a 169.254.128.5 address.
    3. I switched form DHCP to manual, and entered 169.254.30.2 as the IP to put both on the same subnet and set the subnet mask to 255.255.255.0
    4. The wifi icon finally appeared on the iPhone that was connected to my ad-hoc network. I was able to use the Keynote Remote to control the presentation.
    5. Later, the wifi icon disappeared, but I was still able to link and control the slideshow.
    Hope this helps someone.

  • GRC 10: Deleting the Ruleset.

    Hello Guys,
    Anyone has a clue how to go about deleting an existing Ruleset in the system? I tried in SPRO - Delete Ruleset but it is not working. At the same time, I see an option in the nwbc also, which is to Delete the ruleset.
    1. Any idea how we should go about deleting the existing Ruleset?
    2. What is the difference between deleting from NWBC and deleting from SPRO?
    We have 3 Physical systems A, B and C and the connector groups are:
    Logical Group 1 - Having A&B systems.
    Cross Group 2 - Having A&C systems.
    Any ideas appreciated.
    Regards.
    Edited by: sapgrc10 on Nov 7, 2011 8:14 PM

    Hello Asheesh,
    Thanks for your reply. Besides SAP_ALL and SAP_NEW, I also have allmost all the roles to myself as under:
    SAP_GRAC_ACCESS_APPROVER     Role for Access Request Approver
    SAP_GRAC_ACCESS_REQUEST_ADMIN     Role for Access Request Administrator
    SAP_GRAC_ACCESS_REQUESTER     Role for End user
    SAP_GRAC_ALERTS     Generate, clear and delete SOD Alerts
    SAP_GRAC_ALL     Super Admin for AC
    SAP_GRAC_BASE     Base Role for all Access Control Users
    SAP_GRAC_CONTROL_APPROVER     Create AC MIT control, approve, assign, Alerts and perform Risk Analysis
    SAP_GRAC_CONTROL_MONITOR     Ability to assign MIT control to a Risk and perform Risk Analysis
    SAP_GRAC_CONTROL_OWNER     Create AC MIT control.
    SAP_GRAC_DISPLAY_ALL     Display Access To All AC Objects.
    SAP_GRAC_FUNCTION_APPROVER     Approve Function for Workflow
    SAP_GRAC_NWBC     View Access Control Information Architecture.
    SAP_GRAC_REPORTS     Ability to run all AC reports.
    SAP_GRAC_RISK_ANALYSIS     Ability to Perform Risk Analysis
    SAP_GRAC_RISK_OWNER     Risk maint. And Risk Analysis
    SAP_GRAC_ROLE_MGMT_DESIGNER     Role Management Designer
    SAP_GRAC_ROLE_MGMT_ROLE_OWNER     Role Owner
    SAP_GRAC_ROLE_MGMT_USER     Role Management Business User
    SAP_GRAC_RULE_SETUP     Ability to define Access Rules
    SAP_GRAC_SETUP     Ability to setup Access Control
    SAP_GRAC_SUPER_USER_MGMT_ADMIN     Super User  Administrator Role
    SAP_GRAC_SUPER_USER_MGMT_CNTLR     Super User  Controller Role
    SAP_GRAC_SUPER_USER_MGMT_OWNER     Super User  Owner Role
    SAP_GRAC_SUPER_USER_MGMT_USER     Super User  Firefighter
    SAP_GRC_FN_ADISSUE_PROCESS     Ad-hoc Issue Processer
    SAP_GRC_FN_ALL     GRC - Power User
    SAP_GRC_FN_BASE     GRC - Base role to run GRC applications
    SAP_GRC_FN_BUSINESS_USER     GRC - Business User
    SAP_GRC_FN_DISPLAY     GRC - Display
    SAP_GRC_FN_POST     Role with Post Authority Only
    SAP_GRC_MSMP_WF_ADMIN_ALL     MSMP Overall Administrator
    SAP_GRC_MSMP_WF_CONFIG_ALL     MSMP Overall Configurator
    SAP_GRC_NWBC     Governance, Risk, & Compliance
    SAP_GRC_SPC_SCHEDULER     Authorization to schedule background jobs
    But still having the problem. When I press the execute botton to delete, the system does not do anything, neither does it give any message or error.
    Anything else, that I am missiing?
    Also, my second question was if there is any difference deleting the ruleset from NWBC or from the Frontend or are these both the same?
    Thanks in advance!
    Edited by: sapgrc10 on Nov 8, 2011 5:27 PM

  • SAP GRC PC 10.1 Policy Management

    Hi Gurus,
    I am performing a Policy Management Cycle in SAP GRC PC 10.1, and I find the following problem. The approver receives in the Workinbox the notification for perform the approval of the policy, and, if he decide Send to Rework, no one receives the rework, but if I activate a fallback user, he receives everything
    I configured the following business events in the SPRO Actibity : "Maintain Custom Agent Determination Rules".
    Business
      Event
    Role
    Entity ID
    Subtype
    Business Event
      Name
    0FN_AHISSUE_DEFAULT_PRC
    1
    SAP_GRC_SPC_CRS_POLICY_OWNER
    POLICY
    Default processor for ad-hoc issue
    0FN_AHISSUE_DEFAULT_PRC
    1
    SAP_GRC_SPC_GLOBAL_ORG_OWNER
    ORGUNIT
    Default processor for ad-hoc issue
    0FN_POLICY_APPROVE
    1
    SAP_GRC_SPC_CRS_PLC_APPR
    POLICY
    Approve policy
    0FN_POLICY_DEFAULT_APPR
    1
    SAP_GRC_SPC_GLOBAL_ORG_OWNER
    ORGUNIT
    Default apporver for policy
    0FN_POLICY_DEFAULT_APPR
    2
    SAP_GRC_SPC_GLOBAL_ORG_ADMIN
    ORGUNIT
    Default apporver for policy
    0FN_POLICY_REVIEW
    1
    SAP_GRC_SPC_CRS_PLC_REVIEW
    POLICY
    Review policy
    0FN_ISSUE_NOTIFY
    1
    SAP_GRC_SPC_CRS_POLICY_OWNER
    POLICY
    Send notification to object owner
    I am working with a copy of the standard roles, so I configure the table with the copy of these roles.
    In the transaction SWIA an error appears which says in field Executed Action: "No Action". I am wondering if maybe it could happens because user WF_BATCH (user used for the workflow) doen't have enought authorizations.
    I also test it in the sandbox and it works perfect (without fallback and with SAP_ALL in WF_BATCH user).
    Some help will be appreciated.
    Thanks!

    Hello Giridhar,
    What parameters are you referring to?
    You meant the parameters in General Configuration in AC?
    Best Regards,
    Fernando

  • Probles with updated to iTunes version 10.2.2.12 on Windows XP

    I run Windows XP on an older model Dell Inspiron notebook. I updated iTunes to the latest version last night, 10.2.2.12, and when I restarted the computer, I noticed when it booted up that my personal settings had been zapped, so my desktop had a different look, and many program icons were missing. Also, the new version of iTunes had 0 of the 500+ songs I own.
    Has anyone else suffered serious problems like this after installing the new iTunes version? If so, what is the fix?
    Thanks. JCA, Napa, CA.

    Well, I admit the possibility of a post hoc ergo propter hoc issue with assuming the iTunes version update caused the problem with Windows XP not "remembering" my personal settings.
    But I have successfully installed iTunes updates for approximately the last two years, and never had the new version of iTunes fail to find and load my old music library, and that is part of what happened to me last night.
    Are you sure this is a Windows XP malfunction, and not something related to the iTunes installation??? Thanks.

  • I can't connect to ad-hoc networks with my iPod touch 4g AND IT ****** ME OFF!! (running firmware 6.1.2) Please fix this extremely annoying issue ASAP!!

    I can't connect to ad-hoc networks with my iPod touch 4g AND IT ****** ME OFF!! (running firmware 6.1.2) Please fix this extremely annoying issue ASAP!!

    Try:
    - Powering off and then back on your router.
    - Anything else here
    iTunes for Windows: iTunes cannot contact the iPhone, iPad, or iPod software update server
    - Change the DNS to either Google's or Open DNS servers
    Public DNS — Google Developers
    OpenDNS IP Addresses
    - Try on another computer/network
    - Wait if it is an Apple problem

  • Ad-Hoc query output issue

    Hello Experts,
    Recently we have upgraded the system and we are facing issues with Ad-Hoc query output.
    Issue : After entering data in selection fields and click on "OUTPUT" button we  are getting output. now I changed the selection field  data and click on "OUTPUT" button then we are getting message "No Data selected".
    But when clicked on "HIT LIST" button for changed selection fields then we are getting HIT LIST count and after click of "OUTPUT" button we are getting output.
    So at this point this is unclear why it is working after HIT LIST? This is not consistent but appearing most of the time.
    Regards,
    Saurabh

    Thank you for reply. Yes I have checked SQ03, 02 and 01.
    It is not specific to particular query it is appears to be for all the queries.
    The important thing is to get the output we need to click first HIT LIST button and then OUTPUT. Is there any specific settings maintained for displaying output without clicking HIT LIST ?

  • IOS 4.1 / iPod Touch 4th generation and Wiindows 7 Ad Hoc Networking issue

    I have an iPod Touch 1st Gen that I have been successfully using with my Win2k, Win XP, and Windows 7 laptops to transfer files via Windows' Ad Hoc Networking for a couple of years.
    I just received my new iPod Touch 4th Gen iOS4.1 a few days ago and have been having trouble connecting to my Windows 7 laptop using Ad Hoc networking. On Windows 7, I created an unencrypted ad hoc wireless connection. When I try to connect with my Touch 4th Gen, the network status on the laptop keeps on saying "Waiting for users". However, if I try with my Touch 1st Gen, the network status immediately says "Connected"
    Touch 4th Gen connects properly to ad hoc networking only to my Win XP and Win2k laptop. When I connect via a wireless router / access point, the iPod Touch 4th Gen is able to ping my Windows 7 laptop and I am able to do FTP file transfers. VPN PPTP and IPSEC connectivity works fine.
    So the issue seems to be isolated to iOS4.1 / Touch 4th Gen and Windows 7 Ad Hoc networking.
    Just tried my Touch 1st Gen iOS 3.1.3 and it's able to establish Ad Hoc networking to all windows platform that I have.
    Anyone else seeing the ad hoc networking with Windows 7 and iPod Touch 4th Gen issue?

    I have iPhone 4 running IOS 4.1 and ThinkPad running Vista and am experiencing a similar problem. I am able to connect to the ad-hoc network (using WEP encription as WPA2 didn't work at all) however I cannot get internet access through this network connection. My wife has an iPhone 3GS running IOS 4.0.2 and she has no problems at all connecting to the ad-hoc network and getting a connection to the internet.
    I also find that my phone does not remember the pass code to connect to the network and I need to enter it each time I try to connect. The option to "Auto-Join" the network always slides back to "OFF" when I exit from the network setup page. Again my wifes phone does not have this same problem.
    Looks to me like it is either an IOS 4.1 issue or iPod/iPhone 4 hardware problem.
    Message was edited by: CrustyNoodle

  • 11g Performance Issue because of cascading fiters in case of ad hoc reports

    Dear all,
    i already tried to google for similar issues, but I haven't found anything so far.
    We got a large database with about 10 dimension tables and 1 fact table (which has 77m rows). When doing ad hoc reporting, 2 or 3 filters are heavily used by the users. These filters seem to be cascading, i. e. the selection within a filter drop down depends on the values entered/selected in the other dropdowns.
    When using prompts, i am able to disalbe this feature. See http://gerardnico.com/wiki/dat/obiee/dashboard_prompt
    But how do I disable this feature for filters in ad hoc reports?
    Dear all
    Sven

    I think I have to specifiy my source: It is option "Limit values by" in the dialogue box shown on http://gerardnico.com/wiki/dat/obiee/dashboard_prompt

  • [Problem] Issue to create Ad-Hoc Network for iPad via MacBook

    Hello everyone,
    I have a white MacBook (2007) and an iPad 2.
    I am at a hotel which only has a cable Internet access.
    I would like to create an Ad-Hoc Network with my MacBook to use the iPads WiFi.
    I was able to create the Ad-Hoc Network via the Internet-Sharing in the MacBook Settings, but as soon as I switch on the Sharing, neither the MacBook Internet nor the iPad Internet are working (I also tried it with my not jailbroken iPhone 3GS, same result). When I switch off the WiFi from my MacBook, at least I can use the Internet via cable.
    Is it possible that the Internet is not strong enough to use it with 2 devices. I forgot my MacBook charger, does this maybe a reason that it is not working, because the MacBook doesn't have enough power?
    What else can be a reason.
    I heard it should be quiet easy to create an Ad-Hoc connection, but now I wonder why it is not working.
    I would appreaciate any help.
    If you need more information, please let me know.
    Thank you in advance.

    But this doesn't mention at all how to connect iphones, ipods and ipads.
    Your original post didn't mention those. But now it sounds like your wireless access point is down. That's a separate issue. Unless you have a specific need for an ad-hoc network, I suggest you fix your WAP and connect all the devices to it.

  • Oracle Ad-hoc report with multiple queries creating issues

    Hi Guys,
    I have been having multiple issues (one after the other) in trying to generate a report for Business user. Let me start with my test cases and yes, this time I have made sure by testing and dirtying my hands that the test cases work properly and commit into the database (I will be more than happy to provide screen shots of the same).
    Test Case:
    Tables:RETURNS & RETURN_LINE_ITEMS
    CREATE TABLE RETURNS
      ID                    NUMBER(12),
      PROG_PROGRAM_CD       VARCHAR2(2 BYTE),
      ACCT_ID               NUMBER(12),
      ACPE_ID               NUMBER(12),
      JENT_ID               NUMBER(12),
      PREV_RTRN_ID          NUMBER(12),
      ENTP_ABN              NUMBER(9),
      ACCT_OCCURNC_NBR      NUMBER(4),
      SOURCE_TYPE           VARCHAR2(30 BYTE)       DEFAULT 'BLANK',
      RECEIVE_DATE          DATE,
      AMEND_IND             VARCHAR2(1 BYTE)        DEFAULT 'N',
      CMPLT_IND             VARCHAR2(1 BYTE)        DEFAULT 'N',
      PENALTY_OR_IND        VARCHAR2(1 BYTE)        DEFAULT 'N',
      RETURN_STATUS         VARCHAR2(12 BYTE),
      STATUS_DATE           DATE,
      STATUS_USERID         VARCHAR2(8 BYTE),
      PERIOD_START_DATE     DATE,
      PERIOD_END_DATE       DATE,
      NOTICE_STATUS         VARCHAR2(12 BYTE),
      NOTICE_STATUS_DATE    DATE,
      NOTE_TEXT             VARCHAR2(2000 BYTE),
      PENALTY_OR_BY         VARCHAR2(8 BYTE),
      PENALTY_OR_TMST       DATE,
      FILING_ID             NUMBER(12),
      CASE_ID               VARCHAR2(49 BYTE),
      DOC_CONTRL_NBR        NUMBER(29),
      LOCTR_NBR             NUMBER(10),
      STATUTE_BARRED_DATE   DATE,
      MEDIA_TYPE            VARCHAR2(30 BYTE),
      DISPSTN_TYPE          VARCHAR2(30 BYTE),
      AMEND_TYPE            VARCHAR2(30 BYTE),
      CALC_MODE             VARCHAR2(30 BYTE),
      PROCESS_PASS_CNT      NUMBER(1),
      CONVRTD_IND           VARCHAR2(1 BYTE)        DEFAULT 'N',
      LOSS_PERIOD_END_DATE  DATE,
      MF_SYNC_CD            VARCHAR2(1 BYTE)
    CREATE TABLE RETURN_LINE_ITEMS
      ID                       NUMBER(12),
      RTSC_ID                  NUMBER(12),
      RTRN_ID                  NUMBER(12),
      SCLI_ID                  NUMBER(12),
      LITM_ID                  NUMBER(12),
      ENTP_ABN                 NUMBER(9),
      PROG_PROGRAM_CD          VARCHAR2(2 BYTE),
      ACCT_OCCURNC_NBR         NUMBER(4),
      ACPE_END_DATE            DATE,
      SCHED_NBR                VARCHAR2(3 BYTE),
      SCHD_VERSION_YR          NUMBER(4)            DEFAULT 0,
      SCHD_VERSION_NBR         NUMBER(3),
      RTSC_OCCUR_NBR           NUMBER(3),
      LITM_LINE_ITEM_NBR       VARCHAR2(3 BYTE),
      SLIN_LINE_ITEM_ID        NUMBER(12),
      OCCUR_NBR                NUMBER(3)            DEFAULT 1,
      PREV_VAL_MOD_IND         VARCHAR2(1 BYTE)     DEFAULT 'N',
      VIABLE_IND               VARCHAR2(1 BYTE)     DEFAULT 'N',
      ACTIVE_IND               VARCHAR2(1 BYTE)     DEFAULT 'Y',
      ACTION_CD                VARCHAR2(1 BYTE),
      PREV_VAL_AMT             NUMBER(15,2),
      REVISE_VAL_AMT           NUMBER(15,2),
      PREV_VAL_TEXT            VARCHAR2(100 BYTE),
      REVISE_VAL_TEXT          VARCHAR2(100 BYTE),
      DISPLAY_SEQ_NBR          NUMBER(3),
      SYS_VAL_AMT              NUMBER(15,2),
      LITM_INNER_PASS_SEQ_NBR  NUMBER(3)
    Inserting data into RETURNS table
    INSERT INTO RETURNS (
    ID                  ,
    PROG_PROGRAM_CD      ,
    ACCT_ID              ,
    ACPE_ID              ,
    JENT_ID              ,
    PREV_RTRN_ID         ,
    ENTP_ABN             ,
    ACCT_OCCURNC_NBR     ,
    SOURCE_TYPE          ,
    RECEIVE_DATE         ,
    AMEND_IND            ,
    CMPLT_IND            ,
    PENALTY_OR_IND       ,
    RETURN_STATUS        ,
    STATUS_DATE          ,
    STATUS_USERID        ,
    PERIOD_START_DATE    ,
    PERIOD_END_DATE      ,
    NOTICE_STATUS        ,
    NOTICE_STATUS_DATE   ,
    NOTE_TEXT            ,
    PENALTY_OR_BY        ,
    PENALTY_OR_TMST      ,
    FILING_ID            ,
    CASE_ID              ,
    DOC_CONTRL_NBR       ,
    LOCTR_NBR            ,
    STATUTE_BARRED_DATE  ,
    MEDIA_TYPE           ,
    DISPSTN_TYPE         ,
    AMEND_TYPE           ,
    CALC_MODE            ,
    PROCESS_PASS_CNT     ,
    CONVRTD_IND          ,
    LOSS_PERIOD_END_DATE ,
    MF_SYNC_CD)          
    VALUES(
    3715944,
    '01',
    139048,
    3587419,
    9518324,
    NULL,
    401377197,
    1,
    'TAXPAYER',
    TO_DATE('4/7/2009','mm/dd/yyyy'),
    'N',
    'Y',
    'N',
    'ASSESSED',
    TO_DATE('4/30/2009','mm/dd/yyyy'),
    'TRAPROD2',
    TO_DATE('2/1/2008','mm/dd/yyyy'),
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),
    'PRINTED',
    TO_DATE('4/30/2009'     , 'mm/dd/yyyy'),
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    6045574495,
    NULL,
    'RSI',
    'NOTICE',
    NULL,
    NULL,
    NULL,
    'N',
    NULL,
    NULL);
    NSERT INTO RETURNS (
    ID                  ,
    PROG_PROGRAM_CD      ,
    ACCT_ID              ,
    ACPE_ID              ,
    JENT_ID              ,
    PREV_RTRN_ID         ,
    ENTP_ABN             ,
    ACCT_OCCURNC_NBR     ,
    SOURCE_TYPE          ,
    RECEIVE_DATE         ,
    AMEND_IND            ,
    CMPLT_IND            ,
    PENALTY_OR_IND       ,
    RETURN_STATUS        ,
    STATUS_DATE          ,
    STATUS_USERID        ,
    PERIOD_START_DATE    ,
    PERIOD_END_DATE      ,
    NOTICE_STATUS        ,
    NOTICE_STATUS_DATE   ,
    NOTE_TEXT            ,
    PENALTY_OR_BY        ,
    PENALTY_OR_TMST      ,
    FILING_ID            ,
    CASE_ID              ,
    DOC_CONTRL_NBR       ,
    LOCTR_NBR            ,
    STATUTE_BARRED_DATE  ,
    MEDIA_TYPE           ,
    DISPSTN_TYPE         ,
    AMEND_TYPE           ,
    CALC_MODE            ,
    PROCESS_PASS_CNT     ,
    CONVRTD_IND          ,
    LOSS_PERIOD_END_DATE ,
    MF_SYNC_CD)          
    VALUES(
    4117092,
    '01',
    57794,
    3864551,
    10566221,
    NULL,
    400571410,
    1,
    'TAXPAYER',
    TO_DATE('6/30/2010', 'mm/dd/yyyy'),
    'N',
    'Y',
    'N',
    'ASSESSED',
    TO_DATE('7/27/2010','mm/dd/yyyy'),
    'TRAPROD2',
    TO_DATE('1/1/2009','mm/dd/yyyy'),
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    'PRINTED',
    TO_DATE('7/27/2010','mm/dd/yyyy'),
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    6053117120,
    NULL,
    'RSI',
    'NOTICE',
    NULL,
    NULL,
    NULL,
    'N',
    NULL,
    NULL);
    INSERT INTO RETURNS (
    ID                  ,
    PROG_PROGRAM_CD      ,
    ACCT_ID              ,
    ACPE_ID              ,
    JENT_ID              ,
    PREV_RTRN_ID         ,
    ENTP_ABN             ,
    ACCT_OCCURNC_NBR     ,
    SOURCE_TYPE          ,
    RECEIVE_DATE         ,
    AMEND_IND            ,
    CMPLT_IND            ,
    PENALTY_OR_IND       ,
    RETURN_STATUS        ,
    STATUS_DATE          ,
    STATUS_USERID        ,
    PERIOD_START_DATE    ,
    PERIOD_END_DATE      ,
    NOTICE_STATUS        ,
    NOTICE_STATUS_DATE   ,
    NOTE_TEXT            ,
    PENALTY_OR_BY        ,
    PENALTY_OR_TMST      ,
    FILING_ID            ,
    CASE_ID              ,
    DOC_CONTRL_NBR       ,
    LOCTR_NBR            ,
    STATUTE_BARRED_DATE  ,
    MEDIA_TYPE           ,
    DISPSTN_TYPE         ,
    AMEND_TYPE           ,
    CALC_MODE            ,
    PROCESS_PASS_CNT     ,
    CONVRTD_IND          ,
    LOSS_PERIOD_END_DATE ,
    MF_SYNC_CD)          
    VALUES(
    4382179,
    '01',
    498210,
    3957251,
    11264174,
    3727534,
    405079963,
    1,
    'TAXPAYER',
    TO_DATE('4/26/2011', 'mm/dd/yyyy'),
    'Y',
    'Y',
    'N',
    'ASSESSED',
    TO_DATE('5/12/2011','mm/dd/yyyy'),
    'LOPATS',
    TO_DATE('2/1/2008', 'mm/dd/yyyy'),
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    'PRINTED',
    TO_DATE('5/12/2011','mm/dd/yyyy'),
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    NULL,
    6058767341,
    TO_DATE('4/30/2015','mm/dd/yyyy'),
    'RSI',
    'NOTICE',
    'LOSS CARRY BACK (SIMPLE)',
    'LOSS CARRY BACK',
    NULL,
    'N',
    TO_DATE('1/31/2011', 'mm/dd/yyyy'),
    NULL
    Now inserting data into 2nd table i.e. RETURN_LINE_ITEMS
    RTRN_ID means RETURN ID
    This is for RTRN_ID =3715944
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES(
    277707088,
    8022477,
    3715944,
    NULL,
    1585,
    401377197,
    '01',
    1,
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '029',
    23,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    1,
    1,
    NULL,
    NULL,
    115,
    1 ,
    1);
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    277707106,
    8022477,
    3715944,
    NULL,
    1603,
    401377197,
    '01',
    1,
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '062',
    40,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    1069336,
    1069336,
    NULL,
    NULL,
    200,
    1069336,
    130
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    (277707109,
    8022477,
    3715944,
    NULL,
    1539,
    401377197,
    '01',
    1,
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '066',
    43,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    NULL,
    1000,
    'NULL',
    'NULL',
    215,
    1069336,
    200);Now for RTRN_ID = 4117092
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES(
    319820214,
    9028477,
    4117092,
    NULL,
    1585,
    400571410,
    '01',
    1,
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '029',
    23,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    3,
    3,
    NULL,
    NULL,
    115,
    3,
    1
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES(
    319820233,
    9028477,
    4117092,
    NULL,
    1603,
    400571410,
    '01',
    1,
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '062',
    40,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    790068,
    790068,
    NULL,
    NULL,
    200,
    790068,
    130
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    319820236,
    9028477,
    4117092,
    NULL,
    1539,
    400571410,
    '01',
    1,
    TO_DATE('12/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '066',
    43,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    NULL,
    790,
    NULL,
    NULL,
    215,
    790068,
    200
    Now finally for RTRN_ID = 4382179
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    348462584,
    9694297,
    4382179,
    NULL,
    1585,
    405079963,
    '01',
    1,
    TO_DATE(1/31/2009, 'mm/dd/yyyy'),
    '000'
    1998,
    1,
    1,
    '029',
    23,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    1,
    1,
    NULL,
    NULL,
    115,
    NULL,
    1
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    348462602,
    9694297,
    4382179,
    NULL,
    1603,
    405079963,
    '01',
    1,
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '062',
    40,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    672738,
    643304,
    NULL,
    NULL,
    200,
    NULL,
    130
    INSERT INTO RETURN_LINE_ITEMS (
    ID                      ,
    RTSC_ID                 ,
    RTRN_ID                 ,
    SCLI_ID                 ,
    LITM_ID                 ,
    ENTP_ABN                ,
    PROG_PROGRAM_CD         ,
    ACCT_OCCURNC_NBR        ,
    ACPE_END_DATE           ,
    SCHED_NBR               ,
    SCHD_VERSION_YR         ,
    SCHD_VERSION_NBR        ,
    RTSC_OCCUR_NBR          ,
    LITM_LINE_ITEM_NBR      ,
    SLIN_LINE_ITEM_ID       ,
    OCCUR_NBR               ,
    PREV_VAL_MOD_IND        ,
    VIABLE_IND              ,
    ACTIVE_IND              ,
    ACTION_CD               ,
    PREV_VAL_AMT            ,
    REVISE_VAL_AMT          ,
    PREV_VAL_TEXT           ,
    REVISE_VAL_TEXT         ,
    DISPLAY_SEQ_NBR         ,
    SYS_VAL_AMT             ,
    LITM_INNER_PASS_SEQ_NBR  
    VALUES
    348462605,
    9694297,
    4382179,
    NULL,
    1539,
    405079963,
    01,
    1,
    TO_DATE('1/31/2009','mm/dd/yyyy'),
    '000',
    1998,
    1,
    1,
    '066',
    43,
    1,
    'N',
    'Y',
    'Y',
    NULL,
    672738,
    643304,
    NULL,
    NULL,
    215,
    643304,
    200
    );OK. Now once this data is all inserted, comes the real problem and that is:
    a) based on the following requirements
    Requirements: Adhoc Report for Audit on CIT Income Allocation
    1. Select from the RETURNS table:
    • Id > 3600000 and
    • Prog_program_cd = '01' and
    • Return_status in ('ASSESSED', 'DU") and
    • Tax year ending in 2009 (i.e. year portion of the Period_end_date is in 2009)
    2. Retrieve the following fields from the RETURNS table :
    • Id
    • Entp_abn
    • Acct_id
    • Prog_program_cd
    • Period_start_date
    • Period_end_date
    • Amend_ind
    • Return_status
    • Status_date
    • Loctr_nbr
    3. If there are multiple entries from the same account and tax year, only retain the latest record: From the records selected in step 2, if there are multiple records with the same Acct_Id and Period_end_date, only retain the record with the most recent Status_date (i.e. MAX value on the date).
    4. Using the results from step 3, link to the applicable RETURN_LINE_ITEMS table where:
    • RETURNS.Id = RETURN_LINE_ITEMS.Rtrn_Id
    5. From the selected return on RETURN_LINE_ITEMS table, retrieve records where (value on Sch 000 Line 062 > 500,000) and (value on Sch 000 Line 066 < value on Sch 000 Line 062) :
    • Sched_nbr = '000', and Litm_line_item_nbr = '062', and Active_ind = 'Y', get Revise_val_amt as 'ab_taxable_income'
    • Sched_nbr = '000', and Litm_line_item_nbr = '066', and Active_ind = 'Y', get Revise_val_amt as 'amt_taxable_in_ab'
    • Retain the return only if (ab_taxable_income > 500,000) and (amt_taxable_in_ab < ab_taxable_income)
    I utilized the following query and I am getting 4 rows (line item numbers 062 and 066 where in ab_taxable_income > 500,000) and (amt_taxable_in_ab < ab_taxable_income) and this is correct
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB
    from returns r1, return_line_items rtlnms
    where
    r1.id = rtlnms.rtrn_id and
    r1.prog_program_cd = rtlnms.prog_program_cd and
    r1.entp_abn = rtlnms.entp_abn and
    r1.id > 3600000 AND r1.prog_program_cd = '01' AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('062')
    AND nvl(decode(litm_line_item_nbr, '062',  REVISE_VAL_AMT),0) > 500000
    and NVL(RTLNMS.REVISE_VAL_AMT,0) >( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR = '066'
                                                           AND SCHED_NBR='000'
    UNION
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB
    from returns r1, return_line_items rtlnms
    where r1.id = rtlnms.rtrn_id
    AND r1.prog_program_cd = rtlnms.prog_program_cd
    AND r1.entp_abn = rtlnms.entp_abn
    AND r1.id > 3600000 AND r1.prog_program_cd = '01'
    AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('066')
    and NVL(RTLNMS.REVISE_VAL_AMT,0) <( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR = '062'
                                                           and  NVL(RTLNMS2.REVISE_VAL_AMT,0)>500000
                                                           AND SCHED_NBR='000'
    order by IDHowever there is another condition after "5c" i.e. after Retain the return only if (ab_taxable_income > 500,000) and (amt_taxable_in_ab < ab_taxable_income)
    and that is:
    For those returns meeting the criteria in step 5, also retrieve the following from RETURN_LINE_ITEMS table and that is:
    sched_nbr = '000' and Litm_line_item_nbr = '029' and ACTIVE_IND ='Y', get Revise_val_amt as "corp_type"
    and in order to go about this, I utilised the following query:
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB,
    decode(rtlnms.litm_line_item_nbr, '029',  RTLNMS.REVISE_VAL_AMT)CORP_INCOME
    from returns r1, return_line_items rtlnms
    where
    r1.id = rtlnms.rtrn_id and
    r1.prog_program_cd = rtlnms.prog_program_cd and
    r1.entp_abn = rtlnms.entp_abn and
    r1.id > 3600000 AND r1.prog_program_cd = '01' AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('062')
    AND nvl(decode(litm_line_item_nbr, '062',  REVISE_VAL_AMT),0) > 500000
    and NVL(RTLNMS.REVISE_VAL_AMT,0) >( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR IN( '066')
                                                           AND SCHED_NBR='000'
    UNION
    SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd, r1.period_start_date, r1.period_end_Date, r1.amend_ind, r1.return_status, r1.status_date, r1.loctr_nbr,
    rtlnms.sched_nbr, rtlnms.litm_line_item_nbr,
    decode(rtlnms.litm_line_item_nbr, '062',  RTLNMS.REVISE_VAL_AMT)AB_TAXABLE_INCOME,
    decode(rtlnms.litm_line_item_nbr, '066',  RTLNMS.REVISE_VAL_AMT)AMT_TAXABLE_IN_AB,
    decode(rtlnms.litm_line_item_nbr, '029',  RTLNMS.REVISE_VAL_AMT)CORP_INCOME
    from returns r1, return_line_items rtlnms
    where r1.id = rtlnms.rtrn_id
    AND r1.prog_program_cd = rtlnms.prog_program_cd
    AND r1.entp_abn = rtlnms.entp_abn
    AND r1.id > 3600000 AND r1.prog_program_cd = '01'
    AND r1.return_status in ('ASSESSED', 'DU')
    and r1.period_end_Date between to_date('01-01-2009','DD-mm-YYYY') and to_date ('31-12-2009', 'DD-mm-YYYY')
    and r1.status_date = (select max (status_date) from returns r2 where r2. acct_id= r1.acct_id and r2.period_end_date = r1.period_end_date)
    and rtlnms.sched_nbr = '000'
    and rtlnms.active_ind = 'Y'
    and r1.id in (4117092,3715944,4382179,3691435)
    and RTLNMS.LITM_LINE_ITEM_NBR IN('066','029')
    and NVL(RTLNMS.REVISE_VAL_AMT,0) <  ( select NVL(RTLNMS2.REVISE_VAL_AMT,0)
                                                           FROM RETURN_LINE_ITEMS RTLNMS2 
                                                           WHERE RTLNMS2.RTRN_ID=RTLNMS.RTRN_ID
                                                           AND  RTLNMS2.LITM_LINE_ITEM_NBR='062'
                                                           and  NVL(RTLNMS2.REVISE_VAL_AMT,0)>500000
                                                             AND SCHED_NBR='000'
    order by ID                                                          
    My output is: 7 rows i.e.
    3 rows of return id = 3715944,
    3 rows of return id = 4117092
    and 1 row of return id = 4382179
    It should only retrieve rows for 3715944 and 4117092; not for row =4382179 and this is because based on question in 5 "c", rows retrieved were for return ids' = 3715944 and 4117092
    I know where the problem is:
    As soon as it retrieves rows for returns 3715944 and 4117092 (because REVISE_VAL_AMT is greater than 500,000), it also finds another record with return id = 4382179 with greater than 500,000 and it blindly brings that as well.
    Is there a way around to ensure that I my results are compared only against the return id's retrieved from 5 "c" = 3715944 and 4117092
    Believe me I have tried every option that I could think of to remove return id = 4382179 but somehow could not.
    Dear Gurus @ OTN, please help me.
    Thanks,
    Sandeep

    Thanks for your words of wisdom guys. Appreciate it.
    Anyways what ever I asked, I was able to get solution for it by using an inline query and it's as follows:
    SELECT id, entp_abn, acct_id, prog_program_cd, period_start_date,                 
             period_end_date, amend_ind, return_status, status_date, loctr_nbr,           
             ab_taxable_income, amt_taxable_in_ab                                         
    FROM   (SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,                
                  r1.period_start_date, r1.period_end_date, r1.amend_ind,                    
                  r1.return_status, r1.status_date, r1.loctr_nbr,                            
                  SUM                                                                        
                    (DECODE                                                                  
                   (rtlnms.litm_line_item_nbr,                                                  
                    '062', rtlnms.revise_val_amt)) ab_taxable_income,                           
                  SUM                                                                        
                    (DECODE                                                                  
                   (rtlnms.litm_line_item_nbr,                                                  
                    '066', rtlnms.revise_val_amt)) amt_taxable_in_ab                            
              FROM   returns r1, return_line_items rtlnms                                 
              WHERE  r1.id = rtlnms.rtrn_id                                               
              AND    r1.id > 3600000                                                      
              AND    r1.prog_program_cd = '01'                                            
              AND    r1.return_status IN ('ASSESSED', 'DU')                               
              AND    r1.period_end_date BETWEEN                                           
                  TO_DATE ('01-01-2009', 'DD-MM-YYYY') AND                                   
                  TO_DATE ('31-12-2009', 'DD-MM-YYYY')                                       
              AND    rtlnms.sched_nbr = '000'                                             
              AND    rtlnms.active_ind = 'Y'                                              
              AND    r1.status_date =                                                     
                  (SELECT MAX (status_date)                                                  
                   FROM   returns r2                                                         
                   WHERE  r2. acct_id= r1.acct_id                                            
                   AND    r2.period_end_date = r1.period_end_date)                           
              GROUP  BY r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,               
                     r1.period_start_date, r1.period_end_date, r1.amend_ind,                 
                     r1.return_status, r1.status_date, r1.loctr_nbr)                         
    WHERE  ab_taxable_income > 500000                                                 
    AND    amt_taxable_in_ab < ab_taxable_income                                      
    ORDER  BY id                                                                      
    *OUTPUT*
            ID   ENTP_ABN    ACCT_ID PR PERIOD_ST PERIOD_EN A RETURN_STATU STATUS_DA  LOCTR_NBR AB_TAXABLE_INCOME AMT_TAXABLE_IN_AB
       3715944  401377197     139048 01 01-FEB-08 31-JAN-09 N ASSESSED     30-APR-09 6045574495           1069336              1000
       4117092  400571410      57794 01 01-JAN-09 31-DEC-09 N ASSESSED     27-JUL-10 6053117120            790068               790
    2 rows selected.Anyways I am stuck in another issue and that is:
    Based on what I have received above - I have been given a new requirement and that is:
    retrieve the corresponding Schedule 002 data (if exist) from the RETURN_LINE_ITEMS table:
    *•     Sched_nbr = ‘002’, and Litm_line_item_nbr = ‘001’, and Active_ind = ‘Y’, get Revise_val_amt as ‘special_allocation’*
    *•     Sched_nbr = ‘002’, and Litm_line_item_nbr = ‘002’, and Active_ind = ‘Y’, get Revise_val_amt as ‘ab_salaries_wages’*
    So in order to do this, I committed 5 additional rows with schedule number 002 and they are as follows:
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '001',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '002',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '004',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '006',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    INSERT INTO RETURN_LINE_ITEMS (                
    ID                      ,                      
    RTSC_ID                 ,                      
    RTRN_ID                 ,                      
    SCLI_ID                 ,                      
    LITM_ID                 ,                      
    ENTP_ABN                ,                      
    PROG_PROGRAM_CD         ,                      
    ACCT_OCCURNC_NBR        ,                      
    ACPE_END_DATE           ,                      
    SCHED_NBR               ,                      
    SCHD_VERSION_YR         ,                      
    SCHD_VERSION_NBR        ,                      
    RTSC_OCCUR_NBR          ,                      
    LITM_LINE_ITEM_NBR      ,                      
    SLIN_LINE_ITEM_ID       ,                      
    OCCUR_NBR               ,                      
    PREV_VAL_MOD_IND        ,                      
    VIABLE_IND              ,                      
    ACTIVE_IND              ,                      
    ACTION_CD               ,                      
    PREV_VAL_AMT            ,                      
    REVISE_VAL_AMT          ,                      
    PREV_VAL_TEXT           ,                      
    REVISE_VAL_TEXT         ,                      
    DISPLAY_SEQ_NBR         ,                      
    SYS_VAL_AMT             ,                      
    LITM_INNER_PASS_SEQ_NBR                        
    VALUES                                         
    626121,                                        
    118320,                                        
    3715944,                                       
    NULL,                                          
    2322,                                          
    401377197,                                     
    '01',                                          
    1,                                             
    TO_DATE('1/31/2009', 'mm/dd/yyyy'),            
    '002',                                         
    1981,                                          
    1,                                             
    1,                                             
    '008',                                         
    78,                                            
    1,                                             
    'N',                                           
    'Y',                                           
    'Y',                                           
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    NULL,                                          
    5,                                             
    NULL,                                          
    40                                             
    );                                              So based on the requirement I ran the following query in the hope that I should see 8 records but unfortunately I saw none, Can any one help again please??? The query is as follows:
    SELECT id, entp_abn, acct_id, prog_program_cd, period_start_date,      
              period_end_date, amend_ind, return_status, status_date, loctr_nbr,         
              ab_taxable_income, amt_taxable_in_ab,
              CORP_INCOME, AB_ALLOC_FACTOR, AB_TAX_PAYABLE,
              special_allocation, ab_salaries_wages
      FROM   (SELECT r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,              
                  r1.period_start_date, r1.period_end_date, r1.amend_ind,                  
                  r1.return_status, r1.status_date, r1.loctr_nbr,            
                  SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '062', rtlnms.revise_val_amt)) ab_taxable_income,                         
                  SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '066', rtlnms.revise_val_amt)) amt_taxable_in_ab,
                     SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '029', rtlnms.revise_val_amt)) CORP_INCOME,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '065', rtlnms.revise_val_amt)) AB_ALLOC_FACTOR,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '080', rtlnms.revise_val_amt)) AB_TAX_PAYABLE,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '001', rtlnms.revise_val_amt)) SPECIAL_ALLOCATION,
                   SUM                                                                      
                    (DECODE                                                                
                  (rtlnms.litm_line_item_nbr,                                                
                   '002', rtlnms.revise_val_amt)) AB_SALARIES_WAGES
                  FROM   returns r1, return_line_items rtlnms                               
               WHERE  r1.id = rtlnms.rtrn_id                                                     
               AND    r1.id > 3600000                                                    
               AND    r1.prog_program_cd = '01'                                          
               AND    r1.return_status IN ('ASSESSED', 'DU')                             
               AND    r1.period_end_date BETWEEN                                         
                  TO_DATE ('01-01-2009', 'DD-MM-YYYY') AND                                 
                  TO_DATE ('31-12-2009', 'DD-MM-YYYY')                                     
               AND    rtlnms.sched_nbr = '000' 
               AND(rtlnms.sched_nbr = '002' and rtlnms.litm_line_item_nbr in ('001','002','004','006','008') )                                        
               AND    rtlnms.active_ind = 'Y' 
               AND    r1.status_date =                                                   
                  (SELECT MAX (status_date)                                                
                   FROM   returns r2                                                       
                   WHERE  r2. acct_id= r1.acct_id                                          
                   AND    r2.period_end_date = r1.period_end_date)          
               GROUP  BY r1.id, r1.entp_abn, r1.acct_id, r1.prog_program_cd,             
                     r1.period_start_date, r1.period_end_date, r1.amend_ind,               
                     r1.return_status, r1.status_date, r1.loctr_nbr, rtlnms.sched_nbr)
      WHERE  ab_taxable_income > 500000                                               
      AND    amt_taxable_in_ab < ab_taxable_income 
    strangely it's not retrieving any row where as it should have retrieved one row atleast and that is all records pertaining to return_id (return id ) = 3715944
    Can any of the Gurus' please help me out? As said I am really having a bad day on this. Many thanks to any one who can help me see the light today :-)

  • Ad Hoc Query Data Issue for Position Based Infoset

    Experts,
    I've created an infoset that is based on the S object using the PCH database.  For this infoset, I've included several infotypes with focus on 1000, 1001, and 1028.  I've included the Address infotype (1028) as this is where we store our work location information.  For some reason though when I attempt to pull information from 1028, specifically the House Number and Street field, the Postal Code field, and the City field.
    For some reason though, no data is being returned in those fields.  I've verified for the position (in PP01) that I'm querying on that the data is maintained in 1028, and I've verified that I'm attempting to report on the correct fields by verifying the field technical names I'm pulling in the Ad Hoc Query with those I know have data stored in them on the infotype for the specific position.
    Would anyone have any guidance on what could be happening here or what I might need to adjust to be able to pull this data?
    Thanks in advance for your time and help.
    Best Regards,
    Joe

    To add some further clarity to this item, the Address infotype on the Position (S) object is pulling from a dropdown of selectable Buildings.  If unfamiliar, the Building drop is populated by configuration data from the IMG.  The fields that are populated then in the Address infotype actually come then from the Building entries and are simply populated onto IT1028 (address) depending on which Building is selected.
    I think this is what it occuring then when I select the fields from the Address infotype and I see nothing populated in the Ad Hoc query since the field information is not actually stored in IT1028 but on in the Building entry.
    Has anyone else experiencing this particular problem?  If so, have you found a solution?
    Regards,
    Joe

  • Ad-hoc wireless network issues

    I'm running a WiFi Ad-hoc network from my laptop, which runs Windows Vista. It is password protected, I have connected successfully to it, and Internet sharing is turned on for the network. However, when I am connected, the WiFi symbol does not come on and still gets data from Edge. Any idea on how to fix this?
    When I connect to other wireless routers, it works just fine. But not when it connects to my laptop.

    Hi Dave,
    I haven't seen anybody able to use WPA with ICS yet, Mac to Mac anyway, and only WEP as of recent.
    ASCII passwords may need to be enclosed in quote marks, (or maybe that's been fixed!?
    http://docs.info.apple.com/article.html?artnum=106424
    Recent Security updates to Windows® require that the Remote User(s) be setup on the PC first.
    http://www.ifelix.co.uk/tech/3020.html
    Also, you may need to alter the PC to enable clear text password in windows XP.

Maybe you are looking for

  • Report of daywise Material/Vendor closing stock

    Dear Friends, there is a requirement of stock report of closing stocks for each day in a month. Suppose a month has 31 days then the report will show 31 lines for each day closing stock in one go for a single material. Similar to vendor also. If we s

  • Having problem connecting objects in new keynote.

    I used to do it in old version but not possible anymore. What shall I do?

  • Playing movies on ipod w/ 30gb

    I got the iPod video with 30 GB yesturday and I downloaded the movie "10 things I hate about you" onto it. When I went to watch it I heard the sound but I didn't see the images that are kind of necessary to watch a movie you know?! All I saw was the

  • HP Deskjet F4272 - not responding

    My printer (Deskjet F4272) is not responding when I send a document to be printed. The "resume" light is flashing and there is an "E" displayed on the printer but I have looked inside very thoroughly and can't find any obstructions. When I press the

  • Need to know the functionality of EASIM

    Hi Experts, Can anyone tell me the functionlaity of simulation workbench (EASIM)? I cant change the rate category or rate type  whilst simulating the bill by EASIM. I have to find out the simulated bill amount for the following scenarios. 1. Currentl