SAP CONVERT_COMM_TYPE_DATA Function Module for
CONVERT_COMM_TYPE_DATA is a standard convert comm type data SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 convert comm type data FM, simply by entering the name CONVERT_COMM_TYPE_DATA into the relevant SAP transaction such as SE37 or SE38.
Function Group: VSTR
Program Name: SAPLVSTR
Main Program: SAPLVSTR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function CONVERT_COMM_TYPE_DATA 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 'CONVERT_COMM_TYPE_DATA'".
EXPORTING
* PI_COMM_TYPE = 'LET' "
* PI_COMM_VALUES = "Communication Data
* PI_SCREEN = "
* PI_NEWID = "
* PI_COUNTRY = "Country of destination
* PI_REPID = SY-REPID "Calling Program
* PI_SNAST = "
* PI_MAIL_SENDER = ' ' "
* PI_USE_MAILDEVICE_FOR_FAX = ' ' "
IMPORTING
PE_ITCPO = "SAPscript parameters
PE_DEVICE = "
PE_MAIL_RECIPIENT = "
PE_MAIL_SENDER = "
EXCEPTIONS
COMM_TYPE_NOT_SUPPORTED = 1 RECIPIENT_CREATION_FAILED = 2 SENDER_CREATION_FAILED = 3
IMPORTING Parameters details for CONVERT_COMM_TYPE_DATA
PI_COMM_TYPE -
Data type: AD_COMMDefault: 'LET'
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_COMM_VALUES - Communication Data
Data type: SZADR_COMM_VALUESOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_SCREEN -
Data type: TDPREVIEWOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_NEWID -
Data type: SYPRNEWOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_COUNTRY - Country of destination
Data type: LAND1Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_REPID - Calling Program
Data type: TDPROGRAMDefault: SY-REPID
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_SNAST -
Data type: SNASTOptional: Yes
Call by Reference: No ( called with pass by value option)
PI_MAIL_SENDER -
Data type: SYUNAMEDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
PI_USE_MAILDEVICE_FOR_FAX -
Data type: CHAR1Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CONVERT_COMM_TYPE_DATA
PE_ITCPO - SAPscript parameters
Data type: ITCPOOptional: No
Call by Reference: No ( called with pass by value option)
PE_DEVICE -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
PE_MAIL_RECIPIENT -
Data type: SWOTOBJIDOptional: No
Call by Reference: No ( called with pass by value option)
PE_MAIL_SENDER -
Data type: SWOTOBJIDOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
COMM_TYPE_NOT_SUPPORTED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
RECIPIENT_CREATION_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SENDER_CREATION_FAILED -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CONVERT_COMM_TYPE_DATA 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_pe_itcpo | TYPE ITCPO, " | |||
lv_pi_comm_type | TYPE AD_COMM, " 'LET' | |||
lv_comm_type_not_supported | TYPE AD_COMM, " | |||
lv_pe_device | TYPE AD_COMM, " | |||
lv_pi_comm_values | TYPE SZADR_COMM_VALUES, " | |||
lv_recipient_creation_failed | TYPE SZADR_COMM_VALUES, " | |||
lv_pi_screen | TYPE TDPREVIEW, " | |||
lv_pe_mail_recipient | TYPE SWOTOBJID, " | |||
lv_sender_creation_failed | TYPE SWOTOBJID, " | |||
lv_pi_newid | TYPE SYPRNEW, " | |||
lv_pe_mail_sender | TYPE SWOTOBJID, " | |||
lv_pi_country | TYPE LAND1, " | |||
lv_pi_repid | TYPE TDPROGRAM, " SY-REPID | |||
lv_pi_snast | TYPE SNAST, " | |||
lv_pi_mail_sender | TYPE SYUNAME, " SPACE | |||
lv_pi_use_maildevice_for_fax | TYPE CHAR1. " SPACE |
  CALL FUNCTION 'CONVERT_COMM_TYPE_DATA' " |
EXPORTING | ||
PI_COMM_TYPE | = lv_pi_comm_type | |
PI_COMM_VALUES | = lv_pi_comm_values | |
PI_SCREEN | = lv_pi_screen | |
PI_NEWID | = lv_pi_newid | |
PI_COUNTRY | = lv_pi_country | |
PI_REPID | = lv_pi_repid | |
PI_SNAST | = lv_pi_snast | |
PI_MAIL_SENDER | = lv_pi_mail_sender | |
PI_USE_MAILDEVICE_FOR_FAX | = lv_pi_use_maildevice_for_fax | |
IMPORTING | ||
PE_ITCPO | = lv_pe_itcpo | |
PE_DEVICE | = lv_pe_device | |
PE_MAIL_RECIPIENT | = lv_pe_mail_recipient | |
PE_MAIL_SENDER | = lv_pe_mail_sender | |
EXCEPTIONS | ||
COMM_TYPE_NOT_SUPPORTED = 1 | ||
RECIPIENT_CREATION_FAILED = 2 | ||
SENDER_CREATION_FAILED = 3 | ||
. " CONVERT_COMM_TYPE_DATA |
ABAP code using 7.40 inline data declarations to call FM CONVERT_COMM_TYPE_DATA
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.DATA(ld_pi_comm_type) | = 'LET'. | |||
DATA(ld_pi_repid) | = SY-REPID. | |||
DATA(ld_pi_mail_sender) | = ' '. | |||
DATA(ld_pi_use_maildevice_for_fax) | = ' '. | |||
Search for further information about these or an SAP related objects