How to trigger GP workflow through ABAP Program.
Hi All.
i have one scnerio , i want to create BOM through Custom Ztransaction that will be developed in ABAP Modulepool.
User will create BOM from this ztransaction through Transactional Iview in PORTAL,Once the user save transaction , i want to trigger a GP(Guided Procedure ) workflow,from ABAP Program.
is it possible to trigger GP workflow?
if yes how to do it , please suggest the way out.
Regards,
Shyam.
Hi lingana,
As u see in my requriment that, Workflow is not designed within SAP , But the Workflow will be designing
in SAP Netweaver, its a GP Workflow. And Ztransaction(Developed by ABAP) will be seen by user through portal and
he save transaction on PORTAL, In backend ABAP program will run , and after meeting certain condition, it should create
or(Initiate) GP workflow(process).
So my question is , how ABAP Program will call GP workflow, How the connection will be made in between ABAP Code and GP workflow framework.
If any doubt regarding requriment let me know,
Regards,
Shyam.
Similar Messages
-
How to trigger MDM Workflow from ABAP Program.
HI
I have requriment to trigger MDM Workflow(Design in MDM) from My Module pool program. Suggest how to do it?
Thanks in Advance.
Regards,
Shyam Babu Sah.Hi,
This question is for forum SAP Netweaver --> Workflow. There are functions and programmes that SAP delivers for this.
[Example here|Re: How can I trigger workflow from my report] -
HOW TO TRIGGER AN WORKFLOW FROM A PROGRAM ?
HELLO THERE ,
CAN ANYBODY PLZ TELL ME HOW TO TRIGGER AN WORKFLOW FROM AN PROGRAM AND TO PAS THE VALUE TO THE CONTAINER ?Hello Neon,
If you want to trigger the workflow directly, use the FM, SWU_START_WORKFLOW
CALL FUNCTION 'SWU_START_WORKFLOW'
EXPORTING
task =
* LANGUAGE = SY-LANGU
user =
* SENDER_ID =
* IMPORTING
* RETURN_CODE =
* WORKITEM_ID =
tables
* CONTAINER =
* MESSAGE_LINES =
attachment_list =
A workflow can also be triggered by and event which is in turn triggered by a program.
By the FM, SWE_CREATE_EVENT
Example:
w_key = 'Connie'.
w_creator-otype = 'US'.
w_creator-objid = 'SAPDEV02'.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'YH_BUDDIES'
objkey = w_key
event = 'event'
creator = w_creator
* TAKE_WORKITEM_REQUESTER = ' '
* START_WITH_DELAY = ' '
* START_RECFB_SYNCHRON = ' '
* NO_COMMIT_FOR_QUEUE = ' '
* DEBUG_FLAG = ' '
* NO_LOGGING = ' '
* IDENT =
* IMPORTING
* EVENT_ID =
* TABLES
* EVENT_CONTAINER =
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE: / 'EVENT TRIGGERED'.
ENDIF.
COMMIT WORK.
Hope it helps you.
Regards
Indu. -
Trigger GP workflow through ABAP
Hi,
i have one scnerio , i want to create BOM through Custom Ztransaction that will be developed in ABAP Modulepool.
User will create BOM from this ztransaction through Transactional Iview in PORTAL,Once the user save transaction , i want to trigger a GP(Guided Procedure ) workflow,
from ABAP Program.is it possible to trigger GP workflow?
if yes how to do it , please suggest the way out.
Regards,
Shyam.Hello,
To trigger the workflow from an ABAP program, there are function modules like
SAP_WAPI_CREATE_EVENT & SAP_WAPI_START_WORKFLOW
which can be executed.
Hope this will help.
Thanks,
Samson -
How to Trigger a Workflow from ABAP Webdynpro
Hi All Gurus,
I have the following urgent requirement, my client is implementing HR and there is a requirement, where is a ABAP Webdynpro component in which we have integrated a Adobe Interactive Form. When the user calls this from through Portal and fills out the relevant data and submits it, a Workflow in the backend ECC system should lauch,
I am not familiar with, this concept although I have worked in Workflow this is the first time I am interfacind with ABAP Webdynpro and Adobe Interactive From.
Can you please let me know in steps what needs to be done to make the workflow trigger for my scenario and also the specific settings to be done in the bacckend.
Regards,
Pratima JainHi,
If you are using HCM Processes and Forms, the Workflow and form are not directly related, thats true.
But the method in the task calls the corresponding webdynpro application which responds to the action triggered by the user in turn to trigger the workflow and update the data in the HR Master Data.
There are 3 layers 1. UI (webdynpro which launches Adobe Interactive form based on ISR Framework)
2. Workflow
3. Backend framework (used for retrieving F4 helps, default values, save data in the infotypes).
for more documentation, please refer it on help.sap.com.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/82/b6b94278560c31e10000000a1550b0/content.htm
hope this helps.
Best Regards,
Saujanya. -
How to trigger a workflow in webdynpro programs
Hi Experts,
I am new to SRM Workflow, and I need to trigger a workflow in my webdynpro programs.
But I don't know how to achieve it.
I am using SAP SRM 7.0, so I want to use Process Controlled workflow.
Any suggestions would be greatly appreciated.
Thanks and Regards
WeiHi, thank you for the attention, and my requirement is as below.
1. Creating a web dynpro program
2. User can execute the program and input data on it. Such as Expense application, Leave application...
3. When the user click the "Apply" button on the form, the application should be sent to the boss for approval.
*** I want to trigger a workflow when the user click the "apply" button.***
I have achieved the similar functions in SAP ERP systems, by generating Events in my custom programs.
But I don't konw how to do it in SRM 7.0.
Or it is impossible to achieve it, under Process Controlled workflow architecture.
Thanks and Regards
Wei -
Trigger Process chains through ABAP program using selection screens
Hi All
I am loading flat files through process chains. My requirment is such that i need to create a ABAP selection screen so that user can load the flat file from his PC. when the user is loading the flat file i have to copy the file onto the application server folder and then display him the monitor errors/warnings (if any). when my data load is complete i need to archive the file with time stamp onto the application server folder.
Please help me in this regard....
thanks and regards
sairam phaniHi sairam
can you check this link hope this might help you out
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
Going thru your query hope i get the right solution
Thanks=points in SDN
Sanjeev kumar hamsala -
Hi Experts,
How can we send sms through ABAP program. What are the web services required? Is there any tutorial/resource on this topic?
Regards.
AbdullahHi...
Go through this code.....
REPORT y_sms_to_india620.
DATA: http_client TYPE REF TO if_http_client .
DATA: wf_string TYPE string ,
result TYPE string ,
r_str TYPE string .
DATA: result_tab TYPE TABLE OF string.
SELECTION-SCREEN: BEGIN OF BLOCK a WITH FRAME .
PARAMETERS: mail(100) LOWER CASE,
m_no(20) LOWER CASE ,
m_mss(120) LOWER CASE.
SELECTION-SCREEN: END OF BLOCK a .
START-OF-SELECTION .
CLEAR wf_string .
CONCATENATE
'http://www.webservicex.net/SendSMS.asmx/SendSMSToIndia?MobileNumber='
m_no
'&FromEmailAddress='
mail
'&Message='
m_mss
INTO wf_string .
CALL METHOD cl_http_client=>create_by_url
EXPORTING
url = wf_string
IMPORTING
client = http_client
EXCEPTIONS
argument_not_found = 1
plugin_not_active = 2
internal_error = 3
OTHERS = 4.
CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2.
CALL METHOD http_client->receive
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2
http_processing_failed = 3.
CLEAR result .
result = http_client->response->get_cdata( ).
REFRESH result_tab .
SPLIT result AT cl_abap_char_utilities=>cr_lf INTO TABLE result_tab .
LOOP AT result_tab INTO r_str.
WRITE:/ r_str .
ENDLOOP .
Reward if it helps u... -
How to pass table data to brf plus application through abap program
Dear All,
i have a question related to BRF Plus management through abap program.
In brf plus application end, Field1,field2,field3 these 3 are importing parameters.
Table1->structure1->field4,field5 this is the table,with in one structure is there and 2 fields.
in my abap program, i am getting values of fields let us take field1,field2,field3,field4,field5.
And my question is
1) How to pass fields to BRF Plus application from abap program.
2)How to pass Table data to BRF Plus application from abap program.
3)How to pass Structure data to BRF Plus application from abap program.
4)How to get the result data from BRF Plus application to my abap program.
And finally , how to run FDT_TEMPLATE_FUNCTION_PROCESS.
How do i get the code automatically when calling the function in brf plus application.
Regards
venkata.Hi Prabhu,
Since it is a Custom Fm i cant see it in my system.
Look if u want to bring data in internal table then there could be two ways::
1) your FM should contain itab in CHANGING option , so that u can have internal table of same type and pass through FM,
2) read values one by one and append to internal table.
Thanks
Rohit G -
How to crete Button through ABAP programming
Hello Friends,
I am creating 2 selection screens through ABAP code and using them in my Tabstrip control also created through ABAP programming.
Can I also create button on the selection screen through abap programming. If yes then how, and how to assign funtion code and capture the Function Code???
Moderator Message: Read the below advice.
Edited by: kishan P on Dec 30, 2010 7:44 PMHave a look at F1 help on SELECTION-SCREEN. There should be an example as well.
-
Creation of IDOC through abap program.
hello all,
I hav created idoc through abap program. I hav used FM 'Master_idoc _distrribute'.this program creates an idoc but giving status 30. can any one tell me how to get status 03. I hav already created port, Logical sys,partner no.,distribution model.
My Program is as follows:
ABLES : CRMD_ORDERADM_I,CRMD_ORDERADM_H,CRMD_SCHEDLIN.
DATA : S_CTRL_REC LIKE EDIDC OCCURS 0 WITH HEADER LINE,"Idoc Control Record
ORDER_NO TYPE CRMT_OBJECT_ID VALUE '5000000032'," SEGMENT ORDER DATA
PRODUCT TYPE CRMT_ORDERED_PROD VALUE 'SRV_01',
QUANTITY TYPE CRMT_SCHEDLIN_QUAN VALUE '1.000'.
DATA : ZORDER LIKE ZORDER_NUM OCCURS 0 WITH HEADER LINE.
DATA : T_EDIDD LIKE EDIDD OCCURS 0 WITH HEADER LINE. "Data Records
DATA : T_COMM_IDOC LIKE EDIDC OCCURS 0 WITH HEADER LINE. "Generated Communication IDOc
CONSTANTS :
C_ZRZSEG1 LIKE EDIDD-SEGNAM VALUE 'ZORDER_NUM'.
PARAMETERS : C_MESTYP LIKE EDIDC-MESTYP DEFAULT 'ZORDER_IDOC2', "Message Type
C_RCVPRT LIKE EDIDC-RCVPRT DEFAULT 'LS', "Partner type of receiver
C_LOGSYS LIKE EDIDC-RCVPRN DEFAULT 'BSNL_OUT',
C_RCVPOR LIKE EDIDC-RCVPOR DEFAULT 'A000000006',
C_SNDPOR LIKE EDIDC-SNDPOR DEFAULT 'SAPBCD0000',
C_SNDPRN LIKE EDIDC-SNDPRN DEFAULT 'BCDCLNT100',
C_IDOCTP LIKE EDIDC-IDOCTP DEFAULT 'ZORDER2',
C_SNDPRT LIKE EDIDC-SNDPRT DEFAULT 'LS'. "Destination System
***START-OF-SELECTION
START-OF-SELECTION.
PERFORM GENERATE_CONTROL_RECORD.
PERFORM SEND_IDOC.
*& Form generate_control_record
FORM GENERATE_CONTROL_RECORD .
S_CTRL_REC-RCVPOR = C_RCVPOR. "Receiver Port
S_CTRL_REC-MESTYP = C_MESTYP. "Message type
S_CTRL_REC-IDOCTP = C_IDOCTP. "Basic IDOC type
S_CTRL_REC-RCVPRT = C_RCVPRT. "Partner type of receiver
S_CTRL_REC-SNDPOR = C_SNDPOR. "SENDER PORT
S_CTRL_REC-RCVPRN = C_LOGSYS. "Partner number of receiver
S_CTRL_REC-SNDPRT = C_SNDPRT. "Sender Partner type
S_CTRL_REC-SNDPRN = C_SNDPRN. "Sender Partner Number
APPEND S_CTRL_REC.
ENDFORM. " generate_control_record
*& Form send_idoc
FORM SEND_IDOC.
ZORDER-ORDER_NO = ORDER_NO.
ZORDER-PRODUCT = PRODUCT.
ZORDER-QUANTITY = QUANTITY.
APPEND ZORDER.
T_EDIDD-SEGNAM = C_ZRZSEG1.
T_EDIDD-SDATA = ZORDER.
APPEND T_EDIDD.
CALL FUNCTION 'MASTER_IDOC_DISTRIBUTE'
EXPORTING
MASTER_IDOC_CONTROL = S_CTRL_REC
TABLES
COMMUNICATION_IDOC_CONTROL = T_COMM_IDOC
MASTER_IDOC_DATA = T_EDIDD
EXCEPTIONS
ERROR_IN_IDOC_CONTROL = 1
ERROR_WRITING_IDOC_STATUS = 2
ERROR_IN_IDOC_DATA = 3
SENDING_LOGICAL_SYSTEM_UNKNOWN = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
COMMIT WORK.
LOOP AT T_COMM_IDOC.
WRITE:/ 'IDoc Generated - ', T_COMM_IDOC-DOCNUM.
ENDLOOP.
ENDIF.
ENDFORM. " send_idoc
I hav created segment , basic type,message typealso and release also .I also linked them.
Plz help me.
HemlataHi Hemalatha,
Just call this Progream RSEOUT00 from your Zprogram and pass the basic parameters like IDOC number, Basic type,Partner number etc.
You can check the parameters by executing the Program RSEOUT00.
This Program will change the status of your IDOC 30 to 03.
Thanks.
Note:Reward Points if you find useful. -
How to create a job thru ABAP program for calling a program with variant???
Hello experts,
can u give me step wise procedure to create jobs for a program with a variant name thru ABAP???
Also, can a transaction can be scheduled as a job to run in background with a variant name???
Edited by: SAP USER on Jul 22, 2008 6:08 AMHi,
To create a job through ABAP program you can do the following.
Go to Menu bar.
In there, go to SYTSTEM> SERVICES> JOBS--> DEFINE JOB.
Then give the JOB NAME and CLASS in the screen that comes up.
This is how we schedule a program.
Now, to create a variant for a program -
First activate your program in SE38. Then execute it .
Now, click on SAVE button. It will open up the variant creation screen. Give the details there like variant name and value for the fields. Save and come back.
Hope this helps.
Regards,
Hari Kiran -
How to change system time through java program
Hi
I want to know, how to change system time through java program.
give me a idia with example.
ThanksThere isn't any core Java API for this. Use JNI or call an external process with Runtime.exec().
~ -
How do we call smartforms in abap program or web services
how do we call smartforms in abap program or web services
How many types of smartforms are there?
points will be rewardedHi
See this sample program
Using the fun module smartform is called from the program
Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
<b>call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'</b>
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc <> 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function <b>FM_NAME</b>
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
<b>Reward points for useful Answers</b>
Regards
Anji -
How to call subroutines defined in ABAP program with type S
how to call subroutines defined in ABAP program with type S? can you give an example?
Normal executable program,
REPORT ZTEST_MAIN.
perform sub1 in program ztest_sub.
"you can call using in program addition
Subroutine pool program
PROGRAM ZTEST_SUB.
form sub1.
endform.
Maybe you are looking for
-
Choosing every n-th element of string array
Hi, I want to load into memory series of thermograms. The thing is I can get all of them (180) read although I need to improve/compare the results of FFT performed on them - so I want to 'change the sampling frequency' so I will load every 2nd, 3rd,
-
Connection refused from Java in Windows to remote postgresql Linux server
I fail to connect from windows to a remote postgresql linux server. The SQLEexception received is same as the SQLException that happen to the localhost connection to postgresql where the condition of postgresql not started or not start with -i option
-
Intermedia queries..
i would like to know, if any solution for this... A. When interMedia process runs at background, it requries user name and password, and the username and password will be shown in background process when you use ps command. This could be a security p
-
Hi We are in the process of upgrading from 4.6C to 7.0 EHP1. As part of this process we will be moving to new hardware. It it possible to migrate onto the new hardware, upgrade the system and then create an MSCM cluster? We do not want to do another
-
Agent configuration - new EM server
Hi, I've just reinstalled my GRID EM onto a new server. Is it possible to reconfigure the agents to use this new EM, or is the only way to re-install them as well? Thanks, Thom