Creation of task via ABAP
Hello Experts,
I am SRM Consultant & working on a requirement related to portal. We have a requirement to create a task (Universal worklist) automatically from ABAP i.e. Customized SRM transaction. Is it possible to achieve this ?? IF so can anyone tell me step by step how can I achieve this ??? Would appreciate if anyone can send me a document or step-by-step way to do this.
Would reward points definitely for helpful answer.
Thanx in advance.
Hi Michael,
Many thanks for the reply. Actually I thought of one alternative as workflow task only but it does not have collboration feature like the task created via Universal worklist.
Basically the requirement is Users and approvers must be able to add multiple trackers / approvers in the task created from ABAP which is not possible when workflow task is created.
Can you suggest something for above reqmt ?
Thanks again,
Rajeshree
Similar Messages
-
Assign resource to task via abap automatically
Hi experts.
I need to assign via abap a resource to a task.
The scenario is the following:
I have a RoleA with 4 resources staffed (Resource1, Resource2, Resource3, Resource4) and 2 tasks assigned (Task1, Task2).
I need to assign for example Resource1 to Task1 via abap knowing:
- Task1 guid
- RoleA guid
- Resource1 business partner guid.
How is it possible?
Is there a function module or a method to do this?
Thanks,
LucaLuca;
I never used this functionality.
This "Resource" tab strip that you mentioned used the Object BUS2177.
I found this BAPI's:
BAPI_BUS2177_CREATE
BAPI_BUS2177_CANDIDATE_ADD
BAPI_BUS2177_STAFFING_ADD (this BAPI may helpyou)
Explore with this, I think that you are closer to solve this thread.
Hope this help you.
Best regards,
Mariano.
PD: Points will be apreciated. -
How to extract data from BPC InfoCube via ABAP program?
Hi experts!!
I tried to extract data from a BPC InfoCube via ABAP program, but I did'n have succeed.
I used the function 'RSDRI_INFOPROV_READ' to extract data from standard InfoCubes such as '0COPC_C07' and it run OK! However, when I change the InfoCube name to '/CPMB/WAIX8NE' (BPC InfoCube), everything goes wrong...
Is there any difference between extracting data from BPC and standard InfoCubes?
Thank you all!Moderator message - Welcome to SCN.
But please do not cross and duplicate post.
Thread locked.
Rob -
Push data from BW 3.5 to XI 3.0 via ABAP proxy
Hi,
I have the following scenario: I´m in BW 3.5 trying to send data to XI 3.0 via ABAP proxy. I´ve already found a "How-to" to do build this scenario, but something does not work. I think that problem is when a try do the logon from BW to XI because I got the message "logon data not provided" on http service in XI. I´ve already configure an RFC Destination(SM59) as R/3 connection(type 3) and another as HTTP connection to R/3(type H) and both are correct. Someone knows where I configure the user/pass to logon from BW Intergration Server to XI Integration Server?
Regards,
Rafael SoaresHello fellows!
I discovered that my problem was configuration on SXMB_ADM transaction.
Thank you very much for your help!
Best regards.
Rafael -
Delete Overlapping Requests - by Filename via ABAP Routine
Hi SDN Community
Do you know if it is possible to set the delete overlapping request parameters to recoginse the file name, and remove it via the derivation of the file name via an ABAP Routine.
I am using an ABAP routine to derive the flat flat file upon loading, but do not know the syntax, or if it is possible to set this equivalent code into the delete overlapping request Routine area
(The code basically derives the first day of the calendar week, for previous weeks in the Do n times Loop
Thank you.
Simon
DATA: ld_CWEEK TYPE scal-week,
ld_DATE TYPE SY-DATUM,
ld_DATE1 TYPE SY-DATUM,
lc_DIRECTORY(30) TYPE c,
ln_YYYY(4) TYPE n,
ln_WW(2) TYPE n.
*Derive week from sy-datum
ld_date = SY-DATUM.
Determine the calendar week from the entered calendar date
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = ld_date
IMPORTING
week = ld_cweek
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
Get the First day of the week
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = ld_CWEEK
IMPORTING
date = ld_DATE1
EXCEPTIONS
week_invalid = 1
OTHERS = 2.
Need to find the previous calendar week and reconvert to the first
day in order to accomodate weeks less than 7 days
Get the last day of the current calendar week - 2
DO 2 TIMES.
ld_DATE1 = ld_DATE1 - 1.
Determine the calendar week from the last day of the previous week
CALL FUNCTION 'DATE_GET_WEEK'
EXPORTING
date = ld_DATE1
IMPORTING
week = ld_CWEEK
EXCEPTIONS
date_invalid = 1
OTHERS = 2.
Get the First day of the week
CALL FUNCTION 'WEEK_GET_FIRST_DAY'
EXPORTING
week = ld_CWEEK
IMPORTING
date = ld_DATE1
EXCEPTIONS
week_invalid = 1
OTHERS = 2.
ENDDO.
*ln_YYYY = ld_CWEEK(4).
ln_YYYY = ld_DATE1(4).
ln_WW = ld_CWEEK+4(2).
*DIRECTORY represnts path where file is stored .
lc_DIRECTORY = '/interfaces/EDW/data/CSM/'.
CONCATENATE lc_DIRECTORY
ld_date '_WEEK' ln_WW '_c1_pri_' ln_YYYY '.csv' into p_filename.
'MIC_NT_' ld_date1 '_' ln_YYYY '.csv' into p_filename.Thank you for your response Debanshu
However, i could not find this process type in the process chain area.
Is this where you meant, can you please give me more detailed steps including long syntax of names of process types
We are on BW 3.50
i assumed the filename had to be constructed via abap according to some of the sdn replies i've searched through.
Thank you.
Simon -
Problem with complete task via email
Hello,
I have problem with complete task via email. I found this blog very useful (http://blogs.adobe.com/ADEP/2010/11/how-to-complete-a-task-via-email-using-reply-to-comple te.html), but...
I set up everything as it’s written in blog mentioned above. When a task is assigned to me, I received an email notification with actions (accept, deny). After that I replied with action “accept”. Then I received email with subject “Errors from LiveCycle ES”:
LiveCycle ES has tried to process your request and encountered the following error:
com.adobe.pof.POFRuntimeException: Transaction is not active: tx=TransactionImple ; – nested throwable: (javax.resource.ResourceException: Transaction is not active: tx=TransactionImple )
This response to your original email
Subject:RE:Task Assignment – Process: Test/Email_Test. Task 76 has been assigned to you.
Date Sent:Thursday, October 24, 2011 1:17 PM
Body:accept
DO-NOT-DELETE: MTMhMzE0ITMyOA==!
Attachments:
In log appeared this following error:
Caused by: ALC-DSC-215-000: com.adobe.idp.dsc.DSCRuntimeException: None of the Auth Provider could authenticate the user. Authentication Failed
at com.adobe.livecycle.notification.TaskNotificationServiceImpl.processEmailComplete(TaskNot ificationServiceImpl.java:1157)
Can you me please? I have no idea what to do to succesfully complete task via email endpoint. Thanks
Jan PetrlaHi Diana, thanks for your reply.
You're probably right about 2 different error messages.
To the 1st one: I'm sure that status task is Assigned (to me). I received an email and I also reply on that email.
To error log: I found out that error log appears when I enable email endpoint on Complete Task service. But I managed to solve this problem. I set wrong user. Now I have here the same user as is written in login-config.xml so log seems to be ok.
So I created new task and tried to complete it via email. Now I receive email with another error:
LiveCycle ES has tried to process your request and encountered the following error:
com.adobe.idp.dsc.provider.service.email.impl.EmailProviderException: Error getting user context
This response to your original email
Subject:RE:Task Assignment - Process: WorkFlowClient/Test. Task 92 has been assigned to you.
Date Sent:Thursday, October 27, 2011 3:05 PM
Body:Complete
DO-NOT-DELETE: MTIxMSExNjAzITIwMTE=!
Attachments:
And to the last point: email endpoint is set up with TestPOP3@mydomain and user receiving email has jpetrla@mydomain. I use Lotus Notes as email client, I tried another account with gmail, but the result was same.
Now I really don't know to do...
Jan -
Sales order creation using webdynpro in ABAP
Plz give the process how to create sales order creation using webdynpro in ABAP. if not possible plz let me know how to create in JAVA.
It is very urgent. I hope i will get it very soon.
Thanks all
SaiIn your WDA application, all you need to do is call the BAPI BAPI_SALESORDER_CREATEFROMDAT2 when the user clicks some button. Most likely, you can put the code for this BAPI call in the onAction method for your button.
Regards,
Rich Heilman -
How to assign an output type to a document via ABAP
Hello Guru's
I have an interface with a 3rd party system to send information from deliveries. When a delivery is created, we trigger output with 'Post goods issue' and output triggers the interface.
We need to also trigger output with 'reverse goods issue' and here is the problem. When GI is cancelled I don't know how to trigger the interface having the control from Sales not from MM.
I'm thinking to use the same approach assigning an output to the delivery in a user-exit of GI cancellation process. But I don't know how to assign this output to a delivery document using ABAP. I have looked for BAPI's or Functions but no successful.
- Do you know how to assign outputs to documents via ABAP?
- Do you have any other idea to trigger the interface when GI is cancelled?
Thank you in advance,
ManuelHi,
Guess u need to maintain it in SPAD transaction.
Cheers
VJ -
Hello Experts,
I want to send mail via ABAP program with the following requirements :
1. Recipient is OUTLOOK email -id
2. Sender address has to be an external email-id
3. Send mail as CC and BCC also to other email-id.
Is there any function module which can satisfy all the above requirements.
Regards,
Mansi.hi,
this code will definately help you just go through it:
firstly exported the data to memory using the FM LIST_FROM_MEMORY.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = t_listobject
EXCEPTIONS
not_found = 1
OTHERS = 2.
IF sy-subrc 0.
MESSAGE e000(su) WITH text-001.
ENDIF.
then i converted it into ASCII using LIST_TO_ASCI,
CALL FUNCTION 'LIST_TO_ASCI'
TABLES
listasci = t_xlstab
listobject = t_listobject
EXCEPTIONS
empty_list = 1
list_index_invalid = 2
OTHERS = 3.
IF sy-subrc NE 0.
MESSAGE e003(yuksdbfzs).
ENDIF.
This gives the data in ASCII format separated by '|' and the header has '-', dashes. If you use this internal table directly without any proccesing in SO_NEW_DOCUMENT_ATT_SEND_API1, then you will not get a good excel sheet attachment. To overcome this limitation, i used cl_abap_char_utilities=>newline and cl_abap_char_utilities=>horizontal_tab to add horizontal and vertical tabs to the internal table, replacing all occurences of '|' with
cl_abap_char_utilities=>horizontal_tab.
Set the doc_type as 'XLS', create the body and header using the packing_list and pass the data to be downloaded to SO_NEW_DOCUMENT_ATT_SEND_API1 as contents_bin.
This will create an excel attachment.
Sample code for formatting the data for the attachment in excel format.
u2022 Format the data for excel file download
LOOP AT t_xlstab INTO wa_xlstab .
DESCRIBE TABLE t_xlstab LINES lw_cnt.
CLEAR lw_sytabix.
lw_sytabix = sy-tabix.
u2022 If not new line then replace '|' by tabs
IF NOT wa_xlstab EQ cl_abap_char_utilities=>newline.
REPLACE ALL OCCURRENCES OF '|' IN wa_xlstab
WITH cl_abap_char_utilities=>horizontal_tab.
MODIFY t_xlstab FROM wa_xlstab .
CLEAR wa_xlstab.
wa_xlstab = cl_abap_char_utilities=>newline.
IF lw_cnt NE 0 .
lw_sytabix = lw_sytabix + 1.
u2022 Insert new line for the excel data
INSERT wa_xlstab INTO t_xlstab INDEX lw_sytabix.
lw_cnt = lw_cnt - 1.
ENDIF.
CLEAR wa_xlstab.
ENDIF.
ENDLOOP.
Sample code for creating attachment and sending mail:
FORM send_mail .
u2022 Define the attachment format
lw_doc_type = 'XLS'.
u2022 Create the document which is to be sent
lwa_doc_chng-obj_name = 'List'.
lwa_doc_chng-obj_descr = w_subject. "Subject
lwa_doc_chng-obj_langu = sy-langu.
u2022 Fill the document data and get size of message
LOOP AT t_message.
lt_objtxt = t_message-line.
APPEND lt_objtxt.
ENDLOOP.
DESCRIBE TABLE lt_objtxt LINES lw_tab_lines.
IF lw_tab_lines GT 0.
READ TABLE lt_objtxt INDEX lw_tab_lines.
lwa_doc_chng-doc_size = ( lw_tab_lines - 1 ) * 255 + STRLEN( lt_objtxt ).
lwa_doc_chng-obj_langu = sy-langu.
lwa_doc_chng-sensitivty = 'F'.
ELSE.
lwa_doc_chng-doc_size = 0.
ENDIF.
u2022 Fill Packing List For the body of e-mail
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = 'RAW'.
APPEND lt_packing_list.
u2022 Create the attachment (the list itself)
DESCRIBE TABLE t_xlstab LINES lw_tab_lines.
u2022 Fill the fields of the packing_list for creating the attachment:
lt_packing_list-transf_bin = 'X'.
lt_packing_list-head_start = 1.
lt_packing_list-head_num = 0.
lt_packing_list-body_start = 1.
lt_packing_list-body_num = lw_tab_lines.
lt_packing_list-doc_type = lw_doc_type.
lt_packing_list-obj_name = 'Attach'.
lt_packing_list-obj_descr = w_docdesc.
lt_packing_list-doc_size = lw_tab_lines * 255.
APPEND lt_packing_list.
u2022 Fill the mail recipient list
lt_reclist-rec_type = 'U'.
LOOP AT t_recipient_list.
lt_reclist-receiver = t_recipient_list-address.
APPEND lt_reclist.
ENDLOOP.
u2022 Finally send E-Mail
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = lwa_doc_chng
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
sent_to_all = lw_sent_to_all
TABLES
packing_list = lt_packing_list
object_header = lt_objhead
contents_bin = t_xlstab
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.
Hope it will help you
regards
Rahul sharma -
How to get the file on the content server via ABAP
Hi
We are working on an abap that should download certain files stored on the content server and store them on a different file location using GUI_DOWNLOAD. How can we retrieve the files (PDF's) via ABAP from the contentserver?
Hope someone can help
CheersHi,
I think the DMS BAPIs could be useful here. For example you can use BAPI Document_CheckOutViewX or Document.CheckOutView2. You will find the documentation for these BAPIs in transaction BAPI under subtopic 'Cross-Application-Components'.
Further maybe the information in the SAP note 504692 and 796709 could be useful too.
Best regards,
Christoph -
Problem sending xls file in an attachment via ABAP proxy
Hello,
I have in tmp directory a xls file, I tranfer such file to a table, and afterwards I send in an attachment via ABAP proxy, here is the code:
l_attachment TYPE REF TO if_ai_attachment,
lt_attach TYPE prx_attach,
l_name TYPE string,
lx_string TYPE xstring,
l_string TYPE string,
l_type TYPE string,
des TYPE string.
CLASS cl_ai_factory DEFINITION LOAD.
DATA: BEGIN OF itab OCCURS 0,
raw(255) TYPE x,
END OF itab.
DATA: l_controller TYPE REF TO if_ai_posting_controller.
DATA: it TYPE zhcm_mt_segur_out.
CREATE OBJECT prxy.
OPEN DATASET orig FOR INPUT IN binary MODE.
READ DATASET orig INTO itab-raw.
WHILE sy-subrc = 0.
APPEND itab.
READ DATASET orig INTO itab-raw.
ENDWHILE.
CLOSE DATASET orig.
LOOP AT itab.
CONCATENATE lx_string itab-raw INTO lx_string in byte mode.
ENDLOOP.
L_NAME = 'Segur.xls'.
L_TYPE = CL_AI_ATTACHMENT=>IF_AI_ATTACHMENT~C_MIMETYPE_EXCEL.
TRY.
L_ATTACHMENT =
CL_AI_FACTORY=>CREATE_ATTACHMENT_FROM_binary(
P_DATA = LX_STRING
P_TYPE = L_TYPE
P_NAME = L_NAME ).
APPEND L_ATTACHMENT TO LT_ATTACH.
L_CONTROLLER = CL_AI_FACTORY=>CREATE_CONTROLLER( ).
L_CONTROLLER->SET_ATTACHMENTS( LT_ATTACH ).
CALL METHOD PRXY->EXECUTE_ASYNCHRONOUS
EXPORTING
CONTROLLER = L_CONTROLLER
OUTPUT = IT.
COMMIT WORK.
CATCH CX_AI_SYSTEM_FAULT .
DATA FAULT TYPE REF TO CX_AI_SYSTEM_FAULT .
CREATE OBJECT FAULT.
WRITE :/ FAULT->ERRORTEXT.
ENDTRY.
I am using a Mail receiver channel, I receive a mail, with to attachments, one .xml and the other one .bin, I save it to my computer and I change the extension to .xls and when I try to open it, the file is not valid and can be opened after being repaired. What Im doing wrong? I would like to receive a valid xls file, what i should change?
Thanks a lot,
LuisHi,
yes I know, I have used the MessageTransformBean module, and the PayloadSwapBean module. But which parameter I should use for leaving only one attachement in the e-mail. I did this configuration:
1
localejbs/AF_Modules/MessageTransformBean
Local Enterprise Bean
<b>trans</b>
2
localejbs/AF_Modules/PayloadSwapBean
Local Enterprise Bean
<b>swap</b>
3
localejbs/AF_Modules/MessageTransformBean
Local Enterprise Bean
<b>trans1</b>
4
localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
Local Enterprise Bean
mail
<i><b>Module configuration</b></i>
trans
Transform.ContentDisposition
inline
swap
swap.keyName
payload-name
swap
swap.keyValue
Segur
trans1
Transform.ContentDescription
Segur
trans1
Transform.ContentDisposition
attachment;filename="Segur.xls"
trans1
Transform.ContentType
application/vnd.ms-excel;name="Segur.xls"
In the e-mail I get one attachement without name .xml and another one Segur.xsl, and I want only one attachment, the last one. What I should change in my configuration??
Best regards,
Luis -
How to create a dynamic file via ABAP
Hi all,
We have a requirement of storing all internal table data into a temporary file in application server and later the same file will be passed as an input to shell script to meet our business requirement. Here I'm not sure how can we create a temporary file at run time through abap . I'm sure this is certainly possible via Java, Can any one suggest me how temporary file will be create via abap. Also please note that developer shouldn't give this file name any where from selection screen and system itself should create a file with certain name.
Please advise.
ThanksHope this helps: [Working with files |http://wiki.sdn.sap.com/wiki/display/ABAP/Workingwithfiles#Workingwithfiles-Workingwithfilesontheapplicationserver] you need to use open dataset stmt to create files in app server..
if you check the open dataset stmt in any examples in net, you will find the file name which is of type string... to generate a dynamic file name all you need to do is to build the file name dynamically say by using concatenate statements..
concatenate 'PROGNAME' sy-datum sy-uzeit into <filename>.
open dataset <filename> for input . -
Create Directory via ABAP on Application Server
Hej folks,
does anybody know how to create a directory on the ApplServer via ABAP?
Thanks in advance!
borisYou can create an external command via SM69 which you can then invoke through function module SXPG_COMMAND_EXECUTE
For NT you'd need something like the following:
Operating system command
cmd
Parameters for operating system command
/c mkdir
$/SAPGLOBALHOST/\?
Have fun,
Mark
Kudos to Pete Devereux and Pete White -
Direct Link to Next Task via Email
I would like to send a direct link to the next process task via e-mail. In this scenario a user would receive notification to complete a task assigned to them and be able to access that task directly from a link in the mail.
I am currently able to send out notifications and provide test links in that notification. What I do not yet know is how to link directly to the next task.
Is there a WebDynpro app provided by GP where you can pass a process task id as a parameter and link directly to that task in runtime? If so how do I retrieve the task id of the next task from the process?
Best RegardsHi,
Before the process step for which you want to send the notification to the user add another process step using the pre-defined callable object Send Notification. You need to assign a mail template to that CO. So create a mail template with a standard message body and include the following as a replacement for the next task URL :
`
writeln(sy.workitemurl);
`
Assign the send mail to the same processor of the next action and when the user gets the mail the URL of the next task will be present in the mail message. Clicking that he/she can directly open the next task in portal.
Thanks,
Dipankar -
How to access UWL tasks from ABAP ?
Hello workflow experts!
We are using UWL adhoc workflows (java workflow) in connection with Portal collaboration rooms. The system creates the tasks in the java workflow with relation to the collaboration room - so far so good.
Now I would need to read adhoc tasks (or workflows) from ABAP. I have not found any API yet. Does someone know how to get Java workflow tasks from ABAP ?
Thank you in advance!
JohannesHi Johannes ,Please see if this information helps.
WebFlow offers the open interface called Wf-XML.The Wf-XML interface is based on XML and allows workflows from different vendors to communicate with each other.Wf-XML is the only open interface for supporting interoperability of business processes.
Wf-XML comes from the Workflow Management Coalition, an independent body of workflow vendors.
The Actional control broker integrates directly into SAP WebFlow enabling proxy objects to be called directly from the workflow step. When called, the proxy method will make a call to the outside system either as a background task or as a dialogue step.
These proxy objects are generated in the SAP system using a converter which converts the objects interface to the SAP syntax.
A detailed description of the interface is available on the WfMCs web site at www.wfmc.org.
Edited by: Umakanth R on Dec 9, 2008 12:49 PM
Maybe you are looking for
-
I have just purchased Adobe PDF Now and concerned it will not work on my Mac
Does ADOBE PDF Now work on a Mac
-
Hi, I think I might have a defective clickpad and wanted some opinions to see if people agree. Just got the computer about 4 days ago. The clickpad never registers a click if I use the area of the clickpad that's actually marked for that purpose.
-
Is there any way to manage multiple CC memberships from a single account?
Is there any way for all our CC accounts to be managed by a single account, to manage things such as billing, etc? It would save my company time and confusion when we have to do things such as set up a new credit card number (which we would have to d
-
MOPatch error OUI-67074 on Solaris
I'm new to Oracle so bear with me. I'm trying to patch 11.2.0.3 with the latest Oracle patch bundle from SAP (SBP_112032_201207). I'm using the latest version of OPatch from Oracle and the latest MOPatch from SAP. So I run the mopatch command and it
-
Selective Color control in Photoshop Elements?
I am considering a purchase of Photoshop Elements for Mac. I am familiar with Photoshop 5.5 and I often use the Selective Color feature found in the Image menu (Image:Adjust:Selective Color...) Is there a similar feature in Photoshop Elements?