Help in creating function.

Hi friends i am a newbie in pl/sql...
i want to create a function which reads alll the rows from a table containing hundreds of rows....
And further break all rows seperated by space into multiple blocks or columns and check some conditions on each block/columns....
Eg:
I am having a table which is having one colums and hundred such rows...
12345 1234 12345 12345 12345 12345 12345 12345
Now i want to create a function or procedure which reads all the lines and check some conditions on each word of each row....
for eg: 1st condition:
1st,2nd, 3rd,4th,5th word is 12345 or not..
2nd ,3rd,4th,5th,6th word is 1234 or not
3rd word is of length=5 or not and various other conditions... but one thing is sure i have to check all the words of the row against each condition.....
thnx in advance....

Or...
SQL> ed
Wrote file afiedt.buf
  1  with testdata as (select '12345 12345 12345 12345 12345 12346 12347 12348' as txt from dual union all
  2                    select '54321 1234 1234 1234 1234 1234 32785' from dual union all
  3                    select '10101 10101 10101 10101 10101 10101 10101' from dual union all
  4                    select '123 123 123 123 123 123 123' from dual)
  5  --
  6  -- end of test data, use query below
  7  --
  8  select txt
  9        ,case when wrd1 = '12345' and wrd2 = '12345' and wrd3 = '12345' and wrd4 = '12345' and wrd5 = '12345' then
10                'True'
11         else 'False' end as cond1
12        ,case when wrd2 = '1234' and wrd3 = '1234' and wrd4 = '1234' and wrd5 = '1234' and wrd6 = '1234' then
13                'True'
14         else 'False' end as cond2
15        ,case when length(wrd3) = 5 then
16                'True'
17         else 'False' end as cond3
18  from (
19        select txt
20              ,regexp_substr(txt,'[^ ]+',1,1) as wrd1
21              ,regexp_substr(txt,'[^ ]+',1,2) as wrd2
22              ,regexp_substr(txt,'[^ ]+',1,3) as wrd3
23              ,regexp_substr(txt,'[^ ]+',1,4) as wrd4
24              ,regexp_substr(txt,'[^ ]+',1,5) as wrd5
25              ,regexp_substr(txt,'[^ ]+',1,6) as wrd6
26        from testdata
27*      )
SQL> /
TXT                                             COND1 COND2 COND3
12345 12345 12345 12345 12345 12346 12347 12348 True  False True
54321 1234 1234 1234 1234 1234 32785            False True  False
10101 10101 10101 10101 10101 10101 10101       False False True
123 123 123 123 123 123 123                     False False False

Similar Messages

  • Requried Help in creating function

    Hi All,
    i need one help in creating function my input parameters for that function will be 1 or 1,2 or 1,2,3
    my output should be
    If i pass as 1 as input parameter it should return 1
    If i pass 1,2 as input parameter it should return 1,2 in different rows
    Similarly If i pass 1,2,3 as input parameter it should return 1,2,3 in different rows.
    Can any one please help me in creating this function.
    Thanks in Advance.
    Edited by: p78 on Jan 16, 2012 3:31 AM
    Edited by: p78 on Jan 16, 2012 3:31 AM

    Hi,
    that will be something like this. First you need a type for returning the rows (use other datatype for example number if you need so):
    CREATE OR REPLACE TYPE t_list AS TABLE OF VARCHAR2 (4000);
    /Then the function will be a pipelined function:
    CREATE OR REPLACE FUNCTION in_list (p_list  IN  VARCHAR2)
      RETURN t_list PIPELINED
    AS
      l_text  VARCHAR2(32767) := p_list || ',';
      l_idx   NUMBER;
    BEGIN
      LOOP
        l_idx := INSTR(l_text, ',');
        EXIT WHEN NVL(l_idx, 0) = 0;
        PIPE ROW (TRIM(SUBSTR(l_text, 1, l_idx - 1)));
        l_text := SUBSTR(l_text, l_idx + 1);
      END LOOP;
      RETURN;
    END;
    /now you can query (or whatever the needs are):
    select * from table(in_list('aa','bb'));Herald ten Dam
    http://htendam.wordpress.com

  • Help with creating a user function

    Hi, I have never created a user function in Oracle and need some help. My function takes in a variable, reads the table looking for a match of the first 2 characters, if not found tries based on the first character. This is what I have so far:
    CREATE function Get_Country_Of_Origin
    (av_SERIAL_ID varchar2)
    RETURN varchar2
    IS
    var_country varchar2;
    BEGIN
    --If match on first 2 characters of serial id return that value
    SELECT DESCRIPTION INTO var_country
    FROM M4LOADER.SUPPLIER_TYPE
    WHERE SUPPLIER_TYPE = LEFT(av_SERIAL_ID,2)
    --Else If match on first character of serial id return that value
    SELECT DESCRIPTION INTO var_country
    FROM M4LOADER.SUPPLIER_TYPE
    WHERE SUPPLIER_TYPE = LEFT(av_SERIAL_ID,1)
    --Else return nothing
    return var_country;
    END;

    <FONT FACE="Arial" size=2 color="2D0000">
    CREATE function Get_Country_Of_Origin (av_SERIAL_ID varchar2)
    RETURN varchar2
    IS
    var_country varchar2;
    BEGIN
    --If match on first 2 characters of serial id return that value
    <font color="#ff8040">Are you sure that the following will return only one single value </font><font color="#800000">( if TO MANY ROWS ARE FOUND then ..?)</font>
    SELECT DESCRIPTION INTO var_country FROM M4LOADER.SUPPLIER_TYPE WHERE SUPPLIER_TYPE = <font color="#0080c0">substr(av_SERIAL_ID,0,2)</font>
    --Else If match on first character of serial id return that value
    <font color="#0d1099">IF var_country is null then</font>
    SELECT DESCRIPTION INTO var_country FROM M4LOADER.SUPPLIER_TYPE WHERE SUPPLIER_TYPE = <font color="#0080c0">substr(av_SERIAL_ID,0,1)</font>
    <font color="#0d1099">End if;</font></font>
    return var_country;
    END;
    -SK
    </FONT>

  • Need Help to create new screen for RF Sapconsole

    Hi Guru's
    I'm new on RF (but some years in ABAP) since last week.
    I need help to create new screens for RF (SAPLLMOB).
    Can someone explain me the procedure to create screen (with ABAP code after) or perhaps someone have an exemple (simple or not) ?
    I have to develop 2 new screens with really few time.
    And, another subsidiary question :
    how SAP can transfert information between the flash gun and the screen i have developped.
    Is there some code to add to enable this functionality or it is include in SAPLLMOB on standard fields ????
    It's a new strange world for me today...
    Many thanks to everyone who can explain me
    Alain

    hi,
    I am facing this problem as well. Is there any reference to create the new screen?
    Hope someone can help! Thanks!
    Regards,
    Darren

  • Need some help in creating Search Help for standard screen/field

    I need some help in adding a search-help to a standard screen-field.
    Transaction Code - PP01,
    Plan Version - Current Plan (PLVAR = '01'),
    Object Type - Position ( OTYPE = 'S'),
    Click on Infotype Name - Object ( Infotype 1000) and Create.
    I need to add search help to fields Object Abbr (P1000-SHORT) / Object Name (P1000-STEXT).
    I want to create one custom table with fields, Position Abb, Position Name, Job. Position Abb should be Primary Key. And when object type is Position (S), I should be able to press F4 for Object Abb/Object Name fields and should return Position Abbr and Position Name.
    I specify again, I have to add a new search help to standard screen/field and not to enhance it.
    This is HR specific transaction. If someone has done similar thing with some other transation, please let me know.
    There is no existing search help for these fields. If sm1 ever tried or has an idea how to add new search help to a standard screen/field.
    It's urgent.
    Thanks in advace. Suitable answers will be rewarded

    Hi Pradeep,
    Please have a look into the below site which might be useful
    Enhancing a Standard Search Help
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/daeda0d7-0701-0010-8caa-
    edc983384237
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee93446011d189700000e8322d00/frameset.htm
    A search help exit is a function module for making the input help process described by the search help more flexible than possible with the standard version.
    This function module must have the same interface as function module F4IF_SHLP_EXIT_EXAMPLE. The search help exit may also have further optional parameters (in particular any EXPORTING parameters).
    A search help exit is called at certain timepoints in the input help process.
    Note: The source text and long documentation of the above-specified function module (including the long documentation about the parameters) contain information about using search help exits.
    Function modules are provided in the function library for operations that are frequently executed in search help exits. The names of these function modules begin with the prefix F4UT_. These function modules can either be used directly as search help exits or used within other search help exits. You can find precise instructions for use in the long documentation for the corresponding function module.
    During the input help process, a number of timepoints are defined that each define the beginning of an important operation of the input help process.
    If the input help process is defined with a search help having a search help exit, this search help exit is called at each of these timepoints. If required, the search help exit can also influence the process and even determine that the process should be continued at a different timepoint.
    timepoints
    The following timepoints are defined:
    1. SELONE
    Call before selecting an elementary search help. The possible elementary search helps are already in SHLP_TAB. This timepoint can be used in a search help exit of a collective search help to restrict the selection possibilities for the elementary search helps.
    Entries that are deleted from SHLP_TAB in this step are not offered in the elementary search help selection. If there is only one entry remaining in SHLP_TAB, the dialog box for selecting elementary search helps is skipped. You may not change the next timepoint.
    The timepoint is not accessed again if another elementary search help is to be selected during the dialog.
    2. PRESEL1
    After selecting an elementary search help. Table INTERFACE has not yet been copied to table SELOPT at this timepoint in the definition of the search help (type SHLP_DESCR_T). This means that you can still influence the attachment of the search help to the screen here. (Table INTERFACE contains the information about how the search help parameters are related to the screen fields).
    3. PRESEL
    Before sending the dialog box for restricting values. This timepoint is suitable for predefining the value restriction or for completely suppressing or copying the dialog.
    4. SELECT
    Before selecting the values. If you do not want the default selection, you should copy this timepoint with a search help exit. DISP should be set as the next timepoint.
    5. DISP
    Before displaying the hit list. This timepoint is suitable for restricting the values to be displayed, e.g. depending on authorizations.
    6. RETURN (usually as return value for the next timepoint)
    The RETURN timepoint should be returned as the next step if a single hit was selected in a search help exit.
    It can make sense to change the F4 flow at this timepoint if control of the process sequence of the Transaction should depend on the selected value (typical example: setting SET/GET parameters). However, you should note that the process will then depend on whether a value was entered manually or with an input help.
    7. RETTOP
    You only go to this timepoint if the input help is controlled by a collective search help. It directly follows the timepoint RETURN. The search help exit of the collective search help, however, is called at timepoint RETTOP.
    8. EXIT (only for return as next timepoint)
    The EXIT timepoint should be returned as the next step if the user had the opportunity to terminate the dialog within the search help exit.
    9. CREATE
    The CREATE timepoint is only accessed if the user selects the function "Create new values". This function is only available if field CUSTTAB of the control string CALLCONTROL was given a value not equal to SPACE earlier on.
    The name of the (customizing) table to be maintained is normally entered there. The next step returned after CREATE should be SELECT so that the newly entered value can be selected and then displayed.
    10. APP1, APP2, APP3
    If further pushbuttons are introduced in the hit list with function module F4UT_LIST_EXIT, these timepoints are introduced. They are accessed when the user presses the corresponding pushbutton.
    Note: If the F4 help is controlled by a collective search help, the search help exit of the collective search help is called at timepoints SELONE and RETTOP. (RETTOP only if the user selects a value.) At all other timepoints the search help exit of the selected elementary search help is called.
    If the F4 help is controlled by an elementary search help, timepoint RETTOP is not executed. The search help exit of the elementary search help is called at timepoint SELONE (at the
    F4IF_SHLP_EXIT_EXAMPLE
    This module has been created as an example for the interface and design of Search help exits in Search help.
    All the interface parameters defined here are mandatory for a function module to be used as a search help exit, because the calling program does not know which parameters are actually used internally.
    A search help exit is called repeatedly in connection with several
    events during the F4 process. The relevant step of the process is passed on in the CALLCONTROL step. If the module is intended to perform only a few modifications before the step, CALLCONTROL-STEP should remain unchanged.
    However, if the step is performed completely by the module, the following step must be returned in CALLCONTROL-STEP.
    The module must react with an immediate EXIT to all steps that it does not know or does not want to handle.
    Hope this info will help you.
    ***Reward points if found useful
    Regards,
    Naresh

  • Doubt in  export, import and table para when creating Function Module

    Dear fellow ABAPers,
    I have a doubt in defining export, import and table parameter while creating a function module.
    I am calling a function module inside a user exit. Now in the user exit the SAP fills an internal table called i_lfa1 with all the data user has eneterd.
    Now I want to pass this whole internal table to function module and the perform some checks on the values of internal table.
    After that function module fills an error structure with values depending on some check.
    1)
    How do I pass this internal table to function module ? 
    When I am creating function module in se37 where do I define this iternal table type ? Is it in Import or Table parameter during function module creation?
    2)
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Please clear my doubt..
    Relevant points will be awarded.
    Regards,
    Tushar.

    Hi Tushar,
    1. How do I pass this internal table to function module ?
       I assume u are creating your own Y/Z FM.
       Pass it thru TABLES parameter.
    2. When I am creating function module in se37 where do I define this iternal table type
       Define this in TABLES interface.
       What Type ?
       THE SAME TYPE WHICH HAS BEEN DEFINED
        WHILE PASSING IN THE USER-EXIT FUNCTION MODULE.
       IF U SEE THE FM OF THE USER-EXIT,
       U WILL COME TO KNOW.
    3.
    Where do I define error structure type (which is returned by function module to main program)? Is it in Export or table parameter during function module creation?
    Define it in TABLES interace. (not in export, import)
      (Since what u are going to return is an internal table)
      U can take for eg. BDCMSGCOLL.
      OR u can create your own Y/Z structure
    for the same purpose.
      (or u can use the structure type T100)
    I hope it helps.
    Regards,
    Amit M.

  • Creating function to calculate average value

    Hi,
    The below query was successfully return an average value. It returned 1 row.
    SELECT AVG(Volume)
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = ''14-mar-09' OR
    Day = '16-mar-09' OR
    Day = '');
    I tried to use that function on my created function below.
    CREATE OR REPLACE FUNCTION fn_Vol_Average
    ( v_DayLast_1_Week IN DATE,
    v_DayLast_2_Week IN DATE,
    v_DayLast_3_Week IN DATE )
    RETURN NUMBER IS
    v_Vol_Average NUMBER;
    BEGIN
    SELECT AVG(Volume) INTO v_Vol_Average
    FROM security
    WHERE
    Type = 'Future' AND
    Rating = 'AAA' AND
    Code = 1 AND
    (Day = v_DayLast_1_Week OR
    Day = v_DayLast_2_Week OR
    Day = v_DayLast_3_Week);
    RETURN NVL(v_Vol_Average, NULL);
    END;
    I called that function by the following query. it was work, however it return the whole rows. It looks like the function perform the average calculation of each rows on the table.
    Can anyone help me what is going on with the logic?
    select fn_Vol_average('14-mar-09','16-mar-09','')
    from security
    --

    But since your function calculates the average over the whole security table, you wouldn't call this from a select statement which also reads the security table.
    You just want to execute it once.
    declare
       l_vol_average number;
    begin
       l_vol_average := fn_Vol_average('14-mar-09','16-mar-09','');
       dbms_output.put_line(l_vol_average);
    end;By the way, be careful with your date parameters. You should use TO_DATE with a proper format mask to prevent conversion errors.

  • Help on custom function...

    Hi all
    I'm having a problem with this custom function/report posted on TechNet while back for ConfigMgr 2007
    http://social.technet.microsoft.com/wiki/contents/articles/7870.sccm-2007-create-report-of-upcoming-maintenance-windows-by-client.aspx
    I've made the needed changes according to this blog post:
    https://sccmfaq.wordpress.com/2013/08/22/sccm-2012-show-next-effective-maintenance-window/
    ..but when using maintenance windows that occurs for example 1st tuesday of every 1 months, the function returns the date week ahead. For example now (on 28th of Feb) next maintenance window should be on Tuesday March 3rd, but instead the report is showing
    Tuesday March 10th.
    Any help on modifying the function would be appreciated, I saw that there comments on the original post about the recurrence type 4 (monthly by weekday as noted here https://msdn.microsoft.com/en-us/library/cc143300.aspx) not working correctly in the function.
    It seems that the function now returns the weekday of first full week of the month instead of the correct day.
    The function is this:
    CREATE FUNCTION [dbo].[SCCM_GetNextServiceWindow](@ScheduleToken AS CHAR(16), @RecurrenceType AS INT) RETURNS @NextServiceWindow TABLE (ScheduleToken CHAR(16), RecurrenceType INT, NextServiceWindow DATETIME, Duration INT, IsGMTTime BIT) AS BEGIN
    --1 Occurs on 1/1/2012 12:00 AM 00011A8500080000
    --2 Occurs every 3 day(s) effective 1/1/2012 8:00 PM 02811A8040100018
    --3 Occurs every 3 week(s) on Saturday effective 1/1/2012 8:00 PM 02811A80401F6000
    --3 Occurs every 1 week(s) on Saturday effective 1/1/2012 8:00 PM 02811A80401F2000
    --5 Occurs day 2 of every 2 month(s) effective 1/1/2012 8:00 PM 02811A8040288800
    --5 Occurs day 31 of every 1 month(s) effective 1/1/2012 8:00 PM 02811A80402FC400
    --5 Occurs the last day of every 3 months effective 1/1/2012 8:00 PM 02811A8040280C00
    --5 Occurs the last day of every 1 months effective 1/1/2012 8:00 PM 02811A8040280400
    --4 Occurs the Third Monday of every 1 month(s) effective 1/1/2012 4:00 AM 00811A9E08221600
    --4 Occurs the Last Wednesday of every 1 month(s) effective 1/1/2012 8:00 PM 02811A8040241000
    --4 Occurs the Fourth Wednesday of every 1 month(s) effective 1/1/2012 8:00 PM 02811A8040241800
    --4 Occurs the Last Monday of every 1 month(s) effective 1/1/2012 8:00 PM 02811A8040221000
    --3 Occurs every 1 week(s) on Monday effective 1/1/2012 4:00 AM 00811A9E081A2000
    -- http://msdn.microsoft.com/en-us/library/cc143300.aspx [This link is external to TechNet Wiki. It will open in a new window.]
    DECLARE @RecurrenceType_NONE INT
    , @RecurrenceType_DAILY INT
    , @RecurrenceType_WEEKLY INT
    , @RecurrenceType_MONTHLYBYWEEKDAY INT
    , @RecurrenceType_MONTHLYBYDATE INT
    SELECT @RecurrenceType_NONE = 1
    , @RecurrenceType_DAILY = 2
    , @RecurrenceType_WEEKLY = 3
    , @RecurrenceType_MONTHLYBYWEEKDAY = 4
    , @RecurrenceType_MONTHLYBYDATE = 5
    -- http://msdn.microsoft.com/en-us/library/cc143505.aspx [This link is external to TechNet Wiki. It will open in a new window.]
    --DECLARE @RecurrenceType INT; SET @RecurrenceType = @RecurrenceType_WEEKLY
    --DECLARE @ScheduleToken CHAR(16); SET @ScheduleToken = '00811A9E081A2000'
    DECLARE @ScheduleStartTime INT; SET @ScheduleStartTime = CAST(CONVERT(BINARY(4), LEFT(@ScheduleToken, 8), 2) AS INT)
    DECLARE @ScheduleDuration INT; SET @ScheduleDuration = CAST(CONVERT(BINARY(4), RIGHT(@ScheduleToken, 8), 2) AS INT)
    -- Duration is in minutes
    DECLARE @Duration INT; SET @Duration = @ScheduleStartTime % POWER(2, 6)
    -- Calculate the start time
    DECLARE @StartTime DATETIME; SET @StartTime = CONVERT(DATETIME, '01/01/1970 00:00:00')
    SET @StartTime = DATEADD(YEAR, (@ScheduleStartTime / POWER(2,6)) % POWER(2, 6), @StartTime)
    SET @StartTime = DATEADD(MONTH, ((@ScheduleStartTime / POWER(2,12)) % POWER(2, 4)) - 1, @StartTime)
    SET @StartTime = DATEADD(DAY, ((@ScheduleStartTime / POWER(2,16)) % POWER(2, 5)) - 1, @StartTime)
    SET @StartTime = DATEADD(HOUR, (@ScheduleStartTime / POWER(2,21)) % POWER(2, 5), @StartTime)
    SET @StartTime = DATEADD(MINUTE, (@ScheduleStartTime / POWER(2,26)) % POWER(2, 5), @StartTime)
    -- Determinte UTC and Flags
    DECLARE @IsGMTTime BIT; SET @IsGMTTime = CAST(@ScheduleDuration % POWER(2, 1) AS BIT)
    DECLARE @Flags INT; SET @Flags = (@ScheduleDuration / POWER(2,19)) % POWER(2, 3)
    -- Calculate the total duration in minutes
    SET @Duration = @Duration + ((@ScheduleDuration / POWER(2,22)) % POWER(2, 5)) * 24 * 60 -- DAYS
    SET @Duration = @Duration + ((@ScheduleDuration / POWER(2,27)) % POWER(2, 5)) * 60 -- HOURS
    DECLARE @Now DATETIME
    IF @IsGMTTime = 1 BEGIN
    SET @Now = GETUTCDATE()
    END ELSE BEGIN
    SET @Now = GETDATE()
    END
    DECLARE @NextMaintenanceWindow DATETIME
    IF @RecurrenceType = @RecurrenceType_NONE BEGIN
    IF DATEADD(MINUTE, @Duration, @StartTime) > @Now BEGIN
    SET @NextMaintenanceWindow = @StartTime
    END
    END ELSE IF @RecurrenceType = @RecurrenceType_DAILY BEGIN
    IF DATEADD(MINUTE, @Duration, @StartTime) > @Now BEGIN
    SET @NextMaintenanceWindow = @StartTime
    END ELSE BEGIN
    -- Calculate the daily interval in minutes
    DECLARE @DailyInterval INT
    SET @DailyInterval = ((@ScheduleDuration / POWER(2,3)) % POWER(2, 5)) * 24 * 60
    SET @DailyInterval = @DailyInterval + ((@ScheduleDuration / POWER(2,8)) % POWER(2, 5)) * 60
    SET @DailyInterval = @DailyInterval + (@ScheduleDuration / POWER(2,13)) % POWER(2, 6)
    -- Calculate the total number of completed intervals
    DECLARE @DailyNumberOfCompletedIntervals INT; SET @DailyNumberOfCompletedIntervals = ROUND(CAST(DATEDIFF(MINUTE, @StartTime, @Now) AS DECIMAL) / @DailyInterval, 0, 0)
    -- Calculate the next interval
    DECLARE @DailyNextInterval DATETIME; SET @DailyNextInterval = DATEADD(MINUTE, @DailyNumberOfCompletedIntervals * @DailyInterval, @StartTime)
    -- Recalc the next interval if the next interval plus the expected duration is in the past
    IF DATEADD(MINUTE, @Duration, @DailyNextInterval) < @Now BEGIN
    SET @DailyNextInterval = DATEADD(MINUTE, (@DailyNumberOfCompletedIntervals + 1) * @DailyInterval, @StartTime)
    END
    SET @NextMaintenanceWindow = @DailyNextInterval
    END
    END ELSE IF @RecurrenceType = @RecurrenceType_WEEKLY BEGIN
    DECLARE @WeeklyInterval INT; SET @WeeklyInterval = (@ScheduleDuration / POWER(2,13)) % POWER(2, 3)
    DECLARE @WeeklyDoW INT; SET @WeeklyDoW = (@ScheduleDuration / POWER(2,16)) % POWER(2, 3)
    -- Adjust the start time to match the next day of week that matches the interval
    DECLARE @WeeklyStartTime DATETIME; SET @WeeklyStartTime = DATEADD(DAY, (7 - DATEPART(WEEKDAY, @StartTime) + @WeeklyDoW % 7), @StartTime)
    IF DATEADD(MINUTE, @Duration, @WeeklyStartTime) > @Now BEGIN
    SET @NextMaintenanceWindow = @WeeklyStartTime
    END ELSE BEGIN
    -- Calculate the total number of completed intervals
    DECLARE @WeeklyNumberOfCompletedIntervals INT; SET @WeeklyNumberOfCompletedIntervals = ROUND(CAST(DATEDIFF(WEEK, @WeeklyStartTime, @Now) AS DECIMAL) / @WeeklyInterval, 0, 0)
    -- Calculate the next interval
    DECLARE @WeeklyNextInterval DATETIME; SET @WeeklyNextInterval = DATEADD(WEEK, @WeeklyNumberOfCompletedIntervals * @WeeklyInterval, @WeeklyStartTime)
    -- Recalc the next interval if the next interval plus the expected duration is in the past
    IF DATEADD(MINUTE, @Duration, @WeeklyNextInterval) < @Now BEGIN
    SET @WeeklyNextInterval = DATEADD(WEEK, (@WeeklyNumberOfCompletedIntervals + 1) * @WeeklyInterval, @WeeklyStartTime)
    END
    SET @NextMaintenanceWindow = @WeeklyNextInterval
    END
    END ELSE IF @RecurrenceType = @RecurrenceType_MONTHLYBYWEEKDAY BEGIN
    DECLARE @MonthlyBWWeek INT; SET @MonthlyBWWeek = (@ScheduleDuration / POWER(2,9)) % POWER(2, 3)
    DECLARE @MontlhyBWInterval INT; SET @MontlhyBWInterval = (@ScheduleDuration / POWER(2,12)) % POWER(2, 4)
    DECLARE @MonthlyBWDoW INT; SET @MonthlyBWDoW = (@ScheduleDuration / POWER(2,16)) % POWER(2, 3)
    -- Calculate the total number of completed intervals
    DECLARE @MonthlyBWNumberOfCompletedIntervals INT; SET @MonthlyBWNumberOfCompletedIntervals = ROUND(CAST(DATEDIFF(MONTH, @StartTime, @Now) AS DECIMAL) / @MontlhyBWInterval, 0, 0)
    IF @MonthlyBWWeek = 0 BEGIN
    -- Calculate the next interval
    DECLARE @MonthlyBWLDOMNextInterval DATETIME; SET @MonthlyBWLDOMNextInterval = DATEADD(MONTH, @MonthlyBWNumberOfCompletedIntervals * @MontlhyBWInterval, @StartTime)
    -- Calculate last day of month
    SET @MonthlyBWLDOMNextInterval = DATEADD(DAY, DATEDIFF(DAY, @MonthlyBWLDOMNextInterval, DATEADD(DAY, -1, DATEADD(M, DATEDIFF(MONTH, 0, @MonthlyBWLDOMNextInterval) + 1, 0))), @MonthlyBWLDOMNextInterval)
    -- Calculate the last day of the week for the month
    SET @MonthlyBWLDOMNextInterval = DATEADD(DAY, -(7 - DATEPART(WEEKDAY, @MonthlyBWLDOMNextInterval) + @MonthlyBWDoW % 7), @MonthlyBWLDOMNextInterval)
    IF DATEADD(MINUTE, @Duration, @MonthlyBWLDOMNextInterval) < @Now BEGIN
    -- Recalc for the next month interval
    SET @MonthlyBWLDOMNextInterval = DATEADD(MONTH, (@MonthlyBWNumberOfCompletedIntervals + 1) * @MontlhyBWInterval, @StartTime)
    -- Calculate last day of month
    SET @MonthlyBWLDOMNextInterval = DATEADD(DAY, DATEDIFF(DAY, @MonthlyBWLDOMNextInterval, DATEADD(DAY, -1, DATEADD(M, DATEDIFF(MONTH, 0, @MonthlyBWLDOMNextInterval) + 1, 0))), @MonthlyBWLDOMNextInterval)
    -- Calculate the last day of the week for the month
    SET @MonthlyBWLDOMNextInterval = DATEADD(DAY, -(7 - DATEPART(WEEKDAY, @MonthlyBWLDOMNextInterval) + @MonthlyBWDoW % 7), @MonthlyBWLDOMNextInterval)
    END
    SET @NextMaintenanceWindow = @MonthlyBWLDOMNextInterval
    END ELSE BEGIN
    -- Calculate the next interval
    DECLARE @MonthlyBWNextInterval DATETIME; SET @MonthlyBWNextInterval = DATEADD(MONTH, @MonthlyBWNumberOfCompletedIntervals * @MontlhyBWInterval, @StartTime)
    -- Set the date to the first day of the month
    SET @MonthlyBWNextInterval = DATEADD(DAY, -(DAY(@MonthlyBWNextInterval) - 1), @MonthlyBWNextInterval)
    -- Set the date to the first day of week in the month
    SET @MonthlyBWNextInterval = DATEADD(DAY, (7 - DATEPART(WEEKDAY, @MonthlyBWNextInterval) + @MonthlyBWDoW) % 7, @MonthlyBWNextInterval)
    -- Calculate date based on the week number to add
    SET @MonthlyBWNextInterval = DATEADD(WEEK, @MonthlyBWWeek-1, @MonthlyBWNextInterval)
    IF DATEADD(MINUTE, @Duration, @MonthlyBWNextInterval) < @Now BEGIN
    -- Recalc for the next month interval
    SET @MonthlyBWNextInterval = DATEADD(MONTH, (@MonthlyBWNumberOfCompletedIntervals + 1) * @MontlhyBWInterval, @StartTime)
    -- Set the date to the first day of the month
    SET @MonthlyBWNextInterval = DATEADD(DAY, -(DAY(@MonthlyBWNextInterval) - 1), @MonthlyBWNextInterval)
    -- Set the date to the first day of week in the month
    SET @MonthlyBWNextInterval = DATEADD(DAY, (7 - DATEPART(WEEKDAY, @MonthlyBWNextInterval) + @MonthlyBWDoW % 7), @MonthlyBWNextInterval)
    -- Calculate date based on the week number to add
    SET @MonthlyBWNextInterval = DATEADD(WEEK, @MonthlyBWWeek-1, @MonthlyBWNextInterval)
    END
    SET @NextMaintenanceWindow = @MonthlyBWNextInterval
    END
    END ELSE IF @RecurrenceType = @RecurrenceType_MONTHLYBYDATE BEGIN
    DECLARE @MontlhyBDInterval INT; SET @MontlhyBDInterval = (@ScheduleDuration / POWER(2,10)) % POWER(2, 4)
    DECLARE @MonthlyBDDoM INT; SET @MonthlyBDDoM = (@ScheduleDuration / POWER(2,14)) % POWER(2, 5)
    IF @MonthlyBDDoM = 0 BEGIN
    /* This is the last day of month logic */
    -- Calculate the total number of completed intervals
    DECLARE @MonthlyBDLDOMNumberOfCompletedIntervals INT; SET @MonthlyBDLDOMNumberOfCompletedIntervals = ROUND(CAST(DATEDIFF(MONTH, @StartTime, @Now) AS DECIMAL) / @MontlhyBDInterval, 0, 0)
    -- Calculate the next interval
    DECLARE @MonthlyBDLDOMNextInterval DATETIME; SET @MonthlyBDLDOMNextInterval = DATEADD(MONTH, @MonthlyBDLDOMNumberOfCompletedIntervals * @MontlhyBDInterval, @StartTime)
    -- Calculate last day of month
    SET @MonthlyBDLDOMNextInterval = DATEADD(DAY, DATEDIFF(DAY, @MonthlyBDLDOMNextInterval, DATEADD(DAY, -1, DATEADD(M, DATEDIFF(MONTH, 0, @MonthlyBDLDOMNextInterval) + 1, 0))), @MonthlyBDLDOMNextInterval)
    -- Recalc the next interval if the next interval plus the expected duration is in the past
    IF DATEADD(MINUTE, @Duration, @MonthlyBDLDOMNextInterval) < @Now BEGIN
    SET @MonthlyBDLDOMNextInterval = DATEADD(DAY, DATEDIFF(DAY, @MonthlyBDLDOMNextInterval, DATEADD(DAY, -1, DATEADD(M, DATEDIFF(MONTH, 0, DATEADD(MONTH, (@MonthlyBDLDOMNumberOfCompletedIntervals + 1) * @MontlhyBDInterval, @StartTime)) + 1, 0))), @MonthlyBDLDOMNextInterval)
    END
    SET @NextMaintenanceWindow = @MonthlyBDLDOMNextInterval
    END ELSE BEGIN
    -- Check to make sure we won't loop forever if more than 31 days some how ends up in the token
    IF @MonthlyBDDoM > 31 SET @MonthlyBDDoM = 31
    -- Adjust the start time to match the next day of month that matches the interval
    DECLARE @MonthlyBDStartTime DATETIME; SET @MonthlyBDStartTime = DATEADD(DAY, (31 - DATEPART(DAY, @StartTime) + @MonthlyBDDoM % 31), @StartTime)
    -- This loop is used multiple times to search for the next valid date that falls on the desired day of month
    WHILE(DATEPART(DAY, @MonthlyBDStartTime) <> @MonthlyBDDoM) BEGIN
    SET @MonthlyBDStartTime = DATEADD(DAY, (31 - DATEPART(DAY, @MonthlyBDStartTime) + @MonthlyBDDoM) % 31, @MonthlyBDStartTime)
    END
    IF DATEADD(MINUTE, @Duration, @MonthlyBDStartTime) > @Now BEGIN
    SET @NextMaintenanceWindow = @MonthlyBDStartTime
    END ELSE BEGIN
    -- Calculate the total number of completed intervals
    DECLARE @MonthlyBDNumberOfCompletedIntervals INT; SET @MonthlyBDNumberOfCompletedIntervals = ROUND(CAST(DATEDIFF(MONTH, @MonthlyBDStartTime, @Now) AS DECIMAL) / @MontlhyBDInterval, 0, 0)
    -- Calculate the next interval
    DECLARE @MonthlyBDNextInterval DATETIME; SET @MonthlyBDNextInterval = DATEADD(MONTH, @MonthlyBDNumberOfCompletedIntervals * @MontlhyBDInterval, @MonthlyBDStartTime)
    WHILE(DATEPART(DAY, @MonthlyBDNextInterval) <> @MonthlyBDDoM) BEGIN
    SET @MonthlyBDNextInterval = DATEADD(DAY, (31 - DATEPART(DAY, @MonthlyBDNextInterval) + @MonthlyBDDoM % 31), @MonthlyBDNextInterval)
    END
    -- Recalc the next interval if the next interval plus the expected duration is in the past
    IF DATEADD(MINUTE, @Duration, @MonthlyBDNextInterval) < @Now BEGIN
    SET @MonthlyBDNextInterval = DATEADD(MONTH, (@MonthlyBDNumberOfCompletedIntervals + 1) * @MontlhyBDInterval, @MonthlyBDNextInterval)
    WHILE(DATEPART(DAY, @MonthlyBDNextInterval) <> @MonthlyBDDoM) BEGIN
    SET @MonthlyBDNextInterval = DATEADD(DAY, (31 - DATEPART(DAY, @MonthlyBDNextInterval) + @MonthlyBDDoM % 31), @MonthlyBDNextInterval)
    END
    END
    SET @NextMaintenanceWindow = @MonthlyBDNextInterval
    END
    END
    END
    INSERT INTO @NextServiceWindow VALUES (@ScheduleToken, @RecurrenceType, @NextMaintenanceWindow, @Duration, @IsGMTTime)
    RETURN
    END
    Thanks in advance for any suggestions!

    What an ungodly amount of the code for the task!
    I tried
    SELECT * FROM SCCM_GetNextServiceWindow('00811A9E08221600', 4)
    Which is said mean "Occurs the Third Monday of every 1 month(s)" and it returned 2015-03-17. Which is a Tuesday. But it is the third Tuesday.
    Turns out that I have British settings on that instance, DATEFIRST is 1. If do SET DATEFIRST 7, I get 2015-03-23. Which is a Monday, but the wrong one.
    The current setting of DATEFIRST can be detected with @@DATEFIRST, and that would make the code even more complex.
    My gut reaction would be to start over and do it all in C#, where at least I don't have to bother about SET DATEFIRST.
    Or maybe first inspect that the ScheduleToken is correct. Maybe it is, but to me that is just an incomprehensible hex string.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • To upload a data into SAP Table with the help of RFC function in BODS

    Hi,
    Please provide me step-by-step solution to upload data into any SAP table with the help of RFC function in Data Services.
    I have created RFC function that upload data into SAP table. RFC Function contains one table that has same structure as my database table.
    In the data services how can i filled the table of RFC function, i am using this function in query transform of data services but it gives me error.
    I am also follow link http://wiki.sdn.sap.com/wiki/display/BOBJ/BusinessObjectsDataServicesTipsand+Tricks
    but it did not help me.
    Thanks,
    Abhishek

    Hi Abhishek,
    Did you import the function module in the SAP datastore first? When you open the SAP datastore, the function should be listed in the 'functions' section. If not, import it. Make sure your function is remote executable.
    Once the function is there, you can use it in a transformation. In 'Schema Out' right-click on 'Query' (top level) and choose 'New Function Call'. You can then select a datastore and a function in the datastore. The wizard will show you which output parameters are available. I believe you have to add at least one and can select as many as you like.
    After confirming your selection the function and the output parameters appear in Schema Out. You can then right-click on the function and choose 'Modify function call'. A popup will appear where you can specify the input parameters.
    I hope this helps.
    Jan.

  • F4 help to create a document

    Hi all,
    I need a fm/method to create F4 help to create a document at the desired path.
    Regards,
    Harshit Rungta

    hello
    This document provides the procedure to get the F4 help for particular file type like excel type files or doc files but not all files. 
    We can achieve this using the Function module u2018KD_GET_FILENAME_ON_F4u2019. To this function module we have to pass the following parameters.
    u2022     Fieldname of the parameter
    u2022     Pass the static as u2018Xu2019
    u2022     File type in MASK
    PARAMETERS: p_file TYPE RLGRAP-Filename.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
    CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
    EXPORTING
       PROGRAM_NAME        = SYST-REPID
       DYNPRO_NUMBER       = SYST-DYNNR
       FIELD_NAME          = 'P_FILE '
       STATIC              = 'X'
       MASK                = '.excel , *.xls '
      CHANGING
        file_name           = p_file
    EXCEPTIONS
       MASK_TOO_LONG       = 1
       OTHERS              = 2
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    hope it helps.
    Regards
    Geeta Gupta

  • Help w/MaxDB Function; also: how does the "Debug SQL" function work?

    Hi there forum folks,
    In my former life, I was a Basis guy, but I haven't had the pleasure of working directly with SAP applications in a few months.  My current project is to attempt to use MaxDB in a real estate environment.  We're tracking home listings so that we can build statistical reports... such as "what agents are in the Top 100 in postal code X?"
    Anyway, as part of this project, I have attempted to construct my very first MaxDB database function.  Unfortunately, it doesn't give me the answers I'm hoping to see.  Here's the function:
    CREATE FUNCTION COUNT_LISTINGS (AGENTID CHAR(10)) RETURNS FIXED(6,1) AS
      VAR COLISTINGAGENTID CHAR(10);
          LISTINGAGENTID   CHAR(10);
          MLSNUMBER        CHAR(7);
          UNITS            FIXED(6,1);
      SET UNITS = 0;
      DECLARE FUNCTIONRESULT CURSOR FOR
        SELECT MLSNUMBER,
               LISTINGAGENTID,
               COLISTINGAGENTID FROM FREDDIE.GLAR_SOLDS
         WHERE LISTINGAGENTID = :agentid OR COLISTINGAGENTID = :agentid;
      IF $COUNT IS NULL THEN
        BEGIN
          CLOSE FUNCTIONRESULT;
          RETURN UNITS;
        END
      ELSE
        SET $RC = 0;
      WHILE $RC = 0 DO BEGIN
        FETCH FUNCTIONRESULT INTO :mlsnumber, :listingagentid, :colistingagentid;
        IF ( LISTINGAGENTID   = AGENTID AND COLISTINGAGENTID IS NULL ) OR
           ( COLISTINGAGENTID = AGENTID AND LISTINGAGENTID   IS NULL ) THEN
          SET UNITS = UNITS + 1
        ELSE
          SET UNITS = UNITS + 0.5;
      END;
    CLOSE FUNCTIONRESULT;
    RETURN UNITS;
    I've tried to follow the official MaxDB documentation.  My first deviation from that standard was the use of the "$COUNT" variable (instead of the "$RC" variable) immediately after the DECLARE/SELECT statement above.  When I tried to use $RC, for either a successful or unsuccessful query, $RC was always set to a non-zero value.
    I believe I'm past that, but now my issue is down around that FETCH statement.  The UNITS variable doesn't end up with the value I expect.  I know that it can be terribly confusing to try to analyze someone else's logic, but here's a brief narrative that describes what I'm trying to do...
    The GLAR_SOLDS table holds one line for each home sold.  It's keyed by the MLSnumber.  Each record also stores up to four agents who've been involved in the transaction: the listing agent, the co-listing agent, the selling agent, and the co-selling agent.  The database function I've written above pertains to the listing side only.  If I can get this to work, a separate function will process the selling side.  If no co-listing agent is involved in a given sell, that agent should get credit for 1 unit sold.  If he/she has help from a co-listing agent, the agent should only get credit for 1/2 unit sold.
    Also, does anyone know how the "Debug SQL" functionality is supposed to work within Database Studio?  When I right-mouse click on my function, and follow the path thru "Debug As...", after entering the connection & function arguments, I'm presented with an empty screen.  If you could point me to some documentation somewhere, I'd gratefully read it.
    I'm using MaxDB 7.7.06.09 on Windows XP (WIN32) with MaxDB Database Studio 7.7.06.09 (build 009-123-202-944).
    Thanks everyone for your help & advice.
    ~Fred

    Fred,
    please either provide the full SQL statements for your example or stick with mine.
    I'm not going to build it up myself a second time to suit yours now.
    >  But now, my issue is how do I store the resultant data in its own table?
    So where is the problem?
    INSERT INTO <target table> (field 1, field 2, ...)  (<your query>)  UDPATE DUPLICATES-
    With my tables this looks like this:
    create table sell_result (list_agent varchar(20) primary key, SUM_CREDIT fixed (10,2))
    insert
    into sell_result (list_agent,sum_credit)
        ( select list_agent, sum (credit) as SUM_CREDIT
          from ( select sh.object_id,lag.name as list_agent, 1 as credit
                 from soldhomes sh join agents lag on lag.id = sh.list_agent_id
                union all
                 select sh.object_id, lag.name as list_coagent, 0.5 as credit
                 from soldhomes sh join agents lag on lag.id = sh.list_coagent_id
          group by list_agent
    update duplicates
    Check what we have now
    sqlcli db770=> select * from sell_result
    | LIST_AGENT           | SUM_CREDIT        |
    | -------------------- | ----------------- |
    | Lars                 |              4.50 |
    | Lisa                 |              3.00 |
    | Mona                 |              2.50 |
    | Paul                 |              2.50 |
    4 rows selected (600 usec)
    Now add some sales data...
    Insert into soldhomes values (11, 1, 2, NULL, NULL)
    Insert into soldhomes values (12, 2, NULL, NULL, NULL)
    Insert into soldhomes values (13, 2, NULL, NULL, NULL)
    Re-run the INSERT command and you're done:
    sqlcli db770=> select * from sell_result
    | LIST_AGENT           | SUM_CREDIT        |
    | -------------------- | ----------------- |
    | Lars                 |              5.50 |
    | Lisa                 |              3.00 |
    | Mona                 |              5.00 |
    | Paul                 |              2.50 |
    4 rows selected (390 usec)
    Neat, isn't it?

  • Creating function description: "inconsistence in description detected ..."

    In my own NW RFC-SDK based application, I am trying to create a RFC module description the hard way, which is to not download such a description from a SAP system, but to craft the description on-the-fly using API functions RfcCreateFunctionDesc, RfcCreateTypeDesc, RfcAddTypeField, RfcAddParameter and  RfcCreateFunction. When calling RfcCreateFunction the system responds with the message
    "inconsistence in description detected: non-unicode length is too small".
    As far as I can tell all values I provided in the API arguments are correct, including the unicode and non-unicode lengths in the type description of a structure that is underlying the only RFC parameter in the module.
    Here is what the module isi supposed to look like:
    module has only one Export parameter
    the parameter is structured
    the structure has a single field only, which is a character array of length 64 (i.e 128 bytes).
    My application is unicode based. I added some code to the application to trace the API calls along with the argument values. Here is the output:
    API RfcCreateFunctionDesc
    Created function description object; returned handle: 024A1880
    API RfcCreateTypeDesc
    Created type description object; returned handle:     024A1A00
    API RfcAddTypeField
    Added Field to type description 024A1A00:
      name                DEST
      type                0
      nucLength           64
      nucOffset           0
      ucLength            128
      ucOffset            0
      decimals            0
      typeDescHandle      00000000
      extendedDescription 00000000
    API RfcAddParameter
    Added parameter to funtion description 024A1880:
      name                ATTRIBUTES
      type                17
      nucLength           64
      ucLength            128
      decimals            0
      typeDescHandle      024A1A00
      optional            0
      direction           2
      parameterText
      defaultValue
      extendedDescription 00000000
    API RfcCreateFunction
    Created function object from description 024A1880; returned handle:     00000000
    RFC_INVALID_PARAMETER inconsistence in description detected: non-unicode length
    is too small
    Thanks so much for any help!

    Case closed. There was an API call missing in my code, RfcSetTypeLength, which sets the total lengths (unicode and non-unicode) of the structure after adding the structure components.Without that call the system assumes those lengths to be zero, thus the error ...

  • Create function with a cursor in it

    I need help to create a function called f_Getfeedesc. I want to use a cursor for Loop. The function will return fees description for any folder.
    If a folder has more than one fee description, it will concatenate the fees description.
    The select statement I have here returns the following fees description:
    CO Residential 3+ Units No Entry Penalty Fee
    C of O Initial Fee
    CO Residential 3+ Units Initial Fee
    However when the function is done if you run it using the folderrsn 99999 the result should look like this:
    CO Residential 3+ Units No Entry Penalty Fee / C of O Initial Fee / CO Residential 3+ Units Initial Fee
    If the folderrsn has only one fee description the result should just return that one fee description. e.g CO Residential 3+ Units No Entry Penalty Fee
    I am using the following tables:
    folder table with FOLDERRSN......... NOT NULL  NUMBER(10,0) column.
    accountbillfee table with FEECODE..........NOT NULL  NUMBER(10,0) column.
    validaccountfee table with FEECODE........NOT NULL  NUMBER(10,0) and FEEDESC............NOT NULL  VARCHAR2(80) columns.
    SELECT DISTINCT vaf.feedesc
    FROM folder f, accountbillfee abf, validaccountfee vaf
    WHERE f.folderrsn = abf.folderrsn
    AND vaf.feecode = abf.feecode
    --And f.folderrsn = argfolderrsn
    AND f.folderrsn = 99999 --for a specific folderrsn
    Edited by: user4653174 on Sep 12, 2008 1:31 PM

    Hi,
    What you're trying to do is called "string aggregation".
    There's an excellent page on AskTom with several general solutions.
    I recommend the first one, STRAGG.
    Once you have STRAGG installed, you can get the output you want as simply as this:
    SELECT    feecode
    ,         STRAGG (feedesc)
    FROM      validaccountfee
    GROUP BY  feecode;Edited by: Frank Kulash on Sep 13, 2008 2:56 AM

  • Help needed: Search function for custom Repository Manager

    Hi there,
    i'm writing my own Repository Manager for EP 6.0 SP2 PL4.
    I've serious problems getting the search function running. I'm using the 'new', Netweaver-based API.
    I think, there are some general questions to answer:
    - My Repository Manager exposes lots of custom 
       properties to the system. I create the properties
       for example using following code:
       IProperty newProp = new StringSingleValueProperty(
         PropertyName.getPropertyName(
                  "{}" + myAttName),
         myAttVal,                         PropertyFlags.constructFlags(
                  true, false, true, false)
        Is there any convention for the propertie's name?
        I think it has to be written in lowercase only?
        Can I use ANY namespace I want instead of the
        empty default namespace? (For example:
    - After indexing my resources (of course, containing my
       custom properties), the TREX-Monitoring screen for my
       index shows all my custom properties in the 'Document
       Properties' area, but all uppercase chars are escaped
       somewhat. Is this OK?
    - Trying to use the index above to search for particular
       resources in my repository by my custom properties
       fails all the time ('no docs found...'); searching for
       any system property works fine. What's the reason?
    - How can I force the (Property-) search uses my
       custom namespace-manager's methods
       isQueryPropertyNameUnderstood() and
       getQueryBuilder()
       to perform a 'pure' property search by the repository
       manager? It seems that the TREX always handles the
       queries by itself, because my methods are never called.
    Thanx for you help,
    Daniel

    I created a new manager and copied the classes exactly from the "simple" example and I see similar behavior. Actually, when I do this, folders are recursively copied, but not files. Again, browsing and viewing of files work fine. Again, I am not seeing any unexpected exceptions.
    The only thing that changed were the names and namespaces. Nothing else at all was changed.
    This makes me think I am missing some configuration somewhere or there is something special about the example project that the wizards are not creating. The only difference I see in the project file is an additional nature (com.tssap.selena.cmf.PatternNature), but I am not sure that is relevant.
    Wow, I am really stumped.
    -Alex

  • How to create function panels for my own C functions?

    I've been searching for a way to create my own function panels. CVI documentation seems to suggest that this can be done but the explanation inevitably turns to instrument drivers, not C functions.
    I don't yet know what an instrument driver is. So far I've never needed one. I just want to know how to put plain old C functions that I've created into the library tree for coworkers to use. Is that practically possible?

    The facility is couched in terms of "instrument driver" but it can be used for an arbitrary CVI function you've created.
    First make a function tree from File pull down menu   new ... Function Tree
    Then right click in blank function tree panel and create instrument or use Create pulldown menu, enter name as prompted, use help button.  You need to choose a "prefix" for your function names.
    The tricky part is when you want to add a function to your "instrument" you right click on the <create class or function panel window> token the first time, thereafter when adding a function you right click on one of the functions you've already added.  In either case you want to "create function panel window" which brings up the function panel window editor whcih allows you to place input controls that match the function signature.
    There's a learning curve but keep at it.  The help is good, use it.
    Menchar

Maybe you are looking for

  • [Forum FAQ] SkyDrive synchronization issue after upgrading to Windows 8.1

    After Windows 8.1 released, users may encounter the issues about syncing files in SkyDrive. There are the error messages you may find: Error 0xS00705B4: This operation returned because the timeout period expired Sorry, the action couldn't be complete

  • Salesforce Password not saving in CMC

    I've got a couple of reports running successfully outside of BOE that query SFDC with a username/password prompt. These have been published to our BOE server, and the Database Configuration set to "Use same database logon as when report is run". I've

  • Proxy servlet returns "page not found"

    I want all request ending with "/PPO" will be proxy to "http://www.yahoo.com".           Explanation:           Our application is deployed on:           C:\bea\user_projects\rci_domain\applications\rdas           "rdas" is an applications context, w

  • TCP COMMUNICAT​ION ON INTERNET

    Hello..        There is one example "TCP communication client-server model" in example finder.  I have tested it. It is running on local LAN connection.  What should I do to run it on internet... Please let me know Thanks Prashh 

  • Updated version of iTunes won't open HELP!

    After updating my version of iTunes to the most current version it now will not open. After telling iTunes to "run" the hour glass appears next to the mouse pointer and that is the extent of its attempt to open. The hour glass appears, then disappear