SAP CO1N_EXTNUM_READ Function Module for NOTRANSL: Read external number for temporary or internal number
CO1N_EXTNUM_READ is a standard co1n extnum read SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Read external number for temporary or internal number 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 co1n extnum read FM, simply by entering the name CO1N_EXTNUM_READ into the relevant SAP transaction such as SE37 or SE38.
Function Group: CO1N
Program Name: SAPLCO1N
Main Program: SAPLCO1N
Appliation area: C
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function CO1N_EXTNUM_READ 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 'CO1N_EXTNUM_READ'"NOTRANSL: Read external number for temporary or internal number.
EXPORTING
* INTNUM = "Internal number
* TMPNUM = "Temporary number
* XPLAF = "Mark: Planned order
IMPORTING
EXTNUM = "External number
EXCEPTIONS
WRONG_NUMBER_FORMAT = 1 NOT_FOUND = 2 NUMBER_MISMATCH = 3
IMPORTING Parameters details for CO1N_EXTNUM_READ
INTNUM - Internal number
Data type: CLOIMAPTMP-INTNUMOptional: Yes
Call by Reference: No ( called with pass by value option)
TMPNUM - Temporary number
Data type: CLOIMAPTMP-TMPNUMOptional: Yes
Call by Reference: No ( called with pass by value option)
XPLAF - Mark: Planned order
Data type: CLOIMAPTMP-XPLAFOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for CO1N_EXTNUM_READ
EXTNUM - External number
Data type: CLOIMAPTMP-EXTNUMOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
WRONG_NUMBER_FORMAT - Temp.number has int. or int.number temp. format
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NOT_FOUND - Internal or temporary number was not found
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
NUMBER_MISMATCH - Parameter number and table number are different
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for CO1N_EXTNUM_READ 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_extnum | TYPE CLOIMAPTMP-EXTNUM, " | |||
| lv_intnum | TYPE CLOIMAPTMP-INTNUM, " | |||
| lv_wrong_number_format | TYPE CLOIMAPTMP, " | |||
| lv_tmpnum | TYPE CLOIMAPTMP-TMPNUM, " | |||
| lv_not_found | TYPE CLOIMAPTMP, " | |||
| lv_xplaf | TYPE CLOIMAPTMP-XPLAF, " | |||
| lv_number_mismatch | TYPE CLOIMAPTMP. " |
|   CALL FUNCTION 'CO1N_EXTNUM_READ' "NOTRANSL: Read external number for temporary or internal number |
| EXPORTING | ||
| INTNUM | = lv_intnum | |
| TMPNUM | = lv_tmpnum | |
| XPLAF | = lv_xplaf | |
| IMPORTING | ||
| EXTNUM | = lv_extnum | |
| EXCEPTIONS | ||
| WRONG_NUMBER_FORMAT = 1 | ||
| NOT_FOUND = 2 | ||
| NUMBER_MISMATCH = 3 | ||
| . " CO1N_EXTNUM_READ | ||
ABAP code using 7.40 inline data declarations to call FM CO1N_EXTNUM_READ
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.| "SELECT single EXTNUM FROM CLOIMAPTMP INTO @DATA(ld_extnum). | ||||
| "SELECT single INTNUM FROM CLOIMAPTMP INTO @DATA(ld_intnum). | ||||
| "SELECT single TMPNUM FROM CLOIMAPTMP INTO @DATA(ld_tmpnum). | ||||
| "SELECT single XPLAF FROM CLOIMAPTMP INTO @DATA(ld_xplaf). | ||||
Search for further information about these or an SAP related objects