Change status of workitem in his method (ABAP OO)
Hello!
I have class Z_TTT with implementation IF_WORKFLOW. And I have method DISPLAY of this class.
This method executing in task.
How can I change status of this task inside method DISPLAY thus task not to be completed after executing.
(In BOR I could use SAP_WAPI_SET_WORKITEM_STATUS (to ready) and then exit_cancelled.)
How in ABAP OO?
Thanks a million. Didn't know that I'll edit my post, that it's more correct.
In the method definition you declare the Exception class CX_BO_ACTION_CANCELLED to be thrown.
In the method coding you use the following statement to raise the exception.
RAISE EXCEPTION TYPE cx_bo_Action_Cancelled.
Similar Messages
-
Regarding the change status of leave workflow.
hi friends,
i have copied the standard leave worklfow "WS12300111" and customized it just to meet our requirement means for multiple approvers.
everything is working fine in production means if user ID "AIHR01' raise a leave request the workitem will go to "AIHR02" after his approving the workitem will go to the final approver means "AIHR03" after his approval the leave request will be completed and the status in the TC - PTARQ is coming as "APPROVED" means only after the approving of "AIHR03" the status is coming "APPROVED" but in some cases when user id "AIHR02" is approved instead of coming status "SENT" it is coming "APPROVED" in TC-PTARQ and because of this status the workitem is coming blank in UWL of "AIHR03".
I have already incorporated the given below method in the "WORKFLOW" just to change the status from "APPROVED" to "SENT" after the approval of user ID "AIHR02" but in some cases it is not working fine it is giving BUG.
begin_method changestatus changing container.
DATA:request TYPE ptreq_header-request_id,
wi_id TYPE swwwihead-wi_id.
DATA: request_instance TYPE REF TO if_pt_req_request,
event TYPE tim_req_xfer_event VALUE
cl_pt_req_const=>c_reqtrans_send,
ex_status TYPE tim_req_status,
container_wi TYPE swcont OCCURS 0,
agents TYPE STANDARD TABLE OF swhactor WITH HEADER LINE.
swc_get_element container 'REQUEST' request.
swc_get_element container 'Wi_id' wi_id.
DO.
CALL FUNCTION 'ENQUEUE_EPTREQ'
EXPORTING
MODE_PTREQ_HEADER = 'S'
MANDT = SY-MANDT
request_id = request
X_REQUEST_ID = ' '
_SCOPE = '2'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
foreign_lock = 1
system_failure = 2
OTHERS = 3
IF sy-subrc = 0.
EXIT.
ENDIF.
WAIT UP TO 60 SECONDS.
ENDDO.
IF sy-subrc = 0.
CALL METHOD ca_pt_req_header=>agent->get_request
EXPORTING
im_request_id = request
IMPORTING
ex_request = request_instance
EXCEPTIONS
request_not_found = 1
OTHERS = 2.
IF sy-subrc = 0.
CALL METHOD request_instance->initiate_state_trans
EXPORTING
im_transfer_event = event
im_external_call = 'X'
im_ret_value = 0
ex_new_status = ex_status
ex_ret_code =
swc_set_element container 'Ex_Status' ex_status.
ENDIF.
CALL FUNCTION 'DEQUEUE_EPTREQ'
EXPORTING
MODE_PTREQ_HEADER = 'S'
MANDT = SY-MANDT
request_id = request
X_REQUEST_ID = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
ENDIF.
swc_create_container container_wi.
swc_set_element container_wi 'WI_ID' wi_id.
agents-otype = 'US'.
agents-objid = sy-uname.
APPEND agents.
CALL FUNCTION 'SWW_WI_START_SIMPLE'
EXPORTING
task = 'TS90000089'
called_in_background = 'X'
TABLES
agents = agents
wi_container = container_wi
EXCEPTIONS
id_not_created = 1
read_failed = 2
immediate_start_not_possible = 3
execution_failed = 4
invalid_status = 5
OTHERS = 6.
end_method.
Request you to plesase help me to solve this issue .why in some cases instead of coming status "SENT" it is coming "APPROVED" after the approval of user id "AIHR02".
BECAUSE of the "APPROVED" staus the same workitem is coming blank in the UWL OF "AIHR03".solved by own
-
Function to change status in CRM.
Hi..
Let me introduce myself, my name is Daniel.
I'm developing an application based on .Net & ABAP (CRM) & i'm getting problems.
Do you know the function to change status, where that function can be called out from program?
This time i've tried 2 functions :
ZISA_STATUS_CHANGE_N_SAVEDOC
CRM_STATUS_CHANGE_INTERN_OW'
Those functions works if i run inside program, but if i build another program for calling that program (run those functions), the functions will not be worked.
Is there any somebody help me to find out the functions?
Thx so much..IF NOT gt_obj_guids[] IS initial.
CALL FUNCTION 'CRM_ORDER_SAVE'
EXPORTING
it_objects_to_save = gt_obj_guids
IMPORTING
et_saved_objects = gt_saved_objects.
read table gt_saved_objects into saved_object index 1.
OBJECT_ID = saved_object-object_id.
COMMIT WORK.
Like a line a code above, i have put a commit work. But it still can't work well.
But, btw.. Is BAPI Commit that you mention before same with i mention in my code?
I need your suggestion.. _. -
MRS: fm to get assignment and change status
Hello all,
I have a requirement for MRS to get all assigned MRS tasks for a specific user (PERNR) and then change the MRS status of a task from an external system. Therefor, I need 2 remote enables FM's.
1) collect all assigned MRS tasks based on PERNR and start/end date.
2) change status of a chosen MRS task.
I have the pernr and orderid's. But to be able to change the status of a MRS task, I need the assignment key (OBJECT_GUID) .
So first, I need to find the assignment key based on the pernr/resource_key and orderid => is there a functionmodule / method for this? Or does anyone know in which table(s) I can find this assigment?
Next, I have to change the MRS status of this task. I found class /MRSS/CL_SGD_DEM_STATUS with method MAINTAIN where I can change the status => but is there also a functionmodule that also does the SAVE?
Kind regards!
RobertAllright, so I have requirement nr 2 working. But I have not yet found the collection of the assignment value based on pernr / orderid / startdate / enddate. If anyone can help me that would be great!
-
Change status on a SC as an administrator
Hi, Im running on SRM 6.0 and I would like to change status on a SC from staus completed to cancelled, no follow-on-doc has been created. Can I do that as an administrator?
Best Regards
JonasHello
the standard method without the use of Debbug, such is not possible.
look at the function BBP_PD_SC_STATUS_CHANGE.
but the change that status can lead to errors
Edited by: DAV_999 on Jan 17, 2011 2:29 PM -
Is it possible to change status code within a serlvet filter
I tried to update the HTTP status code within a filter's do filter method, but it doesn't work,
public void doFilter(ServletRequest request, ServletResponse response, FilterChain, chain){
chain.doFilter(request, response);
((HttpServletResponse)response).setStatus(HttpServletResponse.SC_OK);
Did I do anything wrongHi, sorry I did not get the relevance of the posted link. It refers to standard customisation, which I think is opposite to what Neil asks. Normally you can execute a GPS on changing the status in STS. But Neil is wanting to do the opposite, if I am not mistaken,: change the status in the STS by running a sequence in the planning.
I don't have a solution; but my question would be why use the STS if not using for status control? One can see issues arising, like when the current status in not what you are expecting, or if a sequence should be run when the status changes, and maintaining the fields that change (status history log). I guess it may be doable, but is it worth it?
Stephen -
I have changed my family sharing organizer payment method but when asked to add members it keeps asking for information for a card I no longer have so I do not have the security code. My current shows in all the correct places but when asked to verify, the old card is referenced. I changed the card in itunes and on my phone and ipad.
I have changed my family sharing organizer payment method but when asked to add members it keeps asking for information for a card I no longer have so I do not have the security code. My current shows in all the correct places but when asked to verify, the old card is referenced. I changed the card in itunes and on my phone and ipad.
-
URGENT: Changing status at Header level in Service Ticket in Webclient
Hi All
Please reply ASAP.......
I am changing status for service ticket in webclient at Header level.
But at item level system status is not changing.
Is there any config in CRM where user status or system status is copied from header to item level
Basically need is to trigger item status when header status is trigerred....
Can anyone help me in resolving this issue.
Regards
Pankaj VisputeThanks Bhanu,
I solved my problem with your answer.
Thanks,
Praveen -
How to restrict user to change status.
Dear All,
we want to restrict users to change the status from set to assign to released status.
is there any authorization object to restirct user to change status?
i was trying with object CPRO_DPO Create Project Definition with activity 43 release ,but unable to do so.
Please do need ful
Regards
RavindraHi Ravi,
probably you need to create user status profile.
Use TA BS02 to create status profile
here you have to add authorization key which needs to be defined in BS52
use b_user_stat auth object to give profiles in custom roles in PFCG
Thus you can block access to change status
Niranjan
Let me know if it helps
Points welcome
Thanks Mathias
Edited by: Niranjan Dandekar on Apr 2, 2009 1:21 PM
Edited by: Niranjan Dandekar on Apr 2, 2009 1:21 PM -
Changing Status of preceeding document in CHARM
Hi Experts ,
I need to change the status of a preceeding document in CHARM.
I created a YDAD document from YDCR.
When i change status of YDAD to cancelled i need to change status of YDCR to Cancelled.
Steps i followed :
1 . While changing status of YDAD to cancelled i added a new parameter PREDOC_STATUS and given status of YDCR as E0009.
2. In "Assign actions" for status "cancelled" of YDAD i hve given a action SET_PREDOC .
3.In "Specify Status Attributes" for status "cancelled" of YDAD i hve given YDCR YDCRHEAD E0009.
But still it is not working . Please help me on this .
Thanks , VijayHello,
please take a look to this Re: Change status of previous document
If solution is not provided; please put break points as stated lines and tell us what you see
Regards
Khalil -
Change status(Active/Inactive) of file adapter by the external command
Hi, all.
Is it possible to change status(Active/Inactive) of file adapter by the external command?
Let's say, like
"$ switch_file_adapter_status.sh <File Adapter name> <active|inactive>"
or something like that.
Actually, we have the following requirement for the file adapter.
For example, we have many "file adapter to R/3" scenarios and we only want to allow data transfer between 9:00 a.m. to 9:00 p.m.(R/3 service time).
In order to achieve this requirement, one option would be to switch file adapter status between active and inactive by external command line.
And this command will be controlled by the job scheduler(like Tivoli).
Does XI(3.0 or above) have this kind of feature?
Best Regards.Hi,
I don't think that this is possible.
But one Solution for your problem could be a job on xi who execute the Queue.
So that Adapter work the hole time and send the Message to XI Queue which process them not automatically.
And the XI Queue you can trigger with a Job like normal R/3 Jobs.
Hope that helps,
Regards,
Robin -
Service Request disappears from the list of My Service Requests after changing status to In process
Service Request disappears from the list of My Service Requests after changing status to In process
Incident manager (resp.) > Agent DashboardHi,
As far as I know, this is a new feedback, Please vote this customer voice, here is the link:
http://feedback.azure.com/forums/216926-service-bus/suggestions/6062851-batching-in-rest-api, or create a new voice at azure feedback forum:
http://feedback.azure.com/forums/34192--general-feedback
Best Regards,
Jambor
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
In Firefox 2.0+ you can go to Advanced JavaScript Settings and check a box to allow scripts to change status bar text. How do I do this is Firefox 10.0.1?
Two items in the Advanced JavaScript window were removed as of the Firefox 4.0 version, but they are still available thru about:config .
Type '''about:config''' in the URL bar and hit Enter. <br />
''If you see the warning, you can confirm that you want to access that page.''
Filter = '''dom.disable_window_status_change''' = double-click to toggle to '''false''' to allow websites to mess with status text. -
CRM_ORDER_MAINTAIN Changing status.
Hi All,
There are many similar posts on the subject which i have mentioned.I went through many of them but i am not able to close the status.Given below is the code which i have done for changing the status for ombudsman complaint and passing it to the FM CRM_ORDER_MAINTAIN .But it is not working.Pls have a look at the code snippet and suggest me any changes
Status:
REFRESH:lt_fieldname.
CLEAR: wa_status,lt_fieldname[].
CLEAR wa_status-ref_handle.
wa_status-ref_guid = lv_guid_header.
wa_status-ref_kind = 'A'.
wa_status-user_stat_proc = 'ZOMBD'.
wa_status-activate = 'X'.
wa_status-status = 'E0006'. " CLOSED status default
INSERT wa_status INTO TABLE lt_status.
CLEAR wa_fieldname.
wa_fieldname-fieldname = 'ACTIVATE'.
wa_fieldname-changeable = 'X'.
INSERT wa_fieldname INTO TABLE lt_fieldname.
CLEAR wa_inputfields.
wa_inputfields-ref_guid = lv_guid_header.
wa_inputfields-ref_kind = 'A'.
wa_inputfields-objectname = 'STATUS'.
wa_inputfields-logical_key = 'E0006ZOMBD'.
wa_inputfields-field_names] = lt_fieldname[.
INSERT wa_inputfields INTO TABLE lt_inputfields.
Then i passed it to the FM and called CRM_ORDER_SAVE and then commit.
When i tested this code ,i fetched guid and transaction number and passed it to BAPI BAPI_BUSPROCESSND_GETDETAILMUL
In the status iwas expecting 'E0006' but it is showing 'E0001' and also i expected status to 'Closed' but it is showing status as 'Received'.
Pls help
Regards
AryaHi,
in SE37 you will find a lot of function modules starting with CRM_STATUS*
Maybe one of this will help to solve your issue - maybe CRM_STATUS_CHANGE_INTERN.
Good luck.
Kind regards
Manfred -
Change status from active to inactive
Hi Experts,
How can I change status from active to inactive for the InfoCube?
Thank youYou can deactivate a cube by deactivating one of the infoobject in it:
select one of the char in the cube
menu option Extras/Unlock infoobjects
The system will offer you to delete the cube content.
If you agreed, the cube becomes inactive.
Please assign if helpful
Maybe you are looking for
-
QuickTime plug-in for Window Media Files?
Microsoft recently announced that they will stop developing any update or improvement for Window Media Player for the Mac: http://news.yahoo.com/s/ap/20060113/apon_hi_te/microsoftapple It is a little disappointing aspect because sometimes I keep runn
-
Hi, I had a hard drive failure on my old PC and I couldn't retrieve anything. I have purchased a new PC and downloaded itunes (Version I'm not use to which isn't helping) and signed in however it only has my purchased songs on the cloud which I need
-
I installed the update that changed my iPhoto to Photos 1.0, and the new Photos program is not showing all images from Photos Library.photoslibrary file/folder (not sure to call it file or folder since it is actually a folder with all my pics but it
-
"The ActiveX control for flash player could not be registered."
Xp Pro 32 bit, SP3, 3.6.8 (seems to install ok on Mozilla, but I am keeping it off for now, for peace of mind). IE 7.0.5730.11 I have tried quite a few of the things on the first page of this [url]http://forums.adobe.com/thread/662582#2905677[url/]
-
We are on Acrobat 9 and have Adobe PDF printer listed in our printers and drivers. There are many paper sizes missing in Printing preferences / Adobe PDF Page Size. I know that I can click Add and then include A0, A1, A2 & A3 but I would like an ente