SAP Function Modules

WRF_MATGRP_ARTICLE_VAL_CHECK SAP Function module - Check of Scheduled Article Assignments







WRF_MATGRP_ARTICLE_VAL_CHECK 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 WRF_MATGRP_ARTICLE_VAL_CHECK into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: RTMATGRP_FU01
Released Date: 06.03.2007
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM WRF_MATGRP_ARTICLE_VAL_CHECK - WRF MATGRP ARTICLE VAL CHECK





CALL FUNCTION 'WRF_MATGRP_ARTICLE_VAL_CHECK' "Check of Scheduled Article Assignments
  EXPORTING
    hier_id =                   " wrf_matgrp_hier-hier_id  Hierarchy ID
    pi_article =                " wrf_article_validity_sty  Validity Check: Article/Node Structure
*   hier_date =                 " wrf_date      Validity of Assignment in Article Hierarchy
*   validity_up_check =         " wrf_checkflg  Check Flag
*   validity_overlap_check =    " wrf_checkflg  Check Flag
  EXCEPTIONS
    NO_DATABASE_ENTRIES = 1     "               No Database Entries Found
    NO_ARTICLE_SELECTED = 2     "               No Current Article Specified
    NO_NODE_SELECTED = 3        "               No Hierarchy Node Specified
    VALIDITY_UP_CHECK_FAILED = 4  "             Validity of Article Assignment Not Allowed
    VALIDITY_OVERLAP_CHECK_FAILED = 5  "        Validity of Article Assignment Not Allowed
    NO_HIERID_SELECTED = 6      "               No Hierarchy ID Specified
    .  "  WRF_MATGRP_ARTICLE_VAL_CHECK

ABAP code example for Function Module WRF_MATGRP_ARTICLE_VAL_CHECK





The ABAP code below is a full code listing to execute function module WRF_MATGRP_ARTICLE_VAL_CHECK 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).

 

SELECT single HIER_ID
FROM WRF_MATGRP_HIER
INTO @DATA(ld_hier_id).

DATA(ld_pi_article) = 'Check type of data required'.
DATA(ld_hier_date) = 'Check type of data required'.
DATA(ld_validity_up_check) = 'Check type of data required'.
DATA(ld_validity_overlap_check) = 'Check type of data required'. . CALL FUNCTION 'WRF_MATGRP_ARTICLE_VAL_CHECK' EXPORTING hier_id = ld_hier_id pi_article = ld_pi_article * hier_date = ld_hier_date * validity_up_check = ld_validity_up_check * validity_overlap_check = ld_validity_overlap_check EXCEPTIONS NO_DATABASE_ENTRIES = 1 NO_ARTICLE_SELECTED = 2 NO_NODE_SELECTED = 3 VALIDITY_UP_CHECK_FAILED = 4 VALIDITY_OVERLAP_CHECK_FAILED = 5 NO_HIERID_SELECTED = 6 . " WRF_MATGRP_ARTICLE_VAL_CHECK
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 2. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 3. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 4. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 5. "Exception "Add code for exception here ELSEIF SY-SUBRC EQ 6. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

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_hier_id  TYPE WRF_MATGRP_HIER-HIER_ID ,
ld_pi_article  TYPE WRF_ARTICLE_VALIDITY_STY ,
ld_hier_date  TYPE WRF_DATE ,
ld_validity_up_check  TYPE WRF_CHECKFLG ,
ld_validity_overlap_check  TYPE WRF_CHECKFLG .


SELECT single HIER_ID
FROM WRF_MATGRP_HIER
INTO ld_hier_id.

ld_pi_article = 'Check type of data required'.
ld_hier_date = 'Check type of data required'.
ld_validity_up_check = 'Check type of data required'.
ld_validity_overlap_check = 'Check type of data required'.

SAP Documentation for FM WRF_MATGRP_ARTICLE_VAL_CHECK


This function module checks the validity of scheduled article assignments of an article hierarchy according to different criteria. ...See here for full SAP fm documentation

Contribute (Add Comments)

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 WRF_MATGRP_ARTICLE_VAL_CHECK or its description.