Wednesday 26 September 2012

PO Form Customization



The purpose of this deliverable is to document the functional specifications for the Customization of PO form to ensure no PO is created for less than US$1000.If  enterd amount is less than it will pop-up a messgae.” Amount Should Be Greater Then $1000.Transaction Not Allowed'.if enterd amount Greater then $1000 it will allow to book the order .(CUSTOM.pll.).
Export program components

The following list contains all components required to completely install the PO form customization using CUSTOM.pll

1.  Open CUSTOM.pll in Oracle Forms Developer.
2. Modify the text of the CUSTOM package body
3. Compile all and save your changes. Exit from Oracle Forms developer.

4. Use the Oracle Forms Compiler program to generate a new .plx file for the CUSTOM library.

5. Verify that your file generated successfully. Place the .plx file in AU_TOP/resource.

6. Try it out from the Oracle Applications Navigator.

PO form customization using CUSTOM.pll  library

The CUSTOM.pll program performs the following steps:
1.      Declare The Variables.
2.      Write The Condition.
3.      Save & Compile.

      Filename                                  CUSTOM.pll
Directory                                 $AU_TOP/resources
Package name                         CUSTOM
Functions                                RETURN BOOLEAN
Procedure                                EVENT                                
      Form  Name                            POXPOEPO

1. Declare The Variables In Custom.pll (po)
form_name      varchar2(30) := name_in('system.current_form');
block_name     varchar2(30) := name_in('system.cursor_block');
 field_name     varchar2(30) := name_in('system.current_field');
 po_line_amount number(20);
 po_unit_amount number(20);
       po_total_amount number(20):=1000;

2.Write The Fallowing Code


form_name      varchar2(30) := name_in('system.current_form');
 block_name     varchar2(30) := name_in('system.cursor_block');
 field_name     varchar2(30) := name_in('system.current_field');
 
  po_line_amount number(20);
po_unit_amount number(20);
po_total_amount number(20):=1000;
po_limit_dsp number(20):=1000;
--po_limit_dsp1 number(20):=1000;
--vl1 varchar2(50):=name_in('PO_HEADERS.DOC_TYPE_NAME');
--AMT_LIMIT_DSP
--DOC_TYPE_NAME
  begin
    if (event_name='WHEN-NEW-FORM-INSTANCE') then
set_window_property(FORMS_MDI_WINDOW, TITLE,'Rajsekhar apps');
end if;
    null;
     --------PO FORM CUSTOMIZATION-----
 -- begin
if(event_name='WHEN-VALIDATE-RECORD') then
if(form_name='POXPOEPO' and block_name='PO_LINES') then
if name_in('PO_HEADERS.DOC_TYPE_NAME')='Standard Purchase Order' or name_in('PO_HEADERS.DOC_TYPE_NAME')='Planned Purchase Order' then
po_line_amount :=name_in('PO_LINES.QUANTITY');
po_unit_amount :=name_in('PO_LINES.UNIT_PRICE');
po_total_amount:=po_line_amount*po_unit_amount;
if po_total_amount<1000 then
fnd_message.set_string('Amount Should Be Greater Then $1000.Transaction Not Allowed');
fnd_message.show;
RAISE Form_Trigger_Failure;
--close_form('POXPOEPO');
--          else
--          message('accepted');
--          message('accepted');
end if;
end if;
end if;
end if;
if(event_name='WHEN-VALIDATE-RECORD') then
if(form_name='POXPOEPO' and block_name='PO_HEADERS') then
if name_in('PO_HEADERS.DOC_TYPE_NAME')='Contract Purchase Agreement' or name_in('PO_HEADERS.DOC_TYPE_NAME')='Blanket Purchase Agreement' then
po_limit_dsp :=name_in('PO_HEADERS.AMT_LIMIT_DSP');
if po_limit_dsp<1000 then
fnd_message.set_string('Amount Should Be Greater Then $1000.Transaction Not Allowed');
fnd_message.show;
message('REQUIRED');
message('REQUIRED');
RAISE Form_Trigger_Failure;
--close_form('POXPOEPO');
--          else
--          message('accepted');
--message('accepted');
--commit_form;
end if;
end if;
end if;
end if;
 end event;

No comments:

Post a Comment

Note: only a member of this blog may post a comment.