Sign Up

Sign Up to our social questions and Answers to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In
Continue with Google
or use


Have an account? Sign In Now

Sign In

Login to our social questions & Answers to ask questions, answer people’s questions & connect with other people.

Sign Up Here
Continue with Google
or use

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

You must login to ask a question.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

Sorry, you do not have permission to add post.

Continue with Google
or use

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Oraask Logo Oraask Logo
Sign InSign Up

Oraask

  • Write
    • Add A New Post
    • Ask A Question

Oraask Navigation

Search
Ask A Question

Mobile menu

Close
Ask A Question
  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
    • Oraask XML Formatter
    • Oraask JSON Formatter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

Hassan AbdElrahman

MasterOracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
Ask Hassan AbdElrahman
1k Visits
29 Followers
0 Questions
Home/ Hassan AbdElrahman/Best Answers
  • About
  • Questions
  • Answers
  • Best Answers
  • Posts
  • Polls
  • Asked Questions
  • Comments
  1. Asked: October 15, 2018In: Oracle E-Business Suite

    How to change user password in oracle apps from backend?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on October 15, 2018 at 10:07 pm

    Hi Sara,you can use : fnd_user_pkg.ChangePassword API to change or reset password for any user from database like this:[code]DECLAREl_user_name VARCHAR2(30):= UPPER('ORAASK');l_new_password VARCHAR2(30):= 'welcome123';l_status BOOLEAN;BEGINl_status := fnd_user_pkg.ChangePassword ( username => l_uRead more

    Hi Sara,

    you can use : fnd_user_pkg.ChangePassword API to change or reset password for any user from database like this:

    [code]
    DECLARE
    l_user_name VARCHAR2(30):= UPPER(‘ORAASK’);
    l_new_password VARCHAR2(30):= ‘welcome123’;
    l_status BOOLEAN;
    BEGIN
    l_status := fnd_user_pkg.ChangePassword ( username => l_user_name,
    newpassword => l_new_password);
    —
    IF l_status THEN
    dbms_output.put_line (‘The password changed successfully for the User:’||l_user_name);
    COMMIT;
    ELSE
    DBMS_OUTPUT.put_line (‘Unable to reset password due to’||SQLCODE||’ ‘||SUBSTR(SQLERRM, 1, 100));
    ROLLBACK;
    END IF;
    —
    END;
    [/code]

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  2. Asked: October 14, 2018In: Oracle SQL

    Is there SQL Function to add space inside string value?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on October 14, 2018 at 11:56 pm
    This answer was edited.

    You can use RPAD or LPAD functions with spaces select 'Ora' || rpad(' ',5,' ') || 'Ask' from dual;  

    You can use RPAD or LPAD functions with spaces

    select 'Ora' || rpad(' ',5,' ') || 'Ask'
    from dual;

     

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  3. Asked: June 10, 2017In: PL/SQL

    How to check and test read/write permissions of Oracle directory?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on September 19, 2018 at 8:33 am
    This answer was edited.

    You can use the UTL_FILE package. For example, this will verify that you can create a new file named your_test_file_name.txt in the directory and write data to it [code]DECLAREl_file utl_file.file_type;BEGINl_file := utl_file.fopen (‘UR_DIR’, ‘some_new_file_name.txt’, ‘W’);utl_file.put_line (l_file,Read more

    You can use the UTL_FILE package. For example, this will verify that you can create a new file named your_test_file_name.txt in the directory and write data to it

    [code]
    DECLARE
    l_file utl_file.file_type;
    BEGIN
    l_file := utl_file.fopen (‘UR_DIR’, ‘some_new_file_name.txt’, ‘W’);
    utl_file.put_line (l_file, ‘Content of the file’);
    utl_file.fclose (l_file);
    EXCEPTION
    WHEN utl_file.invalid_path THEN
    dbms_output.put_line (‘File location is invalid’);
    END;
    [/code]

    Also you can use UTL_FILE.FGETATTR to check if your file is exist and readable or not for more info about UTL_FILE click here.

    If you are looking for How to grant read and write on directory in oracle you can check my answer here

    Regards.

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  4. Asked: August 11, 2017In: Oracle Application Framework - OAF

    How to Put session parameter on link oracle OAF ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on January 6, 2018 at 8:09 pm

    Hello Aashish, There are three common means of passing parameters between pages : Request Transaction Session and you can use VO attributes for passing values Values stored in VO attributes are available in all pages within the transaction with same Root AM. URL Parameters : Encryption and EncodingRead more

    Hello Aashish,

    There are three common means of passing parameters between pages :
    Request
    Transaction
    Session

    and you can use VO attributes for passing values
    Values stored in VO attributes are available in all pages within the transaction with same Root AM.

    URL Parameters : Encryption and Encoding
    When we are passing parameters in URL, following need to be considered:

    [code]
    {@Attr} – encodes. Changes Prince Kapoor to Prince%20Kapoor
    {!Attr} – encrypts. Encrypts sensitive information.
    {$Attr} – plain token substitution (no encoding or encryption)
    {@@RETURN_TO_MENU} – Used for E-Business Suite Personal Home Page. Same as OAWebBeanConstants.RETURN_TO_MENU_URL.
    {@@RETURN_TO_PORTAL} – Return the user to a launching Portal page. Same as OAWebBeanConstants.RETURN_TO_PORTAL_URL.
    [/code]

    See less
      • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  5. Asked: June 18, 2016In: PL/SQL

    Error: PLS-00103: Encountered the symbol when trying to compile

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on July 13, 2017 at 4:21 pm

    You need to change ELSEIF to ELSIF . your code would be like this : [code]declare CURSOR abc IS select * from all_Objects; begin for rec in abc loop if rec.object_id is null then null; elsif rec.owner is null then null; end if; end loop; end;[/code]

    You need to change ELSEIF to ELSIF .

    your code would be like this :

    [code]declare
    CURSOR abc IS select * from all_Objects;
    begin
    for rec in abc
    loop
    if rec.object_id is null then
    null;
    elsif rec.owner is null then
    null;
    end if;
    end loop;
    end;[/code]

    See less
      • 2
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  6. Asked: March 25, 2017In: JavaScript

    How do i redirect user from page to another in JavaScript ?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on July 12, 2017 at 8:57 pm

    Hi Saly, Actually you can achieve this by simulate HTTP redirect by using one of the following : // similar behavior as an HTTP redirect [code]window.location.replace("http://www.oraask.com");[/code] or // similar behavior as clicking on a link [code]window.location.href("http://www.oraask.com");[/cRead more

    Hi Saly,

    Actually you can achieve this by simulate HTTP redirect by using one of the following :

    // similar behavior as an HTTP redirect

    [code]window.location.replace(“http://www.oraask.com”);[/code]

    or

    // similar behavior as clicking on a link

    [code]window.location.href(“http://www.oraask.com”);[/code]

    at the end this your choice but for my suggestion i prefer using  (window.location.replace) because this doesn’t keep originate page in the session history.

    hope this help.

     

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  7. Asked: April 3, 2017In: PL/SQL

    ORA-06550: line , column : PLS-00201: identifier must be declared

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on July 12, 2017 at 9:26 pm
    This answer was edited.

    ORA-06550: error causes are:  You tried to execute an invalid block of PLSQL code (like a stored procedure or function), but a compilation error occurred. in your example, you selected a value inside the variable (v_last) that is not declared in your block. So to correct your block of code, you canRead more

    ORA-06550: error causes are:  You tried to execute an invalid block of PLSQL code (like a stored procedure or function), but a compilation error occurred.

    in your example, you selected a value inside the variable (v_last) that is not declared in your block.

    So to correct your block of code, you can rewrite it like this:

    DECLARE
    V_LAST EMPLOYEES.LAST_NAME%TYPE;
    BEGIN
    SELECT LAST_NAME INTO V_LAST FROM EMPLOYEES; dbms_output.put_line(‘v_last is :’ || V_LAST );
    END;
    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  8. Asked: March 24, 2017In: Oracle Ebs Api’s

    API to create and update Inventory Items in Oracle Apps R12

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on July 11, 2017 at 10:25 am
    This answer was edited.

    Hello @Jone,   you can create or update inventory item by using API (ego_item_pub.process_item) and this an example :   Note : before using both API's be aware that we are not committing the changes. You have to perform explicit commit manually from IDE or set parameter (p_commit = 'T') to commit yoRead more

    Hello Jone,   you can create or update inventory item by using API (ego_item_pub.process_item) and this an example :  

    Note : before using both API’s be aware that we are not committing the changes. You have to perform explicit commit manually from IDE or set parameter (p_commit = ‘T’) to commit your changes.

    1. Create new inventory item using this API example:
    DECLARE
      l_inventory_item_id   NUMBER;
      l_organization_id     NUMBER;
      l_return_status       VARCHAR2 (4000);
      l_msg_data            VARCHAR2 (4000);
      l_msg_count           NUMBER;
      x_message_list        error_handler.error_tbl_type;
    BEGIN
      fnd_global.apps_initialize (user_id => 1318, --> OPERATIONS
                                  resp_id => 50583, --> Inventory, Vision Operations (USA)
                                  resp_appl_id => 401); --> Inventory
    
      ego_item_pub.process_item (p_api_version                  => 1.0
                                ,p_init_msg_list                => 'T' -- (F:- False), (T:- True)
                                ,p_commit                       => 'F' -- (F:- False), (T:- True)
                                ,p_transaction_type             => 'CREATE' -- UPDATE FOR Updating item
                                ,p_segment1                     => 'Oraask_Item01' -- ITEM CODE
                                ,p_description                  => 'Oraask Test Item Description' -- ITEM DESCRIPTION
                                ,p_long_description             => 'Oraask Test Long Item Description' -- ITEM LONG DESCRIPTION
                                ,p_organization_id              => 204 -- Vision Operations
                                ,p_apply_template               => 'ALL'
                                ,p_template_id                  => 2 -- Purchased Item — select * from mtl_item_templates_vl
                                -- P_TEMPLATE_NAME => '@Purchased Item',
                                -- P_ITEM_TYPE => 'P',
                                ,p_inventory_item_status_code   => 'Active'
                                ,p_approval_status              => 'A'
                                ,x_inventory_item_id            => l_inventory_item_id
                                ,x_organization_id              => l_organization_id
                                ,x_return_status                => l_return_status
                                ,x_msg_count                    => l_msg_count
                                ,x_msg_data                     => l_msg_data);
    
      IF l_return_status = fnd_api.g_ret_sts_success THEN
        dbms_output.put_line ('Item is Created Successfully, Inventory Item ID : ' || l_inventory_item_id);
    
      ELSE
        dbms_output.put_line ('Item Creation is Failed');
        error_handler.get_message_list (x_message_list => x_message_list);
    
        FOR i IN 1 .. x_message_list.count
        LOOP
          dbms_output.put_line (x_message_list (i).message_text);
        END LOOP;
    
        ROLLBACK;
      END IF;
    --> EXCEPTIONS HANDLING PART
    EXCEPTION
      WHEN OTHERS THEN
        FOR i IN 1 .. l_msg_count
        LOOP
          dbms_output.put_line (substr (fnd_msg_pub.get (p_encoded => fnd_api.g_false), 1, 255));
          dbms_output.put_line ('message is: ' || l_msg_data);
        END LOOP;
    END;

     

    • Update existing inventory item using this API example:
    DECLARE
      l_inventory_item_id   NUMBER;
      l_organization_id     NUMBER;
      l_return_status       VARCHAR2 (4000);
      l_msg_data            VARCHAR2 (4000);
      l_msg_count           NUMBER;
      x_message_list        error_handler.error_tbl_type;
    BEGIN
      fnd_global.apps_initialize (user_id => 1318, --> OPERATIONS
                                  resp_id => 50583, --> Inventory, Vision Operations (USA)
                                  resp_appl_id => 401); --> Inventory
     
      ego_item_pub.process_item (p_api_version                  => 1.0
                                ,p_init_msg_list                => 'T' -- (F:- False), (T:- True)
                                ,p_commit                       => 'F' -- (F:- False), (T:- True)
                                ,p_transaction_type             => 'UPDATE' -- UPDATE FOR Updating item
                                ,p_Inventory_Item_Id            => 53899
                                ,p_description                  => 'Oraask test description' -- ITEM DESCRIPTION
                                ,p_organization_id              => 204 -- Vision Operations
                                ,x_inventory_item_id            => l_inventory_item_id
                                ,x_organization_id              => l_organization_id
                                ,x_return_status                => l_return_status
                                ,x_msg_count                    => l_msg_count
                                ,x_msg_data                     => l_msg_data);
     
      IF l_return_status = fnd_api.g_ret_sts_success THEN
        dbms_output.put_line ('Inventory Item has been updated Successfully, Inventory Item ID : ' || l_inventory_item_id);
    
      ELSE
        dbms_output.put_line ('Update inventory item is Failed');
        error_handler.get_message_list (x_message_list => x_message_list);
     
        FOR i IN 1 .. x_message_list.count
        LOOP
          dbms_output.put_line (x_message_list (i).message_text);
        END LOOP;
     
        ROLLBACK;
      END IF;
    --> EXCEPTIONS HANDLING PART
    EXCEPTION
      WHEN OTHERS THEN
        FOR i IN 1 .. l_msg_count
        LOOP
          dbms_output.put_line (substr (fnd_msg_pub.get (p_encoded => fnd_api.g_false), 1, 255));
          dbms_output.put_line ('message is: ' || l_msg_data);
        END LOOP;
    END;
    

    — By executing above code we have updated item description to be “Oraask test description” for inventory item id “53899”

    Hopefully, this code snippet helps you 🙂

    See less
      • 7
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  9. Asked: April 8, 2017In: Oracle Reports

    How to show a message in a report at runtime?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on April 11, 2017 at 5:10 pm
    This answer was edited.

    hi Albert, You can display a message in Oracle report builder by using the standard built-in srw.message. The basic syntax for using this package is: srw.message(error_no,'YOUR MESSAGE'); the error no will appear along with the message text. and here is the sample to do this in a particular functionRead more

    hi Albert,

    You can display a message in Oracle report builder by using the standard built-in srw.message.

    The basic syntax for using this package is:

    srw.message(error_no,'YOUR MESSAGE');

    the error no will appear along with the message text. and here is the sample to do this in a particular function

    FUNCTION chck_sal RETURN BOOLEAN IS
    BEGIN
      IF :sal < 0 THEN SRW.MESSAGE(
        100,
        'There is employee that take negative salary.'
      );
    RAISE SRW.PROGRAM_ABORT;
    ELSE :bonus := :sal * .01;
    END IF;
    RETURN(TRUE);
    END;
    See less
      • 1
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
  10. Asked: March 26, 2017In: Oracle E-Business Suite

    How to add “Auto Refresh” feature in EBS submit request form like version 12.2.6?

    Hassan AbdElrahman
    Hassan AbdElrahman Master Oracle ACE Pro Alum ♠ | Oracle Senior ERP Technical Consultant
    Added an answer on March 27, 2017 at 10:07 am

    Hello Beter,here you will find how to implement this functionality inside 12.1.3 + versions:Click Here : Implement Auto Refresh functionality in EBS 12.1.3+

    Hello Beter,

    here you will find how to implement this functionality inside 12.1.3 + versions:

    Click Here : Implement Auto Refresh functionality in EBS 12.1.3+

    See less
      • 0
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
1 … 3 4 5 6

Sidebar

Adv 250x250

Explore

  • Categories
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Dev Tools
    • Online Compiler
    • Base64 Converter
    • Oraask XML Formatter
    • Oraask JSON Formatter
  • Wiki
    • SQL Tutorials
    • Java Tutorials
    • Python Tutorials
    • JavaScript Tutorials

Footer

Oraask

About

Oraask is a website for developers and software engineers who want to learn new skills, share their knowledge, and solve their coding problems. Oraask provides free content on various programming languages and topics, such as Oracle, Python, Java, etc. Oraask also allows users to ask questions and get answers from other members of the community.

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy
  • Terms & Conditions

Follow

Oraask is licensed under CC BY-NC-SA 4.0Oraask CopyrightOraask CopyrightOraask CopyrightOraask Copyright

© 2019 Oraask. All Rights Reserved
With Love by Oraask.