Maint. Order as Attachment in workflow decision step!!!!
Hi All,
I am making a workflow in which i want to attach the Maintenance Order in the Decision Step , is it possible or not.
How can i do attachment in Send Mail Step is there any provision.
Basically my requirement is like:-
When the User create the Maintenance Order a workflow should trigger which will go the SAP Inbox of the recipient now he has to see the maint. Order created and should approve if it can be Released or not .
When he does the approval the application should go for the another approval and when he approves the application is sent back to the workflow initiator.
Please suggest me what is the best way to do this scenerio. As i m very new to workflow so have only basic knowledge
Please help me out!!!!!
Thanks
Hi Rachit,
Have a look at std WF like WS20000014, WS20000021 etc..
It will give idea about maintenace order processing
Regarding your question about attaching objet to User decision, yes, its possible. Just Bind the Maintenance Order Object related container element to AdhocObjects elemnet of user decision.
Your overall process can be there will be 2 user decision steps.
Once these two steps approve, then you can use a third step with background task which will actually release the maintenace order. e.g. For this step you can use BAPI.
Hope this helps.
Regds,
Akshay
Similar Messages
-
How To Send Invoice List as attachment in User Decision Step?
HI All,
I have developed a workflow in which there is one ZMETHOD in which i will get the list of invoices.and that i want to send it as attachment to User Decision Step.
How to do this?
Regards,
ArpitaIf your users will have access to MIR4, why not just bind the business object BUS2081 as an adhoc object into your decision step? That would solve everything pretty nicely, I think.
Regards,
Sue -
Adobe form as attachment to user decision step
Hi,
i need to add adobe form as attachement to user decision step in workflow.
1. i created activity step which call business object method with parameters workitem id
i am using FM SAP_WAPI_ATTACHMENT_ADD’ which will return attribute id
i am passing that attribute with document id to 'ZSOFM'
ZSOFM <-----------------------------------ZSOFM (Method to task)
Bindings 'Attach_objects' <------------- ZSOFM(Task to Workflow).
2. i created user decision step
Bindings 'Attach_objects' --------------------> 'Attach_Objects'( Workflow to user decision task).
but when we execute first activity step in background i am not getting any PDF output .but when we execute same method from class i can see pdf data is coming is it due to user name WF-Batch.
when i execute activity step in back ground which will have sy-uname as WF-Batch i am not getting any PDF output data.
please help how to solve .
Thanks,
PhaniIn transaction SWO1 create a z-object lets say zmyobjpdf (you might want to use it as a sub object of your standard object without delegation since they will probably have the same key).
create a method in that object calling the adobe form.
set it as the default method in the object header.
now create an instance of the zmyobjpdf in the workflow for example as an attribute of the original object) and transfer it to the decision task.
It will be displayed as an attached object pressing it will call the default method - your adobe form.
If your question was about how to create a function module to display the form see SAP Library - PDF-Based Forms -
Smart form attachment in User decision step
Hi,
i have a requirement to display Smart form in user decision step along with Approce and reject buttons.
Please guide how to attach a smart form in workflow.
Thanks.
Edited by: Sanjay_lnt on Jul 10, 2010 8:13 PMHere are some codelines may help you.
CALL FUNCTION 'SO_FOLDER_ROOT_ID_GET'
EXPORTING
region = 'B'
IMPORTING
folder_id = lv_folder
EXCEPTIONS
communication_failure = 1
owner_not_exist = 2
system_failure = 3
x_error = 4
OTHERS = 5.
lv_object-objla = 'EN'.
lv_object-objnam = 'MESSAGE'.
lv_object-objdes = p_name.
lv_object-file_ext = 'PDF'.
CALL FUNCTION 'SO_DOCUMENT_INSERT'
EXPORTING
parent_id = lv_folder
object_hd_change = lv_object
document_type = 'EXT'
IMPORTING
document_id = lv_doc
TABLES
objcont_bin = it_objcont_bin " Your binary file data
EXCEPTIONS
active_user_not_exist = 1
dl_name_exist = 2
folder_not_exist = 3
folder_no_authorization = 4
object_type_not_exist = 5
operation_no_authorization = 6
owner_not_exist = 7
parameter_error = 8
substitute_not_active = 9
substitute_not_defined = 10
x_error = 11
OTHERS = 12 .
Now pass the folder details to AttachObjects of BO type SOFM
Edited by: Saurabh Thalpati on Jul 14, 2010 12:20 PM -
Hi,
I have a decision step. When the user executes it a workflow log and a create attachment buttons appear on the top. Is there a way to suppress these buttons?
Thanks,
ScottHi Janos,
Thank You for your quick response.
I am able to see the link attachment in the Objects and Attachments section but when i click it on the link the invoice image it should get open in SAP Document Viewer it's not opening just doing nothing .
"ArchiveLink Image in workflow screen doesn't work , the image does not open. No error message at all ,just doing nothing when clicking on that link"
But when logged into SAP Portal the same link is opening and able to see the image in SAP document viewer. But from SAP GUI it's not working. -
Can a spool file be sent as an attachment in the decision step?
Hi,
I have z program that runs in background and produces a spool file. Normally, I can use tcode SP01 to display this file. At the end of this z program, I call SWW_WI_START_SIMPLE to send a workflow into SAP inbox. I want to know if I somhow can send the spool file along also? I read about attachment and SOFM object but still can't figure out what I need to do yet. Please help.
Thank you,
THHi Th,
Check this code if helpful.
FORM pdf_conversion.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = spoolno
no_dialog = ' '
IMPORTING
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
btc_jobname = jobname
btc_jobcount = jobcount
TABLES
pdf = pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11.
ENDFORM. " PDF_CONVERSION
FORM SPOOL *
FORM spool.
PERFORM display.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LOCL'
immediately = ' '
new_list_id = 'X'
expiration = '9'
in_parameters = p_pripar
layout = 'X_65_132'
line_count = 65
line_size = 132
mode = 'DEFVALS'
no_dialog = 'X'
IMPORTING
out_parameters = p_pripar
valid = val
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
NEW-PAGE PRINT ON NEW-SECTION PARAMETERS p_pripar NO DIALOG.
PERFORM display.
NEW-PAGE PRINT OFF.
CLEAR t_filename_tx.
CONCATENATE 'c:\temp\' p_mat '.pdf' INTO t_filename_tx.
CONDENSE t_filename_tx.
SELECT * FROM tsp01 INTO TABLE t_tsp01
WHERE rqowner EQ sy-uname.
SORT t_tsp01 BY rqcretime DESCENDING.
LOOP AT t_tsp01.
spoolno = t_tsp01-rqident.
EXIT.
ENDLOOP.
IF sy-subrc EQ 0.
PERFORM pdf_conversion.
ENDIF.
sending that inernal to mail
FUNCTION z_p_traveler_workflow.
""Local interface:
*" IMPORTING
*" REFERENCE(V_FILE_PATH) LIKE RLGRAP-FILENAME
*" REFERENCE(DOKNR) LIKE CRVD_A-DOKNR
*" REFERENCE(DOKVR) LIKE CRVD_A-DOKVR
*" TABLES
*" PDF STRUCTURE TLINE
D A T A
DATA: w_gd_doc_data LIKE sodocchgi1.
internal table for body content of the email
DATA: t_message LIKE solisti1 OCCURS 0 WITH HEADER LINE.
internal table for receivers of email
DATA: t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
internal table for attachment data
DATA: t_objbin LIKE solisti1 OCCURS 0 WITH HEADER LINE.
*internal table for Information about structure of data tables
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
internal tables for attachment data
DATA: t_xi_pdf LIKE tline OCCURS 0 WITH HEADER LINE,
t_xi_temp LIKE bapiqcmime OCCURS 0 WITH HEADER LINE,
t_xi_mime(255) TYPE c OCCURS 0 WITH HEADER LINE,
t_html LIKE solisti1 OCCURS 0 WITH HEADER LINE.
for splitting of the filepath
DATA : BEGIN OF t_split OCCURS 0,
row(50),
END OF t_split.
DATA: w_tab_lines LIKE sy-tabix,
w_subject TYPE so_obj_des, " for email header
w_file_path1 TYPE string. "file path
DATA : w_lines TYPE i,
w_temp(500) TYPE c,
w_offset TYPE p,
w_lineslen(2) TYPE p,
w_mimelen(2) TYPE p,
w_tabix LIKE sy-tabix.
DATA : w_len TYPE i,
w_index LIKE sy-index,
w_doc_type TYPE so_obj_tp,
w_filename TYPE so_obj_des .
internal table for gettting personal numbers of quality engineers
DATA: BEGIN OF t_ztptwf2 OCCURS 0,
pernr LIKE ztptwf2-pernr, "personal number
END OF t_ztptwf2.
internal table for gettting userids of quality engineers
DATA: BEGIN OF t_pa0105 OCCURS 0,
usrid LIKE pa0105-usrid, " user id of the quality engineer
END OF t_pa0105.
move file path to w_file_path
w_file_path1 = v_file_path.
*assign subject of the email
w_subject = text-006. "Travaler Document to Approve
refreshing the internal tables
REFRESH : t_objbin, t_packing_list, t_split.
CLEAR : t_objbin, t_packing_list, t_split.
CLEAR : t_xi_pdf, t_xi_temp.
REFRESH : t_xi_pdf, t_xi_temp.
CLEAR: w_temp, w_offset, t_xi_temp.
move attachment data to t_xi_pdf[].
t_xi_pdf[] = pdf[].
Reformat the line to 255 characters wide
DESCRIBE TABLE t_xi_pdf LINES w_lines.
DESCRIBE FIELD t_xi_pdf LENGTH w_lineslen.
DESCRIBE FIELD t_xi_temp LENGTH w_mimelen.
LOOP AT t_xi_pdf.
w_tabix = sy-tabix.
MOVE t_xi_pdf TO w_temp+w_offset.
IF w_tabix = w_lines.
w_lineslen = strlen( t_xi_pdf ).
ENDIF.
w_offset = w_offset + w_lineslen.
IF w_offset GE w_mimelen.
CLEAR t_xi_temp.
t_xi_temp = w_temp(w_mimelen).
APPEND t_xi_temp.
SHIFT w_temp BY w_mimelen PLACES.
w_offset = w_offset - w_mimelen.
ENDIF.
IF w_tabix = w_lines.
IF w_offset GT 0.
CLEAR t_xi_temp.
t_xi_temp = w_temp(w_offset).
APPEND t_xi_temp.
ENDIF.
ENDIF.
ENDLOOP.
*move data from t_xi_temp to t_xi_mime
LOOP AT t_xi_temp.
t_xi_mime(255) = t_xi_temp-line.
APPEND t_xi_mime.
CLEAR t_xi_mime.
ENDLOOP.
*move data from t_xi_mime[] to t_html[]
t_html[] = t_xi_mime[].
*move data from t_html[] to t_objbin.
LOOP AT t_html.
t_objbin-line = t_html-line.
APPEND t_objbin.
CLEAR t_objbin.
ENDLOOP.
*fill the body of email
t_message = text-005. "Mail with PDF attachment
APPEND t_message.
CLEAR t_message.
t_message = text-004. "Please double click the attachment to verify
APPEND t_message.
CLEAR t_message.
concatenate 'COPY FOR VIEWING ONLY-NOT TO BE'
'USED/PRINTED FOR PRODUCTION' into t_message separated by
space.
APPEND t_message.
CLEAR t_message.
IF NOT doknr IS INITIAL.
CONCATENATE text-001 "The Document
doknr
text-002 "and Version
dokvr
text-003 INTO "is changed
t_message SEPARATED BY space.
APPEND t_message.
CLEAR t_message.
ENDIF.
DESCRIBE TABLE t_message LINES w_tab_lines.
READ TABLE t_message INDEX w_tab_lines.
w_gd_doc_data-doc_size = ( w_tab_lines - 1 ) *
255 + STRLEN( t_message ).
w_gd_doc_data-obj_langu = sy-langu.
w_gd_doc_data-obj_name = 'SENDFILE'.
w_gd_doc_data-obj_descr = w_subject.
w_gd_doc_data-sensitivty = 'O'.
CLEAR t_packing_list.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
t_packing_list-doc_type = 'RAW'.
t_packing_list-body_num = w_tab_lines.
APPEND t_packing_list.
IF NOT w_file_path1 IS INITIAL.
w_len = strlen( w_file_path1 ) - 3.
w_doc_type = w_file_path1+w_len(3) .
TRANSLATE w_doc_type TO UPPER CASE .
SPLIT w_file_path1 AT '\' INTO TABLE t_split .
DESCRIBE TABLE t_split LINES w_index .
READ TABLE t_split INDEX w_index .
w_filename = t_split-row .
w_len = strlen( w_filename ) - 4.
w_filename = w_filename(w_len) .
DESCRIBE TABLE t_objbin LINES w_tab_lines.
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
t_packing_list-doc_type = w_doc_type.
t_packing_list-body_num = w_tab_lines.
t_packing_list-doc_size = w_tab_lines * 255.
t_packing_list-obj_descr = w_filename.
APPEND t_packing_list.
ENDIF.
fill the Receivers
SELECT * FROM ztptwf2 INTO TABLE t_ztptwf2.
IF NOT t_ztptwf2[] IS INITIAL.
SELECT usrid FROM pa0105 INTO TABLE t_pa0105 FOR ALL ENTRIES IN
t_ztptwf2 WHERE pernr = t_ztptwf2-pernr AND subty = '0001' .
LOOP AT t_pa0105.
t_receivers-receiver = t_pa0105-usrid.
t_receivers-rec_type = 'B'.
APPEND t_receivers .
CLEAR t_receivers.
ENDLOOP.
ENDIF.
IF NOT t_receivers[] IS INITIAL.
Call the FM to post the message to SAPMAIL
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = w_gd_doc_data
commit_work = 'X'
TABLES
packing_list = t_packing_list
contents_txt = t_message
contents_bin = t_objbin
receivers = t_receivers
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.
ENDIF.
FREE: t_objbin,t_message,t_packing_list,t_receivers.
i hope this code will solve your problem.
Sankar -
Why cant I bebug BO Method from Workflow decision step
I have been trying for a while to find a solution. I have activated BO Debugging. I have set BO method as advance with dialog. all my efforts in vein. I could debug directly from SW01 but not from SBWP.
Is there any trick to debug a BO method. I have a task to execute a custom BO method "approve" after user decides to approve workitem. I am sure this method is getting executed but but not stopping there because I have put a error message which is being displayed.
your earliest response is much appreciated.
Regards
KasiMurthy,
You have little wrong perception about your workflow logic (As I understood from your description, may be I have not understood it proper).
You said that you put the break point on your BO method.
well user decision is always based on BO DECISION method PROCESS (unless you have created your own screen), Now you might have different buttons on your user decision (say approve/reject/cancel and keep etc), so if you wish to debug this (BO decision method Process) you can,
but the task which got executed once you click on this buttons might be bacground task (based on your BO's method) and you can not debug the background task. Ofcourse there are several indirect ways to debug this, pls search forum for that.
Hope it will help.
Cheers
Jai -
Dear experts,
I have a user decision step. Before the approver can approve or reject the workitem i need to show a tocde screen to him. Say for example CN25. My workitem will be generated only after initiator makes changes in that tcode. I want approver who gets the workitem to see CN25 tcode screen and then only make decision. Is there any possibility to attach or bring a tcode screen in user decision step.Dear Hemalatha,
Thanks a lot for your reply.
You can direct;y use the Object which is used to trigger the workflow. Then you can bind this object to get that tcode as
attachment in decision task.
This is exactly my requirement. In my BO i have a standard method "display" to display the Tcode. I want to know how should i do the binding from BO's method to user decision task so that i can display a link as attachment of user decision step, by clicking which user can see the display screen. -
In workflow decision step, in the details tab under 'adhoc specification determination' the field 'interfaces compatible with' is taking TS20000004 - pm order created and hence when the test taskflow option is used system by default is taking to the notification order. How to change this default
Please help
-
Attachment in WORKFLOW user decision step
Hi all,
My requirement is to display a link in user decision step.
When link is clicked, control should navigate to MM02 transaction.
Also in following user decision step i need to provide link for smart form in user decision.
Can anybody please guide in detail .
Thanks.
Edited by: Sanjay_lnt on Sep 26, 2010 1:14 PM
Edited by: Sanjay_lnt on Sep 26, 2010 1:15 PMClosed.
-
Calling Transaction through User Decision step in workflow
Hi all,
Pls help me calling a transaction through User Decision step in workflow. I have attached two buttons to my User decision and the one of the outcomes to a task where I am calling the transaction through a method of BOR. But the problem is I am unable to see the transaction when I press the button on my User Decision at test run.
Can you ppl let me know how can I achieve this?
Pls reply ASAP...
Thanks
SangharshHello Sangharsh ,
Please Check the paramater of of the method which you define.
e.g. I define CALL_TCODE_CJ03 method
which have the parameters FLAG,ProjectDefinition,WBSElement2,User
with export, import checkbox.
Pass the paratmeres in programs
e.g.
BEGIN_METHOD CALL_TCODE_CJ03 CHANGING CONTAINER.
DATA:
FLAG(1),
PROJECTDEFINITION TYPE PROJ-PSPID,
WBSELEMENT2 TYPE PRPS-POSID,
USER TYPE USR21-BNAME.
SWC_GET_ELEMENT CONTAINER 'FLAG' FLAG.
SWC_GET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.
SWC_GET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2.
SWC_GET_ELEMENT CONTAINER 'User' USER.
GET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.
GET PARAMETER ID 'PRO' FIELD WBSELEMENT2.
SET PARAMETER ID 'PSP' FIELD PROJECTDEFINITION.
SET PARAMETER ID 'PRO' FIELD WBSELEMENT2.
CALL TRANSACTION 'CJ03' AND SKIP FIRST SCREEN.
SWC_SET_ELEMENT CONTAINER 'FLAG' FLAG.
SWC_SET_ELEMENT CONTAINER 'ProjectDefinition' PROJECTDEFINITION.
SWC_SET_ELEMENT CONTAINER 'WBSElement2' WBSELEMENT2. SWC_SET_ELEMENT CONTAINER 'User' USER.
END_METHOD.
I hope it will help you.
***Assigning points is the way to say thanks in SDN.***
Minaxi Shah -
Workflow- Adding Terminating event into a Decision Step
Hi
I have a requirement like, in the decision step for example 'Approve' or 'Reject' has to be executed from the web application by triggering a terminating event for this decision step. I have copied the decision BO DECISION to ZDECISION and created two terminating events and make it ashynchrounous. But this step is not getting executed in the workflow showing error as 'no terminating event is attached to the task'.
Any input on this is welcome. If you could reply bit early as I need the information ASAP.
Thanks in advance.
PadmanHi Padman,
Weclome to the SDN forums. We don't have a specific Workflow forum yet. Please post your questions in the General SDN Forum until we do.
I moved your questions there.
Thanks, Mark. -
Adding of RAW-attachement in decision step ?
hi,
i have an decision step in an workflow.
there it is possible (as SAP Standard) to attach a attachement.
but the only thing a user should do there is to enter an RAW document, just a text
for the next user.
BUT: when i push the 'attachement' button in the decision step i get
a very user-unfriendly popup 'between'. there the user must enter
a text BEFORE he can enter the text in the editor.
is it possible to avoid that windows between and get DIRECTLY into
the note-editor ???????
reg, MartinHi,
Assign "Description as your default attribute in your BO basic data...
this will work...
Regards
Gautam -
hi
my issue is i have kept a decision step where , i need to send decision step with attachment , i have done binding in the control tab ,of decision step like this
& absence& --> &_ATTACH_OBJECTS&
my attachemnet should be absence object.
when i execute , i 'm getting the decision workitem but with
no attachment , would u help on this .Hi,
Make sure you have &ABSENCE& object is instantiated in any one of the steps before to youe decision step.
In Workflow Log, check the container elements and see if Adhoc_Objects container element value getting filled or not on your user decision step? If it is not having any values and if your binding is correct, then i am sure &ABSENCE& object is not instantiated before. Check !!
Regards
Krishna Mohan -
Error in decision step in customise workflow
Hi,
When i execute my customise workflow, There are 2 decision steps. On 2nd decision step i am getting error message 'Element '_WI_OBJECT_ID' not in container. In 1st decision step, element WIOBJECT_ID is not in container, but it execute successfully.
How do i solve this?
Regards,
SmitHi,
Smit do proper binding between event and workflowcontainer and WF container to task container.
If you are not aware of it you should use RED Round button which automatically do this for you.
and another thing goto agent assignment and specify that task with general task from attributes.
Hope magic Works!
Regards,
Purvesh Patel.
Maybe you are looking for
-
We publish our documents in pdf, but we use FrameMaker to create our documents, and we create cross-references for all of our screenshot captions. This is done in case the screenshot is moved to another page by an edit and to automatically update th
-
Hi, I want to make a text to appear in the status bar always. i have used FM SAPGUI_PROGRESS_INDICATOR to display the message. But the message clears as the program executes. I want the text to be always to be present in the status bar. <REMOVE
-
Under DMS Search option CV04n, SAP has provided TEXT Search with TREX search where-in we get different search type with AND & OR options Can some expert explain me what is exactly meaning of each search type...? If you any document kindly forward tha
-
What I want is to ensure that my app always connects only to my server (https). If someone puts https proxy in the middle it's possible to intercept all the communication. Yes, so the user will get cert warning prompt but it never stops anybody from
-
HT1918 How can i merge my two itunes accounts?
apparently I have two iTunes accounts. How can I merge them and get rid of one.