Function Module MEASUREM_DOCUM_RFC_SINGLE_001 
Task
RFC Measurement document: Individual processing, Create
Use
This RFC enables the following remote calls for creating measurement documents:
The session "Create with dialog" can be used for the correction of incorrect data records (compare with processing in the foreground for incorrect batch input sessions).
You can use the parameter CREATE_NOTIFICATION to determine whether another maintenance notification should be created for the measurement document.
If a notification is to be created, a notification type that is set in Customizing of the target system can be assigned, using the parameter NOTIFICATION_TYPE. The standard notification type M2 = Malfunction report is preassigned.
Additionally, the notification can be assigned a priority that also has to be set in Customizing of the target system.
The following data can be copied into the notification from the measurement document or the measuring point:
Notes
The following is valid for the parameters RECORDED_VALUE and RECORDED_UNIT:
-
RECORDED_VALUE is transferred in CHAR format. If the field contains decimal places, these must be separated using a comma or period according to the setting in the user master.-
RECORDED_UNIT is interpreted depending on the logon language and is case sensitive.If the measurement document table IMRG has been extended to include customer-specfic fields by creating the Customizing include CI_IMRG, these fields can be filled using the parameter USER_DATA.
If the parameter CHECK_CUSTOM_DUPREC has been transferred with 'X', the system checks whether a measurement that has not been canceled already exists for the measuring point and time stamp (READING_DATE + READING_TIME).
If this is the case, a new measurement document is not created. Instead, the system returns the parameter CUSTOM_DUPREC_OCCURED with 'X'. In the parameters MEASUREMENT_DOCUMENT, COMPLETE_DOCUMENT and NOTIFICATION, the data of the already-existing measurement documents is returned. For this reason, the exception TIMESTAMP_DUPREC cannot be set, also not for counters.
If you want to allow more than one measurement document per time stamp (second), you must create the Customizing include CI_IMRG with the field ZZ_CUST_ID. You can define the field ZZ_CUST_ID with any format. It is then available automatically in the database table IMRG and in the parameter USER_DATA, and is used during the above-mentioned DupRec-check as a refinement of the time stamp. This means that in the field ZZ_CUST_ID, you are able to transfer an internal counter per measuring point and time stamp, an extension of the time stamp in micro/nanoseconds, or the number of the original document from the feeder system.
Import Parameters
Parameter |
Type |
Length |
Short text |
MEASUREMENT_POINT |
CHAR |
12 |
Measuring point (primary key) |
SECONDARY_INDEX |
CHAR |
20 |
Secondary index: Position no. of measuring point |
READING_DATE |
DATS |
8 |
Date of measurement |
READING_TIME |
TIMS |
6 |
Time of measurement |
SHORT_TEXT |
CHAR |
40 |
Short text for measurement document |
READER |
CHAR |
12 |
Counter reader of measurement reading |
ORIGIN_INDICATOR |
CHAR |
1 |
Origin indicator |
READING_AFTER_ACTION |
CHAR |
1 |
X = Measurement after appropriate action |
RECORDED_VALUE |
CHAR |
22 |
Measurement reading in entry unit |
RECORDED_UNIT |
CHAR |
6 |
Unit of measurement for document entry |
DIFFERENCE_READING |
CHAR |
1 |
X = MeasReading is counter reading difference |
CODE_CATALOGUE |
CHAR |
1 |
Catalog type of the valuation code |
CODE_GROUP |
CHAR |
8 |
Code group of valuation code |
VALUATION_CODE |
CHAR |
4 |
Valuation code |
CODE_VERSION |
CHAR |
6 |
Version number of valuation code |
USER_DATA |
Customer-specific data | ||
CHECK_CUSTOM_DUPREC |
CHAR |
1 |
X = Customer-specific DupRec-check |
WITH_DIALOG_SCREEN |
CHAR |
1 |
X = RFC with dialog screen |
COMMIT_WORK |
CHAR |
1 |
X = Trigger COMMIT WORK at ABAP level |
WAIT_AFTER_COMMIT |
CHAR |
1 |
X = Wait for database update |
CREATE_NOTIFICATION |
CHAR |
1 |
X = Create PM notification |
NOTIFICATION_TYPE |
CHAR |
2 |
Notification type |
NOTIFICATION_PRIO |
CHAR |
1 |
Notification priority |
Export Parameters
Parameter |
Type |
Length |
Short text |
MEASUREMENT_ |
CHAR |
20 |
Measurement document (primary key) |
COMPLETE_DOCUMENT |
See IMRG structure |
See IMRG structure |
Complete measurement document |
NOTIFICATION |
CHAR |
12 |
Notification (primary key) |
CUSTOM_DUPREC_OCCURED |
CHAR |
1 |
X = Customer-defined DupRec occured |
IMRG Structure
Name |
Type |
Length |
Short text |
AEDAT |
DATS |
8 |
Date on which the object was last changed |
AENAM |
CHAR |
12 |
Name of the user who last changed the object |
CANCL |
CHAR |
1 |
Cancel indicator |
CDIFF |
FLTP |
16 |
Counter reading difference in SI-units |
CDIFFI |
CHAR |
1 |
Indicator to show that the corresponding field contains a value |
CNTRG |
CHAR |
1 |
Indicator: Counter-reading document |
CNTRR |
FLTP |
16 |
Counter reading in SI-units |
CNTRRI |
CHAR |
1 |
Indicator to show that the corresponding field contains a value |
CODCT |
CHAR |
1 |
Catalog type - Valuation code for the measurement reading |
CODGR |
CHAR |
8 |
Code group - Valuation code for the measurement reading |
CVERS |
CHAR |
6 |
Version number |
DETAILERG |
NUMC |
8 |
Development reserve: Format NUMC, |
DOCAF |
CHAR |
1 |
Indicator: Measurement document included after corresponding task |
ERDAT |
DATS |
8 |
Date on which the object was created |
ERNAM |
CHAR |
12 |
Name of the user who created the object |
ERUHR |
TIMS |
6 |
Time at which the object was created |
EXCHG |
CHAR |
1 |
Indicator to show that the register was exchanged |
GENER |
CHAR |
1 |
Origin indicator |
IDATE |
DATS |
8 |
Date of measurement |
IDIFF |
CHAR |
1 |
Indicator to show that the counter reading was entered as a difference |
INVTS |
NUMC |
11 |
Internal time stamp format: 99.999.999.999 - seconds |
ITIME |
TIMS |
6 |
Time of measurement |
KZLTX |
CHAR |
1 |
Long text indicator |
LVORM |
CHAR |
1 |
Deletion flag |
MANDT |
CLNT |
3 |
Client |
MBEWERTG |
CHAR |
1 |
Valuation of test result |
MDOCM |
CHAR |
20 |
Measurement document |
MDTXT |
CHAR |
40 |
Measurement document text |
MERKNR |
NUMC |
4 |
Inspection characteristic number |
MLANG |
LANG |
1 |
Language key |
POINT |
CHAR |
12 |
Measuring point |
PREST |
CHAR |
1 |
Processing status |
PROBENR |
NUMC |
6 |
Number of the partial sample |
PRUEFLOS |
NUMC |
12 |
Inspection lot number |
READG |
FLTP |
16 |
Measurement reading / total counter reading in SI-units |
READGI |
CHAR |
1 |
Indicator to show that the corresponding field contains a value |
READR |
CHAR |
12 |
Counter reader of the measurement reading |
RECDU |
UNIT |
3 |
Unit of measurement for document entry |
RECDV |
FLTP |
16 |
Measurement reading in unit of entry |
RECDVI |
CHAR |
1 |
Indicator to show that the corresponding field contains a value |
ROOTD |
CHAR |
20 |
Source document for measurement reading transfer |
TOLID |
NUMC |
8 |
Object ID of the production resource/tool |
TOLTY |
CHAR |
2 |
Object type of the CIM resource for production resource/tool |
TOTEX |
CHAR |
1 |
Indicator to show that the total counter reading was set externally |
VLCOD |
CHAR |
4 |
Valuation code |
VORGLFNR |
NUMC |
8 |
Current node number from order counter APLZL |
WOOB1 |
CHAR |
22 |
Object number of the order operation / confirmation counter, etc. |
WOOBJ |
CHAR |
22 |
Object number of the order etc. |
CI_IMRG |
Customer-specific data |
Exceptions
Parameter |
Short text |
NO_AUTHORITY |
No authorization |
POINT_NOT_FOUND |
Measuring point (table IMPTT) not found |
INDEX_NOT_UNIQUE |
Secondary index is not unique |
TYPE_NOT_FOUND |
Measuring point category not found |
POINT_LOCKED |
Measuring point blocked by dialog user |
POINT_INACTIVE |
Measuring point inactive -> no document entry |
TIMESTAMP_IN_FUTURE |
Measurement time point lies in the future |
TIMESTAMP_DUPREC |
A counter reading already exists |
UNIT_UNFIT |
Unit of measurement does not suit dimension to be measured |
VALUE_NOT_FLTP |
RECORDED_VALUE cannot be read as floating point number |
VALUE_OVERFLOW |
Measurement range exceeded/not reached |
VALUE_UNFIT |
Counter reading does not suit monotone development |
VALUE_MISSING |
Measurement/counter reading missing |
CODE_NOT_FOUND |
Valuation code not defined |
NOTIF_TYPE_NOT_FOUND |
Notification type not defined or not authorized |
NOTIF_PRIO_NOT_FOUND |
Priority not defined |
UPDATE_FAILED |
Database update failed (during WAIT_AFTER_COMMIT) |