Sapass

 Simplify SAP R/3 development with Excel VBA/VB RFC  
Home> UserExit>C1CA0002



Index

C1CA0002

EH&S: Customer Exits
You use this SAP enhancement to define a function exit used to determine the material ID that is assigned to a substance in the R/3 component Product Safety . The material ID is assigned to the RAWMATNR field in the CVDMAT structure.

The customer exit is found in the function group XC1A. It is called in the C1CA_RAWMAT_GET_FROM_MAT function that is called within the C1CA_SD_INTERFACE_TO_EHS_NEW function.

The customer exit is used to display the customer-specific material hierarchy. You can use this display to determine a material ID, for example, using the following data:

  • Order reason (manual request, or request from the R/3 component Sales and Distribution (SD))
  • Customer (customer-specific material hierarchy)
  • Sender

If necessary, you can also modify the material name. Material ID and material name must be entered in the CVDMAT structure. The MATNR field is filled with the following data:

  • Material number from the shipping request
    • when calling this from SD, this is the material number from the delivery note
  • Material names
    • when calling this from SD, this is the material name from the delivery note
    • when requesting this manually, this is the material description from the material master

You can use the following parameters:

Interface parameters Meaning

I_MATERIAL material structure

I_REASON order reason (manual request,

request from SD)

I_CUSDATA customer data (recipient ID, country, region)

I_INITIATOR sender (sales organization)

I_INFO_FOR_ERROR_MAIL contextual information for error handling

I_REPORT_VERSION_DATE key date for report version

I_RECINFO_TAB MSDS recipient data

I_SDDATA_TAB SD-specific data

Export parameter Meaning

E_MATERIAL material structure

The function is called when shipping is triggered automatically from SD, or started manually. The following parameters are not filled when shipping is triggered manually:

  • I_CUSDATA
  • I_SDDATA_TAB
  • I_RECINFO_TAB

You can use the structure I_REASON to determine if shipping was triggered manually or automatically.

Error handling:

As the process runs in the background, you cannot react directly to an error situation.

In the function group C1CA, the function module C1CA_INTERFACE_ERR_MESSAGE supports error handling. You use this function module to send error mails to the persons responsible. The recipients of these mails are specified in Product Safety Customizing.

The import parameter I_INFO_FOR_ERROR_MAIL contains contextual information on error situations (delivery note number from SD, for example) that is output in the error mail.


Function/Program:
  • EXIT_SAPLC1CA_002: EHS: Determines the material ID assigned to substances in EHS

02-Oct-2005