on 08-21-2008 3:26 PM
Hi Experts,
Any one have the sample code for BBP_WFL_ADMIN_APPROV? Many thanks.
A sample code is attached below. Please modify it as per your requirement.
METHOD if_ex_bbp_wfl_admin_approv~admin_approver_get.
* Sample Code to get the SLA Approver as the agent
* for Invoice Documents
DATA: ls_attr_single TYPE bbp_attr_list.
DATA: ls_attr_dft_single TYPE bbps_attr_single.
DATA: ls_agent TYPE swhactor.
ls_attr_single-attr_id = 'SLAPPROVER'.
CASE iv_object_type.
WHEN 'BUS2205'.
CALL FUNCTION 'BBP_READ_ATTRIBUTES'
EXPORTING
iv_user = iv_user
iv_scenario = 'BBP'
iv_attr_single = ls_attr_single
IMPORTING
ev_attr_dft_single = ls_attr_dft_single
EXCEPTIONS
object_id_not_found = 1
no_attributes_requested = 2
attributes_read_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
CLEAR ls_agent.
ls_agent-otype = ls_attr_dft_single-value(2).
ls_agent-objid = ls_attr_dft_single-value+2(12).
APPEND ls_agent TO et_agent.
ENDIF.
WHEN OTHERS.
ENDCASE.
ENDMETHOD.
Regards
Kathirvel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kathirvel,
Thank you very much for your answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kathirvel,
thanks very much for your kindly help. Now our requirements like this, first we got a certain user as the WF approver, and want to set this user to wf approval list, but we found the export parameter is only one:ev_attr_dft_single, In our senario, we do not user attributes:SLAPPROVER. So how can I set the certain user to this export parameter? By the way, could you give us some sample data of ev_attr_dft_single and the format of this table? We have hard code: OTYPE = 'US' and OBJID = '50000907', but the wf is not works correctly, it show up : agent assignment not exsit. Could anybody tell me this error ocurres from a wrong wf config or wrong BADI hard code?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.