SAP FSC_SAMPLE_9501 Function Module for BAPI: Create Contract Account
FSC_SAMPLE_9501 is a standard fsc sample 9501 SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for BAPI: Create Contract Account 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 9501 FM, simply by entering the name FSC_SAMPLE_9501 into the relevant SAP transaction such as SE37 or SE38.
Function Group: FSP_CRM
Program Name: SAPLFSP_CRM
Main Program: SAPLFSP_CRM
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function FSC_SAMPLE_9501 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_9501'"BAPI: Create Contract Account.
EXPORTING
I_VKONTO = "Contract Account Number
* I_PARTNER = "Business Partner Number
CHANGING
I_FKKVK_DI = "
TABLES
T_FKKVKP_DI = "
T_FKKVKLOCK_S_DI = "
T_FKKVK_CORR_S_DI = "Alternative corresp. recipient
IMPORTING Parameters details for FSC_SAMPLE_9501
I_VKONTO - Contract Account Number
Data type: VKONT_KKOptional: No
Call by Reference: No ( called with pass by value option)
I_PARTNER - Business Partner Number
Data type: GPART_KKOptional: Yes
Call by Reference: No ( called with pass by value option)
CHANGING Parameters details for FSC_SAMPLE_9501
I_FKKVK_DI -
Data type: FKKVK_S_DIOptional: No
Call by Reference: Yes
TABLES Parameters details for FSC_SAMPLE_9501
T_FKKVKP_DI -
Data type: FKKVKP_S_DIOptional: No
Call by Reference: No ( called with pass by value option)
T_FKKVKLOCK_S_DI -
Data type: FKKVKLOCK_S_DIOptional: No
Call by Reference: No ( called with pass by value option)
T_FKKVK_CORR_S_DI - Alternative corresp. recipient
Data type: FKKVK_CORR_S_DIOptional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for FSC_SAMPLE_9501 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_vkonto | TYPE VKONT_KK, " | |||
| lv_i_fkkvk_di | TYPE FKKVK_S_DI, " | |||
| lt_t_fkkvkp_di | TYPE STANDARD TABLE OF FKKVKP_S_DI, " | |||
| lv_i_partner | TYPE GPART_KK, " | |||
| lt_t_fkkvklock_s_di | TYPE STANDARD TABLE OF FKKVKLOCK_S_DI, " | |||
| lt_t_fkkvk_corr_s_di | TYPE STANDARD TABLE OF FKKVK_CORR_S_DI. " |
|   CALL FUNCTION 'FSC_SAMPLE_9501' "BAPI: Create Contract Account |
| EXPORTING | ||
| I_VKONTO | = lv_i_vkonto | |
| I_PARTNER | = lv_i_partner | |
| CHANGING | ||
| I_FKKVK_DI | = lv_i_fkkvk_di | |
| TABLES | ||
| T_FKKVKP_DI | = lt_t_fkkvkp_di | |
| T_FKKVKLOCK_S_DI | = lt_t_fkkvklock_s_di | |
| T_FKKVK_CORR_S_DI | = lt_t_fkkvk_corr_s_di | |
| . " FSC_SAMPLE_9501 | ||
ABAP code using 7.40 inline data declarations to call FM FSC_SAMPLE_9501
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