Oracle EBS Purchase Order Cancel API

--------Approved Purchase Order Cancel via API

DECLARE

l_return_status VARCHAR2 (50);

CURSOR C_PO_CANCEL
IS
    SELECT pha.po_header_id,
    pha.org_id,
    pha.segment1 po_number,
    pha.type_lookup_code,
    pha.cancel_flag,
    pha.closed_code
    FROM po_headers_all pha
    WHERE 1=1
    AND pha.segment1 = '2100001262' -- Enter PO Number
    AND nvl(pha.closed_code,'OPEN') = 'OPEN'
    AND nvl(pha.cancel_flag, 'N') = 'N'
    AND approved_flag = 'Y';

BEGIN

fnd_global.apps_initialize (user_id => 1278,
                        resp_id => 50817,
                        resp_appl_id => 7000);

FOR i IN c_po_cancel

LOOP

mo_global.init ('PO');
mo_global.set_policy_context ('S',i.org_id );

DBMS_OUTPUT.PUT_LINE ('Calling API PO_DOCUMENT_CONTROL_PUB.CONTROL_DOCUMENT For Cancelling Documents');


 
po_document_control_pub.control_document
                    (p_api_version => 1.0, -- p_api_version
                    p_init_msg_list => fnd_api.g_true, -- p_init_msg_list
                    p_commit => fnd_api.g_true, -- p_commit
                    x_return_status => l_return_status, -- x_return_status
                    p_doc_type => 'PO', -- p_doc_type
                    p_doc_subtype => 'STANDARD', -- p_doc_subtype
                    p_doc_id => i.po_header_id, -- p_doc_id
                    p_doc_num => NULL, -- p_doc_num
                    p_release_id => NULL, -- p_release_id
                    p_release_num => NULL, -- p_release_num
                    p_doc_line_id => NULL, -- p_doc_line_id
                    p_doc_line_num => NULL, -- p_doc_line_num
                    p_doc_line_loc_id => NULL, -- p_doc_line_loc_id
                    p_doc_shipment_num => NULL, -- p_doc_shipment_num
                    p_action => 'CANCEL', -- p_action
                    p_action_date => SYSDATE, -- p_action_date
                    p_cancel_reason => NULL, -- p_cancel_reason
                    p_cancel_reqs_flag => 'N', -- p_cancel_reqs_flag
                    p_print_flag => NULL, -- p_print_flag
                    p_note_to_vendor => NULL, -- p_note_to_vendor
                    p_use_gldate =>NULL ,
                    p_org_id => i.org_id
                    );

COMMIT;

DBMS_OUTPUT.PUT_LINE('The Return Status of the API is => ' ||l_return_status);

    If l_return_status = 'S' Then

    DBMS_OUTPUT.PUT_LINE('The Purchase Order Which is Cancelled Now => ' ||i.po_number);
    Else

    DBMS_OUTPUT.PUT_LINE('The Purchase Order =>' ||i.po_number|| 'Failed for Cancel Due To Following Reason:');

    -- Error messages returned by the Cancel API

       FOR j IN 1 .. fnd_msg_pub.count_msg
        LOOP
        DBMS_OUTPUT.put_line (fnd_msg_pub.get (p_msg_index => j,
                                                   p_encoded => 'F'));
        END LOOP;
    END IF;
END LOOP;

END;

Output:

Calling API PO_DOCUMENT_CONTROL_PUB.CONTROL_DOCUMENT For Cancelling Documents
The Return Status of the API is => S
The Purchase Order Which is Cancelled Now => 2100001262

Oracle Cloud Database Services 2021 Specialist (1Z0-1093-21) Sample Questions

Oracle Cloud Database Services 2021 Specialist (1Z0-1093-21) Sample Questions:


1. How many DB systems must you provision before you can enable Oracle Data Guard for a virtual machine DB system database?
Ans: One with the primary database, because a new DB system with the standby database is created and associated with the primary database when you enable Oracle Data Guard.

2. The /u02 directory containing Oracle Homes (OH) is 80% utilized and you need to free up space in it. you own two Oracle Homes (OH193_A and OH193_B), each with a test database (193A and 193B respectively).
You decide to consolidate both databases into a single Oracle Home (OH193. |_A) to free up space. Which TWO actions must you perform?
Ans: use the Move Database option from the console.
     Schedule a downtime window with the Test teams who use the 193B database.
 
3. You enable automatic backups on your Exadata Cloud@Customer.?
Ans: Transparent Data Encryption (TDE) keystore (wallet)
 
4. After you have provisioned a virtual machine (VM) database (DB) system, what action can you take to meet changes in block storage requirements?
Ans: If a vm DB system requires more block storage, increase the storage at any time without impacting the system.
 
5. Which FOUR storage options are available in Oracle Cloud Infrastructure (OCI)?
Ans: Local storage
        Block Storage
File Storage
Object Storage

6. Which is NOT a prerequisite for patching Grid Infrastructure or database homes when using the console?
a) Oracle Clusterware is down on the VM cluster.
 
7. You want to permanently delete the DB System and its attached HeatWave cluster. Which action should you perform?
Ans: Delete the DB system and it will also delete the attached HeatWave Cluster.
 
8. In addition to the automatic backup of your Oracle Database associated with a database deployment, you are planning to take an on-demand backup of a database on Exadata Cloud Service.
How do you do this?
Ans: Use the Create Backup button in the backup section of the Database Details page.

9. What information is required to connect to the NoSQL Database Cloud Service?
Ans: signing key fingerprint, API signing key, tenancy OCID

10. What THREE steps must you perform to connect to a MySQL database in the database system by using SSH and MySQL Shell?
a) Connect to the MySQL Database Service instance.
c) Start MySQL Shell on the compute instance.
d) SSH into the compute instance from your local machine.

11.