SAP READ_SACHKONTO_ALTKT Function Module for
READ_SACHKONTO_ALTKT is a standard read sachkonto altkt 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 read sachkonto altkt FM, simply by entering the name READ_SACHKONTO_ALTKT into the relevant SAP transaction such as SE37 or SE38.
Function Group: SAKO
Program Name: SAPLSAKO
Main Program: SAPLSAKO
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function READ_SACHKONTO_ALTKT 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 'READ_SACHKONTO_ALTKT'".
EXPORTING
* ALTKT_I = ' ' "Optional, if already known
BUKRS = "Company code
SAKNR = "G/L account
* SPRAS = SY-LANGU "Language
* XMASS = ' ' "Read and operate accts sequent. from INTAB?
* XSKAN = ' ' "Output alternative acct no. in displ.length
* XTEXT = ' ' "Read text of the alternative account?
IMPORTING
ALTKT = "Alternative account number
ALTKT_NOT_FOUND = "Alternative account number not found
ALTKT_SAKAN = "Alternative G/L acct no. in display length
KTEXT = "G/L account short text
LTEXT = "G/L account long text
TEXT_NOT_FOUND = "Text not found
EXCEPTIONS
BUKRS_NOT_FOUND = 1 SAKNR_NOT_FOUND = 2
IMPORTING Parameters details for READ_SACHKONTO_ALTKT
ALTKT_I - Optional, if already known
Data type: SKB1-ALTKTDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
BUKRS - Company code
Data type: SKB1-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
SAKNR - G/L account
Data type: SKB1-SAKNROptional: No
Call by Reference: No ( called with pass by value option)
SPRAS - Language
Data type: SKAT-SPRASDefault: SY-LANGU
Optional: Yes
Call by Reference: No ( called with pass by value option)
XMASS - Read and operate accts sequent. from INTAB?
Data type: SKB1-XKRESDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
XSKAN - Output alternative acct no. in displ.length
Data type: SKB1-XKRESDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
XTEXT - Read text of the alternative account?
Data type: SKB1-XKRESDefault: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for READ_SACHKONTO_ALTKT
ALTKT - Alternative account number
Data type: SKB1-ALTKTOptional: No
Call by Reference: No ( called with pass by value option)
ALTKT_NOT_FOUND - Alternative account number not found
Data type: SKB1-XKRESOptional: No
Call by Reference: No ( called with pass by value option)
ALTKT_SAKAN - Alternative G/L acct no. in display length
Data type: SKA1-SAKANOptional: No
Call by Reference: No ( called with pass by value option)
KTEXT - G/L account short text
Data type: SKAT-TXT20Optional: No
Call by Reference: No ( called with pass by value option)
LTEXT - G/L account long text
Data type: SKAT-TXT50Optional: No
Call by Reference: No ( called with pass by value option)
TEXT_NOT_FOUND - Text not found
Data type: SKB1-XKRESOptional: No
Call by Reference: No ( called with pass by value option)
EXCEPTIONS details
BUKRS_NOT_FOUND - Company code is not available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
SAKNR_NOT_FOUND - G/L account number is not available
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for READ_SACHKONTO_ALTKT 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_altkt | TYPE SKB1-ALTKT, " | |||
lv_altkt_i | TYPE SKB1-ALTKT, " SPACE | |||
lv_bukrs_not_found | TYPE SKB1, " | |||
lv_bukrs | TYPE SKB1-BUKRS, " | |||
lv_altkt_not_found | TYPE SKB1-XKRES, " | |||
lv_saknr_not_found | TYPE SKB1, " | |||
lv_saknr | TYPE SKB1-SAKNR, " | |||
lv_altkt_sakan | TYPE SKA1-SAKAN, " | |||
lv_ktext | TYPE SKAT-TXT20, " | |||
lv_spras | TYPE SKAT-SPRAS, " SY-LANGU | |||
lv_ltext | TYPE SKAT-TXT50, " | |||
lv_xmass | TYPE SKB1-XKRES, " SPACE | |||
lv_xskan | TYPE SKB1-XKRES, " SPACE | |||
lv_text_not_found | TYPE SKB1-XKRES, " | |||
lv_xtext | TYPE SKB1-XKRES. " SPACE |
  CALL FUNCTION 'READ_SACHKONTO_ALTKT' " |
EXPORTING | ||
ALTKT_I | = lv_altkt_i | |
BUKRS | = lv_bukrs | |
SAKNR | = lv_saknr | |
SPRAS | = lv_spras | |
XMASS | = lv_xmass | |
XSKAN | = lv_xskan | |
XTEXT | = lv_xtext | |
IMPORTING | ||
ALTKT | = lv_altkt | |
ALTKT_NOT_FOUND | = lv_altkt_not_found | |
ALTKT_SAKAN | = lv_altkt_sakan | |
KTEXT | = lv_ktext | |
LTEXT | = lv_ltext | |
TEXT_NOT_FOUND | = lv_text_not_found | |
EXCEPTIONS | ||
BUKRS_NOT_FOUND = 1 | ||
SAKNR_NOT_FOUND = 2 | ||
. " READ_SACHKONTO_ALTKT |
ABAP code using 7.40 inline data declarations to call FM READ_SACHKONTO_ALTKT
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 ALTKT FROM SKB1 INTO @DATA(ld_altkt). | ||||
"SELECT single ALTKT FROM SKB1 INTO @DATA(ld_altkt_i). | ||||
DATA(ld_altkt_i) | = ' '. | |||
"SELECT single BUKRS FROM SKB1 INTO @DATA(ld_bukrs). | ||||
"SELECT single XKRES FROM SKB1 INTO @DATA(ld_altkt_not_found). | ||||
"SELECT single SAKNR FROM SKB1 INTO @DATA(ld_saknr). | ||||
"SELECT single SAKAN FROM SKA1 INTO @DATA(ld_altkt_sakan). | ||||
"SELECT single TXT20 FROM SKAT INTO @DATA(ld_ktext). | ||||
"SELECT single SPRAS FROM SKAT INTO @DATA(ld_spras). | ||||
DATA(ld_spras) | = SY-LANGU. | |||
"SELECT single TXT50 FROM SKAT INTO @DATA(ld_ltext). | ||||
"SELECT single XKRES FROM SKB1 INTO @DATA(ld_xmass). | ||||
DATA(ld_xmass) | = ' '. | |||
"SELECT single XKRES FROM SKB1 INTO @DATA(ld_xskan). | ||||
DATA(ld_xskan) | = ' '. | |||
"SELECT single XKRES FROM SKB1 INTO @DATA(ld_text_not_found). | ||||
"SELECT single XKRES FROM SKB1 INTO @DATA(ld_xtext). | ||||
DATA(ld_xtext) | = ' '. | |||
Search for further information about these or an SAP related objects