SAP MARC_XCHPF_RETAIL Function Module for NOTRANSL: Prüfen Chargenpflicht retailspezifisch









MARC_XCHPF_RETAIL is a standard marc xchpf retail 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: Prüfen Chargenpflicht retailspezifisch 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 marc xchpf retail FM, simply by entering the name MARC_XCHPF_RETAIL into the relevant SAP transaction such as SE37 or SE38.

Function Group: MG80
Program Name: SAPLMG80
Main Program: SAPLMG80
Appliation area: M
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function MARC_XCHPF_RETAIL 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 'MARC_XCHPF_RETAIL'"NOTRANSL: Prüfen Chargenpflicht retailspezifisch
EXPORTING
* WMARC_XCHPF = "Batch management requirement indicator
* WMARA_KZWSM = "Units of measure usage
* WMARA_VPSTA = ' ' "Maintenance status of complete material
* FLG_UEBERNAHME = ' ' "Propose Field Content from the Reference
* P_MESSAGE = ' ' "For message type conversion
* SPERRMODUS = 'E' "Type of block (shared, exclusive)
* WMARC_WERKS = "Plant
* WMARA_XCHPF = "Batch management requirement indicator
CHARGEN_EBENE = "Level at which the batches are defined
NEUFLAG = "Propose Field Content from the Reference
MARA_IN_MATNR = "Material Number
RET_XCHPF = "Batch management requirement indicator
WMARA_ATTYP = "Material Category
* WMARA_MTART = "Material Type

IMPORTING
WMARC_XCHPF = "Batch management requirement indicator
WMARA_XCHPF = "Batch management requirement indicator

EXCEPTIONS
ERROR_NACHRICHT = 1 ERROR_CALL_SCREEN = 2
.



IMPORTING Parameters details for MARC_XCHPF_RETAIL

WMARC_XCHPF - Batch management requirement indicator

Data type: MARC-XCHPF
Optional: Yes
Call by Reference: No ( called with pass by value option)

WMARA_KZWSM - Units of measure usage

Data type: MARA-KZWSM
Optional: Yes
Call by Reference: No ( called with pass by value option)

WMARA_VPSTA - Maintenance status of complete material

Data type: MARA-VPSTA
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_UEBERNAHME - Propose Field Content from the Reference

Data type: T130F-KZREF
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

P_MESSAGE - For message type conversion

Data type: RMMG08_012-MSGTYP
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

SPERRMODUS - Type of block (shared, exclusive)

Data type: TVGVI-SPERA
Default: 'E'
Optional: Yes
Call by Reference: No ( called with pass by value option)

WMARC_WERKS - Plant

Data type: MARC-WERKS
Optional: Yes
Call by Reference: No ( called with pass by value option)

WMARA_XCHPF - Batch management requirement indicator

Data type: MARA-XCHPF
Optional: Yes
Call by Reference: No ( called with pass by value option)

CHARGEN_EBENE - Level at which the batches are defined

Data type: RMMG2-CHARGEBENE
Optional: No
Call by Reference: No ( called with pass by value option)

NEUFLAG - Propose Field Content from the Reference

Data type: T130F-KZREF
Optional: No
Call by Reference: No ( called with pass by value option)

MARA_IN_MATNR - Material Number

Data type: MARA-MATNR
Optional: No
Call by Reference: No ( called with pass by value option)

RET_XCHPF - Batch management requirement indicator

Data type: MARC-XCHPF
Optional: No
Call by Reference: No ( called with pass by value option)

WMARA_ATTYP - Material Category

Data type: MARA-ATTYP
Optional: No
Call by Reference: No ( called with pass by value option)

WMARA_MTART - Material Type

Data type: MARA-MTART
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for MARC_XCHPF_RETAIL

WMARC_XCHPF - Batch management requirement indicator

Data type: MARC-XCHPF
Optional: No
Call by Reference: No ( called with pass by value option)

WMARA_XCHPF - Batch management requirement indicator

Data type: MARA-XCHPF
Optional: No
Call by Reference: No ( called with pass by value option)

EXCEPTIONS details

ERROR_NACHRICHT -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

ERROR_CALL_SCREEN -

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for MARC_XCHPF_RETAIL 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_wmarc_xchpf  TYPE MARC-XCHPF, "   
lv_wmarc_xchpf  TYPE MARC-XCHPF, "   
lv_error_nachricht  TYPE MARC, "   
lv_wmara_kzwsm  TYPE MARA-KZWSM, "   
lv_wmara_vpsta  TYPE MARA-VPSTA, "   SPACE
lv_flg_uebernahme  TYPE T130F-KZREF, "   SPACE
lv_p_message  TYPE RMMG08_012-MSGTYP, "   SPACE
lv_sperrmodus  TYPE TVGVI-SPERA, "   'E'
lv_wmara_xchpf  TYPE MARA-XCHPF, "   
lv_wmarc_werks  TYPE MARC-WERKS, "   
lv_error_call_screen  TYPE MARC, "   
lv_wmara_xchpf  TYPE MARA-XCHPF, "   
lv_chargen_ebene  TYPE RMMG2-CHARGEBENE, "   
lv_neuflag  TYPE T130F-KZREF, "   
lv_mara_in_matnr  TYPE MARA-MATNR, "   
lv_ret_xchpf  TYPE MARC-XCHPF, "   
lv_wmara_attyp  TYPE MARA-ATTYP, "   
lv_wmara_mtart  TYPE MARA-MTART. "   

  CALL FUNCTION 'MARC_XCHPF_RETAIL'  "NOTRANSL: Prüfen Chargenpflicht retailspezifisch
    EXPORTING
         WMARC_XCHPF = lv_wmarc_xchpf
         WMARA_KZWSM = lv_wmara_kzwsm
         WMARA_VPSTA = lv_wmara_vpsta
         FLG_UEBERNAHME = lv_flg_uebernahme
         P_MESSAGE = lv_p_message
         SPERRMODUS = lv_sperrmodus
         WMARC_WERKS = lv_wmarc_werks
         WMARA_XCHPF = lv_wmara_xchpf
         CHARGEN_EBENE = lv_chargen_ebene
         NEUFLAG = lv_neuflag
         MARA_IN_MATNR = lv_mara_in_matnr
         RET_XCHPF = lv_ret_xchpf
         WMARA_ATTYP = lv_wmara_attyp
         WMARA_MTART = lv_wmara_mtart
    IMPORTING
         WMARC_XCHPF = lv_wmarc_xchpf
         WMARA_XCHPF = lv_wmara_xchpf
    EXCEPTIONS
        ERROR_NACHRICHT = 1
        ERROR_CALL_SCREEN = 2
. " MARC_XCHPF_RETAIL




ABAP code using 7.40 inline data declarations to call FM MARC_XCHPF_RETAIL

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 XCHPF FROM MARC INTO @DATA(ld_wmarc_xchpf).
 
"SELECT single XCHPF FROM MARC INTO @DATA(ld_wmarc_xchpf).
 
 
"SELECT single KZWSM FROM MARA INTO @DATA(ld_wmara_kzwsm).
 
"SELECT single VPSTA FROM MARA INTO @DATA(ld_wmara_vpsta).
DATA(ld_wmara_vpsta) = ' '.
 
"SELECT single KZREF FROM T130F INTO @DATA(ld_flg_uebernahme).
DATA(ld_flg_uebernahme) = ' '.
 
"SELECT single MSGTYP FROM RMMG08_012 INTO @DATA(ld_p_message).
DATA(ld_p_message) = ' '.
 
"SELECT single SPERA FROM TVGVI INTO @DATA(ld_sperrmodus).
DATA(ld_sperrmodus) = 'E'.
 
"SELECT single XCHPF FROM MARA INTO @DATA(ld_wmara_xchpf).
 
"SELECT single WERKS FROM MARC INTO @DATA(ld_wmarc_werks).
 
 
"SELECT single XCHPF FROM MARA INTO @DATA(ld_wmara_xchpf).
 
"SELECT single CHARGEBENE FROM RMMG2 INTO @DATA(ld_chargen_ebene).
 
"SELECT single KZREF FROM T130F INTO @DATA(ld_neuflag).
 
"SELECT single MATNR FROM MARA INTO @DATA(ld_mara_in_matnr).
 
"SELECT single XCHPF FROM MARC INTO @DATA(ld_ret_xchpf).
 
"SELECT single ATTYP FROM MARA INTO @DATA(ld_wmara_attyp).
 
"SELECT single MTART FROM MARA INTO @DATA(ld_wmara_mtart).
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!