Is there any function for updating the measurement
documents in a notification?
The sequence of the process requires that you call a BAPI
to commit the work.
Here is a program sample of what
we had to do using standard SAP.
If you use FM: 'MEASUREM_DOCUM_DIALOG_LIST_1'
and then CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
in SE37, pull down menu Function Module
--> Test --> Test sequences and add them in the sequence listed above.
Add your master data (sample below) and execute, then
you will be able to post the measurement documents to the notification.
Program sample with FM's listed
above:
REPORT ZXXXXX
parameters: dis type c,
objec like IMRG-WOOBJ,
qty(3) type c.
data: DOCUMENTS_DEFAULT LIKE RIMR01 occurs 0 with header
line,
DOCUMENTS_DEF_INS LIKE IMRG occurs 0 with header line,
DOCUMENTS_INSERT LIKE IMRG occurs 0 with header line,
DOCUMENTS_UPDATE LIKE IMRG occurs 0 with header line,
IMRG_TAB like IMRG occurs 0 with header line.
start-of-selection.
DOCUMENTS_DEFAULT-POINT = '000000000002'.
DOCUMENTS_DEFAULT-RECDV = qty.
DOCUMENTS_DEFAULT-RECDVI = 'X'.
DOCUMENTS_DEFAULT-RECDU = 'EA'.
DOCUMENTS_DEFAULT-OBLIG = 'X'.
* DOCUMENTS_DEFAULT-DOCAF = 'X'.
APPEND DOCUMENTS_DEFAULT.
CALL FUNCTION 'MEASUREM_DOCUM_DIALOG_LIST_1'
EXPORTING
ACTIVITY_TYPE = '1'
F11_ACTIVE = 'X'
* INDICATOR_INITIALIZE = 'X'
DEFAULT_DATE = SY-DATUM
DEFAULT_TIME = SY-UZEIT
DEFAULT_READER = SY-UNAME
WORK_ORDER_OBJECTNR = objec
* WORK_ORDER_KEY_EXTERN = ' '
* WORK_ORDER_OBJECTNR1 = ' '
NO_DIALOG = 'X'
PREPARE_UPDATE_IF_API = 'X'
* IMPORTING
* INDICATOR_UPDATE =
* LEFT_WITH_F15 =
TABLES
DOCUMENTS_DEFAULT = DOCUMENTS_DEFAULT
DOCUMENTS_DEF_INS = DOCUMENTS_DEF_INS
DOCUMENTS_INSERT = DOCUMENTS_INSERT
DOCUMENTS_UPDATE = DOCUMENTS_UPDATE
EXCEPTIONS
NO_AUTHORITY = 1
WORK_ORDER_NOT_FOUND = 2
ORDER_HAS_NO_DOCUMENTS = 3
IMPTT_NOT_FOUND = 4
TYPE_NOT_FOUND = 5
POINT_LOCKED = 6
POINT_INACTIVE = 7
TIMESTAMP_IN_FUTURE = 8
TIMESTAMP_DUPREC = 9
UNIT_UNFIT = 10
VALUE_OVERFLOW = 11
VALUE_UNFIT = 12
VALUE_MISSING = 13
CODE_NOT_FOUND = 14
OTHERS = 15.
IF SY-SUBRC 0.
write: 'Performance Parameters not updated'.
ELSE.
write: 'Performance docs updated'.
ENDIF.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = 'X'.
Table: Documents Default Input parameters (sample only
for my system)
MANDT 092
POINT 2
IDATE
ITIME 00:00:00
MDTXT
READR
GENER
PRUEFLOS 000000000000
VORGLFNR 00000000
MERKNR 0000
PROBENR 000000
MBEWERTG
TOLTY
TOLID 00000000
DOCAF
RECDV 9.000000000000000E+00
RECDVI X
RECDU EA
IDIFF
CODCT
CODGR
VLCOD
CVERS
OBLIG X |