Disabling the Button in Ap invoice through custom pll

Hi
i have done one customization in ap invoices , such way that
in supplier screen --> organization tab--> created the DFF for the supplier limit say 4000
now in ap invoices screen, now i creating the PREPAYMENT, if the amount exceed that 4000, it will create hold, i written code for that
now my problem is in HOLD TAB Release button is there,
my requirement is RELEASE BUTTON SHOULD BE DISABLED until the until the amount is not rectified.
in custom pll
if form_name = 'APXINWKB' then
if block_name = 'AP_HOLDS' then
if event_name = 'WHEN-NEW-RECORD-INSTANCE' then
l_invoice_id := name_in('INV_SUM_FOLDER.INVOICE_ID');
l_release_hold :=xxcus.AKRUTI_PAYABLES_PKG.release_single_hold(l_invoice_id);
if l_release_hold = 1 then
fnd_message.set_string('Check the Advance amount enter greater than Supplier Limit or Advance amount greater than Purchase Order amount');
fnd_message.show;
set_item_property('APXHOLDS.AP_HOLDS_CONTROL.ACTION_BUTTON',ENABLED,PROPERTY_FALSE);
elsif l_release_hold = 0 then
set_item_property('APXHOLDS.AP_HOLDS_CONTROL.ACTION_BUTTON',ENABLED,PROPERTY_TRUE);
end if;
end if;
end if;
end if;
the release button is not diabling since in the AP INVOICES forms, HOLDS is IN OBJECT GROUPS of that form the HOLD forms is APXHOLDS, how to disabled the button,
it showing the message"'Check the Advance amount enter greater than Supplier Limit or Advance amount greater than Purchase Order amount"
but it is not disabling the button

are you using 11.5.10? If you are why not try the personalization features?

Similar Messages

  • Can we change the Record Group Type through Custom.pll

    Hello All,
    I have a small requirement on Changing the Record Group Dynamically.
    Can i set the Record group type to 'Query' from 'Static'. i.e Can i change the Record group type dynamically through custom.pll. I know that we can dynamically change the Record group query.
    Please help me its a bit urgent.
    Thanks inadvance,
    Amarnadh Js

    you can control your record group runtime without create any recordgroup at design time..
    1.static group
    declare
       rg_name         VARCHAR2 (40)  := 'Global_Rgp_Menu';     --global record group name for menu use
       rg_id           recordgroup;                                            --global record group id
       gc_id           groupcolumn;                                     --global record group coulmn id
       errcode         NUMBER;                                                             --error code
       grp_row         PLS_INTEGER    := 0;                             --global record group row count
    begin
      rg_id := FIND_GROUP (rg_name);
       IF NOT ID_NULL (rg_id)
       THEN
          DELETE_GROUP_ROW (rg_id, all_rows);
       ELSE
          rg_id := CREATE_GROUP (rg_name, global_scope);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'menu_item', char_column, 100);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'p_type', char_column, 100);
          gc_id := ADD_GROUP_COLUMN (rg_id, 'p_no', char_column, 100);    
       END IF;
      grp_row := 0;
      for 1 in 1..10 loop
           grp_row := grp_row + 1;
          ADD_GROUP_ROW (rg_id, grp_row);
          SET_GROUP_CHAR_CELL (rg_name || '.menu_item', grp_row, 'menu' || to_char(i) );
          /*type*/
          SET_GROUP_CHAR_CELL (rg_name || '.p_type', grp_row,  'type' || to_char(i) );
          /*program_no */
          SET_GROUP_CHAR_CELL (rg_name || '.p_no', grp_row,  'programno' || to_char(i) ); 
      end loop;
    end;
    2. query group
    declare
       FACT_SQL VARCHAR2(500) :=NULL;
       rg_name1       VARCHAR2(40) := 'Global_Rgp_fact';
       rg_id1   RecordGroup;
       Error_Flag number:=0;
       group_error exception;
    begin
       rg_id1 := Find_Group( rg_name1 ); IF NOT Id_Null(rg_id1) THEN Delete_Group( rg_id1 ); END IF;     
       FACT_SQL := ' SELECT *   FROM MYFACTORY  ' ;      
       rg_id1 := Create_Group_From_Query( rg_name1,FACT_SQL ,global_scope);
        Error_Flag := POPULATE_GROUP(rg_id1);
        IF Error_Flag <>0 THEN     
               error_msg:='Error while populating factory group';   
               raise group_error;
        END IF; 
    exception
      when group_error then
         message(error_msg);
        raise;
    end;Edited by: nolemlin on 2010/3/23 上午 7:50

  • Disabling the Button

    Hi
    i have done one customization in ap invoices , such way that
    in supplier screen --> organization tab--> created the DFF for the supplier limit say 4000
    now in ap invoices screen, now i creating the PREPAYMENT, if the amount exceed that 4000, it will create hold, i written code for that
    now my problem is in HOLD TAB Release button is there,
    my requirement is RELEASE BUTTON SHOULD BE DISABLED until the until the amount is not rectified.
    in custom pll
    if form_name = 'APXINWKB' then
                   ---if block_name = 'AP_HOLDS' then
              if event_name = 'WHEN-NEW-RECORD-INSTANCE' then
                   l_invoice_id := name_in('INV_SUM_FOLDER.INVOICE_ID');
              l_release_hold :=xxcus.AKRUTI_PAYABLES_PKG.release_single_hold(l_invoice_id);
              if l_release_hold = 1 then
                   fnd_message.set_string('Check the Advance amount enter greater than Supplier Limit or Advance amount greater than Purchase Order amount');
                                  fnd_message.show;                              
                                  set_item_property('APXHOLDS.AP_HOLDS_CONTROL.ACTION_BUTTON',ENABLED,PROPERTY_FALSE);     
              elsif l_release_hold = 0 then
                   set_item_property('APXHOLDS.AP_HOLDS_CONTROL.ACTION_BUTTON',ENABLED,PROPERTY_TRUE);      
              end if;
              -- end if;
                   end if;
                   end if;
    the release button is not diabling since in the AP INVOICES forms, holds is IN OBJECT GROUPS, how to disabled the button

    Hello,
    This is the standalone Forms forum, and you would increase chances to get an answer by posting in the APPS forum.
    Francois

  • Disabling the button in a form

    Hi,
    May i know how to disabling the button in a form based on value of item in same itself. For eg: In a form an Select list item called 'Flag' which holds the values like Y and N. If Flag is N means the Button called 'Check' will be disable otherwise no need to disable the button 'Check'. It is our requirement, please help me if any one know the solution.
    Regards,
    Neel

    Hi Neel,
    You could set the conditional display of the button based on a Plsql function returning a boolean.
    Something along the lines of:
    IF :P1_ITEM = 'Some Value' THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    This will not display the button at all unless the P1_ITEM is equal to the value that you want.
    This is the simplest form that will get you going. If you want to "grey out" the button to leave it visible but disabled then you would need to investigate this a little further. I have seen some other threads that would probably help you out here but am no exert on javascript so just have a poke around.
    Hope this helps,
    Mike C

  • Enabling and disabling the button in the multi record block

    hi all,
    i am using
    Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have a multi record block each block contains a button(button is to approve the record in terms of changing the status)
    i have the items like date,remarks and button
    the button should be enabled if the remarks is not null otherwise it should be disabled.
    for this in pre-record trigger i have written
    if :record is null then
       set_item_property('button',enabled,property_false);
    else
          set_item_property('button',enabled,property_false);
    end if;what problem is enable and disable is impacting on all the buttons in the block. in other words if first record's remarks is null then all the records button is disabled. if first record's remarks column is not null then all the records of the button column is enabled.
    i have to make enable and disable the button for the corresponding record.that means if first record's remarks column is not null then only first records button should be enabled others should be disabled.
    Thanks..

    You need to set the No. of items displayed to 1 as Ammad had said, additionally you can set the X and Y Position (Just Y will do and having fixed X) of the button depending upon the current record.
    can u explain this part alone bit more (setting the position of x and y)You need to calculate the variable Y_POS depending upon the current position of the cursor that is the current record.
    You can find the current record Y_POS using combination of
    V_CURRENT_RECORD := :SYSTEM.CURSOR_RECORD;
    V_TOP_RECORD := GET_BLOCK_PROPERTY ('BLOCK_NAME', TOP_RECORD);
    V_ITEM_Y_POS := GET_ITEM_PROPERTY ('ITEM_NAME', Y_POS);
    -- Also needs to add the Y_POS of the relative other items in the muti-record block
    V_HEIGHT := GET_ITEM_PROPERTY ('BUTTON_NAME', HEIGHT);
    -- Note :- TOP_RECORD  Returns the record number of the topmost visible record in the given block.
    V_Y_POS := V_ITEM_Y_POS + ((V_CURRENT_RECORD - V_TOP_RECORD) * V_HEIGHT);
    -- You will need to add Distance between Items in records if anyThen you can Set the current Y_POS of the button.
    SET_ITEM_PROPERTY ('BUTTON_NAME', Y_POS, V_Y_POS);
    [/code[
    Hope this helps
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Feb 24, 2011 4:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • File chooser disabling the buttons

    i want to disable the buttons unless the user chooses a file or inputs
    name of the file how can i do that

    Hello,
    you could use FileChooser's setControlButtonsAreShown(boolean)-method:import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.File;
    import javax.swing.*;
    import javax.swing.filechooser.FileSystemView;
    public class FileChooserTest extends JFrame
         public FileChooserTest()
              super("File-Chooser Test");
              setDefaultCloseOperation(EXIT_ON_CLOSE);
              final JFileChooser fileChooser = new JFileChooser(FileSystemView.getFileSystemView());
              fileChooser.setControlButtonsAreShown(false);
              fileChooser.addActionListener(new ActionListener(){
                   public void actionPerformed(ActionEvent e)
                        getContentPane().invalidate();
                        fileChooser.setControlButtonsAreShown(true);
                        getContentPane().validate();
                        getContentPane().repaint();
              getContentPane().add(fileChooser);
              pack();
              setLocationRelativeTo(null);
              setVisible(true);
         public static void main(String[] args)
              new FileChooserTest();
    }regards,
    Tim

  • How to disable the button???

    Hi, guys.
    I searched the forum, but did not find anything about disabling the button. There are examples of disabling text areas... But when i tried to implement same technics to disable a button, it did not work.
    I have a page with two regions items region and buttons region. When page opens i want to check if P1_TXT_BOX in items region is empty and if yes, disable button P1_CMD_DOTHIS in buttons region. And then onBlur for P1_TXT_BOX, if it is not empty - enable the button.
    Pls, help...
    Thnks.
    Mike

    Hi,
    I have always struggled with buttons and javascript in APEX because of the way it generates the buttons (as a "button" not "submit").
    A way round it would be to create the buttons using html then disabling the accept button:
    <input type="submit" id="P1_DOWNLOAD" value="Download" onclick="swapButtonStatus();" />
    <input type="submit" id="P1_ACCEPT" value="Acc" onclick="swapButtonStatus();" />
    <script>
    document.getElementById('P1_ACCEPT').disabled="true";
    </script>
    You just need to put them in the region footer or somewhere applicable.
    And use the following javascript function in the HTML Header:
    function swapButtonStatus()
    var downloadButton = document.getElementById('P1_DOWNLOAD');
    var acceptButton = document.getElementById('P1_ACCEPT');
    if(acceptButton.disabled=="")
    downloadButton.disabled="";
    acceptButton.disabled="true";
    //you can submit the button using: then create a process that
    //runs when request=Accept
    doSubmit('Accept');
    else if(downloadButton.disabled=="")
    acceptButton.disabled="";
    downloadButton.disabled="true";
    //you can submit the button using: then create a process that
    //runs when request=Download
    doSubmit('Download');
    Hope this helps
    Graham.

  • Disabling the button till the response comes

    hi all
    i want the button to be disabled till the response has finished on clicking the button. Can anyone help how to do it.
    in java script it can be done, but it is painful for doing each and every form. so i want a centralized way for doing it.
    will the submit button help? we had lot of problem due to it when the load increased and several false records came due to clicking the button several times when response took a long time to come.
    in our project we will normal button and the action is executed using the action attribute.

    There is no other way than disabling the button with Javascript after onclick. Just create a simple function which does that and call that function in the onclick attribute.

  • How to disable the button in application toolbar in report pgm

    Can anyone help with How to disable the button in application toolbar in report pgm

    Hi,
    You can use it_excluding to disable button on the tool bar.You have to find the function code for the required button and append that function code to the it_excluding .The optional IMPORTING parameter IT_EXCLUDING is an internal table. It is only needed if the caller uses the list tool standard interface but wants to deactivate interface functions which he or she does not need.You can have your defined pf-status using I_CALLBACK_PF_STATUS_SET.
    SAMPLE PROGRAM
    tables spfli.
    type-pools: slis.
    DATA W_FCODE TYPE SLIS_EXTAB-FCODE.
    data: t_spfli TYPE SPFLI OCCURS 0 WITH HEADER LINE.
    select * from spfli into table t_spfli.
    data : t_excluding TYPE SLIS_T_EXTAB .
    W_fcode = '&OUP'.
    append w_fcode to t_excluding.
    W_fcode = '&ODN'.
    append w_fcode to t_excluding.
    call function 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_STRUCTURE_NAME = 'SPFLI'
    IS_LAYOUT =
    IT_FIELDCAT =
    IT_EXCLUDING = T_EXCLUDING
    tables
    t_outtab = T_SPFLI
    EXCEPTIONS
    PROGRAM_ERROR = 1
    OTHERS = 2.
    if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    endif.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/99/49b844d61911d2b469006094192fe3/frameset.htm
    Regards,
    Priyanka.

  • Disable the buttons for creation using PFCG roles

    Hi SAP Experts,
       How to disable the buttons for creation using PFCG roles?
    Regards,
    Jaya

    Hi,
    u have to write the code in <b>at selection-screen output</b> event
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF  <b>P_PRINT</b> = 'X'.  " this is radiobutton
          IF screen-name = 'P_RANGE'.
            SCREEN-INPUT = 0.
          ENDIF.
          modify screen.
        ELSE.
          IF screen-name = 'S_LFDAT-LOW'.
            SCREEN-INPUT = 0.
          ENDIF.
          IF screen-name = 'S_LFDAT-HIGH'.
            SCREEN-INPUT = 0.
          ENDIF.
          IF screen-name = 'S_WERKS-LOW'.
            SCREEN-INPUT = 0.
          ENDIF.
          IF screen-name = 'S_WERKS-HIGH'.
            SCREEN-INPUT = 0.
          ENDIF.
          IF screen-name = 'P_LIFNR'.
            SCREEN-INPUT = 0.
          ENDIF.
          IF screen-name = 'S_BUKRS'.
            SCREEN-INPUT = 0.
          ENDIF.
          modify screen.
        ENDIF.
      ENDLOOP.
    Hope it helps.
    Regards,
    Sonika

  • How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods

    Hi All,
    How to Handle Automatic Skip Property of Item in Oracle Forms through Custom.pll or from other methods.
    This is a enhancement requirement.
    When ever user enter value in field 1 then automatically cursor should go to next field.

    Hello Bobb,
    You can create a trigger(when-list-changed) for each list item where you could:
    1.recreate the record groups and then use POPULATE_LIST so you can hide the selected values. In forms builder online help there are some good examples about create record groups dynamically.
    or
    2.you can perform a validation instead of hiding the selected values. If the values is already selected the display a message 'Value already selected....'
    Second option is much faster(only an 'if clause')
    Hope this helps.
    Regards,
    Alex

  • Launch workflow through Custom.pll

    All,
    We have a requirement to invoke Workflow process for every service request create / update and I am calling the wf like below in custom.pll
    WHEN-VALIDATE-RECORD
    XXPPS_CRM_WF_PROCESS.XXPPS_WF_LAUNCH (                                     08291302      ,                                     'REFUND-PROCESS'    ,                                     'CRM QA'       ,                                     P_RETURN_MESG );
    I am getting below error
    FRM-40735 WHEN-VALIDATE-RECORD trigger raised unhandled exception ORA-20002 Does anyone has any idea ?? Can we launch the workflow through Custom.pll ?? Please advise...

    This forum is for general Oracle Forms questions.  Please post your question in the EBS General Discussion forum.  If you have a general Forms question, by all means, ask it here!
    Craig...

  • Invoke workflow through Custom.pll

    All,
    We have a requirement to invoke Workflow process for every service request create / update and I am calling the wf like below in custom.pll
    WHEN-VALIDATE-RECORD
    XXPPS_CRM_WF_PROCESS.XXPPS_WF_LAUNCH (                                     08291302      ,                                     'REFUND-PROCESS'    ,                                     'CRM QA'       ,                                     P_RETURN_MESG );
    I am getting below error
    FRM-40735 WHEN-VALIDATE-RECORD trigger raised unhandled exception ORA-20002 Does anyone has any idea ?? Can we launch the workflow through Custom.pll ?? Please advise...

    This forum is for general Oracle Forms questions.  Please post your question in the EBS General Discussion forum.  If you have a general Forms question, by all means, ask it here!
    Craig...

  • Disable 'Delete' button for posted invoices  in GOS Attachment List

    Hi,
    when i open the attachement list of a generic object i see the attached files. In this dialog i want to disable the   "Delete" ( attachment)  button  for Posted invoices ( In MIR4 tcode -> If the invoice is already posted it should not allow to delete the attachment )
    I read oss notes and some ides of copying diverse classes but nothing really helps.
    I found two badis
    GOS_SRV_REQUEST
    GOS_SRV_SELECT
    but i dont know where we have to write our code .
    I read so many posts related to attachments but all the places described about authoriztion object .
    Can you please give some ideas to disable the delete button for posted invoices.

    Hello,
    For GOS there is no SAP Standard authorization concept. The only way to
    manage GOS authorizations is implementing it via custom code as
    described in SAP Note: 491271.
    Please have a look at the SAP notes:
    491271 Authorizations for generic object services
    701609 Authorizations for services: Final classes
    For the use of S_OC_ROLE: this object states if a user is an office
    administrator he can create, modify or delete every document, even
    those created by other users. If the user is not an office admin, the
    user is still able to create his own attachments.
    Regarding to the issue, there is an role object S_GUI for upload.
    To match your inquiry, pleaes find the user's role and active the
    object S_GUI.
    Regards,
    David

  • Disable "Close" button of command prompt through LabVIEW using Win32 APIs

    Hello all,
    I am trying to disable the close button of a third party console application that I am invoking through LabVIEW. I tried using GetSystemMenu() and DeleteSystemMenu() from user32.dll, but somewhere I am doing it wrong.
    Can anyone can suggest a solution to this?
    Thanks!
    FraggerFox
    -FraggerFox!
    Certified LabVIEW Architect, Certified TestStand Developer
    "What you think today is what you live tomorrow"
    Solved!
    Go to Solution.

    Do you have the handle to Window?  Off hand, I don't know how to delete it, but here is some C# code that I used to grey out the close window button in another project:
            [DllImport("user32.dll")]
            private static extern IntPtr GetSystemMenu(IntPtr hWnd, bool bRevert);
            [DllImport("user32.dll")]
            private static extern bool EnableMenuItem(IntPtr hMenu, uint uIDEnableItem,
               uint uEnable);
            private const Int32 SC_CLOSE = 0xF060;
            private const UInt32 MF_BYCOMMAND    =0x00000000;
            private const UInt32 MF_ENABLED = 0x00000000;
            private const UInt32 MF_GRAYED = 0x00000001;
            private const UInt32 MF_DISABLED = 0x00000002;
            private void EnableClose(bool enable)
                IntPtr pSysMenu = GetSystemMenu(Handle, false);
                if (pSysMenu != null)
                    EnableMenuItem(pSysMenu, SC_CLOSE, MF_BYCOMMAND | (enable ? MF_ENABLED : MF_DISABLED));
    This was fairly easy to convert over once I had the handle (this is from a library I picked up somewhere).
    Hope this helps.
    A
    Attachments:
    WINUTIL.LLB ‏609 KB
    DisableCloseButton.vi ‏44 KB

Maybe you are looking for

  • Wireless Mighty Mouse has stopped selecting, cutting or pasting

    My batteries ran out two days ago. I changed the batteries but since then my wireless Mighty Mouse will not select text, cut or paste. It has other erratic behavior. Any help and advice welcomed.

  • PPro CC on the iMac

    Anyone successfully using PPro CC on the iMac?

  • Help convert time

    Hi All, I'm trying to convert time in millisecond beginning on Jan. 1, 1970 to MMDDYY HH:MM:SS. GMT Can someone give me some direction? Thanks in advance!

  • Snippets in Flash Builder ?

    Will there be an option to save snippets in Flash Builder ? My experience is that I spend WAY more time looking up code than creating stuff in Flex. Snippets would be a colossal timesaver...

  • Unuseable AI CS6 delays with placed files

    Anyone else having my problem. So now I feel like I am going backwards! For years I have created files in AI which contain a number of placed .psd files. I have been upgrading AI without incident, but going from AI CS5.5 to AI CS6 is a disaster. To o