{"id":10098,"date":"2016-02-15T17:07:06","date_gmt":"2016-02-15T16:07:06","guid":{"rendered":"http:\/\/orabr.com\/?p=10098"},"modified":"2016-02-15T14:40:55","modified_gmt":"2016-02-15T16:40:55","slug":"AME-ATTRIBUTE-RECUPERANDO-O-VALOR-DA-LINHA-DA-PO","status":"publish","type":"post","link":"https:\/\/orabr.virttus.com\/?p=10098","title":{"rendered":"AME &#8211; ATTRIBUTE RECUPERANDO O VALOR DA LINHA DA PO"},"content":{"rendered":"<p><HTML><HTML>Boa tarde!    Algu&eacute;m j&aacute; criou algum atribute no AME (Transaction Type: Purchase Order Approval) que fosse utilizado para recuperar o valor da linha da PO?    Eu criei um com a seguinte query    SELECT DECODE(type_lookup_code, &#8216;STANDARD&#8217;, (SELECT (pol.unit_price * pol.quantity) AS PRICE FROM po_distributions_all pod, po_lines_all pol, po_headers_all poh, po_line_locations_all poll WHERE pol.po_header_id = poh.po_header_id AND poh.ame_approval_id = :transactionId AND pol.po_line_id = pod.po_line_id AND pol.po_line_id = poll.po_line_id AND poll.line_location_id = pod.line_location_id AND NVL(poll.cancel_flag,&#8217;N&#8217;) = &#8216;N&#8217; )), poh.currency_code, NVL(poh.rate_type, psp.default_rate_type) FROM po_headers_all poh, po_system_parameters_all psp WHERE poh.AME_APPROVAL_ID = :transactionId AND psp.org_id = poh.org_id    Quando executo a query &eacute; retornado o valor correto, mas quando executo o *Test Workbench no AME* de uma PO com duas ou mais linhas &eacute; apresentado o seguinte erro:    &ldquo;Error: An error occurred while fetching the attributes for given transaction id. Ensure that the given transaction id is correct and the dynamic queries for attributes and item classes are correct. &ldquo;    Algu&eacute;m poderia me ajudar?  Obrigado,  Anderson Marques  <\/HTML><\/HTML><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Boa tarde! Algu&eacute;m j&aacute; criou algum atribute no AME (Transaction Type: Purchase Order Approval) que fosse utilizado para recuperar o valor da linha da PO?&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"class_list":["post-10098","post","type-post","status-publish","format-standard","hentry","category-oracle"],"_links":{"self":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/10098","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10098"}],"version-history":[{"count":0,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=\/wp\/v2\/posts\/10098\/revisions"}],"wp:attachment":[{"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10098"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10098"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/orabr.virttus.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10098"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}