GET_MASTER_COST_ASSIGNMENT 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 GET_MASTER_COST_ASSIGNMENT into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
HRTV_PTRA_ADDON
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'GET_MASTER_COST_ASSIGNMENT' "
EXPORTING
employeenumber = " pernr_d Personnel Number
* tripnumber = " reinr
* begin_date = " rebed
* end_date = " reend
* budat = " dats
* messages_as_warning = " char1
* called_in_pbo = " char1
TABLES
konti = " ptk17 Assignment Values for HR Objects
kostr_stamm = " kostr_stamm Percent Distribution of Travel Expen.-Master Account Assign.
* infotyp0001 = " p0001 Infotype 0001
* infotyp0017 = " p0017 Infotype 0017
* infotyp0027 = " p0027
* cobl_messages = " bapiret2
EXCEPTIONS
ERROR_IN_COBL_CHECK = 1 " Error in check of master account assignment
INCOMPLETE = 2 "
INFOTYPE_AMBIGUOUS = 3 "
NO_MCA_FOUND = 4 "
. " GET_MASTER_COST_ASSIGNMENT
The ABAP code below is a full code listing to execute function module GET_MASTER_COST_ASSIGNMENT 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).
| it_konti | TYPE STANDARD TABLE OF PTK17,"TABLES PARAM |
| wa_konti | LIKE LINE OF it_konti , |
| it_kostr_stamm | TYPE STANDARD TABLE OF KOSTR_STAMM,"TABLES PARAM |
| wa_kostr_stamm | LIKE LINE OF it_kostr_stamm , |
| it_infotyp0001 | TYPE STANDARD TABLE OF P0001,"TABLES PARAM |
| wa_infotyp0001 | LIKE LINE OF it_infotyp0001 , |
| it_infotyp0017 | TYPE STANDARD TABLE OF P0017,"TABLES PARAM |
| wa_infotyp0017 | LIKE LINE OF it_infotyp0017 , |
| it_infotyp0027 | TYPE STANDARD TABLE OF P0027,"TABLES PARAM |
| wa_infotyp0027 | LIKE LINE OF it_infotyp0027 , |
| it_cobl_messages | TYPE STANDARD TABLE OF BAPIRET2,"TABLES PARAM |
| wa_cobl_messages | LIKE LINE OF it_cobl_messages . |
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_employeenumber | TYPE PERNR_D , |
| it_konti | TYPE STANDARD TABLE OF PTK17 , |
| wa_konti | LIKE LINE OF it_konti, |
| ld_tripnumber | TYPE REINR , |
| it_kostr_stamm | TYPE STANDARD TABLE OF KOSTR_STAMM , |
| wa_kostr_stamm | LIKE LINE OF it_kostr_stamm, |
| ld_begin_date | TYPE REBED , |
| it_infotyp0001 | TYPE STANDARD TABLE OF P0001 , |
| wa_infotyp0001 | LIKE LINE OF it_infotyp0001, |
| ld_end_date | TYPE REEND , |
| it_infotyp0017 | TYPE STANDARD TABLE OF P0017 , |
| wa_infotyp0017 | LIKE LINE OF it_infotyp0017, |
| ld_budat | TYPE DATS , |
| it_infotyp0027 | TYPE STANDARD TABLE OF P0027 , |
| wa_infotyp0027 | LIKE LINE OF it_infotyp0027, |
| ld_messages_as_warning | TYPE CHAR1 , |
| it_cobl_messages | TYPE STANDARD TABLE OF BAPIRET2 , |
| wa_cobl_messages | LIKE LINE OF it_cobl_messages, |
| ld_called_in_pbo | TYPE CHAR1 . |
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 GET_MASTER_COST_ASSIGNMENT or its description.