Requirement:
Capture the reason for rejection in User decision step and send a SAP mail to the Initiator.
Steps in Workflow
1. user decision (Workflow container = ATTACH with 255 lines/ multiple)
2. Mail (assined in progam exit Tab = class/ Contains logic to collect all the data from Attchement of Workitem to an internal table)
Now this internal table data I want to append in workflow container.
3. which I will use in mail.
I used SAP_WAPI_WRITE_CONTAINER ---> Does not work
Return Code = 900
error 209
error message Fm cannot be called
can some one suggest how to go head with this.
Without editing Standard BOR.
Request clarification before answering.
Dear all,
workflow container as one container: Attach/ 255 (C)/ multiple/ export / import
I have two steps in Workflow.
1. User decision:
When rejected user enters some text(rejection reason).
2. Mail:
In program Tab: maintained a class in which as describe in step 2 in my oroginal post
a. I have collected the rejection reason text into internal table.
b. By using FM: " SAP_WAPI_WRITE_CONTAINER" trying to update the Workflow container.
rejection reason data passing to "SIMPLE_CONTAINER" table parameter of FM.
now this function module is not updating the container.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sreekanth,
Please check the below link for the correct way to pass an internal table data to the FM "SAP_WAPI_WRITE_CONTAINER". Hope this helps.
https://scn.sap.com/thread/3160394
Thanks and Regards,
Vikram
Hi,
First you read work item id of decision task using SAP_WAPI_READ_CONTAINER and read the attachment object , then read the SOFM document using FM SO_DOCUMENT_READ_API1 and pass reason text to export parameter and assign the same to workflow container. Please find the attached code for more details.
regards,
shamsudheen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
If this is a decision step don't write on the container directly.
Use SAP_WAPI_DECISION_COMPLETE and if you have built your note before (SOFM) you can transfert the reference as type SWRSOBJID in decision note.
Your note can be built by using IT_CONTENT type SOLI_TAB.
swc_container l_cont.
swc_create_container l_cont.
* Creation de l'objet SOFM
swc_create_object lo_sofm 'SOFM' space.
* Remplissage du container
swc_set_element l_cont 'NO_DIALOG' 'X'.
swc_set_table l_cont 'DocumentContent' it_content.
swc_set_element l_cont 'DOCUMENTTYPE' 'RAW'.
swc_set_element l_cont 'Enjoy' 'X'.
* Appel de la methode
swc_call_method lo_sofm 'CREATE' l_cont.
* Recuperation de l'ID de l'objet
swc_get_element l_cont '_Result' lo_sofm.
swc_get_object_key lo_sofm ev_swrsobjid-object_id.
Best regards
Stephane
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.