HElp needed regarding oci methods..

hi,
Dont we have oci functions which perform same task like these methods in mysql : mysql_insert_id(),mysql_info(),mysql_select_db(), mysql_real_escape_string().Actually we are working on some conversion form mysql to oracle..so we need these methods...If anyone already worked in such conversion will definitely be of great help.
Thanks.
srinath.

Hi,
since MySQL is a completly different system, the functions to connect and access are also completely different.
Oracle doesn't use fields, which are incrementet by "auto_increment". In a Oracle DB, you will instead use a Sequence and a Trigger for this:
Let's say you have a table "katalog" with a primary key "KAID" it will look like this:
-- Creating the Sequence:
CREATE SEQUENCE SEQ_KATALOG_KAID INCREMENT BY 1 START WITH 1 MAXVALUE 999999999999 MINVALUE 1 ;
-- Creating the Trigger, to use the Sequence:
CREATE OR REPLACE TRIGGER "KT"."TR_KATALOG_KAID" before insert on "KATALOG"
for each row begin
if inserting then
if :NEW."KAID" is null then
select SEQ_KATALOG_KAID.nextval into :NEW."KAID" from dual;
end if;
end if;
end;
ALTER TRIGGER "KT"."TR_KATALOG_KAID" ENABLE;
If you need to replace mysql_insert_id, you can use:
SELECT SEQ_KATALOG_KAID.currval AS KAID from dual;
Instead of using mysql_select_db(), you can select the database to use during connecting with OCI_connect(), or OCI_logon();
To have another database connected, during the script-runtime, you can either use oci_new_connect(), or use "CONNECT username/password@host/service" as an SQL statement.
Instead of using mysql_real_escape_string(), I think you have to test every single input, before using it as a value within your SQL statements.
Greetings from Hamburg
Thorsten

Similar Messages

  • Help needed regarding the updation of "Relationships" in BP

    Hello Guys,
    This is to request you to kindly help me regarding the following.
    We have a scenario where all the employees assigned to an Organizational unit (in PPOMA_CRM) are not showing in the "Relationships" ("Has Employee")in the BP transaction of that Organizational Unit.
    Could anyone let me know whether there is any update program that updates the "Relationships" from the Organizational asssignment. Or we need to enter the employees manually in BP "Relationships". Please help. Thanks in anticipation.
    Regards,
    Kishore.

    Hi Amit,
    Thanks alot for your reply. Its really helpful for me.
    So,we usually enter these relationships manually only, right? Before going ahead with the custom program, could you please let me know whether there is any SAP note related to this.Once again thanks alot for you help.
    Regards,
    Kishore.

  • Help needed regarding Segment Qualifiers

    Hi,
    In my process of implementing Apps R12 afresh, we just created the segments and assigned them their flexfield qualifiers today. In that, the one assigned towards alancing segment shows the value qualifiers like that of natural accounting segment, unlike the bal. segment value qualifier.
    I mean, when we try to insert a a value in the bal.segment it asks for qualifiers such as nature:expense/revenue/liability/asset, instead of going for the allow posting and allow budgeting alone. This is crazy, and I need your support.
    Thanks,
    Mukunthan L

    Hi Amit,
    Thanks alot for your reply. Its really helpful for me.
    So,we usually enter these relationships manually only, right? Before going ahead with the custom program, could you please let me know whether there is any SAP note related to this.Once again thanks alot for you help.
    Regards,
    Kishore.

  • Help needed Regarding Project Server - 2013 Workflow

    Hi All,
    I am new to Project server 2013 Workflow, hence please help me regarding this. Pardon me if this question is too trivial. 
    I have created a project type associated with a workflow and my workflow is as follows :
    So I am not doing anything here, I am just testing the workflow as mentioned by technet site : http://technet.microsoft.com/en-us/library/dn458865(v=office.15).aspx
    But it is mentioned that, after a minute or 2, the workflow state will change, also they have mentioned to press the Submit button.
    But in my case, the workflow is not moving to next stage [It just says 'The workflow is still processing - which never changes after hours] or I am getting the submit button (Submit button is disabled on the ribbon). Below is the state of my workflow :
    PS : I have made the user added to Portfolio managers group as well. But still I am having this same issue. 
    The Workflow manager is installed properly, and it is working fine in case of List workflow. I am facing the issue only wrt Site workflow for Project server 2013.
    Please help me to solve this issue.
    Thanks,
    shanky

    Hi Kiran,
    I am now facing issue while assigning a task to a person in the workflow.
    I am having a person named say 'John' , who is included in Project Manager as well as Portfolio Manager.
    And I am using a workflow as :
    Stage : Conceptual
    Assign a task to John (Task outcome to Variable: Outcome5 | Task ID to Variable: TaskID3 )
    Transition to stage
    Go to Approval
    But this is again giving issue as :
    Workflow Internal status : Cancelled
    Details: System.ApplicationException: HTTP 401 {"error":{"code":"-2147024891, System.UnauthorizedAccessException","message":{"lang":"en-US","value":"Access denied. You do not have
    permission to perform this action or access this resource."}}}
    PS : I have used the same Sharepoint admin account for 'Account Name' in ‘User Profile Sync' , Is this causing the issue? Please let me know.
    Thanks,
    Shanky

  • Help needed regarding BADI.

    hi all,
    can anyone plz tell me how to define BADI and how create an interface.
    plz tell from everything regarding that, i have work with basic ABAP only.
    anykind of links and any kind of matter will be helpful and you will be rewarded with points for your help difinatly.
    regards.
    raman.

    Hi Raman,
    Please search the forum and you have lots and lots of links in it. For you to start with, try these links,
    The specified item was not found.
    BADI
    Best Regards.

  • Help needed regarding font sizes

    Iam generating pdf documents using oracle developer's report builder.
    When i generate and view those pdf's using the web previewer thay appear to be quite fine,whereas when i host them on ias the font sizes gets bigger, thus lot of text gets truncated.
    Is there any parameters that has to be set for it.Pls help

    Hi Amit,
    Thanks alot for your reply. Its really helpful for me.
    So,we usually enter these relationships manually only, right? Before going ahead with the custom program, could you please let me know whether there is any SAP note related to this.Once again thanks alot for you help.
    Regards,
    Kishore.

  • Help needed regarding replication in ds5.2sp4

    Hi ,
    I am new to ldap . I am able to establish replication between master and consumer and trying to update it is getting update but i am geting the following error
    in error log
    INFORMATION - NSMMReplicationPlugin - conn=-1 op=-1 msgId=-1 - Replication bind to consumer alpha.ad.com:19941 failed:
    [16/May/2007:13:48:26 -0700] - INFORMATION - NSMMReplicationPlugin - conn=-1 op=-1 msgId=-1 - Failed to connect to replication consumer alpha.ad.com:19941
    [16/May/2007:13:48:26 -0700] - ERROR<8318> - Repl. Transport - conn=-1 op=-1 msgId=-1 - [S] Bind failed with response: Failed to bind to remote (900).
    Please help me regarding this .
    Message was edited by:
    ap7926

    If data is getting replicated from master to consumer then the bind for that specific replication agreement is working.
    Check your timestamps and current log entries. Are the "Failed to connect to replication" messages currently being generated? As long as your replication agreement is enabled the supplier will try to keep things up and running, retrying a failed consumer regularly (and generating about 1 set of log messaages per minute on my systems). So you'll get those messages on the supplier when a good consumer is down (the nsslapd directory server process that is).
    If you don't have these messages being generated currently then this probably means that your consumer was down around "16/May/2007:13:48:26 -0700" but is ok now. In that case those messages aren't of big concern. They're just telling you that you had a problem, which you hopefully already knew about.
    If replication is working (test by making a change on the supplier and checking it on the consumer) AND you're still concurrently getting these messages regularly then you have something interesting going on, probably due to a configuration issue. Without seeing the details it's difficult say what it would be.

  • Help need for badi method me_process_po_cust~check

    Dear All expert
    Pl see following thread
    I am stuck
    Help needed
    http://scn.sap.com/thread/3610303

    See the issue here is HOLD feature in PO should not be there if it meets the error condition.
    For this you can refer another BADI for this purpose ME_HOLD_PO.
    Refer one of my previous threads below , it might be helpful :
    Held Purchase order need not be created.
    Reiterating a thread related to same topic is not a good practice.

  • Help Needed regarding Mandatory Field.

    Hi All,
    I have requirement that i have to make certain feilds mandatory in my WD4A view. I have made the "state" property of the fields(input element) as "required". Then i tried doing an event on the view to check whether it throws an error, stating mandatory fields are blank, but i dint get any message.
    Please help me to understand whether what i did is suffice or i need to handle the mandatory concept through my code.
    Thanks,
    Selvakumar M.,

    Hi Selva,
    You need to call the static method check_mandatory_attr_on_view of class cl_wd_dynamic_tool. This would then automatically verify if all the mandatory fields have been filled or not. It would then populate the error messages into an internal table and display them in the view. Also the mandatory fields which haven't been filled would be highlighted with a red border. You need to put the below coding into the action up on which you want to trigger the data chesks.
    data: lt_msg TYPE cl_wd_dynamic_tool=>t_check_result_message_tab,
              lo_view_controller TYPE REF TO if_wd_view_controller,
              lo_message_manager type ref to if_wd_message_manager.
      lo_view_controller ?= wd_this->wd_get_api( ).
      lo_message_manager = lo_view_controller->get_message_manager( ).
      cl_wd_dynamic_tool=>check_mandatory_attr_on_view(
        EXPORTING
          view_controller = lo_view_controller
          display_messages = abap_true
        IMPORTING
          messages = lt_msg ).
    Regards,
    Uday

  • Help needed regarding the client server communication

    this is regarding my networking project which at present i am doing it in java...
    the project is abt establishing a server in my lab that controls all the other systems in that lab... now the problem is i have to shut down all the systems in the lab from the server on a click of a button.... this i need to do using socket programming to which i am new....
    So can anyone pls send me a sample code as to how to pass a command from server to shut shut down all the systems(clients) ..i need a java program that uses sockets concept to perform the above mentioned operation...pls note i am trying to establish a linux server
    regards
    lalita

    Dear hiwa
    i can use it but the constraint in my project is to use only the Socket programming due to time lacks.... i have to find a faster way to communicate between the server and the client...
    can u pls help me find a solution for this via sockets...
    hoping a favorable response
    regards
    Lalita

  • Help needed Regarding a business logic

    Hi all,
    My business requirement is
    requires to get a checksum from the KIOSK field. This would be something like a rule that for a given KIOSK generates a number from 0 to 9.
    The Field value contains alphanumerical
    Can any of guys help me in this logic.how to generate a checksum for a given field..
    Thanks & Regards;
    Vinit

    Alright I found something  I am not  sure if it is of use to you , A checksum is generally used to  detect the integrity of file
    it is calculated oin basis of hash algorithms so  how it is useful to for incoming filed values i m not  sure
    Please find the links below
    http://en.wikipedia.org/wiki/Checksum
    http://www.fastsum.com/support/online-help/checksums.php
    http://www.flounder.com/checksum.htm
    http://www.mkyong.com/java/how-to-generate-a-file-checksum-value-in-java/
    If it is useful , you need to implement a hash algorithm
    regards
    Ninad

  • Help needed regarding SUM keyword in an ITAB loop

    Hello,
    I am maintaining a code as given below.
    LOOP AT itab INTO totwa.
    SUM.
    ENDLOOP.
    totwa is defined as a workarea which is needed to hold the sum totals of the fields in the itab. According to the documentation of SUM, it should calculate the sum totals and should put the totals in the workarea mentioned. But somehow its not calculating the value. Could anyone please help me in resolving this issue. Please guide me with your thoughts as to what might have gone wrong.
    Note: the itab fields are of type P.
    Thanks in advance
    Sudha Naik

    Hello Suha
    According to the ABAP documentation the SUM statement is used in a specific situation:
    <b>Syntax
    SUM. </b>
    <b>Effect </b>
    <i>The statement SUM can only be specified within a loop starting with LOOP, and is only considered within a AT-ENDAT control structure. Prerequisites for using the statement SUM include using the addition INTO in the LOOP statement, and that the specified work area wa is compatible with the row type of the internal table. In addition, SUM cannot be used when the row type of the internal table itab contains components that are tables. </i>
    <i>The statement SUM calculates the component total with the numeric data type ( i, p, f) of all rows in the current control level and assigns these to the components of the work area wa. In the control levels FIRST, LAST , and outside of an AT-ENDAT control structure, the system calculates the sum of numeric components of all rows in the internal table.</i>
    I hope the following sample report will clarify the use of <b>SUM </b>and <b>COLLECT</b>.
    *& Report  ZUS_SDN_COLLECT
    REPORT  zus_sdn_collect.
    TYPES: BEGIN OF ty_s_line.
    TYPES:   key(1)    TYPE n.
    TYPES:   value     TYPE p DECIMALS 2.
    TYPES: END OF ty_s_line.
    TYPES: ty_t_itab    TYPE STANDARD TABLE OF ty_s_line
                        WITH DEFAULT KEY.
    DATA:
      gs_line       TYPE ty_s_line,
      gt_itab       TYPE ty_t_itab,
      gt_itab_coll  TYPE ty_t_itab.
    START-OF-SELECTION.
      DO 3 TIMES.
        gs_line-key = syst-index.
        gs_line-value = syst-index * '2.3'.
        APPEND gs_line TO gt_itab.
        APPEND gs_line TO gt_itab.
      ENDDO.
      gs_line-key = 4.
      gs_line-value = '5.5'.
      APPEND gs_line TO gt_itab.
      WRITE: / 'Initial list'.
      LOOP AT gt_itab INTO gs_line.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using SUM statement with AT END OF'.
      SORT gt_itab BY key.
      LOOP AT gt_itab INTO gs_line.
        AT END OF key.
          SUM.
          WRITE: / gs_line-key,
                   gs_line-value.
        ENDAT.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using SUM statement without control structure (1)'.
      SORT gt_itab BY key.
      LOOP AT gt_itab INTO gs_line.
        SUM.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using SUM statement without control structure (2)'.
      SORT gt_itab BY key.
      LOOP AT gt_itab INTO gs_line.
        SUM.
        WRITE: / gs_line-key,
                 gs_line-value.
        EXIT.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using COLLECT statement'.
      REFRESH: gt_itab_coll.
      LOOP AT gt_itab INTO gs_line.
        COLLECT gs_line INTO gt_itab_coll.
      ENDLOOP.
      LOOP AT gt_itab_coll INTO gs_line.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
      WRITE: / 'Using COLLECT statement for total sum'.
      REFRESH: gt_itab_coll.
      LOOP AT gt_itab INTO gs_line.
        gs_line-key = 0.
        COLLECT gs_line INTO gt_itab_coll.
      ENDLOOP.
      LOOP AT gt_itab_coll INTO gs_line.
        WRITE: / gs_line-key,
                 gs_line-value.
      ENDLOOP.
      WRITE: / syst-uline.
      SKIP 2.
    END-OF-SELECTION.
    Regards
      Uwe

  • Help needed regarding the deployment architecture for PROD env

    Dear All,
    Please help me with some clarifications regarding the deployment architecture for PROD env.
    As of now I have 2 single node 12.1.1 installations for DEV and CRP/TEST respectively.
    Shortly I will be having a PROD env of 12.1.1 with one DB node and 2 middle tier (apps) node. I need help in whether -
    1) to have a shared APPL_TOP in the SAN for the 2 apps node or to have seperate APPL_TOPs for the 2 apps node. The point is that which will be benificitial in my case from business point of view. The INST_TOPS will be node specific in any case right?
    2) Where to enable the Concurrent Managers, in the DB node or in the primary apps node or in 2 apps node both for better performance.
    12.1.1 is installed in RHEL 5.3
    Thanks and Regards

    Hi,
    Please refer to (Note: 384248.1 - Sharing The Application Tier File System in Oracle E-Business Suite Release 12).
    For enabling the CM, it depends on what resources you have on each server. I would recommend you install it on the the application tier node, and leave the database installed on one server with no application services (if possible).
    Regards,
    Hussein

  • Help needed regarding BADI in SAP-CRM 2007.

    hi all,
    i need some help regarding BADI for new creation and enhancement.
    plz help, you will be rewarded accordingly.
    regards.
    raman.

    Hi Raman,
    visit this link
    http://help.sap.com/saphelp_nw70/helpdata/en/32/a83942424dac04e10000000a1550b0/content.htm
    http://help.sap.com/saphelp_crm40/helpdata/en/c3/69bf4abf1045e0966badb60d6160dd/content.htm
    Regards
    Anup.

  • Help needed regarding custom reports

    hello,
    I am using EM 10.2.0.2 on windows 32-bit.
    All EM components are installed on a single machine.
    Have installed AGENT 10.1.0.5 for managing targets which are on LINUX 2.1
    Please help me in getting the solution for the following queries:
    (a)I need to create a custom report regarding the CAPACITY MANAGEMENT .
    (b)I have some UDM defined but I am not able to use these UDM while creating custom report.
    (c)Also is there any possibility that we can use views other than REPOSITORY VIEWS. What I meant was : instead of using REPOSITORY VIEWS can we use the tables of the target instances.
    Thanks in advance.

    You might want to try posting your question to the Grid Control Forum.
    Enterprise Manager

Maybe you are looking for

  • Function as Attribute in SQL raising error

    I have a problem I have a stored procedure 'test_p' and a function 'test_sub'. The Stored Procedure 'test_p' calls function 'test_sub' from a SQL. What I'd like to have is the error from the function to be raised to the 'parent' stored procedure. Wha

  • Tables report are stored in which db table

    tables report are stored in which db table ?and can we do remote comparision between this in dev and prd

  • How do I center a child window in the parent when it loads

    I want to open a window and have it start up centered in the parent window. What's the best way? Thanks in advance for the help.

  • @OrderBy in combination with addJoinedAttribute("...") doesn't work?

    hi there, @OrderBy beautifully works when the collection that has to be sorted is being fetched LAZY. But as soon as there is an attempt to join it in the query using query.addJoinedAttribute(“collectionToBeSorted”) I get no luck. Does it work as des

  • Sales Order credit check

    Hi Gurus, I'm new to FSCM. My requirement is that I have to implement the BADI UKM_CHECK_STEP so that a Sales Order is blocked when the Payment Term has value 'XXXX' even if the customer has sufficient available credit limit. Can anybody please sugge