cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Cannot select user status as object attribute

pokrakam
Active Contributor
0 Likes
878

Hello all,

Simple question: On a 4.6c system I can set a system status to be an attribute of a BO, but it does not allow me to select a user status.

I've done this before but for some reason it's not happening here or I'm missing something blindingly obvious. When I select a status in the attributes all I see are system statuses. If I enter it directly I get

"Status E0001 from the object status management is not defined". (Obviously the user status exists).

IFSTATUS, StatusObjNumber, StatusObjType, StatusProfile are all implemented and functioning correctly, the object tests ok, searched the archives, read the saphelp, still no user status. I can define an attribute, when I hit the dropdown all I see are system statuses.

I suspect it's got something to do with status profiles, but after to days of arguing with the system I'm still in the dark.

Any input appreciated.

Cheers,

Mike

View Entire Topic
Former Member
0 Likes

Hey Mike,

What exactly is a user status?

I did see in the ABAP of attribute in the BO IFSTATUS that it simply calls a FM and pass that info to the attribute, only StatusProfile is not a virtual attribute.

Is this not possible in your case, to create a virtual attribute for it?

Kind regards, Rob Dielemans

pokrakam
Active Contributor
0 Likes

Hi Rob,

User/system statuses form part of status management, they are set by the app and can be queried as an object attribute.

It is possible to code for it, but in QM terms it's the HR equivalent of working with PAnnn tables directly - not pretty and reinventing the wheel. Why code when a few clicks will do, the fact that I've already spent a day on this is completely besides the point

Also, I've done it before at other clients so it's doubly annoying when the straightforward bit doesn't work.

Thanks for the feedback.

Cheers,

Mike

Former Member
0 Likes

Hi Mike,

If in doubt raise an oss message?

There is no other BO you should use. In HR for attributes you dont have to code most of the times, because there are enough usefull BO's (Bus1065, employeet, family etc.)

Kind regard, Rob Dielemans

ramki_maley
Active Contributor
0 Likes

Mike,

I am sure you might have verified already. If not, is the profile in question assigned to the object type (txn OK02)?

Cheers,

Ramki Maley.

pokrakam
Active Contributor
0 Likes

Hi guys,

Yes, all pretty much checks out:

- my object type is correct

- All necessary Status... attributes are redefined/implemented

- profile assigned to object type

Something interesting though: I debugged SWO1 and it looks for the user status in TJ30 with an empty status profile. In customizing you cannot define a user status without a profile.

So... in a sandbox I manually inserted a record into TJ30 without a profile and I can now define my attribute and it works with whatever profile I use to instantiate it with. So it seems some other customizing or something is missing. Presumably this was done at previous clients, since I KNOW it worked elsewhere. Grumble....

Thanks for the input.

Cheers,

Mike

ramki_maley
Active Contributor
0 Likes

Mike,

The IMG path for what you did manually:

SPRO -> QM -> Notific. Processing -> Status Mgmt -> Define Staus Profile -> Status Profile for Notific Type.

Cheers,

Ramki Maley.

pokrakam
Active Contributor
0 Likes

Hi Ramki,

Yep that's the one but as I said customizing won't let you define a user status without a profile, which is what SWO1 checks for.

If I do it manually (insert record without a profile) I can define the attributes. Maybe I'm completely wrong; either way the manual hack is not a solution that will go into anything productive, was just something I tried in order to to figure out what's going on.

Cheers,

Mike

Former Member
0 Likes

Hey Mike,

I suggest you do the following.

Note the message number displaying.

switch on system debuggin /hs

create a watch point on sy-msgno = the message number

press F8.

If it's reached, you'll see what table is read. If you don't agree with sap that the error message is valid. place the break point on the if sy-subrc eq 0. statement. save the breakpoint.

And next time force tit through by changing the returncode. and write SAP an oss message saying that the check is wrong and should be removed.

Kind regards, Rob Dielemans

Former Member
0 Likes

Hi Mike,

I don't know if this will help, this is what I have done for Plant Maintenance order:

To define status profile: SPRO-> PM->Maintenance & Service Processing-> Maintenance & Service Order-> General Data ->User Status for order -> Define Status Profile -> Define User Status Profile for Orders.

To define user status: SPRO-> PM->Master Data in PM->Basic Settings->Define User Status.

Select a Status Profile will give you all the user statuses associated with the status profile, the user statuses displayed here are TXT04 (e.g. INIT) from TJ30T, the ‘internal’ user status is in TJ30-ESTAT (e.g. E0001).

Then define the user status/event using BSVZ, where you will enter the following:

Status Obj Type, Schema (i.e. status profile), Business Obj Type, Event (which you define for your BO in SWO1).

Then define status restrictions (which is located on the left pane), here you specific the ‘internal’ user status (e.g. E0001).

Then define the Start event in your WF, where you define your BO type and event.

Then using SWETYPV to define event linkage for your BO, event and receiver type.

Amy