Help in inserting data to text item

I have a database item, iterval, which is CHAR type and values consist of
'SYSDATE+7','SYSDATE+1','SYSDATE+n/24'...where n is any number. I created a form with two text items, interval_l, which is a list item of CHAR type containing the values, EVERY WEEK, EVERY DAY, EVERY HOUR,etc. and I also have interval_num of NUM type which would contain n from interval. The problem that I am having is that I want to display the current value of interval, for example 'SYSDATE+5/24' as 'EVERY HOUR' in interval_l and '5' in interval_num. Do I need any triggers? I'm open to any suggestions.
Thanks in advance,
Kristine

You use triggers to run when a specific event occurs. So I guess when you query your interval column from your DB table, then the right place to translate the value is in a post-query trigger on the block.
All you need is some pl/sql code to parse the values of Interval:
If substr(Interval,1,8) = 'SYSDATE+'
and substr(Interval,-3) = '/24' then
interval_l := 'EVERY HOUR';
interval_num := substr(Interval,9, length(Interval)-11 );
Else ...

Similar Messages

  • Insert Date Using Text Field

    Hi,
    i have date item ,Can i insert date from text field in dd/mm/yy format.
    My Column for date is DATE type in table.
    How can i ido this with Text field .
    Thanks

    I think you want to have text field for user to input the date? (instead of date picker item type)
    If you are using custom PL/SQL code, it is fine, because you just use to_date(:Px_DATE_ITEM, 'dd/mm/yyyy'); or whatever format you are expecting, in your insert statement.
    If it is a DML process type, I don't think it's possible - apex probably converts the text from the data picker into a date datatype at run time, but not sure it'd do it when its just a text box.
    Ta,
    Trent
    Edited by: trent on Jan 28, 2011 10:57 PM
    I take that back. So long as you have specified the application date format in the globalization attributes, and the format in the text box is the same/valid (otherwise it must be in the format as specified in NLS_DATE_FORMAT), it will insert no trouble in a DML process. http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/bldr.htm#CHDBHCBB

  • How to enter the data into data block text item which has an LOV associated

    Hi,
    I have a data block, one of the data block text item has an LOV assigned. when I populate this text item using the LOV and do "execute_query", it is taking the value in the text item and adding it to the search criteria, but when I enter a value manually in that text item and do "execute_query" it is showing me an alert(which I created) "Please enter a value".
    My question is, why is not taking the value that I enter manually? Looks like before executing the query, this field is getting empty
    How to avoid this problem and make sure that the value entered in the text item is added in the where clause of the query?
    Any advice?
    Thanks in advance
    R.G

    Problem solved!
    Before doing execute-query, all the text items are being cleared,so I used a global variable to store that value
    Thanks anyway
    R.G

  • Insert hyperlink into Text Item

    I'm looking to create a footer text item for all reports that has a link that will launch an email to the BI team.  I was able to find some javascript that I can use to launch Outlook but I can only get it to work with a button item or link item.  I can't seem to figure out how to insert it into a Text Item.
    What I want is:
    "If you have any question please contact BI Team"
    where BI Team is the link.
    Thanks.

    Hi,
    i hope you want this functionality in WAD report. have u tried "HREF" in HTML code of WAD for that link.
    for example: you want to open the link on clicking on "BI Team" so write a code in WAD like this
    "If you have any question please contact  <a href="http://mail.google.com/" target="_blank" >BI team</a>
    Hope this will solve you query
    Thanks,
    Om Ambulker

  • Need Help In Inserting Data

    Hello Everybody
    I have to insert data through excel sheets containing over 2,00,000 lakh records
    I am using toad to insert data but the issue with toad is that it supports excel 97-2003 format and I have to divide the excel sheets again and again to insert the data
    I can also use the pl/sql developer to insert the data but I don't know the process, plz suggest some gud ways to do that
    Thanks & Regards
    Peeyush Sharma

    Hi,
    Use the below script for control file:
    load data
    infile 'C:\Documents and Settings\abcd\Desktop\dat1.csv'
    into table empz
    fields terminated by "," optionally enclosed by '"'
    (emp_id,emp_name,emp_sal)
    {code}
    there is a difference between .txt and csv loading. as  we are using csv(comma seperated values)
    fields terminated by : {code} fields terminated by "," optionally enclosed by '"' should be comma ( ,) .

  • STUDENT HELP: SAMPLE INSERT DATA PROGRAM (DYNPRO)

    Hello,
    I am a current student working on a project for school, so assume I am a beginner.
    I am asking for an example of a simple ABAP Dynpro (Not WebDynpro, we don't have access to that) program that will allow user to input, modify, and delete multiple records at once to a DB table.
    The DB tables are set up like this:
    Z_HBK
    MANDT
    HBK_ID
    S_PLANT
    R_PLANT
    HBK_DATE
    Z_HBK_DATA
    MANDT
    HBK_ID
    DRIVER
    CHECKER
    CUSTOMER
    PRODUCT
    R2S_QTY
    DAM_QTY
    DEST_QTY
    I need to be able to enter multiple records into the Z_HBK_DATA table, with the same HBK_ID. I have set the tables composite key to so the table can accept multiple HBK_ID entries:
    MANDT
    HBK_ID
    DRIVER
    CHECKER
    CUSTOMER
    PRODUCT
    I have tried countless times to use table wizard, but have not been successful.
    Please help my to create simple program that will enter multiple records at 1 time into the Z_HBK_DATA table.
    Also, If anyone can help me to add a button onto the following program to allow user to email report from individual report output screen, that would be very helpful as well.
    Thank you,
    Mike
    *& Report  Z03_HBK_REPORT_ALL
    REPORT  Z03_HBK_REPORTS.
    TYPES:  BEGIN OF TY_HBK_DATA,
            HBK_ID type Z03_HBK_DOC_NUM,
            DRIVER type PERSNO,
            CHECKER TYPE PERSNO,
            CUSTOMER TYPE KUNNR,
            PRODUCT TYPE MATNR,
            R2S_QTY TYPE INT2,
            DAM_QTY TYPE INT2,
            DEST_QTY TYPE INT2,
            END OF TY_HBK_DATA,
            BEGIN OF TY_HBK_DATA_R2S,
            HBK_ID type Z03_HBK_DOC_NUM,
            DRIVER type PERSNO,
            CHECKER TYPE PERSNO,
            CUSTOMER TYPE KUNNR,
            PRODUCT TYPE MATNR,
            R2S_QTY TYPE INT2,
            END OF TY_HBK_DATA_R2S,
            BEGIN OF TY_HBK_DATA_DAM,
            HBK_ID type Z03_HBK_DOC_NUM,
            DRIVER type PERSNO,
            CHECKER TYPE PERSNO,
            CUSTOMER TYPE KUNNR,
            PRODUCT TYPE MATNR,
            DAM_QTY TYPE INT2,
            END OF TY_HBK_DATA_DAM,
            BEGIN OF TY_HBK_DATA_DEST,
            HBK_ID type Z03_HBK_DOC_NUM,
            DRIVER type PERSNO,
            CHECKER TYPE PERSNO,
            CUSTOMER TYPE KUNNR,
            PRODUCT TYPE MATNR,
            DEST_QTY TYPE INT2,
            END OF TY_HBK_DATA_DEST.
    DATA: IT_HBK_DATA TYPE TABLE OF TY_HBK_DATA,
          WA_HBK_DATA TYPE TY_HBK_DATA,
          IT_HBK_DATA_R2S TYPE TABLE OF TY_HBK_DATA_R2S,
          WA_HBK_DATA_R2S TYPE TY_HBK_DATA_R2S,
          IT_HBK_DATA_DAM TYPE TABLE OF TY_HBK_DATA_DAM,
          WA_HBK_DATA_DAM TYPE TY_HBK_DATA_DAM,
          IT_HBK_DATA_DEST TYPE TABLE OF TY_HBK_DATA_DEST,
          WA_HBK_DATA_DEST TYPE TY_HBK_DATA_DEST.
    SELECTION-SCREEN BEGIN OF SCREEN 100.
      SELECT-OPTIONS: S_DATA FOR WA_HBK_DATA-HBK_ID.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 101.
      SELECT-OPTIONS: S_R2S FOR WA_HBK_DATA_R2S-HBK_ID.
    SELECTION-SCREEN END OF SCREEN 101.
    SELECTION-SCREEN BEGIN OF SCREEN 102.
      SELECT-OPTIONS: S_DAM FOR WA_HBK_DATA_DAM-HBK_ID.
    SELECTION-SCREEN END OF SCREEN 102.
    SELECTION-SCREEN BEGIN OF SCREEN 103.
      SELECT-OPTIONS: S_DEST FOR WA_HBK_DATA_DEST-HBK_ID.
    SELECTION-SCREEN END OF SCREEN 103.
    PARAMETERS: HBK_DATA RADIOBUTTON GROUP ONE,
                HBK_R2S RADIOBUTTON GROUP ONE,
                HBK_DAM RADIOBUTTON GROUP ONE,
                HBK_DEST RADIOBUTTON GROUP ONE.
    IF HBK_DATA = 'X'.
      CALL SELECTION-SCREEN 100 STARTING AT 10 10 ENDING AT 100 10.
      PERFORM GET_HBK_DATA.
      PERFORM DISP_HBK_DATA.
    ELSEIF HBK_R2S = 'X'.
      CALL SELECTION-SCREEN 101 STARTING AT 10 10 ENDING AT 100 10.
      PERFORM GET_HBK_DATA_R2S.
      PERFORM DISP_HBK_DATA_R2S.
    ELSEIF HBK_DAM = 'X'.
      CALL SELECTION-SCREEN 102 STARTING AT 10 10 ENDING AT 100 10.
      PERFORM GET_HBK_DATA_DAM.
      PERFORM DISP_HBK_DATA_DAM.
    ELSEIF HBK_DEST = 'X'.
      CALL SELECTION-SCREEN 103 STARTING AT 10 10 ENDING AT 100 10.
      PERFORM GET_HBK_DATA_DEST.
      PERFORM DISP_HBK_DATA_DEST.
    ENDIF.
    *&      Form  GET_HBK_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_HBK_DATA .
      SELECT HBK_ID
               DRIVER
               CHECKER
               CUSTOMER
               PRODUCT
               R2S_QTY
               DAM_QTY
               DEST_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA
        WHERE HBK_ID IN S_DATA.
    ENDFORM.                    " GET_HBK_DATA
    *&      Form  DISP_HBK_DATA
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISP_HBK_DATA .
    LOOP AT IT_HBK_DATA INTO WA_HBK_DATA.
          AT FIRST.
            WRITE: /10'HAULBACK NUMBER',
                    30 'DRIVER ID',
                    50 'CHECKER ID',
                    70 'CUSTOMER ID',
                    90 'PRODUCT',
                    110 'R2S QTY',
                    130 'DAMAGED QTY',
                    150 ' DESTROY QTY'.
            WRITE: /10 SY-ULINE.
          ENDAT.
          WRITE: /10 WA_hbk_data-HBK_ID,
                   30 WA_HBK_DATA-DRIVER,
                   50 WA_HBK_DATA-CHECKER,
                   70 WA_HBK_DATA-CUSTOMER,
                   90 WA_HBK_DATA-PRODUCT,
                   110 WA_HBK_DATA-R2S_QTY,
                   130 WA_HBK_DATA-dAM_QTY,
                   150 WA_HBK_DATA-DEST_QTY.
        ENDLOOP.
    ENDFORM.                    " DISP_HBK_DATA
    *&      Form  GET_HBK_DATA_R2S
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_HBK_DATA_R2S .
      SELECT HBK_ID
               DRIVER
               CHECKER
               CUSTOMER
               PRODUCT
               R2S_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA_R2S
        WHERE HBK_ID IN S_R2S.
    ENDFORM.                    " GET_HBK_DATA_R2S
    *&      Form  DISP_HBK_DATA_R2S
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISP_HBK_DATA_R2S .
    LOOP AT IT_HBK_DATA_R2S INTO WA_HBK_DATA_R2S.
          AT FIRST.
            WRITE: /10'HAULBACK NUMBER',
                    30 'DRIVER ID',
                    50 'CHECKER ID',
                    70 'CUSTOMER ID',
                    90 'PRODUCT',
                    110 'R2S QTY'.
            WRITE: /10 SY-ULINE.
          ENDAT.
          WRITE: /10 WA_hbk_data_R2S-HBK_ID,
                   30 WA_HBK_DATA_R2S-DRIVER,
                   50 WA_HBK_DATA_R2S-CHECKER,
                   70 WA_HBK_DATA_R2S-CUSTOMER,
                   90 WA_HBK_DATA_R2S-PRODUCT,
                   110 WA_HBK_DATA_R2S-R2S_QTY.
        ENDLOOP.
    ENDFORM.                    " DISP_HBK_DATA_R2S
    *&      Form  GET_HBK_DATA_DAM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_HBK_DATA_DAM .
      SELECT HBK_ID
               DRIVER
               CHECKER
               CUSTOMER
               PRODUCT
               DAM_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA_DAM
        WHERE HBK_ID IN S_DAM.
    ENDFORM.                    " GET_HBK_DATA_DAM
    *&      Form  DISP_HBK_DATA_DAM
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISP_HBK_DATA_DAM .
    LOOP AT IT_HBK_DATA_DAM INTO WA_HBK_DATA_DAM.
          AT FIRST.
            WRITE: /10'HAULBACK NUMBER',
                    30 'DRIVER ID',
                    50 'CHECKER ID',
                    70 'CUSTOMER ID',
                    90 'PRODUCT',
                    130 'DAMAGED QTY'.
            WRITE: /10 SY-ULINE.
          ENDAT.
          WRITE: /10 WA_hbk_data_DAM-HBK_ID,
                   30 WA_HBK_DATA_DAM-DRIVER,
                   50 WA_HBK_DATA_DAM-CHECKER,
                   70 WA_HBK_DATA_DAM-CUSTOMER,
                   90 WA_HBK_DATA_DAM-PRODUCT,
                   130 WA_HBK_DATA_DAM-dAM_QTY.
        ENDLOOP.
    ENDFORM.                    " DISP_HBK_DATA_DAM
    *&      Form  GET_HBK_DATA_DEST
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_HBK_DATA_DEST .
      SELECT HBK_ID
               DRIVER
               CHECKER
               CUSTOMER
               PRODUCT
               DEST_QTY FROM Z03_HBK_DATA INTO TABLE IT_HBK_DATA_DEST
        WHERE HBK_ID IN S_DEST.
    ENDFORM.                    " GET_HBK_DATA_DEST
    *&      Form  DISP_HBK_DATA_DEST
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM DISP_HBK_DATA_DEST .
    LOOP AT IT_HBK_DATA_DEST INTO WA_HBK_DATA_DEST.
          AT FIRST.
            WRITE: /10'HAULBACK NUMBER',
                    30 'DRIVER ID',
                    50 'CHECKER ID',
                    70 'CUSTOMER ID',
                    90 'PRODUCT',
                    150 ' DESTROY QTY'.
            WRITE: /10 SY-ULINE.
          ENDAT.
          WRITE: /10 WA_hbk_data_DEST-HBK_ID,
                   30 WA_HBK_DATA_DEST-DRIVER,
                   50 WA_HBK_DATA_DEST-CHECKER,
                   70 WA_HBK_DATA_DEST-CUSTOMER,
                   90 WA_HBK_DATA_DEST-PRODUCT,
                   150 WA_HBK_DATA_DEST-DEST_QTY.
        ENDLOOP.
    ENDFORM.                    " DISP_HBK_DATA_DEST
    Thank you,
    Mike

    Michael, you can adopt your needs using different technologies. If you tried it using a table-control (with wizard), that is something, I do not recommend. Try searching for "editable ALV grid", which will show your editable data that you can always just take from your internal table and pass it to the INSERT / UPDATE / MODIFY statement. You will find it much easier to use during your progress.
    If you have more specific questions, go ahead and ask. But do not expect people will give you the whole code once you do not have the idea (that is the place where it comes to the learning part of it).

  • Help for "insert data to variable tables"

    hi, guys.
    I want to make a tool to upload mass-data then insert the data to tables of SAP for integrative test.
    for example, to input the object tablename "AAAA" from screen, the program willl find the information of this table then input the data to the "AAAA" tables.
    But i have no idea how to define the internal table to suit various tables ( by define dynamic table? or any other ways) ,could you kindly give me some advice?
    thanks a lot in advance.
    Message was edited by:
            huijuan zhao

    hi zhao,
    welcome to sdn,
    for your requirement u can use bdc to upload file to internal table then u can update these internal table fileds to sap tables.
    or
    use <b>gui_upload</b> function module to upload data to internal table then u can use just <b>insert</b> keyword to update sap tables.
    see this sample code to update the database table <b>edpar</b>,
    report  zsd_edpar_update no standard page heading.
    *&Purpose:
    *&        program will be used to update EDAPR table on a daily basis.
    *&        This update will be based on Customer Sold To / Ship To partner
    *&        functions assignment. Ship To customer(s) will be linked to
    *&        the appropriate Sold To customer using the ?Acct at Cust?
    *&        number as a reference.  Then, Ship To customer(s) will be
    *&        set up withthe appropriate partner function with the Sold
    *&        To customer.it updated the DB tabel and gives the information
    *&        of customer level visibility t account receivable.
    *define database tables...
    tables: edpar,
            knvv,
            knvp.
    *define types...
    types: begin of t_tab_edpar,
           mandt type mandt,
           kunnr type kunnr,
           parvw type parvw,
           expnr type edi_expnr,
           inpnr type edi_inpnr.
    types: end of t_tab_edpar.
    types: begin of t_tab_knvv,
           kunnr type kunnr,
           vkorg type vkorg,
           vtweg type vtweg,
           spart type spart,
           eikto type eikto.
    types: end of t_tab_knvv.
    types: begin of t_tab_knvp,
           kunnr type kunnr,
           vkorg type vkorg,
           vtweg type vtweg,
           spart type spart,
           parvw type parvw,
           kunn2 type kunn2.
    types: end of t_tab_knvp.
    type-pools: slis.
    *define data statments...
    data: g_tab_edpar type standard table of t_tab_edpar,
          g_wa_edpar  like line of g_tab_edpar.
    data: g_tab_edpar1 type standard table of t_tab_edpar,
          g_wa_edpar1  like line of g_tab_edpar1.
    data: g_tab_edpar2 type standard table of t_tab_edpar,
          g_wa_edpar2  like line of g_tab_edpar2.
    data: g_tab_knvv type standard table of t_tab_knvv,
          g_wa_knvv  like line of g_tab_knvv.
    data: g_tab_knvp type standard table of t_tab_knvp,
          g_wa_knvp  like line of g_tab_knvp.
    data: repid like sy-repid,
          l_tab_fieldcat  type slis_t_fieldcat_alv,
          l_tab_fieldcat1 type slis_t_fieldcat_alv,
          l_tab_fieldcat2 type slis_t_fieldcat_alv,
          layout type slis_layout_alv,
          events  type slis_t_event,
          events1 type slis_t_event,
          wa_events  like line of events,
          l_pos type i.
    *selection screen...
    selection-screen begin of block b1 with frame title text-001.
    select-options: s_cust for knvv-kunnr obligatory,
                    s_sorg for knvv-vkorg,
                    s_dcha for knvv-vtweg,
                    s_divi for knvv-spart,
                    s_parf for knvp-parvw.
    selection-screen end of block b1.
    *start-of-selection...
    perform get_data.
    *to update the db table edpar...
    perform update_edpar.
    *display alv block...
    perform alv_block.
    *&      Form  get_data
          text
    -->  p1        text
    <--  p2        text
    form get_data .
      select kunnr
             vkorg
             vtweg
             spart
             parvw
             kunn2
             from knvp
             into table g_tab_knvp
             where
             kunnr in s_cust
             and
             vkorg in s_sorg
             and
             vtweg in s_dcha
             and
             spart in s_divi
             and
             parvw in s_parf.
      loop at g_tab_knvp into g_wa_knvp.
        move: g_wa_knvp-kunnr to g_wa_edpar-kunnr,
              g_wa_knvp-kunn2 to g_wa_edpar-inpnr,
              g_wa_knvp-parvw to g_wa_edpar-parvw.
        append g_wa_edpar to g_tab_edpar.
      endloop.
      if not g_tab_knvp[] is initial.
        select kunnr
               vkorg
               vtweg
               spart
               eikto
               from knvv
               into table g_tab_knvv
               for all entries in g_tab_knvp
               where
               kunnr eq g_tab_knvp-kunnr
               and
               vkorg eq g_tab_knvp-vkorg
               and
               vtweg eq g_tab_knvp-vtweg
               and
               spart eq g_tab_knvp-spart.
        loop at g_tab_knvp into g_wa_knvp .
          sort g_tab_knvv by kunnr.
          clear g_wa_knvv-eikto.
          read table g_tab_knvv into g_wa_knvv with key kunnr = g_wa_knvp-kunnr.
          if sy-subrc eq 0.
            move: g_wa_knvv-eikto to g_wa_edpar-expnr.
            modify g_tab_edpar from g_wa_edpar transporting expnr where kunnr eq g_wa_knvp-kunnr.
          endif.
        endloop.
      endif.
      sort g_tab_edpar by kunnr.
      delete adjacent duplicates from g_tab_edpar comparing kunnr parvw.
    endform.                    " get_data
    *&      Form  update_edpar
          text
    -->  p1        text
    <--  p2        text
    form update_edpar .
      delete from edpar." FROM TABLE g_tab_delete.
      call function 'DB_COMMIT'.
      loop at g_tab_edpar into g_wa_edpar.
        insert into edpar values g_wa_edpar.
        if sy-subrc  eq 0.
          move-corresponding g_wa_edpar to g_wa_edpar1.
          append g_wa_edpar1 to g_tab_edpar1.
        else.
          move-corresponding g_wa_edpar to g_wa_edpar2.
          append g_wa_edpar2 to g_tab_edpar2.
        endif.
      endloop.
    reward points if helpful,
    regards,
    seshu.

  • Pls help....BAPI_PO_CREATE1 text items filling...

    Hi experts,
    I need some help from you all.
    While doing program with BAPI_PO_CREATE1 , how to pass the parameters into these tables as inputs... wat are the mandatory fields for this..
    POTEXTHEADER
    POTEXTITEM
    how to assign values into this...???
    any useful inputs will be rewarded points.
    Rgds
    Lakshmiraj A

    Hi,
    Do you actually want to populate texts against your PO documents?  If you have no text data then these tables don't matter.
    Looking at SE37 to see the BAPI_PO_CREATE1 you can see that the two text tables are both optional so you don't have to populate them to create a PO.  You can also drill down on their structure definition to see the data required.  If this is where you are stuck, as you aren't sure what data you need to put into the text tables, I suggest the following to help you figure it out:-
    1. Read the documentation for BAPI_PO_CREATE1 as a good starter to explain about the BAPI.
    2. Look at the standard function module READ_TEXT and SAVE_TEXT - these are the basic module for reading and saving texts against objects in SAP and have some helpful documentation attached.  This might five you a clearer idea of what data goes where.
    3. Go to transaction ME23N and view an exisiting PO document that has texts assigned or go to ME22N and add texts to the header of a PO.  From the texts tab select the text and change "Continuous-text" in the drop down to "SAPScript editor".  This will show you the text in a more basic format and one that is very similar to how the lines of a text should be passed to the BAPI.
    Hope this helps.
    Gareth.

  • Help! Inserting data  into database

    Hi,
    I have problem in inserting new data into database.
    This is my code used.
    PROCEDURE insert_contact IS
    BEGIN
    GO_BLOCK('BLOCK3');
    first_record;
    LOOP
    insert into LIMS_JOB_LEVEL
         (JOB_LEVEL_CODE,JOB_LEVEL_DESC,LAST_UPD_ID,LAST_UPD_DATE)
         values
         ('FAF','FDSAFS','FDSAF','1-1-01');
         EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
         next_record;
    END LOOP;
    END;
    And I cannot insert the data.Can anyone help me to solve this
    problem of mine.
    Thanks a lot.

    I belive this got to do with the date format. There is another
    posting about this after your posting and there are couple of
    good solutions in there for the date formating. Please refer.

  • Help in inserting data in msc_st_supplies

    Hi,
    I am trying to develop custom porgram to insert additional supplies into msc_st_supplies table. Customer wants th send the POs which are "In PROCESS" by end of the day before th a Plan gets executed so that it sees them as supply to avoid creation of duplicate supply.
    To accomplish this, I am trying to add those POs as suuply in to msc_st_supplies before ODS Load .
    I need data mapping for this table. I kind of figured all columns except the sr_mtl_supply_id column? ANy idea what value to map? Checked mtl_supply table in source instance and it is not mapping to this as well.
    Any help is appreciated
    Thanks
    Maran

    Hello Maran,
    From ASPC responsibility, navigate to collection menu, and select the Self-service collection option. A window will open from which you can download AOTemplate files. These files will give you information about data that need to be loaded into staging tables, for example for Purchase orders.
    Regards,
    ct

  • Help with inserting Date into MySQL DB from registration form input

    I'm trying to automatically input the registration date of a customer into my MySQL DB. Nothing seems to work. I've tried timestamp in a table field, I've tried a hidden field in the form. Any suggestions?

    You can use NOW() in the insertion record code, it will display like a time stamp format (date + time). Otherwise u can use this if u just want to store the date, $today = date("j F Y "); . It will display like 21 May 2009. Further information about date() function you can get it HERE.

  • Helping in insert date as quarters

    Hello world ,
    i did this in transaction date and put in validation
    IF TO_CHAR(:BLK1.EO_TRNX_DATE,'DD/MM/YYYY')not in ('31/03/2010','30/06/2010','30/09/2010','31/12/2010','31/12/2009','30/09/2009') THEN
         message('Invalid Date');
              message('Invalid Date');
              RAISE FORM_TRIGGER_FAILURE;
    END IF;
    here i have to define the date with the year .
    i want not to define the year , i just want the user inert in quarter of a year in any year
    for example
    30/09/2007
    30/09/2000
    31/12/2002
    which i dont need to define it in the code

    Simply leave thema out of your TO_CHAR, like
    IF TO_CHAR(:BLK1.EO_TRNX_DATE,'DD/MM')not in ('31/03','30/06','30/09','31/12') THEN
    message('Invalid Date');
    message('Invalid Date');
    RAISE FORM_TRIGGER_FAILURE;
    END IF;

  • How to insert values using pushputtons in text item & fetch data based on

    Dear friends,
    I want to insert values in the Text item using pushbutton e.g to insert 05CST884 into text item using pushbuttons '0' '5' 'C' 'S' 'T' '8' '8' '4' (alpha numeric buttons) in the layout editor and then fetch data based on the number entered with that of one in the table in the another text item2 in the layout editor.
    Suggestions regarding how to develop and use effective triggers are welcome.

    At the block level (for the control block where all your push buttons are, let's call it block1) create a WHEN-BUTTON-PRESSED trigger. Your [A-Z] and [0-9] buttons should be on a dedicated non-database datablock to reduce problems. As stated previously, this trigger should just contain the code:
    :block2.text_item := :block2.text_item||get_item_property(:system.trigger_item, label);
    Also on the pushbutton block, create a backspacve button with its own dedicated WHEN-BUTTON-PRESSED trigger containing:
    if length(:block2.text_item) > 0 then :block2.text_item := substr(:block2.text_item, 1, length(:block2.text_item)); end if;
    This will hopefully erase the last character entered.
    block2 should be based on the database table (see Property Palette --> Database) you wish to query and text_item should be based on the database item which contains the code you entered. All the other database items you wish to displayshould also be added to block2.
    Add another FIND push button to block1 with the code:
    go_block('block2');
    execute_query;
    Without writing the whole thing for you, I'd suggest you get a decent Forms tutorial book to guide you through the basics (Oracle Forms Developers Handbook).

  • Difference between Two Date Should come into Text Item

    Dear All,
    i want to get difference between two date into text Item :P36_C in On Change java script.
    i have two Date Item :P36_A and :P36_B .i have extract these date value from table then difference comes into Text Field :P36_C.
    Now i want if i change Date into Item :P36_A or Item :P36_B then Defference between two date Should Come into Item :P36_C .
    So i have use Java Script Code to do this
    <script>
      function diffdat(){
        function getVal(item){
       if($x(item).value != "")
         return parseFloat($x(item).value);
       else
         return 0;
        $x('P36_C').value =
    getval((TO_DATE('P36_B', 'DD-MON-YYYY'))-
    getval(TO_DATE('P36_A', 'DD-MON-YYYY')))+1;
    </script>
    i have put this into Item HTML Form Element Attributes 
    onChange="javascript:diffdat();"it's not woring .
    How to work that Code with dates.
    Thanks

    You can always create your own difference function based on your own criteria. You can modify this to suit your needs.
    CREATE OR REPLACE FUNCTION CALC_OFFICE_DAYS(date1 DATE, date2 DATE)
    RETURN NUMBER
    IS
    v_begin_date DATE := date1;
    v_end_date DATE := date2;
    v_office_start_time VARCHAR2(10) := '09:30 AM';
    v_office_end_time VARCHAR2(10) := '06:30 PM';
    v_comp_begin_time DATE;
    v_comp_end_time DATE;
    v_days PLS_INTEGER := 0;
    v_hrs NUMBER := 0;
    v_ttltm NUMBER;
    BEGIN
    select trunc(v_end_date) - trunc(v_begin_date)
    into v_days
    from dual;
    select to_date(to_char(sysdate,'DD-MM-YYYY')||' '||to_char(v_begin_date,'HH24:MI'),'DD-MM-YYYY HH24:MI')
    into v_comp_begin_time
    from dual;
    select to_date(to_char(sysdate,'DD-MM-YYYY')||' '||to_char(v_end_date,'HH24:MI'),'DD-MM-YYYY HH24:MI')
    into v_comp_end_time
    from dual;
    select (v_comp_end_time - v_comp_begin_time)/24 into v_hrs from dual;
    IF v_hrs > 4 then
    v_ttltm := v_days + .5;
    ELSE
    v_ttltm := v_days;
    END IF;
    return v_ttltm;
    END;
    As has been noted, this question is best posted on the PL/SQL forum.

  • Insert data with collection data

    Hi,
    I am using a loop for inserting data into a table but it doesn't work.
    On a form you can insert data for the items (text field). These data were stored in the collection 'COLLECTION_C1_T20':
    if :P103_SEQNR is null then
    apex_collection.add_member(
    p_collection_name =>'COLLECTION_C1_T20',
    p_c001 =>:P103_C1,
    p_c002 =>:P103_C2,
    p_c003 =>:P103_C3,
    p_c004 =>:P103_C4,
    p_c005 =>:P103_C5,
    p_c006 =>:P103_C6,
    p_c007 =>:P103_C7,
    p_c008 =>:P103_C8,
    p_c009 =>:P103_C9,
    else
    apex_collection.update_member(
    p_collection_name =>'COLLECTION_C1_T20',
    p_seq =>:P103_SEQNR,
    p_c001 =>:P103_C1,
    p_c002 =>:P103_C2,
    p_c003 =>:P103_C3,
    p_c004 =>:P103_C4,
    p_c005 =>:P103_C5,
    p_c006 =>:P103_C6,
    p_c007 =>:P103_C7,
    p_c008 =>:P103_C8,
    p_c009 =>:P103_C9,
    end if;
    I have tried to concatenate the members C001, C002, ... of the collection with the counter v_count but an error is shown when I want to store the records into the table:
    ORA-06550: line 124, column 9: PL/SQL: ORA-00904: "C00": invalid identifier ORA-06550: line 103, column 1: PL/SQL: SQL Statement ignored
    The source code looks like this one:
    for v_count in 1 .. 9
    loop
    insert into L01_RESULTS (TEST_RESULT)
    values
       (select c00||v_count
        from apex_collections
        where collection_name = 'COLLECTION_C1_T20'
        and seq_id =
                   select max(seq_id)
                   from apex_collections
                   where collection_name='COLLECTION_C1_T20')
    end loop;
    end;Any a idea how to manage this?
    cheers,
    ben

    Mike,
    it is a form (wizard) to store about 200 data. This is managed by clicking a button (FINISH).
    I have about 10 processes to store the data and for testing I have decreased them to two processes. (8 processes are now executed when the button CANCEL is clicked and the other two are executed when the button FINISH is clicked.) So the process is executed by clicking the button.
    I post the source code because it is possible that I made a mistake witch I couldn't figure out:
    declare
    order_number_value                VARCHAR2(30);
    analyses_date_value               DATE;
    analytical_method_value           VARCHAR2(20);
    analyte_measured_value            VARCHAR2(40);
    analyst_name_value                VARCHAR2(20);
    valid_identifier_value            VARCHAR2(50);
    v_sql                             varchar2(4000);
    W_test_result                     varchar2(100);
    readout_value                     varchar2(400);
    begin
    readout_value := 'SIG_NUM_CEN_CELL_';
    for v_count in 1 .. 9
    loop
    v_sql:='select c00'||v_count||'
    from apex_collections
    where collection_name = ''COLLECTION_C1_T20''
    and seq_id = (select max(seq_id) from apex_collections
    where collection_name=''COLLECTION_C1_T20'')';
    execute immediate v_sql into W_test_result;
    insert into L01_RESULTS (READOUT, TEST_RESULT)
    values (readout_value||v_count,W_test_result);
    -- commit;
    end loop;
    end;ben

Maybe you are looking for

  • Acrobat Pro 9.0 freezes when viewing/scrolling through the table of contents of a document

    I am hoping someone can help me or has experienced the same problem I'm about to describe. I belong to the technical publications group of a fairly large company and I review a lot of PDF documents. I just installed Acrobat 9.0.0 (via CS4 Design Stan

  • Unable to load external swf which has runtime sharing with another swf.

    Hi, I am getting issues on loading external swf say "importer.swf" file into another swf file say "loader.swf" for second time like ReferenceError: Error #1065: Variable testSymbol is not defined. VerifyError: Error #1014: Class testClass could not b

  • Beginner trying to get my beans to work with jsp on tomcat

    Please help me open my eyes! I know this is a stupid oversight on my part, but I've been working for days on getting other things to work on my tomcat server, so I'm out of ideas on this one. I've followed all the tomcat docs instructions on where to

  • XML Parsing Woes

    I'm trying to parse XML being returned from a service but having no luck. I've written a unit test to parse a sample that looks like this: *<?xml version="1.0" encoding="UTF-8"?>* *<ShoppingLists xmlns="http://service.mydomain.com/2011/01" xmlns:i="h

  • Hide column based on prompt

    Hi Gurus, Can i hide column based on Prompt value? My requirement is I have report is showing Daily/Weekly/Monthly data based on prompt value ( Prompt selected values are Daily/Weekly/Monthly) If user select daily then report will display data every