SAP PTRM_UTIL_CHECK_CREDIT_CARD Function Module for Check credit card input
PTRM_UTIL_CHECK_CREDIT_CARD is a standard ptrm util check credit card SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Check credit card input processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.
See here to view full function module documentation and code listing for ptrm util check credit card FM, simply by entering the name PTRM_UTIL_CHECK_CREDIT_CARD into the relevant SAP transaction such as SE37 or SE38.
Function Group: PTRM_WEB_CREDIT_CARD
Program Name: SAPLPTRM_WEB_CREDIT_CARD
Main Program: SAPLPTRM_WEB_CREDIT_CARD
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PTRM_UTIL_CHECK_CREDIT_CARD pattern details
In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.CALL FUNCTION 'PTRM_UTIL_CHECK_CREDIT_CARD'"Check credit card input.
EXPORTING
I_CARD_COMPANY = "Code of Payment Card Company
I_CARD_NUMBER_NEW = "Card number input by user
* I_CARD_NUMBER_OLD = "Old Credit Card Number
* I_CARD_NUMBER_UNMASKED = "Old unmasked Credit Card Number
* I_CARD_YEAR = "Year of Credit Card Validity
* I_CARD_MONTH = "Month of Credit Card Validity
IMPORTING
E_CARD_NUMBER_UNMASKED = "Credit Card Number
ET_MESSAGE = "Return Parameter
IMPORTING Parameters details for PTRM_UTIL_CHECK_CREDIT_CARD
I_CARD_COMPANY - Code of Payment Card Company
Data type: CCOMPOptional: No
Call by Reference: Yes
I_CARD_NUMBER_NEW - Card number input by user
Data type: CREDIT_CARD_NUMBEROptional: No
Call by Reference: Yes
I_CARD_NUMBER_OLD - Old Credit Card Number
Data type: CREDIT_CARD_NUMBEROptional: Yes
Call by Reference: Yes
I_CARD_NUMBER_UNMASKED - Old unmasked Credit Card Number
Data type: CREDIT_CARD_NUMBEROptional: Yes
Call by Reference: Yes
I_CARD_YEAR - Year of Credit Card Validity
Data type: CREDIT_CARD_YEAROptional: Yes
Call by Reference: Yes
I_CARD_MONTH - Month of Credit Card Validity
Data type: CREDIT_CARD_MONTHOptional: Yes
Call by Reference: Yes
EXPORTING Parameters details for PTRM_UTIL_CHECK_CREDIT_CARD
E_CARD_NUMBER_UNMASKED - Credit Card Number
Data type: CREDIT_CARD_NUMBEROptional: No
Call by Reference: Yes
ET_MESSAGE - Return Parameter
Data type: BAPIRETTABOptional: No
Call by Reference: Yes
Copy and paste ABAP code example for PTRM_UTIL_CHECK_CREDIT_CARD Function Module
The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.| DATA: | ||||
| lv_i_card_company | TYPE CCOMP, " | |||
| lv_e_card_number_unmasked | TYPE CREDIT_CARD_NUMBER, " | |||
| lv_et_message | TYPE BAPIRETTAB, " | |||
| lv_i_card_number_new | TYPE CREDIT_CARD_NUMBER, " | |||
| lv_i_card_number_old | TYPE CREDIT_CARD_NUMBER, " | |||
| lv_i_card_number_unmasked | TYPE CREDIT_CARD_NUMBER, " | |||
| lv_i_card_year | TYPE CREDIT_CARD_YEAR, " | |||
| lv_i_card_month | TYPE CREDIT_CARD_MONTH. " |
|   CALL FUNCTION 'PTRM_UTIL_CHECK_CREDIT_CARD' "Check credit card input |
| EXPORTING | ||
| I_CARD_COMPANY | = lv_i_card_company | |
| I_CARD_NUMBER_NEW | = lv_i_card_number_new | |
| I_CARD_NUMBER_OLD | = lv_i_card_number_old | |
| I_CARD_NUMBER_UNMASKED | = lv_i_card_number_unmasked | |
| I_CARD_YEAR | = lv_i_card_year | |
| I_CARD_MONTH | = lv_i_card_month | |
| IMPORTING | ||
| E_CARD_NUMBER_UNMASKED | = lv_e_card_number_unmasked | |
| ET_MESSAGE | = lv_et_message | |
| . " PTRM_UTIL_CHECK_CREDIT_CARD | ||
ABAP code using 7.40 inline data declarations to call FM PTRM_UTIL_CHECK_CREDIT_CARD
The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.Search for further information about these or an SAP related objects