FKK_SAMPLE_0785 is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.
See here to view full function module documentation and code listing, simply by entering the name FKK_SAMPLE_0785 into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
FKK4
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'FKK_SAMPLE_0785' "Calculate Account Balances
EXPORTING
* i_vkont = ' ' " fkkvk-vkont Relevant Account
* i_gpart = ' ' " gpart_kk Business Partner
* i_vtref = ' ' " vtref_kk Contract Reference
* i_subap = SPACE " subap_kk Subapplication in Contract Accounts Receivable and Payable
i_start_date = " sy-datum Start Date
i_start_time = " coitm_kk Start Time to the Second
i_end_date = " sy-datum End Date
i_end_time = " coitm_kk End Time to the Second
* i_xallf = ' ' " xfeld Read Dunning and Returns Data
IMPORTING
e_balance = " fkkop-betrh
e_sum_openitems = " fkkop-betrh
e_sum_clearings = " fkkop-betrh
e_sum_institems = " fkkop-betrh
e_sum_interestitems = " fkkop-betrh Amount in Local Currency with +/- Signs
e_sum_chargeitems = " fkkop-betrh Amount in Local Currency with +/- Signs
* TABLES
* t_postab = " fkkepos
* t_augtab = " fkkepos
* t_insttab = " fkkepos
* t_interesttab = " sfkkop
* t_chargetab = " fkkop
. " FKK_SAMPLE_0785
The ABAP code below is a full code listing to execute function module FKK_SAMPLE_0785 including all data declarations. The code uses 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 original method of declaring data variables up front. 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).
| ld_e_balance | TYPE FKKOP-BETRH , |
| ld_e_sum_openitems | TYPE FKKOP-BETRH , |
| ld_e_sum_clearings | TYPE FKKOP-BETRH , |
| ld_e_sum_institems | TYPE FKKOP-BETRH , |
| ld_e_sum_interestitems | TYPE FKKOP-BETRH , |
| ld_e_sum_chargeitems | TYPE FKKOP-BETRH , |
| it_t_postab | TYPE STANDARD TABLE OF FKKEPOS,"TABLES PARAM |
| wa_t_postab | LIKE LINE OF it_t_postab , |
| it_t_augtab | TYPE STANDARD TABLE OF FKKEPOS,"TABLES PARAM |
| wa_t_augtab | LIKE LINE OF it_t_augtab , |
| it_t_insttab | TYPE STANDARD TABLE OF FKKEPOS,"TABLES PARAM |
| wa_t_insttab | LIKE LINE OF it_t_insttab , |
| it_t_interesttab | TYPE STANDARD TABLE OF SFKKOP,"TABLES PARAM |
| wa_t_interesttab | LIKE LINE OF it_t_interesttab , |
| it_t_chargetab | TYPE STANDARD TABLE OF FKKOP,"TABLES PARAM |
| wa_t_chargetab | LIKE LINE OF it_t_chargetab . |
The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.
DATA:
| ld_e_balance | TYPE FKKOP-BETRH , |
| ld_i_vkont | TYPE FKKVK-VKONT , |
| it_t_postab | TYPE STANDARD TABLE OF FKKEPOS , |
| wa_t_postab | LIKE LINE OF it_t_postab, |
| ld_e_sum_openitems | TYPE FKKOP-BETRH , |
| ld_i_gpart | TYPE GPART_KK , |
| it_t_augtab | TYPE STANDARD TABLE OF FKKEPOS , |
| wa_t_augtab | LIKE LINE OF it_t_augtab, |
| ld_e_sum_clearings | TYPE FKKOP-BETRH , |
| ld_i_vtref | TYPE VTREF_KK , |
| it_t_insttab | TYPE STANDARD TABLE OF FKKEPOS , |
| wa_t_insttab | LIKE LINE OF it_t_insttab, |
| ld_e_sum_institems | TYPE FKKOP-BETRH , |
| ld_i_subap | TYPE SUBAP_KK , |
| it_t_interesttab | TYPE STANDARD TABLE OF SFKKOP , |
| wa_t_interesttab | LIKE LINE OF it_t_interesttab, |
| ld_e_sum_interestitems | TYPE FKKOP-BETRH , |
| ld_i_start_date | TYPE SY-DATUM , |
| it_t_chargetab | TYPE STANDARD TABLE OF FKKOP , |
| wa_t_chargetab | LIKE LINE OF it_t_chargetab, |
| ld_e_sum_chargeitems | TYPE FKKOP-BETRH , |
| ld_i_start_time | TYPE COITM_KK , |
| ld_i_end_date | TYPE SY-DATUM , |
| ld_i_end_time | TYPE COITM_KK , |
| ld_i_xallf | TYPE XFELD . |
This function module calculates the balance of the items posted between
the i_startdate-i_starttime and i_enddate-i_endtime.
...See here for full SAP fm documentation
Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name FKK_SAMPLE_0785 or its description.
FKK_SAMPLE_0785 - Calculate Account Balances FKK_SAMPLE_0784 - FI-CA Correspondence - Sample: Creation of Debit Memo Notification GB FKK_SAMPLE_0783 - FI-CA Correspondence - Sample Module for Printing Debit Memo Notificat FKK_SAMPLE_0782 - FI-CA Correspondence - Payment Form Printing Sample Module FKK_SAMPLE_0781 - FI-CA Correspondence - Sample Module for Payment Form Request FKK_SAMPLE_0780 -