SAP FSC_SAMPLE_S001 Function Module for FI-CA: Dummy (Derive Account Assignments for Revenue/Expense Item)









FSC_SAMPLE_S001 is a standard fsc sample s001 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for FI-CA: Dummy (Derive Account Assignments for Revenue/Expense Item) 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 fsc sample s001 FM, simply by entering the name FSC_SAMPLE_S001 into the relevant SAP transaction such as SE37 or SE38.

Function Group: FSP_SAMPLE_MODULES
Program Name: SAPLFSP_SAMPLE_MODULES
Main Program: SAPLFSP_SAMPLE_MODULES
Appliation area: F
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function FSC_SAMPLE_S001 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 'FSC_SAMPLE_S001'"FI-CA: Dummy (Derive Account Assignments for Revenue/Expense Item)
EXPORTING
I_BUKRS = "Company Code
I_SPARTE = "Division
I_KOFIZ = "Account Determination ID
I_HVORG = "Main Transaction for Line Item
I_TVORG = "Subtransaction for Document Item

IMPORTING
E_HKONT = "G/L Account Number
E_GSBER = "Business Area
E_F_TFKCOD = "CO Account Assignments

EXCEPTIONS
ERROR_IN_INPUT_DATA = 1
.



IMPORTING Parameters details for FSC_SAMPLE_S001

I_BUKRS - Company Code

Data type: FKKOP-BUKRS
Optional: No
Call by Reference: No ( called with pass by value option)

I_SPARTE - Division

Data type: FKKOP-SPART
Optional: No
Call by Reference: No ( called with pass by value option)

I_KOFIZ - Account Determination ID

Data type: FKKOP-KOFIZ
Optional: No
Call by Reference: No ( called with pass by value option)

I_HVORG - Main Transaction for Line Item

Data type: FKKOP-HVORG
Optional: No
Call by Reference: No ( called with pass by value option)

I_TVORG - Subtransaction for Document Item

Data type: FKKOP-TVORG
Optional: No
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for FSC_SAMPLE_S001

E_HKONT - G/L Account Number

Data type: SKA1-SAKNR
Optional: No
Call by Reference: No ( called with pass by value option)

E_GSBER - Business Area

Data type: TGSB-GSBER
Optional: No
Call by Reference: No ( called with pass by value option)

E_F_TFKCOD - CO Account Assignments

Data type: TFKCOD
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ERROR_IN_INPUT_DATA -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for FSC_SAMPLE_S001 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_e_hkont  TYPE SKA1-SAKNR, "   
lv_i_bukrs  TYPE FKKOP-BUKRS, "   
lv_error_in_input_data  TYPE FKKOP, "   
lv_e_gsber  TYPE TGSB-GSBER, "   
lv_i_sparte  TYPE FKKOP-SPART, "   
lv_i_kofiz  TYPE FKKOP-KOFIZ, "   
lv_e_f_tfkcod  TYPE TFKCOD, "   
lv_i_hvorg  TYPE FKKOP-HVORG, "   
lv_i_tvorg  TYPE FKKOP-TVORG. "   

  CALL FUNCTION 'FSC_SAMPLE_S001'  "FI-CA: Dummy (Derive Account Assignments for Revenue/Expense Item)
    EXPORTING
         I_BUKRS = lv_i_bukrs
         I_SPARTE = lv_i_sparte
         I_KOFIZ = lv_i_kofiz
         I_HVORG = lv_i_hvorg
         I_TVORG = lv_i_tvorg
    IMPORTING
         E_HKONT = lv_e_hkont
         E_GSBER = lv_e_gsber
         E_F_TFKCOD = lv_e_f_tfkcod
    EXCEPTIONS
        ERROR_IN_INPUT_DATA = 1
. " FSC_SAMPLE_S001




ABAP code using 7.40 inline data declarations to call FM FSC_SAMPLE_S001

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 SAKNR FROM SKA1 INTO @DATA(ld_e_hkont).
 
"SELECT single BUKRS FROM FKKOP INTO @DATA(ld_i_bukrs).
 
 
"SELECT single GSBER FROM TGSB INTO @DATA(ld_e_gsber).
 
"SELECT single SPART FROM FKKOP INTO @DATA(ld_i_sparte).
 
"SELECT single KOFIZ FROM FKKOP INTO @DATA(ld_i_kofiz).
 
 
"SELECT single HVORG FROM FKKOP INTO @DATA(ld_i_hvorg).
 
"SELECT single TVORG FROM FKKOP INTO @DATA(ld_i_tvorg).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!