SAP COPA_GET_BSTRA Function Module for
COPA_GET_BSTRA is a standard copa get bstra 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 copa get bstra FM, simply by entering the name COPA_GET_BSTRA into the relevant SAP transaction such as SE37 or SE38.
Function Group: KEAB
Program Name: SAPLKEAB
Main Program: SAPLKEAB
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:
Function COPA_GET_BSTRA 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 'COPA_GET_BSTRA'".
EXPORTING
I_ERKRS = "Operating Concern
* I_BWFKT = "Point of Valuation
* I_VRGAR = "Transaction/Event Type
* I_VERSI = "Plan version (CO-PA)
* I_VRGNG = "Business Transaction
IMPORTING
E_BSTRA = "Valuation strategy (CO-PA)
CHANGING
* IS_ITEM = "CO-PA line item
EXCEPTIONS
VAL_NOT_ACTIVE = 1
Customer Function user exits
Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.EXIT_SAPLKEAB_001 User Exit for Actual Data Valuation
EXIT_SAPLKEAB_002 User Exit for Planning Data Valuation
EXIT_SAPLKEAB_003 Valuation Using Conditions: Access to the Structures KOMK / KOMP
EXIT_SAPLKEAB_004 CO-PA Valuation: Flexible Assignment Costing Key
IMPORTING Parameters details for COPA_GET_BSTRA
I_ERKRS - Operating Concern
Data type: ERKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_BWFKT - Point of Valuation
Data type: RKE_BWFKTOptional: Yes
Call by Reference: No ( called with pass by value option)
I_VRGAR - Transaction/Event Type
Data type: RKE_VRGAROptional: Yes
Call by Reference: No ( called with pass by value option)
I_VERSI - Plan version (CO-PA)
Data type: RKEVERSIOptional: Yes
Call by Reference: No ( called with pass by value option)
I_VRGNG - Business Transaction
Data type: J_VORGANGOptional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for COPA_GET_BSTRA
E_BSTRA - Valuation strategy (CO-PA)
Data type: BSTRATOptional: No
Call by Reference: Yes
CHANGING Parameters details for COPA_GET_BSTRA
IS_ITEM - CO-PA line item
Data type: ANYOptional: Yes
Call by Reference: Yes
EXCEPTIONS details
VAL_NOT_ACTIVE -
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for COPA_GET_BSTRA 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_bstra | TYPE BSTRAT, " | |||
lv_is_item | TYPE ANY, " | |||
lv_i_erkrs | TYPE ERKRS, " | |||
lv_val_not_active | TYPE ERKRS, " | |||
lv_i_bwfkt | TYPE RKE_BWFKT, " | |||
lv_i_vrgar | TYPE RKE_VRGAR, " | |||
lv_i_versi | TYPE RKEVERSI, " | |||
lv_i_vrgng | TYPE J_VORGANG. " |
  CALL FUNCTION 'COPA_GET_BSTRA' " |
EXPORTING | ||
I_ERKRS | = lv_i_erkrs | |
I_BWFKT | = lv_i_bwfkt | |
I_VRGAR | = lv_i_vrgar | |
I_VERSI | = lv_i_versi | |
I_VRGNG | = lv_i_vrgng | |
IMPORTING | ||
E_BSTRA | = lv_e_bstra | |
CHANGING | ||
IS_ITEM | = lv_is_item | |
EXCEPTIONS | ||
VAL_NOT_ACTIVE = 1 | ||
. " COPA_GET_BSTRA |
ABAP code using 7.40 inline data declarations to call FM COPA_GET_BSTRA
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