Iconet Services Ltd - SAP ABAP / SAPScript Consultant

Home Page
Company Profile
Search Internet for SAP Information
Subscribe to SAP R3 Mailing list
Sample ABAP Programs
ABAP How to
General Purpose layout set

direct read method of obtaining material characteristic value

Extracting Material classification Equipment No.

CLAF_CLASSIFICATION_OF_OBJECTS extracts all characteristics for a material and so is very slow. For a single characteristic e.g. EQUIPMENT NO a direct read on tables AUSP and CAWNT can be used instead.

The internal key for characteristic EQUIPMENTNO is read in INITIALIZATION. This is fixed within a client.

This and the material number is used to read the characteristic value from AUSP. The value is translated to external format by using this value as a key to CAWNT.

form get_classification changing p_display type ty_display.

data: l_object type objnum,

lt_class type table of sclass,

lt_objectdata type table of clobjdat,

l_objectdata type clobjdat,

l_atwrt type atwrt,

l_atwtb type atwtb.

l_object = p_display-matnr.

select single atwrt from ausp into l_atwrt

where objek = l_object

and atinn = g_equipment

and mafid = 'O'

and klart = '001'.

if sy-subrc = 0.

concatenate l_atwrt '%' into l_atwrt.

select single atwtb from cawnt into l_atwtb

where atinn = g_equipment

and spras = sy-langu

and atwtb like l_atwrt.

if sy-subrc = 0.

p_display-ausp1 = l_atwtb.

endif.

endif.

Back to How To list