1 2 Previous Next 15 Replies Latest reply on Apr 15, 2009 4:51 PM by Rakesh S

    WFENG_ITEM_ATTR

    Rakesh S
      Failed Activity Get Requisition Attributes

      Activity Type Function

      Error Name WFENG_ITEM_ATTR

      Error Message 3103: Attribute 'TAX_AMOUNT_DSP' does not exist for item 'REQAPPRV/

      I am getting the above, please let me know how to fix this issue.


      Thanks !
        • 1. Re: WFENG_ITEM_ATTR
          Srini Chavali-Oracle
          Pl see if MOS Doc 741985.1 (How to Diagnose Build Approval List Failures Using the FND Diagnostic Log in Release 12) can help debug your issue

          HTH
          Srini
          • 2. Re: WFENG_ITEM_ATTR
            Rakesh S
            Hi Srini,

            Thanks for the document .

            I am having issues with the WF error which mentions TAX_AMOUNT_DSP does not exist.
            • 3. Re: WFENG_ITEM_ATTR
              Hussein Sawwan-Oracle
              Rakesh,

              I could not find anything relevant on Metalink that may help.

              Did you try to log a SR and see if Oracle support can help?

              Regards,
              Hussein
              • 4. Re: WFENG_ITEM_ATTR
                Rakesh S
                Hussein,

                Metalink was of less help, so trying to debug the issue. I have not raised SR, trying to fix if any one have previously faced the issue.

                Thanks
                Rakesh
                • 5. Re: WFENG_ITEM_ATTR
                  628428
                  Rakesh
                  Did you apply any patch or upgrade? Usually this happens if you have some requisitions waiting to be approved and you have applied the patch in the middle. When some the approval process tries to retrieve the value expecting that it is set initially, but cannot find it. Hence you get this error.

                  select * from wf_item_attribute_values
                  where item_type='REQAPPRV'
                  and item_key =(select wf_item_key from po_requisition_headers_all
                  where requisition_header_Id = 133941
                  and wf_item_type='REQAPPRV')
                  and name='TAX_AMOUNT_DISP'

                  If the above SQL does not return rows, the value is not initiated when the workflow started.

                  Thanks
                  Nagamohan
                  • 6. Re: WFENG_ITEM_ATTR
                    Rakesh S
                    Hi Nagamohan,

                    I am not getting any rows from the query provided, how do i fix the issue, please let me know.

                    Thanks
                    Rakesh
                    • 7. Re: WFENG_ITEM_ATTR
                      628428
                      Rakesh
                      This is the code snippet that you need to execute. But again, I encourage you to log an SR and see if this issue is beyond this requisition.

                      This only sets the tax amount. There is another attribute called total display amount. This needs to be updated as well to include the tax amount into the total amount. But this is only for the req approval. Other than that base functionality is fine.

                      Please treat this as only a guide and test it before going into Prod. It is just an idea from forums and not support.

                      I know you know that..but I am trying to be careful.

                      DECLARE
                      l_doc_id NUMBER;
                      l_tax_amount NUMBER;
                      l_tax_amount_disp VARCHAR2 (60);
                      l_currency_code VARCHAR2 (30);
                      g_currency_format_mask NUMBER := 60;
                      itemtype VARCHAR2 (100);
                      itemkey VARCHAR2 (100);

                      CURSOR req_tax_csr (p_doc_id NUMBER)
                      IS
                      SELECT NVL (SUM (nonrecoverable_tax), 0)
                      FROM po_requisition_lines rl, po_req_distributions_all rd
                      WHERE rl.requisition_header_id = p_doc_id
                      AND rd.requisition_line_id = rl.requisition_line_id
                      AND NVL (rl.cancel_flag, 'N') = 'N'
                      AND NVL (rl.modified_by_agent_flag, 'N') = 'N';
                      BEGIN
                      l_doc_id := &requisition_header_id;

                      SELECT wf_item_key, wf_item_type
                      INTO itemtype, itemkey
                      FROM po_requisition_headers_all
                      WHERE requisition_header_id = p_doc_id;

                      l_currency_code := po_core_s2.get_base_currency;

                      OPEN req_tax_csr (l_doc_id);

                      FETCH req_tax_csr
                      INTO l_tax_amount;

                      CLOSE req_tax_csr;

                      l_tax_amount_disp :=
                      TO_CHAR (l_tax_amount,
                      fnd_currency.get_format_mask (l_currency_code,
                      g_currency_format_mask
                      )
                      );
                      wf_engine.setitemattrtext (itemtype => itemtype,
                      itemkey => itemkey,
                      aname => 'TAX_AMOUNT_DSP',
                      avalue => l_tax_amount_disp
                      );
                      END;

                      Thanks
                      Nagamohan
                      1 person found this helpful
                      • 8. Re: WFENG_ITEM_ATTR
                        Rakesh S
                        Hi Nagamohan,

                        As mentioned, i am testing on a single requisiton and i am getting the following error.

                        ORA-20002: 3148: '0.00' could not be converted to a type. TYPE=
                        ORA-06512: at "APPS.WF_CORE", line 300
                        ORA-06512: at "APPS.WF_ENGINE", line 645
                        ORA-06512: at line 47

                        Please let me know.

                        Thanks
                        Rakesh
                        • 9. Re: WFENG_ITEM_ATTR
                          628428
                          Rakesh
                          I hope you corrected the code I pasted..

                          the sql that is selecting the type and key should like this..

                          SELECT wf_item_key, wf_item_type
                          INTO itemkey, itemtype
                          FROM po_requisition_headers_all
                          WHERE requisition_header_id = p_doc_id;

                          it was like this..

                          SELECT wf_item_key, wf_item_type
                          INTO itemtype, itemkey
                          FROM po_requisition_headers_all
                          WHERE requisition_header_id = p_doc_id;

                          Can you confirm?

                          Thanks
                          Nagamohan
                          • 10. Re: WFENG_ITEM_ATTR
                            Rakesh S
                            Thanks, i made the changes and i get new set of errors.


                            ORA-20002: 3103: Attribute 'TAX_AMOUNT_DSP' does not exist for item 'REQAPPRV/195578-822214925'

                            Thanks
                            Rakesh
                            • 11. Re: WFENG_ITEM_ATTR
                              Rakesh S
                              Hi Nagamohan,

                              I made few changes to the code and this lead to complete the procedure. Added an exception block to add item attribute, doe this help, please let me know.

                              l_tax_amount_disp :=
                              TO_CHAR( l_tax_amount
                              ,fnd_currency.get_format_mask( l_currency_code
                              ,g_currency_format_mask
                              )
                              );
                              DBMS_OUTPUT.put_line( l_tax_amount );
                              DBMS_OUTPUT.put_line( l_tax_amount_disp );
                              wf_engine.setitemattrtext( itemtype => itemtype
                              ,itemkey => itemkey
                              ,aname => 'TAX_AMOUNT_DSP'
                              ,avalue => l_tax_amount_disp
                              );
                              COMMIT;
                              EXCEPTION
                              WHEN OTHERS
                              THEN
                              wf_engine.additemattr( itemtype => itemtype
                              ,itemkey => itemkey
                              ,aname => 'TAX_AMOUNT_DSP'
                              ,text_value => l_tax_amount_disp
                              );
                              DBMS_OUTPUT.put_line( 'In Exception' );
                              COMMIT;
                              • 12. Re: WFENG_ITEM_ATTR
                                628428
                                Do you have rows for this?

                                select * from wf_item_attributes
                                where item_type='REQAPPRV'
                                and name='TAX_AMOUNT_DSP';
                                • 13. Re: WFENG_ITEM_ATTR
                                  Rakesh S
                                  Yes, i do have.
                                  • 14. Re: WFENG_ITEM_ATTR
                                    628428
                                    Rakesh
                                    Should work. Give it a try as you confirmed that that attribute is there in the workflow definition.

                                    Thanks
                                    Nagamohan
                                    1 2 Previous Next