SAP R/3 форум ABAP консультантов
Russian ABAP Developer's Club

Home - FAQ - Search - Memberlist - Usergroups - Profile - Log in to check your private messages - Register - Log in - English
Blogs - Weblogs News

Note 440186 FAQ Validation and substitution in the project



 
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> CO
View previous topic :: View next topic  
Author Message
admin
Администратор
Администратор



Joined: 01 Sep 2007
Posts: 1636

PostPosted: Tue Jul 28, 2009 5:14 pm    Post subject: Note 440186 FAQ Validation and substitution in the project Reply with quote

Note 440186 - FAQ 2: Validation and substitution in the project

Symptom
Questions on the validation and substitution in the Project System.

Solution
You will find the documentation on detailed information on the creation and maintenance of substitutions in the SAP Library under Financial Accounting -> FI - Special Purpose Ledgers -> Substitution.
Take the following points / descriptions into account if the system response is not clear during validation and substitution:

1. The substitution does not work as expected, the substituted fields have different values than expected or the substitution is used always or never.

Check the rules set under prerequisites in the substitution. If no prerequisites are listed, the rules always apply (that is, for all objects to which this substitution is assigned via the profile). Moreover, consider possible concatenations which might occur in the hierarchy of a project.

Up to Release 4.5, in Customizing, there was only one field for the validation rule or substitution rule that was used for the project.
As of Release 4.6, one validation rule or substitution rule for project definition and WBS elements can be assigned to the project and WBS elements via the project profile or to the network header and activityvia the network profile.
During the upgrade, it can occur that the required rules are not entered in these profiles. Note 639396 contains a correction report.

2. Fields are filled with values which are set to 'Display' in the field selection. Field contents are changed during saving. After saving, the system displays messages which informs you on inconsistent setting combinations.

The substitution works independently from the field selection (Note 304891). The field selection is only used for the control of the dialog transactions. Therefore, fields might contain values which are set to 'Display' in the field selection. With this, the validation can be used as an option to maintain display fields and, at the same time, to protect these fields against dialog entries.
The substitution changed/created these field contents during saving.

3. The automatic validation and substitution (during saving) is run before the field check. Inconsistencies that could be generated through the substitution are prevented as a result. Therefore field contents which are queried by the field check during saving cannot be taken into account during substitution.
Field contents (field A) are to be transferred to another field (field B) via substitution. Field A is set as required field. When saving, substitution is carried out first, then the field check follows. Consequently, if field A has its initial value before saving, it is also submitted to substitution with initial value. Only after substitution, the user is asked to enter values by the required field check. This entry has no effect on substitution. Solution: Use validation instead of a required field check.

4. You created 'user-defined fields'. You want to use these 'user-defined fields' in a substitution or validation. However, you cannot find these fields when you create a substitution/validation.

The substitution of 'user-defined fields' can occur with a substitution or validation exit.
The fields must be included in table GB01. The general procedure is described in Note 410160 or 358473.

In principle, only master data of the Project System can be validated or substituted (for example, field AFVGDS-FLG_FRE cannot be used in a validation or substitution as it is not used in the Project System).
Statuses are no master data and can therefore not be changed, see also point 4. The system status is set by business transactions and can therefore not be influenced by the substitution.

For user-defined fields added later, it may be necessary to execute report RGUGBR00 in order to include these fields in the declaration.
Execute the report in those systems in which the structure has not yet been adjusted to these user-defined fields. Set indicator 'Generate substn exp. routines' only. Read also Note 358473 on this topic.

5. You want to access the system status in a validation or substitution.

An access to the system status via the display area for the status (for example, AFVGD-VSTTXT = system status network activity) does not work as several statuses can be active at the same time. To include the status in a substitution or validation rule, you must use the substitution or validation exit. The status to be checked can beread with function STATUS_CHECK, in interface OBJNR (AFVGD-OBJNR) and with the status to be checked. Transaction BS23 displays the status information (CRTD corresponds to I0001, thus STAT = 'I0001', REL I0002 = and so on). The status is active, if SY-SUBRC is initial after function STATUS_CHECK has been run.
The same applies to field CAUFVD-STTXT system status network header and so on.

Example:
1) Create Exit:
Define a new user exit by entering your user exit in the form routine GET_EXIT_TITLES in the FORMPOOL RGGBR000.
Codingexample:
EXITS-NAME = 'U102'.
EXITS-PARAM = C_EXIT_PARAM_NONE.
EXITS-TITLE = 'Validation'.
APPEND EXITS.

2) Define the Form and enter the coding.
Codingexample:
FORM U102 USING B_RESULT.
B_RESULT = B_TRUE.
CALL FUNCTION 'STATUS_CHECK'
EXPORTING
OBJNR = PROJ-OBJNR
status = 'I0001'
EXCEPTIONS
OBJECT_NOT_FOUND = 1
STATUS_NOT_ACTIVE = 2.
if sy-subrc <> 0.
B_RESULT = B_FALSE.
endif.
ENDFORM.

System Status can be found in BS23. User Status information can be found in TJ30.

6. You want to access fields of another object withing the validation or substitution exit.

How to access other objects (e.g. access a WBS element within the validation exit for network activity) is described in Note 303348. The sample coding in Note 303348 shows the access scheme.

7. You want to substitute the execution factor in the activity. This field cannot be substituted.

As various follow-up functions are run when the execution factor is executed and this cannot be ensured in case of a substitution, this field is not available for the substitution.

8. When entering validation rules in the project profile, message
GB 109 - Validation X is assigned to class 73, not class &
is displayed.


The validation rule is a rule for a 'consistency check in the project structure plan'. Validation rules for a 'consistency check in the project structure plan' cannot be entered in the project profile. Those validation rules are used in Transactions CNC5 and CNC4.

9. When you save a project/network, the system generates an error message that is in the customer namespace.

If the system processes error messages with a message number that is in the customer namespace after you entered values in the Project System, this could be due to a validation check. Check your validation rule andthe values of the entry used for that.

10. After the substitution, the system generates an error message that is not in the customer namespace, for example an error message which refers to the cost center and the controlling area.

You have to take into account that values can be maintained per substitution which require other settings as a consequence, therefore which should only occur in combination.
For example combinations of the organizational data:
During substitution 'Responsible cost center', you must also maintain the corresponding controlling area 'Controlling area of the responsible cost center'.

11. Within a validation/substitution, you want to access a subfield.
In this case:
the system does not return the required results or
the system generates error message GB309 'Expression with
subfield of field & in table & not permitted' or
the system generates runtime error CONVT_NO_NUMBER, for
example, for fields BSEG-PROJK or COBL-PS_PSP_PNR.

Read Note 77268 on this topic.
In addition, the field Profit Center has, for example, a conversion exit, which fills out a purely numerical value with a leading 'O'. You should consider this when you select the partial field, since numbers are right-aligned. For alpha-numerical values, no conversion takes place.

12. The symptoms listed under point 1 occur when field PRPS-POSID is accessed or you require information on the usage of the fields in Boolean formulas.

Read Note 351634.

13. No validation messages are displayed when saving.

Messages from validation are only displayed when saving, if warning or error messages were generated. If information messages only were generated, they are not displayed during saving.

14. Is it unlcear how to create a Substitution / Validation Exit.

Instructions are availble in the Documentation
Accounting -> FI - Special Purpose Ledgers -> Tools
-> Validation, Substitution and Rules
-> User Exits in Validations/Substitutions/Rules
You may copy the form pools RGGBS000 for validation exits and RGGBR000 for substitution exits and configure them in T80D.
e.g. table T80D
MANDT ARBGB FORMPOOL EX_TEXT
800 GBLR ZGGBR800 Val/Sub:Exits for Rules
800 GBLS ZGGBS000 Val/Sub:Exits for Substitution
The new form pool name should conform to the
customers naming convention (beginning with the letter Z).
e.g ZGGBR000 and ZGGBS000.
In this form pool the exit can be created
constisting of 2 parts:
1. Defining in form pool ZGGBR800
FORM GET_EXIT_TITLES
....
EXITS-NAME = 'U999'.
EXITS-PARAM = C_EXIT_PARAM_NONE.
EXITS-TITLE = TEXT-009.
APPEND EXITS.
...
ENDFORM

2. Creating the Form
FORM U999 USING B_RESULT.
< customer coding >
ENDFORM.

It is not possible to explain or change the system behavior considering the listed points.
Search for notes under component PS* and also under component FI-SL-VSR*. If this does not solve your problem, create a message under the corresponding PS-ST* component. Add an action log and value log and describe exactly which validation/substitution should be used and the effects of the error.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Russian ABAP Developer's Club Forum Index -> CO All times are GMT + 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


All product names are trademarks of their respective companies. SAPNET.RU websites are in no way affiliated with SAP AG.
SAP, SAP R/3, R/3 software, mySAP, ABAP, BAPI, xApps, SAP NetWeaver and any other are registered trademarks of SAP AG.
Every effort is made to ensure content integrity. Use information on this site at your own risk.