Chinaunix首页 | 论坛 | 博客
  • 博客访问: 710270
  • 博文数量: 145
  • 博客积分: 3446
  • 博客等级: 中校
  • 技术积分: 1567
  • 用 户 组: 普通用户
  • 注册时间: 2006-08-30 13:58
文章分类

全部博文(145)

文章存档

2021年(1)

2020年(1)

2019年(1)

2018年(6)

2017年(1)

2016年(10)

2015年(12)

2014年(10)

2013年(15)

2012年(33)

2011年(21)

2010年(9)

2009年(18)

2008年(2)

2006年(5)

我的朋友

分类: Web开发

2019-05-15 08:53:18

解决方法: BADI: BSV_STATUS_PROFILE-@5B@ IF_BSV_STATUS_PROFILE~NOTE_159553 
SPAN { font-family: "Courier New"; font-size: 10pt; color: #000000; background: #CCE8CF; } .L0S31 { font-style: italic; color: #808080; } .L0S33 { color: #4DA619; } .L0S52 { color: #0000FF; } .L0S55 { color: #800080; } .L0S70 { color: #808080; } METHOD if_bsv_status_profile~note_159553.

* activate status profile behavior according to note 159553
* for all status profiles:
*  is_active = 'X'.

* ... or for specific profiles
  CASE stsma.
    WHEN 'Z_ORDER'.
      is_active 'X'.
    WHEN OTHERS.
      is_active ' '.
  ENDCASE.
ENDMETHOD.


Symptom

You receive one of the error messages BS042,BS043.
This can occur when you process any object which uses the general status management, for example project, order, network and so on.

Other Terms

BS02, BS03

Reason and Prerequisites

The object which is currently subjected to a status change is assigned to a user status profile.
The user status with status number is defined in this user status profile.
You defined for every status with status number an interval in the status profile which must contain the subsequent status.
One is always active at any time for an object in the user status with status number. If you want to change the status, it is first checked whether the required subsequent status is in the allowed interval. If this is the case, it is set and the predecessor status is deactivated. Otherwise, one of the error messages

  • BS042 (new status number is too low)
  • BS043 (new status number is too high)


is issued. The interval limits are output for the status numbers in the long text of the error messages (F1). In this case the logic of the interval check is as follows:

    1. The status currently active determines the upper limit of the subsequent status.
    2. The status with status number which was the highest one ever active for the object determines the lower limit for the status number of the subsequent status.


The effect of the second point is that a user status has still an influence on the status sequence if it is no longer active at all yet it was once active.
Thus, status management has something like a "memory".
The following status profile may serve as an example:

           Stat.no Status Ini Lstat no. Hstat no.
           
            1      AAAA    X    1          2
            2      BBBB        2          3
            3      CCCC        1          3
           
This has the initial status AAAA when generating the object.
This alone determines which status number interval is allowed for the subsequent status, namely 1 to 2.
Thus, only BBBB is allowed as a subsequent status. If you switch to BBBB, the status management 'memorizes' that AAAA was once active. However, this has no effects since BBBB is the higher status. 2 to 3 are allowed as a status number of the subsequent status of BBBB. Thus, you may only switch to CCCC, a switching back to AAAA is not allowed. If the status CCCC is reached you can switch back to BBBB as the status number must be between 1 and 3. The object is now again in status BBBB with the difference that you may now also switch back to AAAA because

  • the active status BBBB determines the upper limit: 3
  • the highest ever status CCCC active determines the lower limit: 1


Since CCCC is the highest status in this status profile, you can switch back to AAAA from every status without restriction.
You can look at this 'memory' function of status management either as "bug" or as "feature" depending on the requirement. Should this attribute be interfering, you can carry out a MODIFICATION of the SAP standard system so that only the currently active status determines the interval limits for the subsequent status. However, this changes the behavior of status management globally for all defined status profiles. You may now receive the error messages BS042/043 for status changes at objects which are assigned to other status profiles and where you made use of the 'memory' of the status management as a "feature".
You must check and test this, otherwise you do not have to expect any other side effects from the modification.

Solution

If necessary, make the following MODIFICATION.




阅读(1167) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~