CS_WHERE_USED_COP 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 CS_WHERE_USED_COP into the relevant SAP transaction such as SE37 or SE80.
Associated Function Group:
CSS5
Released Date:
Not Released
Processing type: Normal fucntion module
CALL FUNCTION 'CS_WHERE_USED_COP' "
EXPORTING
datub = " rc29l-datub
datuv = " rc29l-datuv
matnr = " rc29l-matnr
* postp = SPACE " rc29l-postp
* retcode_only = SPACE " csdata-xfeld
* stlan = SPACE " rc29l-stlan
* werks = SPACE " rc29l-werks
* mclmt = SPACE " stzu-stuez
* mnstl = SPACE " stzu-stlnr
* mxstl = SPACE " stzu-stlnr
* stltp = SPACE " rc29a-atabr
* newsi = SPACE " csdata-xfeld
IMPORTING
topmat = " mc29s
TABLES
wultb = " stpov
equicat = " cscequi
kndcat = " cscknd
matcat = " cscmat
stdcat = " cscstd
tplcat = " csctpl
* prjcat = " cscprj
EXCEPTIONS
CALL_INVALID = 1 "
MATERIAL_NOT_FOUND = 2 "
NO_WHERE_USED_REC_FOUND = 3 "
NO_WHERE_USED_REC_SELECTED = 4 "
NO_WHERE_USED_REC_VALID = 5 "
. " CS_WHERE_USED_COP
The ABAP code below is a full code listing to execute function module CS_WHERE_USED_COP 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).
| ld_topmat | TYPE MC29S , |
| it_wultb | TYPE STANDARD TABLE OF STPOV,"TABLES PARAM |
| wa_wultb | LIKE LINE OF it_wultb , |
| it_equicat | TYPE STANDARD TABLE OF CSCEQUI,"TABLES PARAM |
| wa_equicat | LIKE LINE OF it_equicat , |
| it_kndcat | TYPE STANDARD TABLE OF CSCKND,"TABLES PARAM |
| wa_kndcat | LIKE LINE OF it_kndcat , |
| it_matcat | TYPE STANDARD TABLE OF CSCMAT,"TABLES PARAM |
| wa_matcat | LIKE LINE OF it_matcat , |
| it_stdcat | TYPE STANDARD TABLE OF CSCSTD,"TABLES PARAM |
| wa_stdcat | LIKE LINE OF it_stdcat , |
| it_tplcat | TYPE STANDARD TABLE OF CSCTPL,"TABLES PARAM |
| wa_tplcat | LIKE LINE OF it_tplcat , |
| it_prjcat | TYPE STANDARD TABLE OF CSCPRJ,"TABLES PARAM |
| wa_prjcat | LIKE LINE OF it_prjcat . |
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_topmat | TYPE MC29S , |
| ld_datub | TYPE RC29L-DATUB , |
| it_wultb | TYPE STANDARD TABLE OF STPOV , |
| wa_wultb | LIKE LINE OF it_wultb, |
| ld_datuv | TYPE RC29L-DATUV , |
| it_equicat | TYPE STANDARD TABLE OF CSCEQUI , |
| wa_equicat | LIKE LINE OF it_equicat, |
| ld_matnr | TYPE RC29L-MATNR , |
| it_kndcat | TYPE STANDARD TABLE OF CSCKND , |
| wa_kndcat | LIKE LINE OF it_kndcat, |
| it_matcat | TYPE STANDARD TABLE OF CSCMAT , |
| wa_matcat | LIKE LINE OF it_matcat, |
| ld_postp | TYPE RC29L-POSTP , |
| it_stdcat | TYPE STANDARD TABLE OF CSCSTD , |
| wa_stdcat | LIKE LINE OF it_stdcat, |
| ld_retcode_only | TYPE CSDATA-XFELD , |
| it_tplcat | TYPE STANDARD TABLE OF CSCTPL , |
| wa_tplcat | LIKE LINE OF it_tplcat, |
| ld_stlan | TYPE RC29L-STLAN , |
| ld_werks | TYPE RC29L-WERKS , |
| it_prjcat | TYPE STANDARD TABLE OF CSCPRJ , |
| wa_prjcat | LIKE LINE OF it_prjcat, |
| ld_mclmt | TYPE STZU-STUEZ , |
| ld_mnstl | TYPE STZU-STLNR , |
| ld_mxstl | TYPE STZU-STLNR , |
| ld_stltp | TYPE RC29A-ATABR , |
| ld_newsi | TYPE CSDATA-XFELD . |
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 CS_WHERE_USED_COP or its description.