SAP ABAP Reports and Programs

Share |

RPUTX8D0 SAP Report - Test Report for Communication ETNotif./ETStmt

RPUTX8D0 is a standard ABAP report available within your SAP system (depending on your version and release level). Below is the standard documentation available for this report and a few details of other objects it interacts with such as tables, function modules, includes etc. If you would like to see the full code listing simply enter RPUTX8D0 into the relevant SAP transaction such as SE38 or SE80

Although this basic information may have limited use other that for reference, within the comments section below there is also an opportunity for anyone to add useful hints, information and links to existing content specific to this abap report. This page will therfore over time start to contain a useful amount of information that can be found quickly, simply by searching on the object name, RPUTX8D0.


SAP Documentation for program RPUTX8D0

Transaction Code:

N/A

Use
After setting up SAPCryptolib and creating the key file (PSE file), you can use this report to test the encryption and decryption.

Prerequisites
SAPCryptolib is installed (SAP Note 662340) and a PSE file was created with a key pair for the employer. After that, the open key of the clearing house was read. By generating credentials, it is possible to use the PSE without entering a PIN.

Features
For testing the functions of SAPCryptolib, the report performs the following steps in this sequence:
Reading of the certificate of the employer (PSE file)
The program reads the PSE file of the employer and determines the employer’s DN (Distinguished Name).
Encryption with DN of employer
The program encrypts a test string. It uses the public key of the employer. The public key is determined using the DN of the employer.
Decryption with DN of employer
The program decrypts the test string that it previously encrypted. Here it uses the private key of the employer.
Encryption with DN of the clearing house
The DN of the clearing house is delivered in system table T50BS. The program encrypts a test string using the public key of the clearing house referenced by the DN. For this to take place, the public key must be imported in the PSE file of the employer.
Reading of the DN list from the PSE file
All of the public keys imported into the PSE file are entered there with their DN. The list of DNs is read and output.
If errors occur when you execute the report, for more information see SAP Note 725508 "B2A: Troubleshooting Encryption of Employment Tax".

Selection
  • File Name of PSE

  • Name of the PSE file. Entering a path is not necessary. The system finds the file in the directory defined by the environment variable SECUDIR ($DIR_INSTANCE/sec).
  • PIN for PSE

  • No entry required. When the PSE is generated, a PIN is assigned for using it. The generation of credentials in the directory of the PSE provides an authentication mechanism that makes it unnecessary to enter a PIN again for the use of SAP applications. If there are no credentials for the PSE file, then you can also test the encryption by entering the PIN. The PIN is case-sensitive. However, the prerequisite for using SAPCryptolib for electronic tax returns (ELSTER) is that there are credentials for PSE. Example for Standard Variants
    Entries for selection:
  • There are credentials for PSE

  • PSE file name: SAMPLECORP_1.pse
    PIN for PSE No entry; field remains blank
  • There are no credentials for PSE

  • PSE file name: SAMPLECORP_1.pse
    PIN for PSE 123456

    Includes used within report:

    No INCLUDES are used within this report code!


    Tables used within report and the associated select statement:

    T50BS select single * from t50bs into l_t50bs where molga = '01' and sagrp = 'ST' and docty = 'LSTB' and konst = 'DNPUB' and endda >= sy-datum and begda <= sy-datum.


    Function Modules used within report and the associated call statement:

    SSFC_GETOWNCERTIFICATE CALL FUNCTION 'SSFC_GETOWNCERTIFICATE' EXPORTING profile = pa_pse PROFILEPW = pa_pin IMPORTING CERTIFICATE = l_certificate EXCEPTIONS SSF_KRN_ERROR = 1 SSF_KRN_NOMEMORY = 2 SSF_KRN_NOSSFLIB = 3 SSF_KRN_INVALID_PAR = 4 SSF_KRN_NOCERTIFICATE = 5 OTHERS = 6.

    SSFC_PARSECERTIFICATE CALL FUNCTION 'SSFC_PARSECERTIFICATE' EXPORTING certificate = l_certificate IMPORTING * SUBJECT = l_subject SUBJECT = l_subject "QCM#1262507 ISSUER = l_issuer * SERIALNO = * FINGERPRINT = * SUMMARY = * ALL = EXCEPTIONS SSF_KRN_ERROR = 1 SSF_KRN_NOMEMORY = 2 SSF_KRN_NOSSFLIB = 3 SSF_KRN_INVALID_PAR = 4 OTHERS = 5.

    SSF_KRN_ENVELOPE CALL FUNCTION 'SSF_KRN_ENVELOPE' EXPORTING ssftoolkit = 'SAPSECULIB' str_format = 'PKCS7' b_inenc = 'X' io_spec = 'T' ostr_input_data_l = l_length str_pab = l_profile str_pab_password = l_str_password IMPORTING ostr_enveloped_data_l = l_length_env crc = l_crc TABLES ostr_input_data = lt_ostr_input_data recipient_list = lt_recipient_list ostr_enveloped_data = lt_ostr_enveloped_data EXCEPTIONS ssf_krn_error = 1 ssf_krn_noop = 2 ssf_krn_nomemory = 3 ssf_krn_opinv = 4 ssf_krn_nossflib = 5 ssf_krn_recipient_list_error = 6 ssf_krn_input_data_error = 7 ssf_krn_invalid_par = 8 ssf_krn_invalid_parlen = 9 ssf_fb_input_parameter_error = 10 OTHERS = 11.

    SSF_KRN_DEVELOPE CALL FUNCTION 'SSF_KRN_DEVELOPE' EXPORTING SSFTOOLKIT = 'SAPSECULIB' STR_FORMAT = 'PKCS7' B_OUTDEC = 'X' IO_SPEC = 'T' ostr_enveloped_data_l = l_length_env IMPORTING OSTR_OUTPUT_DATA_L = l_length CRC = l_crc tables ostr_enveloped_data = lt_ostr_enveloped_data recipient = lt_recipient_list ostr_output_data = lt_ostr_output_data EXCEPTIONS SSF_KRN_ERROR = 1 SSF_KRN_NOOP = 2 SSF_KRN_NOMEMORY = 3 SSF_KRN_OPINV = 4 SSF_KRN_NOSSFLIB = 5 SSF_KRN_RECIPIENT_ERROR = 6 SSF_KRN_INPUT_DATA_ERROR = 7 SSF_KRN_INVALID_PAR = 8 SSF_KRN_INVALID_PARLEN = 9 SSF_FB_INPUT_PARAMETER_ERROR = 10 OTHERS = 11.

    SSF_KRN_ENVELOPE CALL FUNCTION 'SSF_KRN_ENVELOPE' EXPORTING ssftoolkit = 'SAPSECULIB' str_format = 'PKCS7' b_inenc = 'X' io_spec = 'T' ostr_input_data_l = l_length str_pab = l_profile str_pab_password = l_str_password IMPORTING ostr_enveloped_data_l = l_length_env crc = l_crc TABLES ostr_input_data = lt_ostr_input_data recipient_list = lt_recipient_list ostr_enveloped_data = lt_ostr_enveloped_data EXCEPTIONS ssf_krn_error = 1 ssf_krn_noop = 2 ssf_krn_nomemory = 3 ssf_krn_opinv = 4 ssf_krn_nossflib = 5 ssf_krn_recipient_list_error = 6 ssf_krn_input_data_error = 7 ssf_krn_invalid_par = 8 ssf_krn_invalid_parlen = 9 ssf_fb_input_parameter_error = 10 OTHERS = 11.

    SSFC_GETCERTIFICATELIST CALL FUNCTION 'SSFC_GETCERTIFICATELIST' EXPORTING profile = l_profile PROFILEPW = l_profilepw tables certificatelist = lt_certificatelist EXCEPTIONS SSF_KRN_ERROR = 1 SSF_KRN_NOMEMORY = 2 SSF_KRN_NOSSFLIB = 3 SSF_KRN_INVALID_PAR = 4 SSF_KRN_NOCERTIFICATE = 5 OTHERS = 6.

    SSFC_PARSECERTIFICATE CALL FUNCTION 'SSFC_PARSECERTIFICATE' EXPORTING certificate = l_certificatelist-cert IMPORTING * SUBJECT = SUBJECT = l_subject "QCM#1262507 ISSUER = l_issuer * SERIALNO = * FINGERPRINT = * SUMMARY = * ALL = EXCEPTIONS SSF_KRN_ERROR = 1 SSF_KRN_NOMEMORY = 2 SSF_KRN_NOSSFLIB = 3 SSF_KRN_INVALID_PAR = 4 OTHERS = 5.


    Text pool values


    Selection Text: PA_PSE = PSE File Name
    Selection Text: PA_PIN = PIN for PSE
    Title: Test Report to Check Encoding with SAPCryptolib
    Text Symbol: 041 = SY-SUBRC:
    Text Symbol: 042 = Error During Encryption
    Text Symbol: 043 = CRC:
    Text Symbol: 044 = Error During Encryption
    Text Symbol: 045 = Encoding - OK
    Text Symbol: 047 = Error in an SSF parameter
    Text Symbol: 048 = Error - Certificate Not Found
    Text Symbol: 049 = Error - No Error Text. Undefined
    Text Symbol: 050 = Exception of Function Module SSFC_GETOWNCERTIFICATE
    Text Symbol: 051 = Error - No Error Text. Undefined
    Text Symbol: 052 = Exception of Function Module SSFC_PARSECERTIFICATE
    Text Symbol: 053 = Employer DN:
    Text Symbol: 054 = Error Reading Table T50BS Constant DNPUB
    Text Symbol: 055 = Read DN List of PSE File
    Text Symbol: 056 = Error - No Error Text. Undefined
    Text Symbol: 057 = Exception of Function Module SSFC_PARSECERTIFICATE
    Text Symbol: 058 = Error - No Public Key in PSE File
    Text Symbol: 059 = Read Certificate - OK
    Text Symbol: 060 = Read DN List - OK
    Text Symbol: 061 = Output Profile Param.
    Text Symbol: 062 = Sample Profile Parameter for Elster
    Text Symbol: 063 = Profile Param. ssf/name = SAPSECULIB
    Text Symbol: 064 = Error - Profile Parameter ssf/name has not
    Text Symbol: 065 = Value SAPSECULIB
    Text Symbol: 066 = Profile Param. ssf/ssf_md_alg = initial
    Text Symbol: 067 = Error - Profile Param ssf/ssf_md_alg is
    Text Symbol: 068 = not initial
    Text Symbol: 069 = Profile Param. ssf/ssf_symencr_alg = TRIPLE-DES
    Text Symbol: 070 = Error - Profile Param. ssf/ssf_symencr_alg
    Text Symbol: 071 = has not value TRIPLE-DES
    Text Symbol: 072 = Profile Param. ssf/ssfapi_lib und sec/libsapsecu
    Text Symbol: 073 = point to same file - OK
    Text Symbol: 074 = Profile Param. ssf/ssfapi_lib und sec/libsapsecu
    Text Symbol: 075 = must point to same file - Error
    Text Symbol: 076 = Profile Parameter Check - OK
    Text Symbol: 077 = Error - Check Profile Parameter
    Text Symbol: 040 = Encoding with Clearing House DN
    Text Symbol: 001 = Read Employer Certificate (PSE File)
    Text Symbol: 002 = PSE File Name:
    Text Symbol: 003 = Error - Unknown SSF Kernel Error
    Text Symbol: 004 = Error - Insufficient Main Memory
    Text Symbol: 005 = Error - SSF Kernel Not Initialized
    Text Symbol: 006 = Encoding with Employer DN
    Text Symbol: 007 = SY-SUBRC:
    Text Symbol: 008 = Error During Encryption
    Text Symbol: 009 = CRC:
    Text Symbol: 010 = Error During Encryption
    Text Symbol: 011 = Encoding - OK
    Text Symbol: 012 = Decoding with Employer DN
    Text Symbol: 013 = SY-SUBRC:
    Text Symbol: 014 = Error During Decoding
    Text Symbol: 015 = CRC:
    Text Symbol: 016 = Error During Decoding
    Text Symbol: 017 = CRC - 1: External Security Product Not Found
    Text Symbol: 018 = CRC - 2: Invalid Save Format
    Text Symbol: 019 = CRC - 3: Input Data Missing or Unsuitable
    Text Symbol: 020 = CRC - 4: No More Main Memory for Processing
    Text Symbol: 021 = CRC - 9: No Recipient - Error
    Text Symbol: 022 = Check Constant SSFPR in Table T50BK
    Text Symbol: 023 = CRC - 11: ASN.1 Coding Failed
    Text Symbol: 024 = CRC - 12: ASN.1 Decoding Failed
    Text Symbol: 025 = CRC - 13: Unknown Error in External Security Product
    Text Symbol: 026 = CRC -
    Text Symbol: 027 = Error Decoding Data Part
    Text Symbol: 028 = Decoding - OK
    Text Symbol: 029 = CRC Error 1 - External Security Product Not Found
    Text Symbol: 030 = CRC Error 2 - Invalid Save Format
    Text Symbol: 031 = CRC Error 3 - Input Data Missing or Unsuitable
    Text Symbol: 032 = CRC Error 4 - No main memory remaining for processing
    Text Symbol: 033 = CRC Error 7 - Unknown Address Book
    Text Symbol: 034 = CRC Error 8 - Invalid Password for Address Book
    Text Symbol: 035 = CRC Error 9 - There are recipient errors
    Text Symbol: 036 = CRC Error 11 - ASN.1 encoding failed
    Text Symbol: 037 = CRC Error 12 - ASN.1 decoding failed
    Text Symbol: 038 = CRC Error 13 - Unknown error in external security product
    Text Symbol: 039 = No error text






    Terms of Service     Contact Us     Privacy Policy     Useful SAP related sites