Need to display date result but has to exclude sat & sun day

Hi all,
I need to display date (A), from the plan date (B) for qty more than 10, but the result of A, should be B -10 and should not include sat & sunday.
I managed to do in excel but I have problem in oracle sql here.
My quote in excel, =IF(qty<=10, WORKDAY(plan_date,-5), WORKDAY(plan_date,-10))
If qty=12, plan_date is 30/05/11, the result is 16/05/11
qty=2, plan_date is 30/05/11, the result is 23/05/11
Anyone can help me to quote in SQL ?
Thanks.
Lim

CREATE OR REPLACE FUNCTION GOKHAN.business_date (start_date DATE, days NUMBER)
   RETURN DATE
IS
   counter  number := 0;
   curdate DATE:= start_date;
BEGIN
   WHILE counter < days
   LOOP
      curdate := curdate  - 1;
      IF TO_CHAR (curdate, 'D') BETWEEN 1 AND 5
      THEN
         dbms_output.put_line( curdate || ' ' || TO_CHAR (curdate, 'D'));
         counter := counter + 1;
      END IF;
   END LOOP;
   RETURN curdate;
END;
with t as (
select to_date('30/05/11','DD/MM/YY' ) plan_date, 12 qty from dual
union all
select to_date('30/05/11','DD/MM/YY' ) , 2  from dual
select qty, case when qty <= 10 then business_date( plan_date, 5 ) else business_date( plan_date, 10 ) end plan_date from t;
       QTY PLAN_DATE
        12 16/05/2011
         2 23/05/2011Best Regards,
Gokhan Atil
If this question is answered, please mark appropriate posts as correct/helpful and the thread as closed. Thanks

Similar Messages

  • What cables do I need to connect my 2013 macbook pro to my HD tv? I know I need mini display to HDMI, but male? female HDMI??? and also, do I need a separate cable for sound?

    what cables do I need to connect my 2013 macbook pro to my HD tv? I know I need mini display to HDMI, but male? female HDMI??? and also, do I need a separate cable for sound?

    Actually you need a Thunderbolt to HDMI adapter. It will carry both audio and video.
    This one will work: Mini DisplayPort | Thunderbolt® to HDMI® Adapter w/ Audio Support

  • Need to display data from one group while in another repeating group

    I have a repeating group in my .rft file which displays line level data that has a quote number in it.
    At the end of this repeating group I need to display the total for the quote number but these values are in another group that's within a differnt group higher up in the XML tree. Both of the groups have quote number so there is a link between the two. How do I do this? When I add the "higher up" repeating group within the current group I can't get any data to show. Any help would be appreciated.
    Kind Regards

    Here's the data, I do know how to to move up the tree like a file system but I think my problem is I need to move up the tree and repeat based on the value (quote number) of the lower node.
    For instance for each quote number in repeating group G_FORX_OPS_QTE_ORDER_LINES loop through the occurances of same quote number in G_OPPCAT_BREAKDOWN so I can get a total of the fields by quote number
    This is overly simplified but it would be like this
    <?for-each-group:G_FORX_OPS_QTE_ORDER_LINES;QUOTE_NUMBER?>
    quote number 1428
    various line level data....
    various line level data....
    etc....
    -- Open loop to get data from other group (Only get data for quote 1428!!)
    <?for-each-group:/FORX_AS_OPPOR/LIST_G_OPPORTUNITY_SHEET/G_OPPORTUNITY_ID/LIST_G_OPPCAT_BREAKDOWN/G_OPPCAT_BREAKDOWN;./QUOTE_NUMBER1?>
    Total For Quote 1428
    Billing Class
    BILLABLE: Billable total in dollars
    INTERNAL: Internal total in dollars
    <?end for-each-group?>
    <!-- Generated by Oracle Reports version 6.0.8.26.0
    -->
    - <FORX_AS_OPPOR>
    - <LIST_G_OPPORTUNITY_SHEET>
    - <G_OPPORTUNITY_ID>
    <COMMENTS1>Opportunity Includes Quote Number(s): 1428-2 1443-1 1444-1 Order Number(s): 159038-10 159044-3</COMMENTS1>
    <CUSTOMER_ID>1183</CUSTOMER_ID>
    <UPDATED_BY>CTYNER</UPDATED_BY>
    <DEPOSITS>5704.68</DEPOSITS>
    <OPPORTUNITY_ID>1000216</OPPORTUNITY_ID>
    <OPPORTUNITY_NAME>1000216:UAT DEMO</OPPORTUNITY_NAME>
    <CUSTOMER_NUMBER>103736</CUSTOMER_NUMBER>
    <ENTITY>FSG</ENTITY>
    <SOLD_TO>ALLSTATE INSURANCE COMPANY</SOLD_TO>
    <CONTRACT_ID>S620_N</CONTRACT_ID>
    <SALESREP_ID>2239</SALESREP_ID>
    <SALES_REP_NAME>Conley, Michael</SALES_REP_NAME>
    <ORDER_ACCEPTANCE>Skokie</ORDER_ACCEPTANCE>
    <BOOKED_COUNT>2</BOOKED_COUNT>
    <TERRITORY_NAME>Enterprise - Enterprise</TERRITORY_NAME>
    - <LIST_G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1> First Occurence of 1428
    <INT_ITM_TYPES>HARDWARE</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>5</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>151500.4</SUM_ITM_PRICE>
    <SUM_ITM_COST>1688</SUM_ITM_COST>
    <SUM_ITM_GPM>149812.4</SUM_ITM_GPM>
    <SUM_ITM_MARKUP>88.7514218009478672985781990521327014218</SUM_ITM_MARKUP>
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1> Second Occurence of 1428
    <INT_ITM_TYPES>INVOICE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>4</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>29.72</SUM_ITM_PRICE>
    <SUM_ITM_COST>0</SUM_ITM_COST>
    <SUM_ITM_GPM>29.72</SUM_ITM_GPM>
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1443</QUOTE_NUMBER1>
    <INT_ITM_TYPES>HARDWARE</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>5</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>2084</SUM_ITM_PRICE>
    <SUM_ITM_COST>1748</SUM_ITM_COST>
    <SUM_ITM_GPM>336</SUM_ITM_GPM>
    <SUM_ITM_MARKUP>.192219679633867276887871853546910755149</SUM_ITM_MARKUP>
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1444</QUOTE_NUMBER1>
    <INT_ITM_TYPES>HARDWARE</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>4</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>1500.4</SUM_ITM_PRICE>
    <SUM_ITM_COST>1364</SUM_ITM_COST>
    <SUM_ITM_GPM>136.4</SUM_ITM_GPM>
    <SUM_ITM_MARKUP>.1</SUM_ITM_MARKUP>
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1444</QUOTE_NUMBER1>
    <INT_ITM_TYPES>INVOICE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>BILLABLE</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>4</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>66.28</SUM_ITM_PRICE>
    <SUM_ITM_COST>0</SUM_ITM_COST>
    <SUM_ITM_GPM>66.28</SUM_ITM_GPM>
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1>
    <INT_ITM_TYPES>EXPENSE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>INTERNAL</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>1</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>0</SUM_ITM_PRICE>
    <SUM_ITM_COST>22.98</SUM_ITM_COST>
    <SUM_ITM_GPM />
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1444</QUOTE_NUMBER1>
    <INT_ITM_TYPES>EXPENSE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>INTERNAL</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>1</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>0</SUM_ITM_PRICE>
    <SUM_ITM_COST>22.98</SUM_ITM_COST>
    <SUM_ITM_GPM />
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    - <G_OPPCAT_BREAKDOWN>
    <QUOTE_NUMBER1>1428</QUOTE_NUMBER1>
    <INT_ITM_TYPES>REVENUE_ADJUSTMENT</INT_ITM_TYPES>
    <OPPORTUNITY_ID3>1000216</OPPORTUNITY_ID3>
    <INT_BILLING_CLASS>INTERNAL</INT_BILLING_CLASS>
    <SUM_ITM_COUNT>1</SUM_ITM_COUNT>
    <SUM_ITM_PRICE>20</SUM_ITM_PRICE>
    <SUM_ITM_COST>101</SUM_ITM_COST>
    <SUM_ITM_GPM />
    <SUM_ITM_MARKUP />
    </G_OPPCAT_BREAKDOWN>
    </LIST_G_OPPCAT_BREAKDOWN>
    - <LIST_G_FORX_OPS_QTE_ORDER_LINES>
    - <G_FORX_OPS_QTE_ORDER_LINES>
    <ORDER_ACCEPTANCE1>SKOKIE</ORDER_ACCEPTANCE1>
    <COMMITMENT />
    <COMMITMENT_APPLIED_AMOUNT />
    <PARTIAL_COMMENTS />
    <COMMENT_FOR_INVOICE />
    <QUOTE_DATE>07/13/2009 02:00:10PM</QUOTE_DATE>
    <LINE_NUMBER>1</LINE_NUMBER>
    <EXTD_SELLING_PRICE>880</EXTD_SELLING_PRICE>
    <ORDER_PAY_TERM>Automated Term Due in 44 Days</ORDER_PAY_TERM>
    <QUOTE_PAY_TERM />
    <ITEM_CATEGORIES>HARDWARE.MACHINE.SERVER.</ITEM_CATEGORIES>
    <QUOTE_STATUS>Order Submitted</QUOTE_STATUS>
    <QUOTE_USER>Tyner, Chris</QUOTE_USER>
    <OPPORTUNITY_ID1>1000216</OPPORTUNITY_ID1>
    <DATASOURCE>1</DATASOURCE>
    <HEADER_ID>398631</HEADER_ID>
    <LINE_ID>900897</LINE_ID>
    <LINE_TYPE_ID>1181</LINE_TYPE_ID>
    <ORDER_NUMBER>159038</ORDER_NUMBER>
    <ORDER_VERSION>10</ORDER_VERSION>
    <TEAM>IBM</TEAM>
    <OPPORTUNITY_NAME1 />
    <QUOTE_NAME>1000216:IBM:UAT DEMO</QUOTE_NAME>
    <QUOTE_NUMBER>1428</QUOTE_NUMBER>
    <QUOTE_VERSION>2</QUOTE_VERSION>
    <NEW_PARTIAL>0</NEW_PARTIAL>
    <COMMIT_DEL_DATE>13-JUL-09</COMMIT_DEL_DATE>
    <ORDERED_QUANTITY>1</ORDERED_QUANTITY>
    <PO_NUMBER>098534089</PO_NUMBER>
    <GROUP_NUM>1</GROUP_NUM>
    <INVENTORY_ITEM_ID>845256</INVENTORY_ITEM_ID>
    <ORDERED_ITEM>7978BDU</ORDERED_ITEM>
    <PRODUCT>7978BDU</PRODUCT>
    <ITEM_DESCRIPTION>X3550, XEON QUAD CORE E5430 80W 2.66GHZ/1333MHZ/12MB L2, 2X1GB CHK, O/BAY 2.5IN HS SAS, SR 8K-I, PCI-E RISER CARD, ULTRABAY ENHANCED DVD-ROM/CD-RW COMBO DRIVE, 670W P/S, RACK</ITEM_DESCRIPTION>
    <MANUFACTURER_DESCRIPTION>IBM</MANUFACTURER_DESCRIPTION>
    <TYPE />
    <EQUIPMENT_CODE>B</EQUIPMENT_CODE>
    <TAX_CLASS_CODE>HW</TAX_CLASS_CODE>
    <CLS />
    <SUBINVENTORY />
    <UNIT_LIST_PRICE>0</UNIT_LIST_PRICE>
    <ITEM_UNIT_COST>800</ITEM_UNIT_COST>
    <VENDOR_INVENTORY_RETURN />
    <SHIPPING_TYPE />
    <SHIPPING_ORG>DSP</SHIPPING_ORG>
    <SOLD_TO1>ALLSTATE INSURANCE COMPANY</SOLD_TO1>
    <SOLD_TO_ACCOUNT_NUMBER>103736</SOLD_TO_ACCOUNT_NUMBER>
    <INVOICE_TO_LOCATION>10110384</INVOICE_TO_LOCATION>
    <INVOICE_TO>ALLSTATE INSURANCE COMPANY</INVOICE_TO>
    <INVOICE_TO_ACCOUNT_NUMBER>103736</INVOICE_TO_ACCOUNT_NUMBER>
    <INVOICE_TO_ADDRESS1>2775 SANDERS RD</INVOICE_TO_ADDRESS1>
    <INVOICE_TO_ADDRESS2 />
    <INVOICE_TO_ADDRESS3 />
    <INVOICE_TO_ADDRESS4 />
    <INVOICE_TO_EMAIL />
    <INVOICE_TO_PHONE_NUMBER>847-402-0223</INVOICE_TO_PHONE_NUMBER>
    <INVOICE_TO_ADDRESS5>NORTHBROOK, IL, 60062-6110, US</INVOICE_TO_ADDRESS5>
    <INVOICE_TO_CONTACT>CRAIG SOCKEL</INVOICE_TO_CONTACT>
    <L_INVOICE_TO_LOCATION>10110384</L_INVOICE_TO_LOCATION>
    <L_INVOICE_TO_ACCOUNT_NUMBER>103736</L_INVOICE_TO_ACCOUNT_NUMBER>
    <L_INVOICE_TO>ALLSTATE INSURANCE COMPANY</L_INVOICE_TO>
    <L_INVOICE_TO_ADDRESS1>2775 SANDERS RD</L_INVOICE_TO_ADDRESS1>
    <L_INVOICE_TO_ADDRESS2 />
    <L_INVOICE_TO_ADDRESS3 />
    <L_INVOICE_TO_ADDRESS4 />
    <L_INVOICE_TO_EMAIL />
    <L_INVOICE_TO_PHONE_NUMBER>847-402-0223</L_INVOICE_TO_PHONE_NUMBER>
    <L_INVOICE_TO_ADDRESS5>NORTHBROOK, IL, 60062-6110, US</L_INVOICE_TO_ADDRESS5>
    <L_INVOICE_TO_CONTACT>CRAIG SOCKEL</L_INVOICE_TO_CONTACT>
    <SHIP_TO_ACCOUNT_NUMBER>103736</SHIP_TO_ACCOUNT_NUMBER>
    <SHIP_TO>ALLSTATE INSURANCE COMPANY</SHIP_TO>
    <SHIP_TO_LOCATION>10271260</SHIP_TO_LOCATION>
    <SHIP_TO_ADDRESS1>3075 SANDERS RD STE 12C</SHIP_TO_ADDRESS1>
    <SHIP_TO_ADDRESS2 />
    <SHIP_TO_ADDRESS3 />
    <SHIP_TO_ADDRESS4 />
    <SHIP_TO_ADDRESS>NORTHBROOK, IL, 60062-7119, US</SHIP_TO_ADDRESS>
    <SHIP_EMAIL>[email protected]</SHIP_EMAIL>
    <SHIP_TO_PHONE_NUMBER>847-402-0223</SHIP_TO_PHONE_NUMBER>
    <SHIP_TO_CONTACT>ORLANDO LOPEZ</SHIP_TO_CONTACT>
    <L_SHIP_TO_ACCOUNT_NUMBER>103736</L_SHIP_TO_ACCOUNT_NUMBER>
    <L_SHIP_TO>ALLSTATE INSURANCE COMPANY</L_SHIP_TO>
    <L_SHIP_TO_LOCATION>10271260</L_SHIP_TO_LOCATION>
    <L_SHIP_TO_ADDRESS1>3075 SANDERS RD STE 12C</L_SHIP_TO_ADDRESS1>
    <L_SHIP_TO_ADDRESS2 />
    <L_SHIP_TO_ADDRESS3 />
    <L_SHIP_TO_ADDRESS4 />
    <L_SHIP_TO_ADDRESS>NORTHBROOK, IL, 60062-7119, US</L_SHIP_TO_ADDRESS>
    <L_SHIP_EMAIL>[email protected]</L_SHIP_EMAIL>
    <L_SHIP_TO_PHONE_NUMBER>847-402-0223</L_SHIP_TO_PHONE_NUMBER>
    <L_SHIP_TO_CONTACT>ORLANDO LOPEZ</L_SHIP_TO_CONTACT>
    <DEL_TO_ACCOUNT_NUMBER>103736</DEL_TO_ACCOUNT_NUMBER>
    <DEL_TO>ALLSTATE INSURANCE COMPANY</DEL_TO>
    <DEL_TO_LOCATION>10110327</DEL_TO_LOCATION>
    <DEL_TO_ADDRESS1>3075 SANDERS RD</DEL_TO_ADDRESS1>
    <DEL_TO_ADDRESS2 />
    <DEL_TO_ADDRESS3 />
    <DEL_TO_ADDRESS4 />
    <DEL_TO_ADDRESS>NORTHBROOK, IL, 60062-7119, US</DEL_TO_ADDRESS>
    <DEL_TO_EMAIL />
    <DEL_TO_PHONE_NUMBER>847-402-0223</DEL_TO_PHONE_NUMBER>
    <DEL_TO_CONTACT />
    <UNIT_SELLING_PRICE>880</UNIT_SELLING_PRICE>
    <BILL_TO_LAST_UPDATE>21/04/2009 02:25:18PM</BILL_TO_LAST_UPDATE>
    <SHIP_TO_LAST_UPDATE>13/07/2009 01:31:45PM</SHIP_TO_LAST_UPDATE>
    <BILL_TO_UPDATED_BY>SLUMPP</BILL_TO_UPDATED_BY>
    <SHIP_TO_UPDATED_BY>CTYNER</SHIP_TO_UPDATED_BY>
    <ORDER_QUOTE_USER>CTYNER</ORDER_QUOTE_USER>
    <PARTICIPANTS>Conley, Michael Order:159044 100% and Conley, Michael Order:159038 100% and Conley, Michael Quote:1443 50% and Jones, Maureen Quote:1443 50%</PARTICIPANTS>
    <ORDERED_DATE>07/13/2009 02:23:23PM</ORDERED_DATE>
    <BOOKED_DATE>07/13/2009 02:31:15PM</BOOKED_DATE>
    <ORDER_QUOTE_STATUS>BOOKED</ORDER_QUOTE_STATUS>
    <ORDER_USER_STATUS>RE-BOOK REQD</ORDER_USER_STATUS>
    <BUYER>Tyner, Chris</BUYER>
    <SERIAL_NUM>45784687</SERIAL_NUM>
    <INVOICE_HANDLING_FORMAT_VALUE />
    <INVOICE_HANDLING_FORMAT />
    <PRINT_TRADE_NAME_VALUE>No</PRINT_TRADE_NAME_VALUE>
    <ITEM_EXTD_COST>800</ITEM_EXTD_COST>
    <QUOTE_APPROVERS>Tyner, Chris</QUOTE_APPROVERS>
    </G_FORX_OPS_QTE_ORDER_LINES>

  • Need to Display Data for Cummulated to Current Day of Current Fiscal Year

    We use fiscal variant V3 (April-March).  My need is to display data automatically from first of fiscal period (April 1 2006) to today.
    I tried using 0CYTCD on Calendar Day but this works only for the current calendar year that the system is in  i.e 2007.
    Is there a standard variable I can use on 0CALDAY so I always get data from day one of current fiscal year/period to today? e.g. April 1, 2006 to January 3, 2007
    If not, can someone please help with the exact customer exit code that I would need to write in CMOD in BW?
    Thanks a ton!

    I thought of using 0FYTCD variable, but I cannot find it in the business content.
    Has anyone used 0FYTCD (Fiscal year to current day) in BW 3.1 SP25?
    Again, I am looking for a variable that would get me the beginning of fiscal year to today.
    Thanks.

  • BAPI/FM to display data(result) in spool

    Hi all,
    I am using bapi BAPI_REQUISITION_DELETE to set deletion flag of PR.
    Here all the error messages are captured and i need to display that resulttant error data in spool.
    How can I dispaly resultant error message captured by BAPI in Spool.
    Is there a FM/BAPI  or i shld be using Simple write statement.

    Hi Sachin,
       Check with the simple write statement.
       If you run this report program in back ground job, then this  
       should work.
       If it doens't work, there are few class methods to handle this.
    Regards,
    Dinakar.

  • I need to display date field as ..

    hi
    i need to display a field in format yyyy-mm-dd as ( char 10)
    i am able to display as yyyymmdd by declaring as char but how to include - in between
    display is needed both in ALv output and also in text file geneartion on server.

    Hi
    - File
    U can use WRITE statament for the file:
    PARAMETERS: P_DATE(8) DEFAULT SY-DATUM.
    DATA: DATE_OUT(10).
    START-OF-SELECTION.
      WRITE P_DATE USING EDIT MASK '____-__-__'  TO DATE_OUT.
    - ALV:
    The catalog table should have a field to indicate the mask, you can insert a musk like above.
    Max

  • Need to display data on the right side in the header area of alv report.

    hi experts,
                       I want to display data in the header area of alv report on the right side  . I have already used function for events on the header side data is getting displayed on the left side .but i want data to be displayed on the right side.
    regards,
    andrews.

    Hi,
    Hope this below code helps you.
    Take care,
    Çağatay.
    * build header for alv
    FORM top_of_page_split USING r_top TYPE REF TO cl_dd_document.
    DATA: s_tab TYPE sdydo_text_table,
          c_area TYPE REF TO cl_dd_area,
          text TYPE sdydo_text_element.
    TYPES: BEGIN OF tab_text,
    text TYPE sdydo_text_element,
    END OF tab_text.
    DATA: i_text TYPE TABLE OF tab_text.
    DATA: w_text TYPE tab_text.
    CALL METHOD r_top->initialize_document.
    CALL METHOD r_top->vertical_split
    EXPORTING
    split_area = r_top
    split_width = '70%'
    IMPORTING
    right_area = c_area.
    CONCATENATE sy-datum+4(2)
    sy-datum+6(2)
    sy-datum(4)
    INTO date1.
    CONCATENATE 'DATE'  date1
    INTO w_text-text
    SEPARATED BY ':'.
    APPEND w_text TO i_text.
    CONCATENATE 'time:' sy-uzeit INTO w_text .
    APPEND w_text TO i_text.
    CONCATENATE 'uesr:' sy-uname INTO w_text .
    APPEND w_text TO i_text.
    CONCATENATE 'local date:' sy-datlo INTO w_text .
    APPEND w_text TO i_text.
    CONCATENATE 'time zone:' sy-zonlo INTO w_text .
    APPEND w_text TO i_text.
    s_tab[] = i_text[].
    CALL METHOD c_area->add_text
    EXPORTING
    text_table = s_tab
    fix_lines = 'X'
    sap_fontsize = cl_dd_document=>medium
    sap_emphasis = cl_dd_document=>strong.
    CALL METHOD r_top->add_gap
    EXPORTING
    width = 60.
    text = 'THIS IS REPORT HEADING'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'STRONG'.
    CALL METHOD r_top->new_line.
    CALL METHOD r_top->add_gap
    EXPORTING
    width = 70.
    text = 'THIS IS REPORT HEADING1'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'STRONG'.
    CALL METHOD r_top->new_line.
    CALL METHOD r_top->add_gap
    EXPORTING
    width = 80.
    text = 'THIS IS REPORT HEADING2'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'STRONG'.
    CALL METHOD r_top->new_line.
    text = 'Report Subheading1'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'NORMAL'.
    CALL METHOD r_top->new_line.
    text = 'Report Subheading2'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'NORMAL'.
    CALL METHOD r_top->new_line.
    text = 'Report Subheading3'.
    CALL METHOD r_top->add_text
    EXPORTING
    text = text
    sap_emphasis = 'NORMAL'.
    CALL METHOD r_top->new_line.
    ENDFORM. "TOP_OF_PAGE_SPLIT

  • Urgent: Removal of sat/sun days from the sql date query

    Hi All,
    I have a date field in my database table and I would like to get the details from the db table for the condition (SYSDATE - I/PDATE)< 2 i.e I need all the details which are 2 days old. But with this condition I would like to exclude the saturdays and sundays.
    Say if I am running this query on wednesday then it returns me the details for sat/sun which I do not want. It sould return me the thursday and friday details.
    My question can we this in SQL??? Can anybody help me??
    Thanks and regards,
    Kshitij

    refer to http://technet.oracle.com:89/ubb/Forum88/HTML/002539.html

  • Need help displaying data in text field... Help?

    i have this code:
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import com.adobe.serialization.json.JSON;
    var loader:URLLoader = new URLLoader(new URLRequest("https://api.twitter.com/1/statuses/user_timeline.json?screen_name=ScottMitchell"));
    loader.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(e:Event):void {
        processData(e.target.data);
    function processData(data:String):void {
        var tweets:Array = JSON.decode(data) as Array;
        trace(tweets[0].text);
    It works, in the output it tells me the tweets.
    but i need it to be displyed on the app, i need to no how to do this, someone pointed me in the direction of using a item renderer extended from sprite?
    But really all i need to do is display it in a text field, all i want to do is display the data.
    Can anyone help???
    I know this is probably simple and i did try to figure this out on my own, but had no luck.
    All help is appreciated.
    Many thanks in advance.

    you can always use an array if there's no pattern to your positions:
    var positionA:Array=[ [100,20], [2,222], [55,2], [201,111], [78,23] ];
    import flash.net.URLLoader;
    import flash.net.URLRequest;
    import flash.events.Event;
    import com.adobe.serialization.json.JSON;
    var loader:URLLoader = new URLLoader(new URLRequest("https://api.twitter.com/1/statuses/user_timeline.json?screen_name=ScottMitchell"));
    loader.addEventListener(Event.COMPLETE, loadComplete);
    function loadComplete(e:Event):void {
        processData(e.target.data);
    function processData(data:String):void {
        var tweets:Array = JSON.decode(data) as Array;
    for(var i:int=0;i<5;i++){
    var tf:TextField=new TextField();
    addChild(tf);
    tf.multiline=true;
    tf.width=300;
    tf.text =   tweets[i].text;
    tf.autoSize="left";
    tf.x=positionA[i][0];
    tf.y=positionA[i][1];
    nextY+=tf.height;

  • Need to display "Calendar Month/Year" at report level from Calendar Day

    Hello Experts,
    I have a scenario in which I have 0CALDAY (e.g. 01.01.2009) along with other fields available in my report. My requirement is to display "Calendar Month/Year" (01.2009) in my report. Is it possible to have "Calendar Month/Year" in my report from 0CALDAY, by making changes to the query, as I cannot remodel the underlying InfoCube.
    Many Thanks,
    VA

    What you mean with huge - 100 Mio dataset?
    The import of the new infocube will be also take a long time - the database must be insert a new field for every dataset.
    => is this a big infocube, then don't use virtual infoobjects.
    => on a big infocube is important to have a good datamodel - please insert always all 11 infoobjects for the time dimension.
    Sven

  • I need today's date in 030213 Format. And today's Day.

    Hi,
    Is there a Date method that would yield ==> 030213 as
    a string for today? Also today's Day, as in
    Thursday.
    How would I use it ? String dat = Date.xxmethod() ?
    Any help will be appreciated. Thanks.
    -- gte99te

    Thank you, I tried the fix in the "import .... SimpleText..." and it works.
    I had to fix the "instantiation -- new " line too. The following codes
    compiled successfully and also works.
    1 Question: What method in Calendar class to use to get today's
    day,.... ex. "Friday" or "5" etc. as a return string ? Can some-one
    code that into the program. So, I can say System.out.println(day) ,
    which will yield ===> Friday ( or 5 ). Thanks for any help,... and
    I am learning quite a bit about Java. --- gte99te
    kdate.java <--- works so far, without Day return yet.
    ====================================================
    import java.io.*;
    import java.util.*;
    import java.util.Calendar ;
    import java.util.Date ;
    import java.text.SimpleDateFormat ;
    class kdate
    public static void main(String args[])
    Calendar today = Calendar.getInstance();
    SimpleDateFormat df = new SimpleDateFormat("yyMMdd");
    String date = df.format(today.getTime());
    System.out.println(date) ;
    ==================================================

  • Need to display seqno along with his superior number

    Hi friends,
    I have a table adm_menus
    It's DDL is
      CREATE TABLE "ADM_MENUS"
       (     "MENU_ID" NUMBER,
         "MENU_NAME" VARCHAR2(60 BYTE),
         "PARENT_MENU_ID" NUMBER,
         "SEQ_NO" NUMBER,
    "DISP_SEQ_NO" VARCHAR2(250 BYTE),
         "MENU_ACTION_TYPE" VARCHAR2(60 BYTE),
         "MENU_ACTION" VARCHAR2(2000 BYTE),
         "MENU_PARAMETER" VARCHAR2(2000 BYTE),
         "INACTIVE_DATE" DATE,
         "CREATED_BY" NUMBER(15,0),
         "CREATION_DATE" DATE,
         "LAST_UPDATED_BY" NUMBER(15,0),
         "LAST_UPDATE_DATE" DATE
       )DML is
    Insert into ADM_MENUS (MENU_ID,MENU_NAME,PARENT_MENU_ID,SEQ_NO,DISP_SEQ_NO,MENU_ACTION_TYPE,MENU_ACTION,MENU_PARAMETER,INACTIVE_DATE,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE)
    values (19,'TRANSACTION',null,10,'10',null,null,null,to_date('12-10-11','DD-MM-RR'),-1,to_date('12-10-11','DD-MM-RR'),-1,to_date('12-10-11','DD-MM-RR'));
    Insert into ADM_MENUS (MENU_ID,MENU_NAME,PARENT_MENU_ID,SEQ_NO,DISP_SEQ_NO,MENU_ACTION_TYPE,MENU_ACTION,MENU_PARAMETER,INACTIVE_DATE,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE)
    values (18,'TRANSACTION',19,10,'10',null,null,null,to_date('12-10-11','DD-MM-RR'),-1,to_date('12-10-11','DD-MM-RR'),-1,to_date('12-10-11','DD-MM-RR'));
    Insert into ADM_MENUS (MENU_ID,MENU_NAME,PARENT_MENU_ID,SEQ_NO,DISP_SEQ_NO,MENU_ACTION_TYPE,MENU_ACTION,MENU_PARAMETER,INACTIVE_DATE,CREATED_BY,CREATION_DATE,LAST_UPDATED_BY,LAST_UPDATE_DATE)
    values (20,'Report1',18,30,'3010',null,null,null,to_date('12-10-11','DD-MM-RR'),-1,to_date('12-10-11','DD-MM-RR'),-1,to_date('12-10-11','DD-MM-RR'));My scenario in the sense is i need to display the results for the disp_seq_no column like
    Since from the above DML statement i have three rows, For my explanation im taking four columns
    menu_id------->parent_menu_id-------------->seq_no------------>Disp_seq_no
    19                 null                      10                
    18                 19                        10                
    20                 18                        30For the above rows i need to display the rows for the column disp_seq_no as
    For the first row from the above result the parent_menu_id is null(so, in my case he is the parent and there is no any superior to him, so his disp_seq_no has to be '010'(i.e his seq_no with *'0' infront of it*.)
    For the second and third row i need like
    menu_id------->parent_menu_id------------->seq_no------------>Disp_seq_no
    19                 null                      10                010
    18                 19                        10                010010 
    20                 18                        30                010030For the second row, he has the parent menu id as '19', so i need his disp_seq_no like (his parents seq_no and his own Seq_no(but i need '0' infront of each and every seq number)) like
    010010
    For the third row, he has the parent menu id as '18', so the disp_seq_no has to be 010030
    How i can able to achieve it friends.
    Brgds,
    Mini

    /* Formatted on 10/12/2011 9:57:19 AM (QP5 v5.149.1003.31008) */
    WITH ADM_MENUS
            AS (SELECT 19 menu_id, NULL parent_menu_id, 10 seq_no FROM DUAL
                UNION
                SELECT 18, 19, 10 FROM DUAL
                UNION
                SELECT 20, 18, 30 FROM DUAL)
        SELECT menu_id,
               parent_menu_id,
               seq_no,
               CASE CONNECT_BY_ISLEAF
                  WHEN 0
                  THEN
                     REPLACE (SYS_CONNECT_BY_PATH (seq_no, ','), ',', '0')
                  ELSE
                     SUBSTR (REPLACE (SYS_CONNECT_BY_PATH (seq_no, ','), ',', '0'),
                             LENGTH (SYS_CONNECT_BY_PATH (seq_no, ',')) - 5)
               END
                  disp_seq_no
          FROM ADM_MENUS
    START WITH parent_menu_id IS NULL
    CONNECT BY PRIOR menu_id = parent_menu_id
    19          10     010
    18     19     10     010010
    20     18     30     010030

  • How to display data in table with dynamic rows, section wise in a page.

    Hello all,
    I work on report creation in BI Publisher where I need to display data from xml in a table in pdf format.The output page is divided into two vertical sections , containing tables, with exactly same columns on left and right sections. The number of rows in table depends on the output of the fetching query. The page is to be populated in such a way that, at first, the left table is populated, then the next rows fill up the table on the right section of the page, if more rows are left, they fill up the tables on next page[first the left table, and then the right one, in a similar fashion as in page 1]
    On a bird's eye view, the data needs to be simply mapped to a table, with dynamic number of rows, and so can span number of pages depending on size of data. On a implementation level, I am stuck in getting the left section of the page populated first, then the right section[in place of the right page], and then the next page.
    Please guide me if someone has any idea in getting this achieved.
    Thanks in advance.

    Thanks for the response...
    I am able to get the desired functionality. I just need the tables to be inside a bigger table, that also has a dividing line between the two columns. This is was is intended in the req. provided to me. The column formatting option provides me a line ,but that is not further modifiable .Please help me in getting a perpendicular line between the two columns, which I need to be of a specified width and color.

  • How to display data on PublishingWebControls RichHtmlField ?

    Hello,
    I have placed sharepoint control as below on application page :
    <PublishingWebControls:RichHtmlField FieldName="MultilineRichText" id="multilinetext" runat="server"/>
    I have fetched sharepoint list data pro grammatically, however I do not know how can I display it on publishing web control !!
    Would you please let me know the syntax for the same ?
    Thanks and Regards,
    Dipti Chhatrapati

    Hi Subhash, Thank you for your time and look at this thread !
    I have treid to add the propeties you mentioned but it has thrown below error message:
    Type 'Microsoft.SharePoint.Publishing.WebControls.RichHtmlField' does not have a public property named RichText
    Type 'Microsoft.SharePoint.Publishing.WebControls.RichHtmlField' does not have a public property named RichTextMode
    Also, programmatically I need to display data from below item to above publishing control :
     SPListItem itemAnnouncement = list.GetItemById(listItemId);
    Kindly let me know the rest of the syntax to display data and solution to resolve above error.
    Thanks and Regards,
    Dipti Chhatrapati

  • Display data in bold and red in color in side a table control cell

    Hi,
    I need to display data in side a Table Control cell with Bold and Red in color, can any body help me how to do it.
    Regards,
    Srinivas

    The gui does not support the coloring in table controls.  You can set the hightlight attribute, but this will only make the text blue in color. There is no way to make it any other color.
    Regards,
    Rich Heilman

Maybe you are looking for

  • Mini overheating

    Hello, Just trying to canvas opinion. I've discussed this with Apple Support, and have had no real help. Very unlike Apple, but I'm very disappointed. Ever since I've had my mini (6 months or so) the fan has been running loudly and noisily almost con

  • Lead column in KE34 - Report Painter:Create Form

    Experts, How can I insert row in Ke34 lead column? How can I change the display text in lead column from short text to long text? Thanks in advance lui

  • Trex: Unable to find name server

    We are in process of upgrading our portals from EP6sp2 to EP6SP9 and we have trex 6.0 server. Recently we have upgraded our dev portal to EP6SP9 and trying to configure trex fails. I have specified name server in J2EE engine but still I cant create i

  • Airport Extreme 7.2.1 - Can't get wireless working

    I upgraded my AEBS to 7.2.1 yesterday from my MB and immediately wasn't able to reconnect to the BS after the upgrade, not even to configure or view logs. I plugged into the lan port, and was able reset the device to factory settings, and then I reco

  • After Effects error:crash in progress 844 ?

    What is the problem with that error? How to fix it?? Display: AMD Radeon R7 200 series 260X