03-10-2014 3:40 PM
We have an approval workflow associated with BUS0050.Prepost to prevent end users from using the post by graying out the button and only allow them to prepost. We have some users on our statewide functional team that are allowed to directly post budget documents without triggering the approval workflow based on their user security (the button isn't grayed out).
The problem is that the newest support packs we are testing add the following code to
CL_FMED_ENTRYDOC==============CP method CHECK_ED_HEADER
122 *note 1701024 : document type with workflow but post remains possible
123 IF E_FLG_WORKFLOW_ACTIVE = con_on AND G_F_HEADER-docstate = con_posted AND I_FLG_POSTING = con_on.
124
125 L_F_MSG-MSGV1 = G_F_HEADER-DOCTYPE.
126 CALL FUNCTION 'FMKU_CUMULATE_MSG'
127 EXPORTING
128 I_REF_MSG = I_REF_MSG
129 I_MSGNO = '201'
130 I_MSGV1 = L_F_MSG-MSGV1.
Anytime anyone tries to post now, they get:
If I set a breakpoint and make the above If statement fail, the user can post as before. I don't understand why SAP added this additional check to prevent direct posting nor am I sure what I can to avoid it when a user that should be able to post creates a document.
Any help would be greatly appreciated
03-10-2014 5:22 PM
Hi,
In the BCS budget document type definition, you can create a document type with workflow box unchecked. There is a standard authorization object F_FMBU_DOC for BCS document types. You can use this object to control what work roles have access to that document type.
Regards,
Ming
03-10-2014 7:28 PM
I want the particular doc type to have an approval workflow when created by the end user but I want certain people to be able to post. SAP apparently doesnt want to provide that option anymore.