SAP SWNC_SETUP_COLL_PARAMS Function Module for









SWNC_SETUP_COLL_PARAMS is a standard swnc setup coll params 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 swnc setup coll params FM, simply by entering the name SWNC_SETUP_COLL_PARAMS into the relevant SAP transaction such as SE37 or SE38.

Function Group: SWNC_TOOLSET
Program Name: SAPLSWNC_TOOLSET
Main Program: SAPLSCSM_COLLECTOR
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Remote-Enabled
Update:



Function SWNC_SETUP_COLL_PARAMS 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 'SWNC_SETUP_COLL_PARAMS'"
EXPORTING
* TOTAL_COLL_HOURS = '01,02,17' "
* AGGREGATES = 'WN,VS,VT' "
* AGGR_KEEP_DAYS = 14 "
* AGGR_KEEP_WEEKS = 6 "
* AGGR_KEEP_MONTHS = 2 "

EXCEPTIONS
NOT_AUTHORIZED = 1 HOUR_OUT_OF_RANGE = 2 AGGR_OUT_OF_RANGE = 3 KEEP_OUT_OF_RANGE = 4
.



IMPORTING Parameters details for SWNC_SETUP_COLL_PARAMS

TOTAL_COLL_HOURS -

Data type: SWNCTXT128
Default: '01,02,17'
Optional: No
Call by Reference: No ( called with pass by value option)

AGGREGATES -

Data type: SWNCTXT128
Default: 'WN,VS,VT'
Optional: No
Call by Reference: No ( called with pass by value option)

AGGR_KEEP_DAYS -

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

AGGR_KEEP_WEEKS -

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

AGGR_KEEP_MONTHS -

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

EXCEPTIONS details

NOT_AUTHORIZED -

Data type:
Optional: No
Call by Reference: Yes

HOUR_OUT_OF_RANGE -

Data type:
Optional: No
Call by Reference: Yes

AGGR_OUT_OF_RANGE -

Data type:
Optional: No
Call by Reference: Yes

KEEP_OUT_OF_RANGE -

Data type:
Optional: No
Call by Reference: Yes

Copy and paste ABAP code example for SWNC_SETUP_COLL_PARAMS 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_not_authorized  TYPE STRING, "   
lv_total_coll_hours  TYPE SWNCTXT128, "   '01,02,17'
lv_aggregates  TYPE SWNCTXT128, "   'WN,VS,VT'
lv_hour_out_of_range  TYPE SWNCTXT128, "   
lv_aggr_keep_days  TYPE SWNCUINT2, "   14
lv_aggr_out_of_range  TYPE SWNCUINT2, "   
lv_aggr_keep_weeks  TYPE SWNCUINT2, "   6
lv_keep_out_of_range  TYPE SWNCUINT2, "   
lv_aggr_keep_months  TYPE SWNCUINT2. "   2

  CALL FUNCTION 'SWNC_SETUP_COLL_PARAMS'  "
    EXPORTING
         TOTAL_COLL_HOURS = lv_total_coll_hours
         AGGREGATES = lv_aggregates
         AGGR_KEEP_DAYS = lv_aggr_keep_days
         AGGR_KEEP_WEEKS = lv_aggr_keep_weeks
         AGGR_KEEP_MONTHS = lv_aggr_keep_months
    EXCEPTIONS
        NOT_AUTHORIZED = 1
        HOUR_OUT_OF_RANGE = 2
        AGGR_OUT_OF_RANGE = 3
        KEEP_OUT_OF_RANGE = 4
. " SWNC_SETUP_COLL_PARAMS




ABAP code using 7.40 inline data declarations to call FM SWNC_SETUP_COLL_PARAMS

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.

 
DATA(ld_total_coll_hours) = '01,02,17'.
 
DATA(ld_aggregates) = 'WN,VS,VT'.
 
 
DATA(ld_aggr_keep_days) = 14.
 
 
DATA(ld_aggr_keep_weeks) = 6.
 
 
DATA(ld_aggr_keep_months) = 2.
 


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!