Sections – Assigning/Searching for a Material Master Record 

Menu path: SAP ® Material ® Assign

Menu path: SAP ® BOM ® Assign Material

The contents of the sections [MATRQ_RF_U], [TAKE_OVER_MATERIAL], and [MATRQ_RL_CL_D] determine the appearance of the dialog box displayed when you choose the menu items "Assign" and "Assign Material".

 

 

The [MATRQ_RL_CL_D] section determines which fields are displayed on the right-hand side of the dialog box. If SAP fields that have been assigned to an AutoCAD attribute in the [TAKE_OVER_MATERIAL] section are displayed on the right-hand side of the dialog box, then these attributes will be displayed on the top left-hand side of the dialog box opposite the corresponding SAP field. The lower part of the dialog box shows the SAP fields to be displayed by the [MATRQ_RF_U] section. The active matchcode determines which SAP fields are activated.

In this case, a default value for "Language" has been determined in the [MATRQ_RF_U] section. It is also possible to enter a question mark as a default value.

Menu path: SAP ® Material ® Search

The contents of the sections [MATRQ_RF_U] and [MATRQ_RL_CL_D] determine the appearance of the dialog box that is displayed when you choose the menu item "Search".

 

The [MATRQ_RF_U] section determines which fields are displayed on the right-hand side of the dialog box. The sections [MATRQ_RF_U] and [MATRQ_RL_CL_U] determine which fields are displayed on the left-hand side of the dialog box. The active matchcode determines which SAP fields are activated.

In this case, a default value for "Language" has been determined in the [MATRQ_RF_U] section.

Menu path: SAP ® Assign Material

Menu path: SAP ® Bill of Materials ® Assign Material

The contents of the [MATRQ_RL_CL_D] section determine the appearance of the dialog box that is displayed when you choose the menu items "Assign", "Assign Material", "Search" and click the "Browse" button.

 

 

 

If more than one data record is found, a list of all the data records found is displayed. One data record is displayed per line. The identifier "BROWSELEN" in the [MATRQ_RL_CL_D] section determines which fields of the data record in question are displayed.

[MATCHCODESET]

The contents of the [MATCHCODESET] section determine the appearance of the dialog box that is displayed when you choose the menu items "Material->Assign", "Material->Material SAP->Search" and press the "Matchcode" button.

 

In the [MATCHCODESET] section, you should specify which matchcode sets are to be used for the advanced search in the SAP database. Each matchcode set is defined as an object. The name of the object consists of two parts. The first part is the string "MATCHCODE". A sequential number is added to the end of this string. The first number is 1. All of the numbers are positive whole numbers. The numbering must be sequential without any gaps. The value of the object is a character or a character string that identifies the matchcode set in the SAP. You must specify at least one matchcode set.

Example of what the [MATCHCODESET] section might look like:

 

[SAP]= dwg=1 edit=1

[MATCHCODESET]= dwg=1 edit=1

MATCHCODE1 [GenCfgString]="M" dwg=0 edit=1 Object 1

MATCHCODE2 [GenCfgString]="P" dwg=0 edit=1 Object 2

MATCHCODE3 [GenCfgString]="R" dwg=0 edit=1 Object 3

...

[]

[]

[MATRQ_RF_U]

You create a new section under the section [MATRQ_RF_U] for each SAP field name. The name of the section consists of two parts. The first part is the string "MATRQ_RF_U". A sequential number is added to the end of this string. The first number is 1. All of the numbers are positive whole numbers. The numbering must be sequential without any gaps. The number of objects depends on the entries in the [MATCHCODESET] section. An corresponding object must exist in the [MATRQ_RF_U] section for each field name of a matchcode (you can take the names from the LOG file as required).

The objects from the sections [MATRQ_RF_U...] have the following identifiers:

Identifier

Type

Description

SAPKEY

String

The "SAPKEY" plays a special role in the process "MATRQ" "RF "U". You can enter a user-defined character string here. The string you enter, though, should be unique in the [MATRQ_RF_U] section. If you know that the name under "SAPSTRICT" corresponds with a field in the section [MATRQ_RL_CL_D] (SAPKEY), you can enter the same field name here. This will mean that the field will only appear once in the dialog box. All other settings for this field are taken from the section [MATRQ_RL_CL_D] (e.g. COLLEN).

SAPSTRICT

String

The value specified for "SAPSTRICT" (and not the "SAPKEY") is crucial to the process "MATRQ" "RF" "U". The value specified is always language-independent, and should be unique in the [MATRQ_RF_U] section. You define the value for "SAPSTRICT" in accordance with the matchcodes used. A value is contained in the standard matchcodes supplied by SAP – in most companies, this value is not changed. This value will be entered as the default value during installation. You will find details on "SAPSTRICT" at the end of this section.

COLLEN

Short

With regard to the dialog box that is displayed for the menu item "Assign". The value specified here determines the size of the edit field for the SAP field and the size of the edit field for any referenced AutoCAD attributes in the dialog box. If the value is "0", the SAP field and, if applicable, the AutoCAD attribute, will not be displayed in the dialog box. All SAP fields belonging to the active matchcode set are activated. All AutoCAD fields in the dialog box are deactivated.

With regard to the dialog box that is displayed for the menu item "Search":

This value determines the size of the edit field for the SAP field in the dialog box. If the value is "0", the SAP field will not be displayed in the dialog box. All SAP fields belonging to the active matchcode set are activated.

SAPLABEL

String

Text for the name of the SAP field in the dialog box. This text is user-definable. The length of the name and the corresponding "COLLEN" gives the width of the dialog box. The lower your screen resolution, the shorter the text you enter should be. If possible, it should be the same as the name in the SAP System.

SAPLABEL-MNEM

String

One letter of the text for the SAP field name (SAPLABEL). You can access the corresponding edit field more quickly by pressing <TAB> and then the letter in question on your keyboard. The letter assigned for SAPLABELMNEM should be unique in the sections [MATRQ_RF_U] and [MATRQ_RL_CL_D] ("SAPKEY" information).

FILL

Bool

If the value is "1", the field with the corresponding value will be taken from the LISP list as a default. This value can be changed in the edit field of the dialog box before the search is run.

FILL-DEFAULT

String

You can specify a default value for the SAP field here. This value is used for the matchcode processes. If the SAP field is displayed in the dialog box, the value can be overwritten before the process starts. If FILL is set to "1", the value will be taken from the AutoCAD object (LISP list).

Example of what the [MATRQ_RF_U] section might look like:

[SAP]= dwg=1 edit=1

[MATRQ_RF_U]= dwg=1 edit=1

[MATRQ_RF_U1]= dwg=1 edit=1 Section

SAPKEY [GenCfgString]="MATERIAL" dwg=0 edit=1 Object 1

COLLEN [GenCfgShort]= 18 dwg=0 edit=1 Object 2

SAPLABEL [GenCfgString]="Material" dwg=0 edit=1 Object 3

SAPLABELMNEM [GenCfgString]="M" dwg=0 edit=1 Object 4

SAPSTRICT [GenCfgString]="Material" dwg=0 edit=1 Object 5

FILL [GenCfgBool]= 1 dwg=0 edit=1 Object 6

FILLDEFAULT [GenCfgString]="" dwg=0 edit=1 Object 7

[]

[MATRQ_RF_U2]= dwg=1 edit=1 Section

SAPKEY [GenCfgString]="DESCRIPT_M" dwg=0 edit=1 Object 1

COLLEN [GenCfgShort]= 4 dwg=0 edit=1 Object 2

SAPLABEL [GenCfgString]="Material short text" dwg=0 edit=1 Object 3

SAPLABELMNEM [GenCfgString]="T" dwg=0 edit=1 Object 4

SAPSTRICT [GenCfgString]="Material short text" dwg=0 edit=1 Object 5

FILL [GenCfgBool]= 1 dwg=0 edit=1 Object 6

FILLDEFAULT [GenCfgString]="Material" dwg=0 edit=1 Object 7

[]

...

[]

[]

All of the field names listed under section [MATRQ_MR_U] should be listed – this is because the program uses the values of the selected data record for the direct search that follows the enhanced search.

The number of SAP fields listed in sections [MATRQ_RL_CL_D] and [MATRQ_RF_U] determines the height of the dialog box. Depending on your screen resolution, you should not exceed a maximum number. The value specified for the object "COLLEN", the length of the character string for the value of the object "SAPLABEL", and the length of the character string for the MLD number that was specified in the section [TAKE_OVER_MATERIAL] for the object "GENDCL", all determine the width of the dialog box. Once again, the maximum width of the dialog box will depend on your screen resolution.

"SAPSTRICT"

Each matchcode in the SAP system consists of predefined fields. The same field can occur in several matchcodes ("Language", for example). The number of fields in a matchcode differs from matchcode to matchcode. For example, the matchcode "M" (for finding a material by the material description) contains three fields. Matchcode "T" (for finding a material by the material type), on the other hand, contains four fields. Three of the fields are contained in both matchcodes (see table below).

Matchcode

MATERIAL

LANGUAGE

SHORT
TEXT

MATERIAL
TYPE

PLANT

M

Material by description

X

X

X

   

T

Material by material type

X

X

X

X

 

W

Material by plant

X

X

X

 

X

…

         

If you want to use a matchcode in the AutoCAD-SAP interface, you must ensure that the fields of the matchcode are displayed in the dialog box and activated when the matchcode is selected. You do this by specifying the language-dependent field name of the field in "SAPSTRICT". At the same time, however, this field name should appear only once if several different matchcodes containing the same fields are used. If this language-dependent name is changed in the company’s SAP System, it will no longer correspond to the standard default values. In this case, the field will not be activated when a matchcode is selected – this means that no values can be entered for the search. Once the installation is complete, check all of the matchcodes you use to see if the corresponding fields are displayed in the dialog box, and the appropriate fields are activated when the matchcode in question is selected. The following table lists all of the matchcodes that come with the standard SAP System (and their respective fields).

SAPKEY

SAPSTRICT

Matchcode

   

A

B

C

E

H

M

N

P

R

S

T

W

Old material number

Old material number

X

                     

Display unit of measure

Display unit of measure

           

X

         

CAD identifier

CAD identifier

   

X

                 

DESCRIPT_M

Material short text

X

X

X

X

X

X

X

X

X

X

X

X

EAN/UPC code

EAN/UPC code

           

X

         

Valid from

Valid from

               

X

     

Identifier main EAN

Identifier main EAN

           

X

         

MATERIAL

Material

X

X

X

X

X

X

X

X

X

X

X

X

Material type

Material type

                   

X

 

Plan group

Plan group

               

X

     

Plan group counter

Plan group counter

               

X

     

PLANT

Plant

 

X

           

X

   

X

Plan type

Plan type

               

X

     

Product hierarchy

Product hierarchy

       

X

   

X

       

Language

Language

X

X

X

X

X

X

X

X

X

X

X

X

Alternative BOM

Alternative BOM

 

X

                   

BOM usage

BOM usage

 

X

                   

Sales organization

Sales organization

       

X

   

X

 

X

   

Distribution channel

Distribution channel

       

X

   

X

 

X

   

Competitor

Competitor

     

X

               

If the entry for "SAPKEY" is different than the entry for "SAPSTRICT", the field also affects the download process (see [MATRQ_RL_CL_D]).

If, when you select a matchcode, not all of the corresponding fields are displayed in the dialog box, or have not been activated, then proceed as described in the following example:

When you select matchcode "M" (find a material by its description), you notice that the "Material short text" field does not appear in the dialog box (or that it has not been activated).

Procedure:

Enter the following values:

Restart AutoCAD/Genius, and log on to the SAP System.

The entry that you find will looks as follows:

 

MATRQID 000003 M@@

** ---------------------------------------------------------

** MATRQRF00000000049 Material short text@0040@Language@0001@Mat

** erial@0018@

** ---------------------------------------------------------

 

The subsequent entries between the two lines "**-------" are what you need to look at. Interpret the contents as follows.

"MATRQRF00000000049" does not contain any information that is important for you. After this character string come several value pairs, each separated by the separator. A value pair consists of two values, which are also separated by the separator. The first value of the value pair is the language-dependent field name; the second is the field length. Following on from this, the text above should be interpreted as follows:

Matchcode "M" consists of three value pairs, i.e. three fields.

Material short text – field name

0040 – field length

Language – field name

0001 – field length

Material – field name

0018 – field length

The field length is not important at this point. The field names specified are the language-dependent field names of the matchcode. A "SAPSCRIPT" value must be specified under "[MATRQ_RF_U]" for all three field names. Please pay particular attention to the use of capitals and small letters (case-sensitive!).

[MATRQ_RL_CL_D ]

You create a new section under the section [MATRQ_RL_CL_D] for each SAP field name. The name of the section consists of two parts. The first part is the string "MATRQ_RL_CL_D". A sequential number is added to the end of this string. The first number is 1. All of the numbers are positive whole numbers. The numbering must be sequential without any gaps.

The objects of the sections [MATRQ_RL_CL_U...] have the following identifiers:

Identifier

Type

Comments

SAPKEY

String

SAP field name. All fields (or only the SAP fields) listed in the field set assigned to the process "MATRQ" "RL" "D", can be displayed in the dialog box. The field set names defined for the process can be found in the file called "cadcimr3.dat" (see below for more details).

COLLEN

Short

With regard to the dialog box that is displayed for the menu item "Assign". The value specified here determines the size of the edit field for the SAP field and the size of the edit field for any referenced AutoCAD attributes in the dialog box. If the value is "0", the SAP field and, if applicable, the AutoCAD attribute will not be displayed in the dialog box. Only the SAP fields whose SAPKEY is defined in the section [MATRQ_RF_U] and belongs to the active matchcode set are activated. All AutoCAD fields in the dialog boxes are deactivated.

With regard to the dialog box that is displayed for the menu item "Search". This value determines the size of the edit field for the SAP field in the dialog box. If the value is "0", the SAP field will not be displayed in the dialog box. Only SAP fields whose SAPKEY is defined in the section [MATRQ_RF_U] and belongs to the active matchcode set are activated.

SAPLABEL

String

Text for the name of the SAP field in the dialog box. This text is user-definable. The length of the text gives the width of the dialog box. The lower your screen resolution, the shorter the text you enter should be.

SAPLABEL-MNEM

String

One letter of the text for the SAP field name (SAPLABEL). You can access the corresponding edit field more quickly by pressing <TAB> and then the letter in question on your keyboard. The letter assigned for SAPLABELMNEM should be unique in the [MATRQ_RF_U] section ("SAPKEY" information).

BROWSE-LEN

Short

This value determines the size of the field in the list box of the browse dialog box. If the value is "0", the SAP field will not be displayed in the browse dialog box.

Example of what the [MATRQ_RL_CL_D] section might look like:

[SAP]= dwg=1 edit=1

[MATRQ_RL_CL_D]= dwg=1 edit=1

[MATRQ_RL_CL_D1]= dwg=1 edit=1 Section

SAPKEY [GenCfgString]="MATERIAL" dwg=0 edit=1 Object 1

COLLEN [GenCfgShort]= 18 dwg=0 edit=1 Object 2

SAPLABEL [GenCfgString]="Material no." dwg=0 edit=1 Object 3

SAPLABELMNEM [GenCfgString]="M" dwg=0 edit=1 Object 4

BROWSELEN [GenCfgShort]= 18 dwg=0 edit=1 Object 5

[]

[MATRQ_RL_CL_D2]= dwg=1 edit=1 Section

SAPKEY [GenCfgString]="MAT_TYPE" dwg=0 edit=1 Object 1

COLLEN [GenCfgShort]= 4 dwg=0 edit=1 Object 2

SAPLABEL [GenCfgString]="Material type" dwg=0 edit=1 Object 3

SAPLABELMNEM [GenCfgString]="T" dwg=0 edit=1 Object 4

BROWSELEN [GenCfgShort]= 4 dwg=0 edit=1 Object 5

[]

...

[]

[]

All of the field names listed under section [MATRQ_MR_U] should be listed – this is because the program uses the values of the selected data record for the direct search that follows the enhanced search.

The number of SAP fields listed in the sections [MATRQ_RL_CL_D] and [MATRQ_RF_U] give the height of the dialog box. Depending on your screen resolution, you should not exceed a maximum number. The value specified for the object "COLLEN", the length of the character string for the value of the object "SAPLABEL", and the length of the character string for the MLD number that was specified in the section [TAKE_OVER_MATERIAL] for the object "GENDCL", all determine the width of the dialog box. Once again, the maximum width of the dialog box will depend on your screen resolution.