Before reading this document please go through document Enhancements in SAP Project Systems Assembly Processing
In the standard assembly processing the selection of the standard network is done based on the entries in table TCN61 (maintained in transaction CN08). The selection of this table is done based on material master and network type (i.e. order type). Selection of the standard network based on other parameters is not provided by standard.
Analysis of the standard behavior of the system
The selection of the standard network is performed inside function module CO_TA_TCN61_READ, which is called maximally twice in form GET_NETWORK_DATA (include LCO61F0V). That function module accepts as import parameter a material master number and a network type (i.e. order type).
In the first call of function module CO_TA_TCN61_READ the material master number passed as import parameter comes from the material master informed in the sales document item and the network type passed as import parameter comes from table T459K, selected in form T459K_SELECT in program SAPMV45A (main program for sales order processing). If this first call does not return any value then a second call is performed with material master number still coming from the material master informed in the sales document item, but with network type equal to “*” (i.e. the material master is valid to all network types). If the second call still does not return any value then the system calls screen 0100 of program SAPLCO61 and the user is provided with the possibility of filling in manually the standard network parameters.
As the call of function module CO_TA_TCN61_READ is quite straightforward it would be relatively easy to enhance it by creating an implicit enhancement implementation at the beginning of that function module. The sample code below illustrated the selection of the standard network from a customer table based on the sales area (i.e. combination of sales organization, distribution channel and division).
* assumption: there is a customer table called ZTCN61 which is a copy of table TCN61, but with key fields VKORG (Sales Organization), VTWEG (Distribution Channel) and SPART (Division)
DATA: ls_ztcn61 TYPE ztcn61. FIELD-SYMBOLS: <ls_vbak> TYPE any. FIELD-SYMBOLS: <l_vkorg> TYPE vkorg. FIELD-SYMBOLS: <l_vtweg> TYPE vtweg. FIELD-SYMBOLS: <l_spart> TYPE spart. ASSIGN('(SAPMV45A)VBAK') TO <ls_vbak>. IF <ls_vbak> IS ASSIGNED. ASSIGN COMPONENT 'VKORG' OF STRUCTURE <ls_vbak> TO <l_vkorg>. ASSIGN COMPONENT 'VTWEG' OF STRUCTURE <ls_vbak> TO <l_vtweg>. ASSIGN COMPONENT 'SPART' OF STRUCTURE <ls_vbak> TO <l_spart>. IF <l_vkorg> IS ASSIGNED AND <l_vtweg> IS ASSIGNED AND <l_spart> IS ASSIGNED. SELECT SINGLE * FROM ztcn61 INTO ls_ztcn61 WHERE vkorg = <l_vkorg> AND vtweg = <l_vtweg> AND spart = <l_spart>. IF sy-subrc = 0. MOVE-CORRESPONDING ls_ztcn61 TO tcn61_exp. tcn61_exp-auart = ls_ztcn61-coauart. EXIT. ENDIF. ENDIF. ENDIF.
This enhancement is applicable to any situation in which the standard network should be derived based on parameters other than material master and network type.