API to get Work Item and Attached Information
Dearl all,
Is there any API to get the work items assigned to specific users and their attached information during runtime?
Thanks, Jerome
HI Jerome,
This code will help you: API FM is " 'SO_NEW_DOCUMENT_ATT_SEND_API1'
DATA : w_name TYPE sos04-l_adr_name.
SELECT-OPTIONS :
Recipient address
s_name FOR w_name DEFAULT sy-uname NO INTERVALS.
START-OF-SELECTION.
E-mail Abap report
PERFORM f_send_mail.
Form f_send_mail
FORM f_send_mail.
Data Declaration
DATA:
l_datum(10),
ls_docdata TYPE sodocchgi1,
lt_objpack TYPE TABLE OF sopcklsti1 WITH HEADER LINE,
lt_objhead TYPE TABLE OF solisti1 WITH HEADER LINE,
lt_objtxt TYPE TABLE OF solisti1 WITH HEADER LINE,
lt_objbin TYPE TABLE OF solisti1 WITH HEADER LINE,
lt_reclist TYPE TABLE OF somlreci1 WITH HEADER LINE,
lt_listobject TYPE TABLE OF abaplist WITH HEADER LINE,
l_tab_lines TYPE i,
l_att_type LIKE soodk-objtp.
WRITE sy-datum TO l_datum.
List of Users According to Logon Date and Password Change
NOTE: Create ALI/OTF Document in Spool
MESSAGE ID 'ZWF' TYPE 'I' NUMBER '001'.
SUBMIT ZMM_MIR_RPT_FOR_WORKFLOW VIA SELECTION-SCREEN WITH valid = 'X'
WITH notvalid = space
WITH unlocked = 'X'
WITH locked = space
EXPORTING LIST TO MEMORY AND RETURN.
IF sy-subrc = 0.
ENDIF.
MESSAGE ID 'ZWF' TYPE 'I' NUMBER '000'.
Read list from memory into table
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = lt_listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
Error in function module &1
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
IF sy-subrc = 0.
CALL FUNCTION 'WRITE_LIST'
TABLES
listobject = lt_listobject.
ENDIF.
IF sy-subrc = 0.
endif.
Because listobject is of size RAW(1000)
and objbin is of size CHAR(255) we make this table copy
CALL FUNCTION 'TABLE_COMPRESS'
TABLES
in = lt_listobject
out = lt_objbin
EXCEPTIONS
compress_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
Error in function module &1
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
NOTE: Creation of attachment is finished yet.
For your report, the attachment should be placed into table
objtxt for plain text or
objbin for binary content.
Now create the message and send the document.
Create Message Body
Title and Description
ls_docdata-obj_name = 'Outstanding MIR'.
CONCATENATE 'Outstanding MI-Report sent by' sy-uname l_datum "#EC *
INTO ls_docdata-obj_descr SEPARATED BY space.
Main Text
lt_objtxt = 'Outstanding MIR Report' &
'List of Outstanding Goods Receipts under inspection 103 movement'. "#EC *
APPEND lt_objtxt.
Write Packing List (Main)
DESCRIBE TABLE lt_objtxt LINES l_tab_lines.
READ TABLE lt_objtxt INDEX l_tab_lines.
ls_docdata-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
lt_objpack-transf_bin = 1. " If u want to CLEAR inbox evrytime
lt_objpack-head_start = 1.
lt_objpack-head_num = 0.
lt_objpack-body_start = 1.
lt_objpack-body_num = l_tab_lines.
lt_objpack-doc_type = 'RAW'.
APPEND lt_objpack.
Create Message Attachment
Write Packing List (Attachment)
l_att_type = 'ALI'.
DESCRIBE TABLE lt_objbin LINES l_tab_lines.
READ TABLE lt_objbin INDEX l_tab_lines.
lt_objpack-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( lt_objbin ).
lt_objpack-transf_bin = 'X'.
lt_objpack-head_start = 1.
lt_objpack-head_num = 0.
lt_objpack-body_start = 1.
lt_objpack-body_num = l_tab_lines.
lt_objpack-doc_type = l_att_type.
lt_objpack-obj_name = 'ATTACHMENT'.
lt_objpack-obj_descr = 'Outstanding MIR'. "#EC *
APPEND lt_objpack.
Create receiver list
LOOP AT s_name.
lt_reclist-receiver = s_name-low.
lt_reclist-rec_type = 'B'.
APPEND lt_reclist.
ENDLOOP.
Send Message
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = ls_docdata
put_in_outbox = ''
TABLES
packing_list = lt_objpack
object_header = lt_objhead
contents_bin = lt_objbin
contents_txt = lt_objtxt
receivers = lt_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
IF sy-subrc = 0.
Document sent
MESSAGE ID 'ZWF' TYPE 'S' NUMBER '002'.
ELSE.
Document <&> could not be sent
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH ls_docdata-obj_name.
ENDIF.
ENDFORM.
Thanks and Regards,
Prabhakar Dharmala
Similar Messages
-
To get line item and confirmation details from CRM_ORDER_READ
Hi,
Please can anybody let me know which the field from which i can get line item details and material for the service order given?
I am using CRM_ORDER_READ to retrieve the values. In that i am exporting 4 fields - et_orderadm_h, et_orderadm_i, et_product_i, et_doc_flow. So from where to get line items and material id from these fields?
I will be very thankful if i get the answer of this question.Hi,
The attribute NUMBER_INT of ET_ORDERADM_I contains the Item Number.
Hope this helps!
Regards,
Rohit -
Using a newly created Library document to create a list item and attach itself
I have a workflow that moves a document from one library to another.
When a document is moved to a certain library I want to create a list item with a link to the document in the list item. Keep in mind there could be 10 files submitted to the library, so then in my list I would want 10 new list items created for
each file, with a link to the individual file. or is there a way to attach the document to a newly created list item programmatically?
is this possible?Hi,
According to your post, my understanding is that you wanted to use a newly created Library document to create a list item and attach itself.
I recommend to create a workflow assocaited to the second library, and start the workflow automatically when an item is created.
Then add action as below:
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
BPE crash - Trying to remove work item and SXMB_MONI message that caused it
Hi,
I have a file to IDOC scenario with BPE. We have had a large file that was picked up by XI in error, but the adapter engine did process the XML conversion successfully. This message was sent to the BPE but due to the message size, the BPE crashed. Currently the work flow that caused the crash is in started status in report RSWF_XI_SWPC - continue workflow after system crash. and we have a message in SXMB_MONI for this workflow that is still in status outbound to PE "message being sent". We would like to remove or cancel the workflow and the message in XI. I have searched around for the best way to do this in this situation but have not found anything. We cannot cancel the message in SXMB_MONI due to the status it is currently in. Can we:
1. stop and start BPM to resolve the issue or
2. some how change the status of the workflow to error so the message in SXMB_MONI can be cancelled.
3. Should we just leave the work item and messge as is, because it is not affecting anything else in XI.
Any help would be apprecieated.
thanks.
Jamie
Edited by: Jamie Bullen on Jan 22, 2008 4:04 PMHi,
Thanks for your reply. I'm pretty sure I can delete the work item from SWWL but I don't think the outbound status of the message is SXMB_MONI will change once this is done.
thanks.
Jamie -
One of the user is unable to remove obsolete Tags from new work items and search query
Hi I am new to TFS Administration, User has some obsolete Tags in TFS site which is removed on the Backlogs but user can see those tags when he is creating new work items and while querying the Work Items but he is not able to see any obsolete tags in Backlogs.
TFS version: TFS 2013 SP2
Steps followed:
we queried each tags, we see 0 work items associated with the tags
As per MSDN, we have to remove associated tags which automatically removes the Tags after 3 days
The user is facing the same from past week
Am i missing something? or will the list of Tags be available in new work items and querying WITs? Please help
Thanks in AdvanceHi BE,
I tested this scenario in my TFS 2013 Update 4 Server, and found that Tags will disappear from Tags dropdown list automatically after serverl days, if there’s no any work item associated that Tags.
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. -
How to get work item details programatically ?
Hi All,
I have a list of work items (process instances) and I want to retrieve each item details such as: attachments, notes, id, ...
All the items are filtered and represented as Fuego.Papi.Instance:
Fuego.Papi.Instance[] inst = busProcess.getInstancesByFilter(filter : instFilter);
But the work item details are inherited from Fuego.Lib.ProcessInstance. So, how to get the item details from inst[] ?
Would appreciate any help, may be Dan will have an advise ?
Regards,
KimIf you have instances returned by your filter, you could extract variable information for each instance by doing something like this:
for each inst in getInstancesByFilter(ps, filter : instF) do
// here's how to get the value inside a primitive instance variable
orderAmtObj as Object = getVar(inst, var : "orderAmount")
// here's how to get the value of attributes inside a complex BPM Object instance variable
// - in this case this is an "order" object with two attributes (customerName and amount)
orderObj as Object = (getVar(inst, var : "order"))
xmlObject = Fuego.Xml.XMLObject(createXmlTextFor(DynamicXml, object : orderObj, topLevelTag : "xsi"))
logMessage "The value of the order object's customer name is: " +
selectString(xmlObject, xpath : "customerName")
logMessage "The value of the order object's order amount is: " +
selectNumber(xmlObject, xpath : "amount")
// here's a rather uninspired way to retrieve who the participant is that was assigned the instance
logMessage "The participant assigned to this instance is: " + inst.participantId
endInside the above "for" loop, you could retrieve these predefined variables (this example assumes you use "inst" in your "for" loop):
objRet as Any
objRet = inst.getVar(var : "PREDEFINE_ACTIVITY")
logMessage "Activity name = " + objRet using severity = DEBUGSubstitute "PREDEFINE_ACTIVITY" in the above logic to get this information:
PREDEFINE_PRIORITY (priority)
PREDEFINE_ACTIVITY_DEADLINE (activity.deadline)
PREDEFINE_CREATION_TIME (creation.time)
PREDEFINE_PROCESS_DEADLINE (deadline)
PREDEFINE_DESCRIPTION (description)
PREDEFINE_PROCESS (process)
PREDEFINE_RECEIVED_TIME (receptionTime)
PREDEFINE_PARTICIPANT (participant)
PREDEFINE_COPY (id.copy)
PREDEFINE_STATUS (status)
Similarly, you might want to try to get instance information using the Fuego.Papi.VarDefinition object a try. Never used it, but the logic might be as simple as:
logMessage "who created? = " + inst.getVar(Fuego.Papi.VarDefinition.CREATOR_ID) using severity = DEBUG
logMessage "does it have attachments? = " + inst.getVar(Fuego.Papi.VarDefinition.HAS_ATTACHMENTS) using severity = DEBUG
logMessage "does it have notes? = " + inst.getVar(Fuego.Papi.VarDefinition.hasnotes) using severity = DEBUGDan -
Viewing ALL Open Work Items and Corresponding Approvers in System
Is there a workflow report in ECC that displays ALL open work items in the system at any given time and their approvers that need to take action?
Hi ,
SWIA - You can give a status of the workitem ( Ready , Inprocess ...........), workitem type (dialog....)
in the selection criteria and also the time then you can find all the open workitems.
And also you can check Header table SWWIHEAD it includes all the information related to workflows
but this is a lenghty process need to process object type and need to refer so many attributes.
best way is need to create one report make use of it. -
How to get PO item level attachment
Hi All,
We created "Z" driver program for PO print, in driver program we convert PO into PDF format and attach that PDF with email.
But we have PO ITEM LEVEL ATTACHMENT and for sending email we use standarf FM SO_DOCUMENT_SEND_API1.
Everything working fine,we got mail with both PDF's(PO item level attachment and & PO converted PDF) but when we double click to open PDF which is attached in mail we got error message .
So we decide insted of using standard function module use class to send mail, but challenge is HOW TO DOWNLOAD PO ITEM LEVEL ATTACHEMENT .
Kindly suggest the solution.
-NavinKHi Navin,
check this thread:
it has the exact same question + solution
[Send CV03N attachments present in Purchase order at line item level |Re: Send CV03N attachments present in Purchase order at line item level].
Best regards,
Steven -
Can I just add a state to bug work item and not set the state to the workflow
Hi,
Based on my team, we need to add a state/states to the bug work item, just add the bug state, and let it displayed in the state dropdown list. We don't want to add the state to the workflow. Can I do that?
Thanks,
shmilyHi shmily,
If you add a state for the bug in your work item definition file, you have to define the transition for the state. If not, when you change the state, the backlog page or task board will not display the work item correctly.
Please check the links below for more information about workflow design guidelines and customization for work item type:
http://msdn.microsoft.com/en-us/library/ms194981.aspx
http://msdn.microsoft.com/en-us/library/hh409273.aspx
Best regards,
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. -
How to get Mobile number and other information from SIM card
Hi,
I like to get mobile number,mobile user name and other information from SIM card using j2me program.Is there is any API for this one.
Any one give guidelines to me how to get this.
with regards,
latchiyaPlease use the search! this topic has come up lots of times already.
-
hello all,
I am looking for a FM that return the work Item Id from the work flow Id,
can anyone help me pleae,
thank you allSAP_WAPI_GET_DEPENDENT_WIS , in this FM five the workitem id of the main workflow and you will get the dependent workitems .
other Way
Workitems are based on workflow instance , so you can give the instance of your business object to the WAPI FM and get the existing workitems . See the code below
call function 'SAP_WAPI_WORKITEMS_TO_OBJECT'
exporting
objtype = 'ECM'
objkey = g_objkey
top_level_items = 'X'
selection_status_variant = 0001
tables
worklist = i_worklist[].
Another way would be to access SWWWihead table -
In GP how to get work items in outlook inbox
Hi,
Any one can explain me how to send work items to Outlook Mail. This option is there in ABAP work flow. I need solution in GP.
Please give any sloution.
Thanks,
SunilHi Jonathon,
in our last project, we faced the same problem and resolved it with a standard notification CO:
- we put a notification CO (+ action) in front of the action you mentioned (that one that generates the UWL's workitem and provides the CO for manual processing)
- the notification's addressee will be the current processor, who is also the guy to do the manual processing
- the notification email contains a link to the process' current workitem, which is the action you mentioned (e.g. a webdynpro form or whatever the manual processing is)
The result is, that there will be an automatically sent notification, followed by the normal manual processing. And our client was happy to be able to customize every single email.
See this link for email administration: http://help.sap.com/saphelp_nw04s/helpdata/en/43/f9097d1b607061e10000000a1553f6/frameset.htm
Best regards
Daniel -
How to get the user and groups information from http header
Hi All,
In my current scneario, we are using Siteminder for SSO setup.. And in this process, after authentication and authorization, they are going to append the user information and group information of the user into a HTTP header and it will be sent back to our presentation services.. We have to extract the user information and group information from the http header.
My HTTP header will look like as follows..
SM_USER XYZ
SM_USERDN CN=Firstname\, Lastname\, xyz, OU=GPO-Low Level Security,OU=Domain Users,OU=BU FDT,
SM_USERGROUPS CN=GG-CA-SiteminderAdmins, OU=Global,OU=Domain Groups, DC=com^CN=GG-ServiceDeskAdmin-TCCORPCEFS
And also if anyone explain me the overall working of SSO in detail like how presentation services will make a connection to BI server( I guess using Impersonator User), and also how our BI server will read the URL from presentation services and the over all working flow in our OBIEE..
Thanks a lot....Please use the search! this topic has come up lots of times already.
-
Hi,
I am a newbie with AL BPM, and am trying to use it for a project. We are trying to manage breaks for incoming events. An event could have multiple breaks associated with it and would be assigned to a user to resolve.
One of the key requirements is that the user would see only a single work item per event in the Inbox, but would see the break tasks in the detailed screen associated with it.
Can I use the AL BPM work item/ task mechanism to do this? Is it possible to display work items alone in the inbox, if it has multiple tasks associated with it?
Thanks in advance,
ABHi,
If you'd like each individual person to execute the tasks, you might want to have a Split-N activity (now called "Multiple" in 10g) to create a work item instance for each person and assign it to that specific person using "participant.next" logic (inside the logic for the Split-N, you'd need to assign the specific participant using "next participant" logic to the specific work item instance).
Following the Split-N, you could do the multiple task thing several different ways.
1. Using a screenflow, you could have them accomplish the tasks in one sitting in the various screens that would be associated with the screenflow's flow of tasks. If you go this route, you might want to add "Save" button functionality so they could save their work and return to the screen where the left off when they come back.
2. If the tasks are done in a specific sequence, you could have a series of Interactive activties following the Split-N with different screenflows. If you go this route, be sure to make the predefined variable participant property called "sticky" set to true so the instance stays stuck to the same participant.
3. If the tasks could be done in any order, you could have a Split following the Split-N with each of the branches in the Split going to a different task. You'd want to make sure you've assigned the original participant as the next participant for each of the branches going to Interactive activities coming out of the Split activity.
Hope this helps,
Dan -
Identifying pending work items and sending emails to persons responsible.
Hi Experts ,
Can you please provide the database table where i can get the status of the work item along with the user/person responsible to act on that work item.
Basically the requirement is to send emails to outlook of employees having pending work items in their SAP inbox.
ThanksHi Kokate_Abhishek ,
Using this FM SAP_WAPI_CREATE_WORKLIST, you can get all workitems with status(STATUSTEXT,columname).
May be this will work for you.
Maybe you are looking for
-
How do o get my browsing history to show on the mozilla icon in the taskbar?
I'm not even sure if I'm using the correct terminology, but here's the problem. During a session, if I clicked on the Mozilla Firefox icon on the taskbar (bottom left of my screen), it would show all of the pages I'd been looking at, and I could just
-
Flash Player 11.8 won't install on mac mini why
Flash Player 11.8 won't install on my mac mini, OSX 10.6.4?
-
RE_RHTRANS0 usage for mass language key changes
Hello, Does anyone know if it is possible to use RE_RHTRANS0 for mass language key changes, i.e. to have it as a background job? I tried to execute RHTRANS0 or RHTRANS0_NO_ALV in the background, but the translation record is not getting created. I th
-
after installing lion and updating to pages 4.1 cannot view my document content after I open the document. Shows how many pages I have and how many words in word count, but no words...
-
Indesgin CS 5 PDF Doppelseite erstellen?
Hallo, ich bin noch ein CS5 Laie, also hoffe ich eine einfache Frage zu stellen: Ziel: Ich möchte 2 einzelne PDF zusammenfügen. ABER nicht untereinander (z.B. mit PDF Creator kein Problem), sondern schön nebeneinander. Ich stelle mir das vor wie z.B.