SAP MD_POSTING Function Module for NOTRANSL: Verbuchung von Verkaufs-Konditionen
MD_POSTING is a standard md posting SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Verbuchung von Verkaufs-Konditionen 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 md posting FM, simply by entering the name MD_POSTING into the relevant SAP transaction such as SE37 or SE38.
Function Group: WMF3
Program Name: SAPLWMF3
Main Program:
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:

Function MD_POSTING 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 'MD_POSTING'"NOTRANSL: Verbuchung von Verkaufs-Konditionen.
EXPORTING
* PI_FEHLP = ' ' "Print error log
* PI_DRUKZ = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_REFRS = ' ' "DE-EN-LANG-SWITCH-NO-TRANSLATION
* PI_MFCNR = ' ' "Document no. of Markdown Plan
TABLES
PX_T_CALP_C = "Sales Price Calculation: Item in a Price Calculation
PE_T_ERRO = "Sales price calculation: structure for error processing
EXCEPTIONS
ERROR_IN_CALCULATION = 1 ERROR_IN_POSTING = 2
IMPORTING Parameters details for MD_POSTING
PI_FEHLP - Print error log
Data type: PISPC-FEHLPDefault: ' '
Optional: Yes
Call by Reference: Yes
PI_DRUKZ - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: PISPC-DRUKZDefault: ' '
Optional: Yes
Call by Reference: Yes
PI_REFRS - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type: SY-MARKYDefault: ' '
Optional: Yes
Call by Reference: Yes
PI_MFCNR - Document no. of Markdown Plan
Data type: W_MFCNRDefault: ' '
Optional: Yes
Call by Reference: Yes
TABLES Parameters details for MD_POSTING
PX_T_CALP_C - Sales Price Calculation: Item in a Price Calculation
Data type: CALPOptional: No
Call by Reference: Yes
PE_T_ERRO - Sales price calculation: structure for error processing
Data type: ERROOptional: No
Call by Reference: Yes
EXCEPTIONS details
ERROR_IN_CALCULATION - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: Yes
ERROR_IN_POSTING - DE-EN-LANG-SWITCH-NO-TRANSLATION
Data type:Optional: No
Call by Reference: Yes
Copy and paste ABAP code example for MD_POSTING 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_pi_fehlp | TYPE PISPC-FEHLP, " ' ' | |||
| lt_px_t_calp_c | TYPE STANDARD TABLE OF CALP, " | |||
| lv_error_in_calculation | TYPE CALP, " | |||
| lv_pi_drukz | TYPE PISPC-DRUKZ, " ' ' | |||
| lt_pe_t_erro | TYPE STANDARD TABLE OF ERRO, " | |||
| lv_error_in_posting | TYPE ERRO, " | |||
| lv_pi_refrs | TYPE SY-MARKY, " ' ' | |||
| lv_pi_mfcnr | TYPE W_MFCNR. " ' ' |
|   CALL FUNCTION 'MD_POSTING' "NOTRANSL: Verbuchung von Verkaufs-Konditionen |
| EXPORTING | ||
| PI_FEHLP | = lv_pi_fehlp | |
| PI_DRUKZ | = lv_pi_drukz | |
| PI_REFRS | = lv_pi_refrs | |
| PI_MFCNR | = lv_pi_mfcnr | |
| TABLES | ||
| PX_T_CALP_C | = lt_px_t_calp_c | |
| PE_T_ERRO | = lt_pe_t_erro | |
| EXCEPTIONS | ||
| ERROR_IN_CALCULATION = 1 | ||
| ERROR_IN_POSTING = 2 | ||
| . " MD_POSTING | ||
ABAP code using 7.40 inline data declarations to call FM MD_POSTING
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 FEHLP FROM PISPC INTO @DATA(ld_pi_fehlp). | ||||
| DATA(ld_pi_fehlp) | = ' '. | |||
| "SELECT single DRUKZ FROM PISPC INTO @DATA(ld_pi_drukz). | ||||
| DATA(ld_pi_drukz) | = ' '. | |||
| "SELECT single MARKY FROM SY INTO @DATA(ld_pi_refrs). | ||||
| DATA(ld_pi_refrs) | = ' '. | |||
| DATA(ld_pi_mfcnr) | = ' '. | |||
Search for further information about these or an SAP related objects