Start of Content Area

Procedure documentation Inserting Exception Texts Locate the document in its SAP Library structure

There should be an explanatory text assigned to each exception. This text describes the exception situation for the user. You can insert texts for your exceptions in your exception class in two different ways.

Creating Exception Texts in the OTR

Use

You can assign one or more texts to an exception class in the Class Builder. Different texts are addressed with the corresponding IDs. Each class has a default text whose ID corresponds to the class name. If you want to create further texts for special cases of this exception, you have to assign a separate ID for each text.

Note

Exception texts are generally language-specific and have to be translated. The OTR can be used here as a central storage area for exception texts. 

This graphic is explained in the accompanying text

You might want to parameterize exception texts with attributes of the exception class. To do so, enclose the attribute name in '&' characters.

Example:  An error occurred in object &ATTRIBUTE&.

Procedure

To create exception texts:

...

       1.      Select the exception class. 

       2.      Switch the Class Builder to change mode and click on Texts.

       3.      First edit the default text whose ID was created automatically by the Class Builder.  

       4.      Choose ENTER.

The system displays the Create OTR Concept dialog box.

       5.      Confirming your entries will copy the new text to the OTR.

       6.      If necessary, create further IDs to assign special texts and repeat steps 4-6.

Result

The exception texts for an exception class are created in the OTR and can be output as message texts.

Inserting Exception Texts from Message Classes

Use

Instead of creating a new text in the OTR you can use the text from an existing message class. If you want to do this, you must have set the With Message Class flag on the Create dialog of the exception class.

Procedure

To include a message class text in your exception class, proceed as follows:

...

       1.      Select the exception class.

       2.      Switch the Class Builder to change mode and click on Texts.

       3.      On the tab above the text table, click on Message Text.

       4.      On the next screen, select the message class first and then the message number you require. The input help can support you in the usual way.

       5.      Once you have selected the message number, press Enter. The text assigned to the message number is then displayed in the Message Text line.

       6.      You can now assign attributes of the exception class to any placeholders that exist in the Attributes for Exception Class table. The following points apply when you do this:

When the placeholders are numbered (&1, &2, and so on), the attributes are assigned according to their number; otherwise the sequence in which the placeholders occurs is taken into consideration.

       7.      Choose Change to complete this process.

Result

The text belonging to your exception was linked to a text from a message class.

This graphic is explained in the accompanying text 

Note that you cannot create any message texts as part of this process.

 

 

End of Content Area