SAP PSA_GET_PROD_MONTH_BY_MONTH Function Module for Get input data for production
PSA_GET_PROD_MONTH_BY_MONTH is a standard psa get prod month by month SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Get input data for production 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 psa get prod month by month FM, simply by entering the name PSA_GET_PROD_MONTH_BY_MONTH into the relevant SAP transaction such as SE37 or SE38.
Function Group: PSACALC
Program Name: SAPLPSACALC
Main Program: SAPLPSACALC
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function PSA_GET_PROD_MONTH_BY_MONTH 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 'PSA_GET_PROD_MONTH_BY_MONTH'"Get input data for production.
EXPORTING
I_BUKRS = "
* I_CURR = "
I_PER_FROM = "
I_YEAR_FROM = "
I_PER_TO = "
I_YEAR_TO = "
I_DATE = "
I_PSC = "PSA Name
I_PRODUCT = "PSA Product
I_VNAME = "Joint Venture
I_ETYPE = "Equity type
* I_PV = "PSC Production Volume
* I_PPU = "Price per Unit
I_BFREQ = "PSC reporting frequency
* I_CURT = "
IMPORTING
E_RESULT = "
TABLES
T_CURR = "PSC currencies
T_T8PSA_INPUT = "PSC Production Input
EXCEPTIONS
INCOMPLETE_INPUT = 1
IMPORTING Parameters details for PSA_GET_PROD_MONTH_BY_MONTH
I_BUKRS -
Data type: T001-BUKRSOptional: No
Call by Reference: No ( called with pass by value option)
I_CURR -
Data type: T001-WAERSOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PER_FROM -
Data type: GLU1-POPEROptional: No
Call by Reference: No ( called with pass by value option)
I_YEAR_FROM -
Data type: BKPF-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
I_PER_TO -
Data type: GLU1-POPEROptional: No
Call by Reference: No ( called with pass by value option)
I_YEAR_TO -
Data type: BKPF-GJAHROptional: No
Call by Reference: No ( called with pass by value option)
I_DATE -
Data type: SY-DATUMOptional: No
Call by Reference: No ( called with pass by value option)
I_PSC - PSA Name
Data type: T8PSA_PSC-PSC_NAMEOptional: No
Call by Reference: No ( called with pass by value option)
I_PRODUCT - PSA Product
Data type: T8PSA_PRODUCT-PSC_PRODUCTOptional: No
Call by Reference: No ( called with pass by value option)
I_VNAME - Joint Venture
Data type: T8PSA_PA-VNAMEOptional: No
Call by Reference: No ( called with pass by value option)
I_ETYPE - Equity type
Data type: T8PSA_PA-ETYPEOptional: No
Call by Reference: No ( called with pass by value option)
I_PV - PSC Production Volume
Data type: PSA_CALC-PVOptional: Yes
Call by Reference: No ( called with pass by value option)
I_PPU - Price per Unit
Data type: PSA_CALC-PPUOptional: Yes
Call by Reference: No ( called with pass by value option)
I_BFREQ - PSC reporting frequency
Data type: T8PSA_PSC-PSC_BILL_FREQOptional: No
Call by Reference: No ( called with pass by value option)
I_CURT -
Data type: T881-CURT1Optional: Yes
Call by Reference: No ( called with pass by value option)
EXPORTING Parameters details for PSA_GET_PROD_MONTH_BY_MONTH
E_RESULT -
Data type: PSATP_INTERFACEOptional: No
Call by Reference: No ( called with pass by value option)
TABLES Parameters details for PSA_GET_PROD_MONTH_BY_MONTH
T_CURR - PSC currencies
Data type: PSA_CURROptional: No
Call by Reference: Yes
T_T8PSA_INPUT - PSC Production Input
Data type: T8PSA_INPUTOptional: No
Call by Reference: Yes
EXCEPTIONS details
INCOMPLETE_INPUT -
Data type:Optional: No
Call by Reference: No ( called with pass by value option)
Copy and paste ABAP code example for PSA_GET_PROD_MONTH_BY_MONTH 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: | ||||
| lt_t_curr | TYPE STANDARD TABLE OF PSA_CURR, " | |||
| lv_i_bukrs | TYPE T001-BUKRS, " | |||
| lv_e_result | TYPE PSATP_INTERFACE, " | |||
| lv_incomplete_input | TYPE PSATP_INTERFACE, " | |||
| lv_i_curr | TYPE T001-WAERS, " | |||
| lv_i_per_from | TYPE GLU1-POPER, " | |||
| lv_i_year_from | TYPE BKPF-GJAHR, " | |||
| lv_i_per_to | TYPE GLU1-POPER, " | |||
| lv_i_year_to | TYPE BKPF-GJAHR, " | |||
| lv_i_date | TYPE SY-DATUM, " | |||
| lv_i_psc | TYPE T8PSA_PSC-PSC_NAME, " | |||
| lt_t_t8psa_input | TYPE STANDARD TABLE OF T8PSA_INPUT, " | |||
| lv_i_product | TYPE T8PSA_PRODUCT-PSC_PRODUCT, " | |||
| lv_i_vname | TYPE T8PSA_PA-VNAME, " | |||
| lv_i_etype | TYPE T8PSA_PA-ETYPE, " | |||
| lv_i_pv | TYPE PSA_CALC-PV, " | |||
| lv_i_ppu | TYPE PSA_CALC-PPU, " | |||
| lv_i_bfreq | TYPE T8PSA_PSC-PSC_BILL_FREQ, " | |||
| lv_i_curt | TYPE T881-CURT1. " |
|   CALL FUNCTION 'PSA_GET_PROD_MONTH_BY_MONTH' "Get input data for production |
| EXPORTING | ||
| I_BUKRS | = lv_i_bukrs | |
| I_CURR | = lv_i_curr | |
| I_PER_FROM | = lv_i_per_from | |
| I_YEAR_FROM | = lv_i_year_from | |
| I_PER_TO | = lv_i_per_to | |
| I_YEAR_TO | = lv_i_year_to | |
| I_DATE | = lv_i_date | |
| I_PSC | = lv_i_psc | |
| I_PRODUCT | = lv_i_product | |
| I_VNAME | = lv_i_vname | |
| I_ETYPE | = lv_i_etype | |
| I_PV | = lv_i_pv | |
| I_PPU | = lv_i_ppu | |
| I_BFREQ | = lv_i_bfreq | |
| I_CURT | = lv_i_curt | |
| IMPORTING | ||
| E_RESULT | = lv_e_result | |
| TABLES | ||
| T_CURR | = lt_t_curr | |
| T_T8PSA_INPUT | = lt_t_t8psa_input | |
| EXCEPTIONS | ||
| INCOMPLETE_INPUT = 1 | ||
| . " PSA_GET_PROD_MONTH_BY_MONTH | ||
ABAP code using 7.40 inline data declarations to call FM PSA_GET_PROD_MONTH_BY_MONTH
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 BUKRS FROM T001 INTO @DATA(ld_i_bukrs). | ||||
| "SELECT single WAERS FROM T001 INTO @DATA(ld_i_curr). | ||||
| "SELECT single POPER FROM GLU1 INTO @DATA(ld_i_per_from). | ||||
| "SELECT single GJAHR FROM BKPF INTO @DATA(ld_i_year_from). | ||||
| "SELECT single POPER FROM GLU1 INTO @DATA(ld_i_per_to). | ||||
| "SELECT single GJAHR FROM BKPF INTO @DATA(ld_i_year_to). | ||||
| "SELECT single DATUM FROM SY INTO @DATA(ld_i_date). | ||||
| "SELECT single PSC_NAME FROM T8PSA_PSC INTO @DATA(ld_i_psc). | ||||
| "SELECT single PSC_PRODUCT FROM T8PSA_PRODUCT INTO @DATA(ld_i_product). | ||||
| "SELECT single VNAME FROM T8PSA_PA INTO @DATA(ld_i_vname). | ||||
| "SELECT single ETYPE FROM T8PSA_PA INTO @DATA(ld_i_etype). | ||||
| "SELECT single PV FROM PSA_CALC INTO @DATA(ld_i_pv). | ||||
| "SELECT single PPU FROM PSA_CALC INTO @DATA(ld_i_ppu). | ||||
| "SELECT single PSC_BILL_FREQ FROM T8PSA_PSC INTO @DATA(ld_i_bfreq). | ||||
| "SELECT single CURT1 FROM T881 INTO @DATA(ld_i_curt). | ||||
Search for further information about these or an SAP related objects