8 Replies Latest reply on Oct 2, 2013 5:34 AM by user623998

    custom.pll error

    mDy
      Dear all,


      In my production environment,I need to create a custom package.. so, In the custom.pll I modified the contents as follows :




      BEGIN

      IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN
      IF FND_PROFILE.VALUE('USER_NAME')='MAN' THEN

      --formname varchar2(50);
      --blockname varchar2(30);
      BEGIN
      COPY('Entering app_form.query_only_mode.','global.frd_debug');
      COPY('YES', 'PARAMETER.QUERY_ONLY');

      APPS.APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);
      APPS.APP_MENU2.SET_PROP('FILE.ACCEPT', ENABLED,PROPERTY_OFF);
      formname := NAME_IN('system.current_form');
      blockname := GET_FORM_PROPERY(formname, FIRST_BLOCK);

      WHILE (blockname is not null) LOOP

      IF (GET_BLOCK_PROPERTY(blockname, BASE_TABLE) is not NULL) THEN

      SET_BLOCK_PROPERTY(blockname, INSERT_ALLOWED, PROPERTY_FALSE);
      SET_BLOCK_PROPERTY(blockname, UPDATE_ALLOWED, PROPERTY_FALSE);
      SET_BLOCK_PROPERTY(blockname, DELETE_ALLOWED, PROPERTY_FALSE);

      END IF;

      blockname := GET_BLOCK_PROPERTY(blockname, NEXTBLOCK);

      END LOOP;


      END query_only_mode;
      end if;
      end if;

      END;



      when compiling, am getting the error :


      identifier APPS.APP_MENU2 must be declared..

      identified GET_FORM_PROPERY must be declared.



      Guide please


      Yusuf
        • 1. Re: custom.pll error
          442721
          Hi Yusuf,

          Obviously, you should change GET_FORM_PROPERY into GET_FORM_PROPERTY.

          Then, APPS is another PL/SQL-library? With package APP_MENU2? Has the library APPS been attached to your form? You don't have to give name of the PL/SQL-library; Forms Builder will search for the package APP_MENU2 in all attached libraries.

          So then a call like
          APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);
          should be enough.

          HTH,
          Lennart de Vos
          • 2. Re: custom.pll error
            mDy
            Thanks Lennart de Vos


            As u said I removed APPS from the below.

            APPS. APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);

            Even then am getting the same error

            ANy ideas ?

            Yusuf
            • 3. Re: custom.pll error
              François Degrelle
              Hello,

              Why don't you ask this question in the Applications forum? You would have more chances to get an answer than here (that is the single Forms forum).

              Francois
              • 4. Re: custom.pll error
                Somasundaram N
                1. Remove APPS prefix from APPS.APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);

                The procedure call has to be like the following:
                APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);

                2. Ensure that APPCORE2.pll is present in your Forms Path. The Package APP_MENU2 belongs to APPCORE2 library and hence it is imperative that you need to have this library in your forms path before compilation. In fact it is better if your Forms Path points to $AU_TOP/resource and $AU_TOP/forms/US.
                • 5. Re: custom.pll error
                  mDy
                  Thanks Francois .. but am already redirected from there only . Thanks

                  Thanks Somasundaram , I will try and let u know..


                  Yusuf
                  • 6. Re: custom.pll error
                    658147
                    Hi,

                    I faced the same error and I was able to solve it by adding the appcore2 library to the attached library when I opened the custom.pll using forms builder.


                    Thanks,
                    Nisha

                    Edited by: user10223260 on Oct 21, 2008 1:32 PM
                    • 7. Re: custom.pll error
                      user623998


                      Hi,

                       

                      I have created read only responsibilties by custom.pll and look up , it is working but I am getting the following message.

                       

                      FRM - 41051 :You cannot create records here                                            so many times on the same form.

                       

                      Please let me know how can I supress the message or remove the message.

                       

                      Thanks and Regards

                      Sanjoy

                      • 8. Re: custom.pll error
                        user623998

                        I have used this code.

                         

                        IF event_name = 'WHEN-NEW-FORM-INSTANCE' THEN

                        /*IF FND_PROFILE.VALUE('RESPONSIBILITY_NAME')in (*/

                        v_Resp_id := FND_PROFILE.VALUE('RESP_ID');

                        begin

                        select responsibility_name

                          into v_Resp_name

                          from fnd_responsibility_vl

                        where responsibility_id = v_Resp_id;

                        Exception

                             when others then

                             v_Resp_name := '';

                        End;

                         

                         

                        SELECT   count(1) into v_count --TRIM(meaning)

                        FROM   FND_LOOKUP_VALUES_VL

                        WHERE       lookup_type = 'CLX_READ_ONLY_RESPONSIBILITY'

                        AND enabled_flag = 'Y'

                        AND TRIM(meaning) = v_Resp_name --FND_PROFILE.VALUE('RESPONSIBILITY_NAME')

                        AND end_date_active IS NULL;

                         

                        --)

                        if v_count >0 THEN       

                        BEGIN

                                COPY('Entering app_form.query_only_mode.','global.frd_debug');

                                COPY('YES', 'PARAMETER.QUERY_ONLY');

                                APP_MENU2.SET_PROP('FILE.SAVE', ENABLED,PROPERTY_OFF);

                                APP_MENU2.SET_PROP('FILE.ACCEPT', ENABLED,PROPERTY_OFF);

                                form_name := NAME_IN('system.current_form');

                                block_name := GET_FORM_PROPERTY(form_name, FIRST_BLOCK);

                                WHILE (block_name is not null) LOOP

                                  IF (GET_BLOCK_PROPERTY(block_name, BASE_TABLE) is not NULL) THEN

                                    SET_BLOCK_PROPERTY(block_name, INSERT_ALLOWED, PROPERTY_FALSE);

                                    SET_BLOCK_PROPERTY(block_name, UPDATE_ALLOWED, PROPERTY_FALSE);

                                    SET_BLOCK_PROPERTY(block_name, DELETE_ALLOWED, PROPERTY_FALSE);

                                  END IF;

                                            block_name := GET_BLOCK_PROPERTY(block_name, NEXTBLOCK);

                                END LOOP;

                                END;  

                            END IF;

                            END IF;

                         

                        Thanks and Regards

                        Sanjoy