Friday, 16 September 2011

po_report TO_SUPPLIERS

function CF_5Formula return Char is
a varchar2(25);
 v_short_long varchar2(5000);

begin
 SELECT datatype_name into a
FROM FND_ATTACHED_DOCS_FORM_VL a
WHERE FUNCTION_NAME=DECODE(0,1,NULL,'PO_POXPOVPO') AND
FUNCTION_TYPE=DECODE(0,1,NULL,'F') AND
(SECURITY_TYPE=1 OR
PUBLISH_FLAG='Y' OR
(SECURITY_TYPE=1 AND SECURITY_ID= fnd_profile.VALUE ('ORG_ID') )) AND
((ENTITY_NAME= 'PO_HEADERS' AND PK1_VALUE = :po_header_id  ) OR
(ENTITY_NAME= 'PO_VENDORS' ))
order by user_entity_name, seq_num;

if a =  'Short Text' then
SELECT SHORT_TEXT into v_short_long
FROM FND_ATTACHED_DOCS_FORM_VL a,FND_DOCUMENTS_SHORT_TEXT b
WHERE 1= 1
and a.MEDIA_ID = b.MEDIA_ID
and  FUNCTION_NAME=DECODE(0,1,NULL,'PO_POXPOVPO') AND
FUNCTION_TYPE=DECODE(0,1,NULL,'F') AND
(SECURITY_TYPE=1 OR
PUBLISH_FLAG='Y' OR
(SECURITY_TYPE=1 AND SECURITY_ID= fnd_profile.VALUE ('ORG_ID'))) AND
((ENTITY_NAME= 'PO_HEADERS' AND PK1_VALUE =:po_header_id ) OR
(ENTITY_NAME= 'PO_VENDORS' ))
order by user_entity_name, seq_num;
elsif a =  'Long Text' then
SELECT LONG_TEXT into v_short_long
FROM FND_ATTACHED_DOCS_FORM_VL a,FND_DOCUMENTS_LONG_TEXT b
WHERE 1= 1
and a.MEDIA_ID = b.MEDIA_ID
and  FUNCTION_NAME=DECODE(0,1,NULL,'PO_POXPOVPO') AND
FUNCTION_TYPE=DECODE(0,1,NULL,'F') AND
(SECURITY_TYPE=1 OR
PUBLISH_FLAG='Y' OR
(SECURITY_TYPE=1 AND SECURITY_ID= fnd_profile.VALUE ('ORG_ID'))) AND
((ENTITY_NAME= 'PO_HEADERS' AND PK1_VALUE =:po_header_id ) OR
(ENTITY_NAME= 'PO_VENDORS' ))
order by user_entity_name, seq_num;
END IF;
return v_short_long;
end;

1 comment:

  1. Companies such as PCH China Solutions may also offer engineering services. Some of these sourcing companies provide analytical tools that help to qualify suppliers on many aspects of their business. alibaba com pakistan islamabad



    ReplyDelete