Monday 28 November 2016

Microsoft Outlook "Not implemented" error

I recently faced an error "Not implemented" when clicked on Send/Receive button. I was forced to use web version of outlook to access my emails. After searching online and trying different options suggested by community. I decided to try below steps and hoila, it worked. So thought it could be of use for some one like me.

Go to control panel -> programs and features (in windows 10) or add or remove programs in lower versions.

select office 2013 (in my case) and click on change button on the top.

Select Repair and proceed. This will repair whole installation, it will ask for reboot. Go for it.

After reboot, outlook will work. If it doesn't work, delete outlook profile and recreate again.

I noticed this issue has occurred with recent major updates downloaded and installed last night. This has done something with my outlook to fail.

Hope this solves your problem.

Tuesday 27 September 2016


Amount Released calculation in the PO Headers/Summary Screen


 Steps followed to identify the calculation
 
Enable the log profiles at user level.

FND: Debug Log Enabled: yes
FND: Debug Log Level: Statement

 


Run the below query and take the maximum seq number from the debug log table. This table contains huge data and we only want the logs created after this seq number.

select max(log_sequence) from fnd_log_messages

Assume, seq number is 1001

navigate to the Purchase order screen, query for the purchase order document, then take the seq number again.

select max(log_sequence) from fnd_log_messages

Assume, seq number is 1010

Now query the log between these two numbers

select * from fnd_log_messages where log_sequence between 1001 and  1010

 

Concentrate on columns module, message_text to analyze log data.

The API that does amount_released calculation is PO_CORE_S.get_gc_amount_released

 

Wednesday 11 May 2016

Send PO communication PDFs manually through Pl/Sql API

Query to find file attachment id

select * from FND_LOBS fl,FND_DOCUMENTS fd,FND_ATTACHED_DOCUMENTS fad
where fl.file_id = fd.media_id
and fd.document_id= fad.document_id
and fad.pk1_value=<po header id>
and fad.pk2_value=<rev num>


Identify what POs are failed in workflow notifications table , for whom you should send pdfs manually as a workaround, change the parameters as required.

SELECT *
from wf_notifications
where Mail_Status = 'MAIL'
and message_name ='EMAIL_PO_PDF'
and status= 'OPEN'
and sent_Date > (Sysdate - 2)
and recipient_role not like 'PO_OUTPUT%'
order by Notification_id;

Use the sample below stub to retrieve blob object and save as file in any oracle directory

declare
v_blob BLOB;
blob_length INTEGER;
out_file UTL_FILE.FILE_TYPE;
v_buffer RAW(32767);
chunk_size BINARY_INTEGER := 32767;
blob_position INTEGER := 1;
v_file_name varchar2(240);

BEGIN

SELECT FILE_DATA,file_name INTO v_blob,v_file_name FROM fnd_lobs WHERE FILE_ID = 12345;
blob_length:=DBMS_LOB.GETLENGTH(v_blob);

out_file := UTL_FILE.FOPEN ('oracle directory name', v_file_name, 'wb', chunk_size);

WHILE blob_position <= blob_length LOOP
IF blob_position + chunk_size - 1 > blob_length THEN
chunk_size := blob_length - blob_position + 1;
END IF;
DBMS_LOB.READ(v_blob, chunk_size, blob_position, v_buffer);
UTL_FILE.PUT_RAW(out_file, v_buffer, TRUE);
blob_position := blob_position + chunk_size;
END LOOP;

UTL_FILE.FCLOSE (out_file);
END;
/

Then use an utl_smtp api to send the file attachment to respective supplier email, email address you get in wf_notifications table. Query the recipient role with wf_roles to derive email address.

DECLARE
   v_From       VARCHAR2(80) := 'ab.cs@nergy.com';
   v_Recipient  VARCHAR2(80) := 'ni.ka@ergy.com';
   v_Subject    VARCHAR2(80) := 'test subject';
   v_Mail_Host  VARCHAR2(30) := 'host name';        -- take from v$instance
   v_Mail_Conn  utl_smtp.Connection;
   crlf         VARCHAR2(2)  := chr(13)||chr(10);
BEGIN
  v_Mail_Conn := utl_smtp.Open_Connection(v_Mail_Host, 25);

  utl_smtp.Helo(v_Mail_Conn, v_Mail_Host);

  utl_smtp.Mail(v_Mail_Conn, v_From);

  utl_smtp.Rcpt(v_Mail_Conn, v_Recipient);

  utl_smtp.Data(v_Mail_Conn,
    'Date: '   || to_char(sysdate, 'Dy, DD Mon YYYY hh24:mi:ss') || crlf ||
    'From: '   || v_From || crlf ||
    'Subject: '|| v_Subject || crlf ||
    'To: '     || v_Recipient || crlf ||

    'MIME-Version: 1.0'|| crlf ||    -- Use MIME mail standard
    'Content-Type: multipart/mixed;'|| crlf ||
    ' boundary="-----SECBOUND"'|| crlf ||
    crlf ||

    '-------SECBOUND'|| crlf ||
    'Content-Type: text/plain;'|| crlf ||
    'Content-Transfer_Encoding: 7bit'|| crlf ||
    crlf ||
    'some message text'|| crlf ||    -- Message body
    'more message text'|| crlf ||
    crlf ||

    '-------SECBOUND'|| crlf ||
    'Content-Type: text/pdf;'|| crlf ||
    ' name="abc.pdf"'|| crlf ||
    'Content-Transfer_Encoding: 8bit'|| crlf ||
    'Content-Disposition: attachment;'|| crlf ||
    ' filename="/ass/ddd/fff/asdadS.pdf"'|| crlf ||
    crlf ||
    'pdf,file,attachement'|| crlf ||    -- Content of attachment
    crlf ||

    '-------SECBOUND--'            -- End MIME mail
  );

  utl_smtp.Quit(v_mail_conn);
EXCEPTION
  WHEN utl_smtp.Transient_Error OR utl_smtp.Permanent_Error then
    raise_application_error(-20000, 'Unable to send mail', TRUE);
   
END;
/


 

Comments system

Disqus Shortname