Skip to Content

With SAP Risk Management – Preference Processing, you can request long-term vendor declarations from your vendors, for each administrative unit and for a specified period of time.

Procedure:

  1. In the SAP GTS area menu, choose SAP Risk Management ® Preference Processing ® EU or NAFTA ® Vendor-Based Long-Term Vendor Declaration ® Request/Reminder ® Request Vendor Declaration
  2. Enter the selection criteria like Administrative Unit, Validity Period etc.,
  3. Under Program Control, specify whether you want to perform a simulation run and create a log, by setting the appropriate indicators
  4. If, before printing the requests, you want to display a list of all the vendor-material relationships for which you want to request a long-term vendor declaration based on your selection criteria, you have to set the Output List indicator
  5. Choose Execute
  6. If you have set the Output List indicator, you can select the lines in the vendor-material-relationships
  7. You can perform the following functions for the lines that you select:  a.       Print Preview    b.       To print the request, choose Request and Save.
  8. The system prints all the long-term vendor declaration requests that match your selection criteria

In GTS, SAP evidently supports the printing of the NAFTA Certificates. But there may be a need to email these NAFTA Certificates directly to the Business Partner, there by reducing the paper cost and obviously to speed up the process. With the above process a spool is generated and one would have to code a custom program to pick up the spool and convert it to PDF document and send as an email attachment. To automate this process and enable the email functionality upon Request and Save, some additional steps have to be drafted as below:

  • For the Business Partner, maintain an email Id, which is where the emails will be sent to:
  • Identify the include where the enhancement can be developed to incorporate the logic to send the email
  •  In Include “/SAPSLL/LPRE_VD_PRINTOUTF01”, create an Implicit Enhancement.
  • Add the below logic to populate the email Id of the Business Partner:
  • Get the communication data dynamically
      pi_comm_values-adsmtp-consnumber = ‘001’.
      pi_comm_values-adsmtp-flgdefault = ‘X’.
      pi_comm_values-adsmtp-flg_nouse = ‘X’.
      pi_comm_values-adsmtp-home_flag = ‘X’.
      pi_comm_values-adsmtp-smtp_addr = BP email ID.
      pi_comm_values-adsmtp-smtp_srch = BP email ID.
      CLEAR: gs_recipient.
      CALL FUNCTION ‘CONVERT_COMM_TYPE_DATA’
        EXPORTING
          pi_comm_type              = ‘INT’
          pi_comm_values            = pi_comm_values
        IMPORTING
          pe_mail_recipient         = gs_recipient
        EXCEPTIONS
          comm_type_not_supported   = 1
          recipient_creation_failed = 2
          sender_creation_failed    = 3
          others                             = 4.
      IF sy-subrc = 0.
        MOVE-CORRESPONDING: gs_recipient TO l_params-mail_recipient.
      ENDIF.
    • Call Job Open function module, the dynamic function module and Job Close function module:
    • call function ‘FPCOMP_JOB_OPEN’
          changing
            ie_outpar            = l_params
          exceptions
            cancel               = 1
            usage_error          = 2
            system_error         = 3
            internal_error       = 4.
      *—-  Determine function module via PDF form name
            CALL FUNCTION ‘FP_FUNCTION_MODULE_NAME’              
              EXPORTING
                i_name     = FORM NAME
              IMPORTING
                e_funcname = l_fnam
              EXCEPTIONS
                OTHERS     = 1.
      *—-  call PDF form
          CALL FUNCTION l_fnam
            EXPORTING
              /1bcdwb/docparams = l_fp_docparams
              is_prn            = is_vdc
              is_prn_ctrl       = is_print_cntrl
            EXCEPTIONS
              usage_error       = 1
              system_error      = 2
              internal_error    = 3
              OTHERS            = 4.
        call function ‘FPCOMP_JOB_CLOSE’
          importing
            e_jobresult          = l_result
          exceptions
            usage_error          = 1
            system_error         = 2
            internal_error       = 3.
        if sy-subrc = 0.
          commit work.
        endif.
    This will enable the email option when the long term vendor declaration is requested.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply