Dynamic months names

Hi all,
i have the Final Output Table with the fields  Workstart Date and WorkEnd date.
lets us say the work start date is  01-01-2009 and
                              workend date  is 31-12-2009.
so, in my final output table i want to generate 12 dynamic columns, each column referring to each month.
like 01-01-2009  is the first column
     01-02-2009 is the second column
     01--3-2009 is the third column etc.
the work start date  and workend date  is are also varying depending upon requirement.
if work start date is  01-01-2009  and
    workend date  is 31-12-2010. then in this case i have to generate 24 dynamic columns.
How to do this.
Thanks
Kamala

Try something like following
DATA  : GO_LINE_TYPE      TYPE REF TO CL_ABAP_STRUCTDESCR,  "LINE STRUCTURE
        GO_TABLE_DESC     TYPE REF TO CL_ABAP_TABLEDESCR,   "TABLE DEFINITION
        GS_COMPONENTS     TYPE        ABAP_COMPONENTDESCR,  "FIELDS STRUCTURE
        GT_COMPONENTS     TYPE        ABAP_COMPONENT_TAB,   "FIELDS TABLE
        GR_TAB            TYPE REF TO DATA,                 "DATA TABLE
        GV_DATE          TYPE        D.                     "DATE
FIELD-SYMBOLS: <GT_TABLE> TYPE        TABLE.                "FINAL TABLE
GV_DATE = '20090101'.   "SET FIRST OF THE YEAR
DO 24 TIMES.            "CREATE 24 COLUMNS
CLEAR GS_COMPONENTS.   "CLEAR FIELDS STRUCTURE
CONCATENATE 'D' GV_DATE INTO GS_COMPONENTS-NAME. "CREATE FIELD NAME D + DATE
GS_COMPONENTS-TYPE ?= CL_ABAP_STRUCTDESCR=>DESCRIBE_BY_NAME( 'BUDAT' ). "GET FIELD TYPE
APPEND GS_COMPONENTS TO GT_COMPONENTS.                                  "ADD FIELD TO LINE STRUCTURE
GV_DATE+4(2) = GV_DATE+4(2) + 1.                                        "GET NEXT MONTH
IF GV_DATE+4(2) > 12.                                                   "CHECK FOR NEW YEAR
    GV_DATE+0(4) = GV_DATE+0(4) + 1.                                     "INCREASE YEAR
    GV_DATE+4(2) = '01'.                                                 "SET FIRST MONTH
ENDIF.
ENDDO.
GO_LINE_TYPE  = CL_ABAP_STRUCTDESCR=>CREATE( GT_COMPONENTS ).            "CREATE LINE STRUCTURE
GO_TABLE_DESC = CL_ABAP_TABLEDESCR=>CREATE( GO_LINE_TYPE ).              "CREATE TABLE DESCRIPTION
CREATE DATA:  GR_TAB TYPE HANDLE GO_TABLE_DESC.                          "CREATE DATA REF TABLE
ASSIGN:  GR_TAB->* TO <GT_TABLE>.                                        "ASSIGN TABLE

Similar Messages

  • Saving result from sp_executesql into a variable and using dynamic column name - getting error "Error converting data type varchar to numeric"

    Im getting an error when running a procedure that includes this code.
    I need to select from a dynamic column name and save the result in a variable, but seem to be having trouble with the values being fed to sp_executesql
    DECLARE @retval AS DECIMAL(12,2)
    DECLARE @MonthVal VARCHAR(20), @SpreadKeyVal INT
    DECLARE @sqlcmd AS NVARCHAR(150)
    DECLARE @paramdef NVARCHAR(150)
    SET @MonthVal = 'Month' + CAST(@MonthNumber AS VARCHAR(2) );
    SET @SpreadKeyVal = @SpreadKey; --CAST(@SpreadKey AS VARCHAR(10) );
    SET @sqlcmd = N' SELECT @retvalout = @MonthVal FROM dbo.CourseSpread WHERE CourseSpreadId = @SpreadKeyVal';
    SET @paramdef = N'@MonthVal VARCHAR(20), @SpreadKeyVal INT, @retvalout DECIMAL(12,2) OUTPUT'
    --default
    SET @retval = 0.0;
    EXECUTE sys.sp_executesql @sqlcmd,@paramdef, @MonthVal = 'Month4',@SpreadKeyVal = 1, @retvalout = @retval OUTPUT;
    SELECT @retval
    DECLARE @return_value DECIMAL(12,2)
    EXEC @return_value = [dbo].[GetSpreadValueByMonthNumber]
    @SpreadKey = 1,
    @MonthNumber = 4
    SELECT 'Return Value' = @return_value
    Msg 8114, Level 16, State 5, Line 1
    Error converting data type varchar to numeric.

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. You should follow ISO-8601 rules for displaying temporal data. We need
    to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. And you need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    >> I need to select from a dynamic column name and save the result in a variable, but seem to be having trouble with the values being fed to sp_executesql <<
    This is so very, very wrong! A column is an attribute of an entity. The idea that you are so screwed up that you have no idea if you want
    the shoe size, the phone number or something else at run time of this entity. 
    In Software Engineering we have a principle called cohesion that says a model should do one and only one task, have one and only one entry point, and one and only one exit point. 
    Hey, on a scale from 1 to 10, what color is your favorite letter of the alphabet? Yes, your mindset is that level of sillyity and absurdity. 
    Do you know that SQL is a declarative language? This family of languages does not use local variables! 
    Now think about “month_val” and what it means. A month is a temporal unit of measurement, so this is as silly as saying “liter_val” in your code. Why did you use “sp_” on a procedure? It has special meaning in T-SQL.  
    Think about how silly this is: 
     SET @month_val = 'Month' + CAST(@month_nbr AS VARCHAR(2));
    We do not do display formatting in a query. This is a violation of at the tiered architecture principle. We have a presentation layer. But more than that, the INTERVAL temporal data type is a {year-month} and never just a month. This is fundamental. 
    We need to see the DDL so we can re-write this mess. Want to fix it or not?
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Passing Dynamic File Name to ODI nterface for processing to another system

    Hi,
    I need help regarding passing a Dynamically Name changing fixed length Flat File in ODI Interface. This interface is built for taking the Flat File as Input and process it to SQL Server by applying Data Mapping and transformations... The input Flat File Name is sequence generated for eg: OEORD1123.txt and next file will be OEORD1124.txt and it sits in Oracle Conc tier. How to pass the latest file name to ODI interface for processing
    Regards,
    Anil..

    Hi Guys...
    I would like to suggest a way.
    a) create a single interface with dynamic resouce name (a ODI variable) with a filter to the month column like:
    month_column = '#vCountMonth'
    b) in the refresh tab of a first variable (I named "vMonth"), use the following query: (varialbe should be alphanumeric, "not persistent")
    select to_char(to_date('#vCountMonth','MM'),'month') from dual
    c) create one more ODI variable (I named "vCountMonth"), alphanumeric, not persistent and at its refresh tab write:
    select lpad(to_char(#vCountMonth + 1), 2, '0') from dual
    d) now just create a package, drag and drop the objects in the following order:
    d.1) vCountMonth in set mode and set = 0 (zero)
    d.2) vCountMonth in refresh mode
    d.3) vMonth in refresh mode
    d.4) the interface
    d.5) vCountMonth in evaluate mode, evaluating "= 12"
    ==> if NO (KO, red line) link the KO line to d.2 step
    ==> a OK line is not necessary unless you have others steps after finish the evaluating
    Make any sense? That is a single loop to have the interface developed only one time.
    Please, remember to check each thread reply as Useful or Correct if they are useful to you...

  • Dynamically Pass the Column Name cursor. || Dynamic Column Name

    Hi,
    I need to dynamically pass the column name based on a Mapping table in a loop ( Right now i have hardcoded stuff )just like using Execute immediate.... Inside the procedure, I have commented as where i hit the problem.
    Thanks for all of your time...
    Thanks
    Muthu
    CREATE OR REPLACE PROCEDURE xml_testing_clob AS
    doc xmldom.DOMDocument;
    main_node xmldom.DOMNode;
    root_node xmldom.DOMNode;
    user_node xmldom.DOMNode; item_node xmldom.DOMNode;
    root_elmt xmldom.DOMElement;
    item_elmt xmldom.DOMElement;
    item_text xmldom.DOMText;
    item_test xmldom.DOMText;
    nodelist xmldom.DOMNodeList;
    sub_variable varchar2(4000);
    x varchar2(200);
    y varchar2(200);
    sub_var varchar2(4000);
    CURSOR get_users IS
    SELECT FIRST_NAME,LAST_NAME,ROWNUM FROM USER_INFO_TBL WHERE WEIN_NUMBER = '1234' ;
    CURSOR get_cdisc_name IS
    select CTS_COL_NAME,CDISC_NAME from CTS2CDISC_DICTIONARY where CTS_TABLE_NAME = 'USER_INFO_TBL';
    BEGIN
    -- get document
    doc := xmldom.newDOMDocument;
    doc := xmldom.NewDomDocument;
    xmldom.setVersion(doc, '1.0');
    xmldom.setStandalone(doc, 'no');
    xmldom.setCharSet(doc, 'ISO-8859-1');
    -- create root element main_node := xmldom.makeNode(doc);
    root_elmt := xmldom.createElement(doc,'AdminData');
    root_node := xmldom.appendChild(main_node,xmldom.makeNode(root_elmt));
    FOR get_users_rec IN get_users LOOP
    item_elmt := xmldom.createElement(doc,'User');
    xmldom.setAttribute(item_elmt,'OID' , get_users_rec.rownum);
    user_node := xmldom.appendChild(root_node,xmldom.makeNode(item_elmt));
    FOR cv_get_cdisc_name IN get_cdisc_name LOOP
    EXIT WHEN get_cdisc_name%NOTFOUND;
    sub_var := cv_get_cdisc_name.cts_col_name;
    sub_variable := 'get_users_rec.';
    sub_variable := 'get_users_rec.'||cv_get_cdisc_name.cts_col_name;
    x := sub_variable;
    dbms_output.put_line(x); -------------- Here i just see the literal string
    y := get_users_rec.FIRST_NAME;
    dbms_output.put_line(y); -------------- Here i just see actual value ( data )
    item_elmt := xmldom.createElement(doc,cv_get_cdisc_name.cdisc_name);
    item_node := xmldom.appendChild(user_node,xmldom.makeNode(item_elmt));
    item_text := xmldom.createTextNode(doc,x ); ---- This is the place i am hitting with an error .
    If i use variable X then i am able to see only the literal
    string in the output. BUT if i put cursor name.coulmname,
    then the resumt (XML) is fine.I wanted acheive this
    dynamically just like execute Immediate
    item_node := xmldom.appendChild( item_node , xmldom.makeNode(item_text));
    END LOOP;
    END LOOP;
    -- write document to file using default character set from database
    xmldom.WRITETOCLOB(doc,);
    xmldom.writeToFile(doc, 'c:\ash\testing_out.xml');
    -- free resources
    xmldom.freeDocument(doc);
    END;
    +++++++++++++++++++++++++++++++++++ XML OUTPUT +++++++++++++++++++++++++++++++++++++++++
    <?xml version="1.0" ?>
    - <AdminData>
    - <User OID="1">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName> </User>
    - <User OID="2">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="3">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="4">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    - <User OID="5">
    <FirstName>get_users_rec.FIRST_NAME</FirstName>
    <LastName>get_users_rec.LAST_NAME</LastName>
    </User>
    ++++++++++++++++++++++++++++++++++++++++++++++++++++ MAPPING TABLE DETAILS +++++++++++++++++
    CTS_COL_NAME     CDISC_NAME     CTS_TABLE_NAME     XML_TAG     -----------> Column Name
    FIRST_NAME     FirstName     USER_INFO_TBL     Element     -----------> Records
    LAST_NAME     LastName     USER_INFO_TBL     Element     -----------> Records

    My scenario is little different, let me explain:
    My columns will remain same but values changes (based on column formula) according to the selected prompt value
    If I select 'Oct' from prompt then
    Curr will contain data for 'Oct' only
    Next1 will contain data for 'Nov' only
    Next2 will contain data for 'Dec' only
    Next3 will contain data for 'Jan' of next year only.
    Later if I select 'Jul' from prompt then
    Curr will contain data for 'Jul' only
    Next1 will contain data for 'Aug' only
    Next2 will contain data for 'Sep' only
    Next3 will contain data for 'Oct' only.
    I don't have different columns for each months but the columns are capable to reflect data for any month.
    So, how can I reflect the column name as month name for which that contains data.
    Regards,
    S Anand

  • Oracle Reports 10g Distribution - Dynamic file name

    HI all.
    I have a problem in my distribution file.
    The following is my xml file:
    <destinations>
    <!-- Generate one file for all Employees -->
    <file id="MyFiles1" name="C:\Apps_Attach\Jan2007\Rep_all_Employees.pdf" format="pdf" >
    <include src="mainSection"/>
    </file>
    <!-- Generate a file for each Employee -->
    <foreach>
    <file id="MyFiles2" name="&<FOLDER_NAME>&<post_month>&<REP_EMP_NO>.pdf" format="pdf" instance="this">
    <include src="mainSection"/>
    </file>
    </foreach>
    </destinations>
    This is used for generating Pay Slips as pdf files and storing in the AS.
    The users can login to the application with their ID/password and view their payslips only. All working ok.
    I can successfully generate both - single file per Employee and one BIG pdf containing all pay slips - this is for the report generator's viewing only.
    My problem is - I have to store every month's files in a different folder. Say for example, Jan -2007 files in a folder called Jan2007 , Feb 2007's files in Feb2007 folder,etc.
    The parent path for these is fixed - C:\Apps_Attach\
    I am able to do this in the per employee files -
    &<FOLDER_NAME> gives C:\Apps_Attach\
    &<post_month> gives the Jan2007\, Feb2007\,..etc. folder name from Report.
    &<REP_EMP_NO> gives the file name per employee.
    But in the generate one file for all employees, I am not able to use dynamic path name like
    name="&<FOLDER_NAME>&<post_month>Rep_all_Employees.pdf"
    It works fine if I use
    name="C:\Apps_Attach\Jan2007\Rep_all_Employees.pdf" as in my xml file code above.
    Thanks in advance.
    -Anu.

    Anybody knows how?
    -Anu.

  • Dynamic file name from input payload (RFC 2 flat file)

    Hi,
    I have an RFC to flat file scenario. The output flat file has not an XML structure, it's just a plain text file generated with abap mapping.
    In my source interface (RFC), I have a field called <FILENAME>, I want to use the value of that field to create the target file using dynamic file name. But if  in variable substitution I use payload:ZRFC_NAME,1,FILENAME,1 It doesn't work because the dynamic variable substitution try to access to output payload, not the source one...
    What can I do?

    Hi Marshal,
           You can add a extra node to your target strucutre like
    FileName- Node
    --FileName - Element.
    do the mapping from the field filename of RFC to FileName field in u r target strucure. And use this  field path at Refrence in variable subtituion.
    In the Content converison add the Name & Values as below
    FileName.fileldNames -- FileName
    FileName.fieldFixedLengths -- 0
    FileName.fixedLengthTooShortHandling -- Cut
    So the extra field in u r target structure would not populate in u r target text file.
    Cheers
    Veera

  • How to change recordset bahaviour to accept dynamic column names in the where clause

    Hi
    im using php-mysql and i make a recordset and i want to make the column names in the where clause to be dynamic like
    "select id,name from mytable where $tablename-$myvar";
    but when i do this my i break the recordset and it disappear
    and when i use variables from advanced recordset it only dynamic for the value of the column not for the column name
    and when i write the column name to dynamic as above by hand it truns a red exclamation mark on the server behaviour panel
    so i think the only way is to change the recordset behaviour is it? if so How to make it accept dynamic column names?
    thanks in advance.

    As bregent has already explained to you, customizing the recordset code will result in Dreamweaver no longer recognizing the server behavior. This isn't a problem, but it does mean that you need to lay out your dynamic text with the Bindings panel before making any changes. Once you have changed the recordset code, the Bindings panel will no longer recognize the recordset fields.
    Using a variable to choose a column name is quite simple, but you need to take some security measures to ensure that the value passed through the query string isn't attempting SQL injection. An effective way of doing this is to create an array of acceptable column names, and check that the value matches.
    // create array of acceptable values
    $valid = array('column_name1', 'column_name2', 'column_name3');
    // if the query string contains an acceptable column name, use it
    if (isset($_GET['colname']) && in_array($_GET['colname'], $valid)) {
      $col = $GET['colname'];
    } else {
      // set a default value if the submitted one was invalid
      $col = 'column_name1'
    You can then use $col directly in the SQL query.

  • Month name displayed in month calendar view for previous month

    In iPad IOS 7.04 iCal month view the month name displayed at the top of the window is incorrect. The previous month name show when viewing a calendar month. Test by selecting year view and the any month from the year. The month view will be for the selected month, but the month name will be for the preceding month. The incorrect month name in month vie is also displayed if the month view is scrolled to new months.
    I observe this on my iPad II.
    Ha s anyone seen this error? Does anyone know if Apple has seen this and has a plan to correct it?

    Imhave the same exact problem on my iPad2.  It was not fixed in the recent iOS 7.1 release, even though modifications were made to the calendar app.  Very frustrating, since this is such an easily observable problem.

  • Checking for month name and number in different language?

    I have to let people search for documents by date. The database is used by French-speakers as well as English-speakers. The search allows users to type in free text (because it's not just dates they might search by, though if they do type in something that's intended to be interpreted as a date, that's the only thing they're allowed to type in). So, I might get '23/Apr/2009' or '2009/04/23', for example. (I also have to allow them to submit 23.04.2009 and 23 04 2009 and any combination of the above!)
    I have written a function which breaks the string into three bits, and then I work out if each bit is a year, or a month, or a day with simple rules (eg, if it's a number between 1900 and 2400, it must be the year component).
    When it comes to the month, I do two things. One is obvious: is it a number between 1 and 12? The other is, is it a month name that appears in a list of 'allowed' month names. So my function does this at the start:
    v_validmonths := 'january,february,march,april <and so on>';
    v_validmonths := v_validmonths || ',janv,fevr,avr,mai, <and so on>';Then I do this:
        for x in 1 .. listlen(v_validmonths,',') loop
          v_probemonth := listgetat(v_validmonths,x,',');   
          if instr(lower(v_partone),v_probemonth) > 0 then
            v_month := extract (month from to_date(v_partone,'MON'));
          end if;
        end loop;   IE, I compare the first component of the string (v_partone) with the list of allowed month names. I repeat that for the other two parts of the supplied string. As you can see, if one of the parts of the supplied string matches an allowed month name, I then try to extract the month number into a variable, using Oracle's own extract function.
    And that's where my problem arises. Because although "aout" is valid French for August and is permitted by my list of valid months, the extract function fails to understand it. A simple select extract (month from to_date('AOUT','MON')) from dual, for example, gives an ORA01843 (invalid month).
    How can I get the code to work with French (and German, actually) months and month abbreviations whilst also being able to understand English ones? Is there an in-built function that would allow me to do this? Or is there some way neatly to say, 'yes: AOUT is in the list, and it's month 8' without me having to rely on the extract function to work it out?
    (I realise that the business requirement here is very peculiar and your first reaction will probably be "this is horrible!". I will absolutely agree with you! But this is the requirement as has been explicitly specified by the MD and I can't negotiate it away, sadly.)

    Hi,
    Many of Oracle's date functions allow a parameter where you can override the current NLS settings only for that function call.
    For example:
    SELECT  TO_DATE ( 'JUIL.'
                     , 'MON'
                     , 'NLS_DATE_LANGUAGE=FRENCH'
                     ) AS month
    FROM    DUAL;You could also create your own table of month names
    NAME     NUM     LANGUAGE
    JANVIER   1     FRENCH
    JANV       1     FRENCHand look up the names in this table, rather than in a string hard-coded in the function. This might be especially useful if you wanted to allow your own abbreviations or spellings (e.g., ignoring accent marks).
    Edited by: Frank Kulash on Dec 16, 2010 11:40 PM

  • How to create a formula to get the month name based on userresponse

    Hi,
    I have created a report using E-Fashion - Actually i need  a report like  -  For ex i need 4 months data from 12 months
    My report should display the 4 months data along with starting & end month data in the next 2 columns
    I have used the prompt to fetch the data & i have created a formula in the cloumn like below:
    For the column haader i have given = Tonumber(userresponse("Enter start:")) - I am getting the Month number in the header But i need the month name in the header.Please guide me
    Regards
    Karthika

    Hi Ram,
      Thanks for your Help.I tried in an another way like I created 2 Variable -
    Start Date  =UserResponse("Enter Month(Start):"
    End Date = =UserResponse("Enter Month(End):"
    I have created the column header for
    start date:
    =If([start Date] = "1";"January";If( [start Date] = "2"; "February";If([start Date] = "3";"March";If([start Date] = "4";"April";If([start Date] = "5";"May";If([start Date] = "6";"June";If([start Date] = "7";"July";If([start Date] = "8";"August";If([start Date] = "9";"September";If([start Date] = "10";"October";If([start Date] = "11";"November";If([start Date] = "12";"December"))))))))))))
    End Date:
    =If([End Date] = "1";"January";If( [End Date] = "2"; "February";If([End Date] = "3";"March";If([End Date] = "4";"April";If([End Date] = "5";"May";If([End Date] = "6";"June";If([End Date] = "7";"July";If([End Date] = "8";"August";If([End Date] = "9";"September";If([End Date] = "10";"October";If([End Date] = "11";"November";If([End Date] = "12";"December"))))))))))))
    For the Datas in the column:
    Start Date:
    =[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(Start):")))
    End Date:
    =[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(End):")))
    I got the Report format as i required
    Thanks
    Karthika

  • Display Month name Year

    Hi,
    Which variable Displays Month name Year (Exaple: July 2007)???
    Help will be gratly appreciated...
    Thanks...

    Hi,
    Thanks for your information..
    But i am not getting like month and year display( Example:  Sept 2007)
    I am using Text variable 0P_FPER on 0Fiscal year/period..
    and entering Input as 006.2007 then the resultant query displays as 06.
    Please suggest me how to do it??
    For entry i should give 006.2007 (or) Sept 2007..
    But in the result it should display as Sept 2007..
    Help will be greatly appreciated...
    Thanks

  • How to set dynamic table name in sql query?

    I want set dynamic table name by parameter in sql query,just like:
    select * from :tbname
    but run report is error,BI P report table name is invalidation.
    What can i do? Thanks!

    Hi,
    that's only possible inside a data template with a lexical parameter.
    Regards
    Rainer

  • Problem with Dynamic Table Name

    Hello all,
    I am having trouble using a dynamic table name. I have the following code.....
    declare l_cur sys_refcursor;
    l_ID int;
    l_tableName varchar(30);
    BEGIN
    open l_cur for
    select hkc.ColumnID, mapping from &HKAPPDB_Schema_Name..doctablemapping ddm
    inner join &HKDB_Schema_Name..HKColumns hkc on hkc.doctablemappingid = ddm.id
    where ddm.id > 0;
    LOOP
         FETCH l_cur into l_ID, l_tableName;
         EXIT WHEN l_cur%notfound;
         -- update missing VerbID in DocumentDocMapping table
         UPDATE &HKAPPDB_Schema_Name..IndexedDocument
         SET VerbID = (SELECT t.VerbID
                             FROM (SELECT DocRef, VerbID, DateUpdated
                                  FROM &HKAPPDB_Schema_Name..l_tableName dd        - this is where the dynamic table name is used
                                  WHERE dd.VerbID is not NULL))
         WHERE HKColumnID = l_ID AND VerbID is NULL;
    END loop;
    end;
    /When I try to execute this i get an error
    ORA-00942: table or view does not exist
    What am I doing wrong?
    Regards,
    Toby

    redeye wrote:
    I only started about 6 weeks ago, with no tutorials and learning it on the fly; Same here.. only my introduction was to a 12 node Oracle OPS cluster all those years ago.. and required a whole new mind set after using SQL-Server extensively. But it was fun. Still is. :-)
    but thats what you get when a company throws you in at the deep end with a ridiculous time constraint to migrate a whole MSSQL DB.Migrating SQL-Server to Oracle is not a simple thing. A lot of best practices in SQL-Server are absolutely worse practices in Oracle - they are that different. Simple example is lock escalation - an issue in SQL-Server. In Oracle, the concept of a lock being escalated into a page lock simply does not exist.
    In terms of getting the migration done as quickly and painlessly as possible I try to reuse all the logic as it appears in the MSSQL code - in this case it was using dynamic table names. I do not doubt that i am probably shooting myself in the foot in the long run.....As long as you do not splatter too much blood on us here.. not a problem :D
    Seriously though - just keep in mind that what works in SQL-Server may not work as well (or even at all) in Oracle. So do not hesitate to refactor (from design to code to SQL) mercilessly when you think it is warranted.

  • FM to get the month name based on numeric value

    Hi , Is there any FM which returns the month name when we enter the corresponding numeric value . E.g. if the input is 3 the output must be March

    Hi,
    Try
    DATA: mon_number TYPE numc VALUE '03',
          month_name(20).
    SELECT ltx
      FROM t247
      INTO month_name
    WHERE spras = 'EN'
       AND mnr   = mon_number.
    Hope it helps.
    Regards
    Message was edited by: Shehryar Khan

  • Dynamic file name ?

    Hi,
    I am following this blog to name the target file/directory dynamically at the runtime :
    /people/sameer.shadab/blog/2005/09/23/an-interesting-usage-of-variable-substitution-in-xi
    But I am getting this error in the CC monitoring :
    Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: Unknown message header category 'interface_name ' for variable 'var1'.

    Hi,
    Try following this weblog for dynamic file name.
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Dynamic filename come under the Dynamic configuration in moni, for your messages.
    This is the code used inside.
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String ourSourceFileName = conf.get(key);
    return ourSourceFileName;
    That is why Dynamic configuration is coming in output.. It is a class to generate dynamic configuration file at runtime provided by SAP XI.
    Hope this will help you.
    regards
    Aashish Sinha
    PS : reward points if helpful

Maybe you are looking for

  • Customer balance report - S_ALR_87012172

    Hi sap gurus, I searched forum but I couldn't get enough knowledge. how does S_ALR_87012172 calculate customer's balance value? based on posting date, clearing date, document date or other date? I'm checking with fbl5n but balances are different.as I

  • Php to generate numbers spreadsheet

    there is a pear package (http://pear.php.net/package/SpreadsheetExcelWriter) that uses php to generate excel spreadsheets. could this be done with numbers? anyone have any idea what would have to change to use numbers instead of excel?

  • Idoc successfully posted without deleting service line

    Dear Team, I am trying to delete the service line item for multiple service lines throguh Idoc (FM : BAPI_PO_CHANGE) its bit of surprising thata my IDOC is getting posted without any errors but nothing is changing ,however the value is getting change

  • How long can Apple photo books be expected to last?

    How long can Apple photo books be expected to last?  Given the type of ink and paper used, what can we expect these books to look like in 10 years?  20 years?  100 years?

  • PrintStram Object taking a lot of memory (urgent)

    Hi, I have this peace of code which is a part of exception logging. I am analysing this code and I do not think the the printstream object is released in any moment as a result this is creating a great deadlock in performance as it is consuming memor