When you make a posting with account assignment to a WBS element, an update termination occurs in status management.
This problem mostly occurs in summarized or mass postings (FB01).
You are making several postings in the same transaction to the same WBS element. This might, for example, be the first actual posting to the object. This triggers the setting of an internal (system) status in the function module which checks account assignment for WBS elements. When the system comes to the insert in updating, it finds that this status has already been set by an earlier line item.
SolutionThe defective log records cannot be posted to, as the internal reference to the status change insert cannot be corrected manually. This means that you will have to post all the defective records again.
To avoid a recurrence of this problem for future postings, make the correction shown below::
'PS_STAT_CHANGE'
Import-Parameter neu aufnehmen:
I_MODE RCWBS-SEL01 SPACE
...
IF I_MODE IS INITIAL. <=== insert
CALL FUNCTION 'STATUS_CHANGE_FOR_ACTIVITY'
EXPORTING
CHECK_ONLY = CON_YES
OBJNR = PRPS-OBJNR
VRGNG = I_VRGNG
IMPORTING
ACTIVITY_NOT_ALLOWED = ERROR_FOUND
ERROR_OCCURRED = ERROR_FOUND
OBJECT_NOT_FOUND = ERROR_FOUND
STATUS_INCONSISTENT = ERROR_FOUND
STATUS_NOT_ALLOWED = ERROR_FOUND
EXCEPTIONS
ACTIVITY_NOT_ALLOWED = 01
OBJECT_NOT_FOUND = 02
STATUS_INCONSISTENT = 03
STATUS_NOT_ALLOWED = 04
WRONG_INPUT = 05.
IF NOT ERROR_FOUND IS INITIAL OR NOT SY-SUBRC IS INITIAL.
RAISE WRONG_ACTIVITY.
ENDIF.
ENDIF. <=== insert
...
DESCRIBE TABLE LOC_STAT LINES SY-TFILL.
CHECK NOT SY-TFILL IS INITIAL.
IF I_MODE IS INITIAL. "Dialog oder Verbuchung<==insert
CALL FUNCTION 'STATUS_CHANGE_INTERN'
EXPORTING
OBJNR = PRPS-OBJNR
TABLES
STATUS = LOC_STAT.
ELSE. <=== insert
CALL FUNCTION 'STATUS_CHANGE_INTERN_VB' IN UPDATE TASK <===insert
EXPORTING <=== insert
OBJNR = PRPS-OBJNR <=== insert
TABLES <=== insert
STATUS = LOC_STAT. <=== insert
ENDIF. <=== insert
ENDFUNCTION.
-----------------------------------------------------------------
'CJPN_PROJECT_ACCOUNT'
...
* allgemeine Statusverwaltung
...
CASE SY-SUBRC.
WHEN 0.
IF ERROR_OCCURRED IS INITIAL AND CHANGE_STATUS EQ CON_YES.
* CALL FUNCTION 'STATUS_CHANGE_FOR_ACTIVITY' <=== delete
* EXPORTING <=== delete
* OBJNR = PRPS-OBJNR <=== delete
* VRGNG = ACTIVITY <=== delete
* ZEILE = LOC_ZEILE. <=== delete
CALL FUNCTION 'PS_STAT_CHANGE'
EXPORTING
I_MODE = CON_YES <=== insert
I_KATYP = KATYP
I_OBJNR = PRPS-OBJNR
I_VRGNG = ACTIVITY.
ENDIF.
...
No comments:
Post a Comment