How to send data from a web dypro application using workflow
Hi All,
I am working on a web dynpro application where the user will enter the header and item details for a FI document to be posted. Once the user enters the data the workflow should initiate and should also send the data across to the approver to approve. To initiate the workflow I am using the function module 'SAP_WAPI_START_WORKFLOW' and it's working fine and generating a uniquw workflow item id. Now my main concern is how to send the data across from web dynpro application through the workflow. I have my data in three internal tables: 1. header table. 2. G/L table and 3. Currency table, I am capturing all this data from the web dypro screen entered by the user. Right now I have the following code in my web dypro application.
METHOD execute_bapi_acc_document_post .
DATA: return TYPE TABLE OF bapiret2.
DATA: wa_return LIKE LINE OF return.
DATA lo_bapi_acc_document_po TYPE REF TO if_wd_context_node.
DATA lo_changing TYPE REF TO if_wd_context_node.
DATA lo_accountgl TYPE REF TO if_wd_context_node.
DATA lo_currencyamount TYPE REF TO if_wd_context_node.
DATA lo_importing TYPE REF TO if_wd_context_node.
DATA lo_documentheader TYPE REF TO if_wd_context_node.
DATA lo_element TYPE REF TO if_wd_context_element.
DATA lt_elements TYPE wdr_context_element_set.
DATA ls_c_documentheader TYPE if_componentcontroller=>element_documentheader.
DATA lt_c_accountgl TYPE if_componentcontroller=>elements_accountgl.
DATA ls_c_accountgl LIKE LINE OF lt_c_accountgl.
DATA lt_c_accountgl_cp TYPE if_componentcontroller=>elements_accountgl.
DATA lt_c_currencyamount TYPE if_componentcontroller=>elements_currencyamount.
DATA ls_c_currencyamount LIKE LINE OF lt_c_currencyamount.
DATA lt_c_currencyamount_cp TYPE if_componentcontroller=>elements_currencyamount.
DATA wa_c_currencyamount type bapiaccr09.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
TASK = 'TSXXXXXXXXXX'
USER = sy-uname
IMPORTING
RETURN_CODE = L_RETURN_CODE
WORKITEM_ID = LV_WIID
TABLES
* INPUT_CONTAINER = lt_input_container
MESSAGE_LINES = lt_message_lines
AGENTS = ls_agents
lo_bapi_acc_document_po = wd_context->get_child_node( wd_this->wdctx_bapi_acc_document_po ).
lo_changing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_changing ).
lo_accountgl = lo_changing->get_child_node( wd_this->wdctx_accountgl ).
lo_currencyamount = lo_changing->get_child_node( wd_this->wdctx_currencyamount ).
lo_importing = lo_bapi_acc_document_po->get_child_node( wd_this->wdctx_importing ).
lo_documentheader = lo_importing->get_child_node( wd_this->wdctx_documentheader ).
lo_element = lo_documentheader->get_element( ).
lo_element->get_static_attributes(
IMPORTING static_attributes = ls_c_documentheader ).
lt_elements = lo_accountgl->get_elements( ).
LOOP AT lt_elements[] INTO lo_element.
lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_accountgl ).
INSERT ls_c_accountgl INTO TABLE lt_c_accountgl[].
ENDLOOP.
lt_c_accountgl_cp = lt_c_accountgl[].
lt_elements = lo_currencyamount->get_elements( ).
LOOP AT lt_elements[] INTO lo_element.
lo_element->get_static_attributes( IMPORTING static_attributes = ls_c_currencyamount ).
INSERT ls_c_currencyamount INTO TABLE lt_c_currencyamount[].
ENDLOOP.
lt_c_currencyamount_cp = lt_c_currencyamount[].
READ TABLE lt_c_currencyamount INTO ls_c_currencyamount INDEX 2.
ls_c_currencyamount-amt_doccur = ls_c_currencyamount-amt_doccur * '-1.0000'.
MODIFY lt_c_currencyamount FROM ls_c_currencyamount INDEX 2.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = ls_c_documentheader
TABLES
accountgl = lt_c_accountgl
currencyamount = lt_c_currencyamount
return = return.
ENDMETHOD.
Please suggest.
Thanks,
Rajat
I am not sure if this falls in webdynpro or workflow threads.. so I am posting it here also
Edited by: rajatg on Jun 23, 2010 9:28 PM
Dear Colleague,
You have different method to send parameters to Workflow.
1. Method
Container Set Element
DEFINE SWC_SET_ELEMENT.
CALL FUNCTION 'SWC_ELEMENT_SET'
EXPORTING
ELEMENT = &2
FIELD = &3
TABLES
CONTAINER = &1
EXCEPTIONS
OTHERS = 1.
END-OF-DEFINITION.
Set the data into Workflow container
SWC_SET_ELEMENT IT_CONTAINER 'parameter1' lv_parameter1.
Start the Workflow
CALL FUNCTION 'EWW_WORKFLOW_START'
EXPORTING
X_TASK = 'WS90000001' " your wf
IMPORTING
Y_WORKFLOW_ID = WF_ID " your workitem id
TABLES
X_CONTAINER = IT_CONTAINER
EXCEPTIONS
INVALID_TASK = 1
NO_ACTIVE_PLVAR = 2
START_FAILED = 3
GENERAL_ERROR = 4
OTHERS = 5.
2. Method,
You can also add your parameters direly to a container,
DATA: lt_simple_container TYPE TABLE OF swr_cont,
ls_simple_container TYPE swr_cont.
ls_simple_container-element = 'parameter1'.
ls_simple_container-value = lv_parameter1.
APPEND ls_simple_container TO lt_simple_container.
CALL FUNCTION 'SAP_WAPI_WRITE_CONTAINER'
EXPORTING
workitem_id = WF_ID " your workitem id
do_commit = 'X'
TABLES
simple_container = lt_simple_container.
Bulent.
Similar Messages
-
How to send data from internal table to the shared folder in ABAP
Hi experts,
My requirement is to transfer data from a file to shared folder. i just did reading data from a file to a internal table. Now i want to send this internal table data into a shared folder which is "
xxx\y\z....".
I do not have any idea on how to send data from internal table to the shared folder path.
can anybody please help me out how to do this?
Thanks & Regards
Sireesha.Where that folder is located, its on presentation server i.e. desktop or application server.
If its on presentation server, use FM GUI_UPLOAD.
If its on application server, then use DATASET functions. Have a look at below link.
[File Handling in ABAP|http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3ca6358411d1829f0000e829fbfe/frameset.htm]
I hope it helps.
Thanks,
Vibha
Please mark all the useful answers -
IDOC :: how to send data from Custom Infotype in SAP HR to third party
Hi,
I have created one custom Infotype by number 9020. How to send data from this infotype to third party system and also change pointers need to trigger for this infotype.
Please help me in doing it.
I am using one Custom Message type ZTALENT and Custom Idoc Type ZTALENT.
ZTALENT Talent Management
5 E1PLOGI Header for an HR Object (Master Data or Organizational Data)
5 E1PITYP HR: Transported Infotypes and Subtypes for an Object
ZPUSER User base Data File
ZPERSON Personal Information File Segment
ZPOST Position File
ZOPE Overall Performance
ZPWORK Outside Work Experience
ZPEDUC Education Details of Employee
E1P0000 HR: HR Master Record Infotype 0000 (Actions)
E1P0001 HR: HR Master Record Infotype 0001 (Org. Assignment)
E1P0002 HR: HR Master Record Infotype 0002 (Personal Data)
E1P0016 HR Master Record: Infotype 0016 (Contract Elements)
E1P0022 HR Master Record: Infotype 0022 (Education)
E1P0023 HR Master Record: Infotype 0023 (Other/Previous Employers)
E1P0041 HR Master Record: Infotype 0041 (Date Specifications)
E1P0105 HR: HR Master Record Infotype 0105 (Communications)
ZE1P9020
ZPLANG Language Details
ZACTION Actions Changes
Regards,
KrishnaHello Shankar,
Technically TEMSE files are read by calling the following 3 function modules in sequence,
1) RSTS_OPEN_RLC or RP_TS_OPEN: open the temse object
2) RSTS_READ : read the object
3) RSTS_CLOSE: close the object
Regards,
Rajesh -
How to get data from a USB-UIRT device using Labview?
How to get data from a USB-UIRT device using Labview?
I'm trying to get data from a USB-UIRT device, is it posible with Labview?
I really appreciate your help,
thanksYou may want to contact the developer of the device for the API and DLL.
http://65.36.202.170/phpBB2/viewforum.php?f=3 -
How to send a mail through web dynpro application
Hi
How to send a mail through web dynpro application?
ThanksHi ,
Please post some more details about your query .
One way is to can use LinkToUrl UI element and in the reference property of the UI element , give it as mailto:mail addess
Thanks.
aditya. -
How to extract data from Essbase to Flat File using ODI
Hi,
Anyone know how to extract data from Essbase to Flat File using ODI?
Thanks in advance.
Regards,
SumardiHi,
Have you read through :-
Oracle Data Integrator Adapter for Hyperion Essbase Getting Started - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_getting_started.pdf
Oracle Data Integrator Adapter for Hyperion Essbase User's Guide - http://download.oracle.com/docs/cd/E10530_01/doc/epm.931/odiess_users.pdf
If you have read them and are still have a problem at what stage are you having the issues?
Cheers
John
http://john-goodwin.blogspot.com/ -
How Can I Send Data From One Pc To Another Using An Ethernet Connection ?
Hi,
I would Like to know how to send data ( For example, any String ) from a Server Pc to a Client Pc, Using the same java program installed on both computers.
[Pc One ( Server ) [ Java Program] ] <----Ethernet--Cable----> [Pc Two( Client ) [ Java Program] ]
Thanks .
Edited by: jaysal2490 on Jul 7, 2008 9:45 PM
Edited by: jaysal2490 on Jul 7, 2008 9:46 PM
Edited by: jaysal2490 on Jul 7, 2008 9:51 PMCheck out this tutorial:
http://java.sun.com/docs/books/tutorial/networking/sockets/index.html
There are code samples included. -
How to retrieve data from a web service
Hi
i am at very beginner level about web services.
I am searching for a simple example of retrieving data from a web services, but cant find.
How can i get xml data from a web service. i dont need to develop the web service it is already ready, i just need how could i fetch data from it.
Can somebody point out or give an example?
Thanks in advanceHi,
just create a skeleton for the Web Service. In JDeveloper, create a new project and then use the "NEW" context menu option.
Navigate to "Business Tier" --> Web Services and select "Web Service Proxy"
In teh following, provide the WSDL reference to create the Java proxy. This gives you accss to the WS without having to parse the XML yourself
Frank -
EPM add-in for Excel question : How to send data from local member?
Dear experts,
for EPM add-in for excel, how do I send data from local member?
best regards,
Evans.Hello Evans,
Could you please explain what is your requisite? What is the formula on your local member?
You can also apply formulas to formatting sheet. This way you can reference the cells in your formatting sheet formulas and save the values in the report area.
Please check this blog:
How to use Excel formulas in BPC Input Schedules
Thank you
Best regards,
Raquel Oliveira -
How to show data from one web site to other web site having diffrent domain.
Dear all,
i want to show the selected data from one web site to other web site.
the location of the two web site is geographically seprated (and diffrent domain)
Please tel me in how many ways it can be accomplished.
If it can be done using jquery then please tel me the function or procedure to do it.
Note: ( i have seen the above behavior in many web sites .
like, i was purchasing some thing but finally declined,
after that i visited some other web sites to gets some other data on other area
, and i show my selected items of the first web site on second website as advertisement.)
i would like to know how these things are accomplished and how it can be done in asp.net.
yours sincerelyHello,
Thank you for your post.
I am afraid that the issue is out of support range of VS General Question forum which mainly discusses
the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System
and Visual Studio Editor.
Because your issue is about ASP.NET website programming, I suggest that you can consult your issue on ASP.NET forum:
http://forums.asp.net/
for better solution and support.
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. -
kindly suggest me the php parsing script so that i can fetch the data from a web page.....
suppose we have a url.........
http://abc.com/news/companydetails.aspx?sskicode=x&Exchange=y
and the page contains the various fields.........like
xyz 10
xyz1 20
xyz2 30 etc...
then we have to retrive data from this page trough php script and insert it into database.....
value of xyz , xyz1 n xyz2 should be retrived and further inserted into database.......
thanx ......Should be nice..
But its not working i think.. -
How to pull data from a c/c++ Application
I am working on a project to instrument a product which runs on java as well as c/c++.
Is there a way to pull data from a c/c++ application to a MBean?
I am able to push the data through a custom TCP Adapter, But I could not get much help on a pull model.
Also I would like to get some pointers on instrumentation techniques / patterns.
Regards
ChandramohanI'm not aware of any JMX out-of-the-box support for managing C++ applications with JMX or MBeans, but you can find some ideas on how this might be done in [this thread|http://forum.java.sun.com/thread.jspa?threadID=5240363] from [this very forum|http://forum.java.sun.com/forum.jspa?forumID=537&start=0].
-
Retrieve data from a non-peoplesoft application using HTTP Get
I need to retrieve data from a non-peoplesoft application. They want us to submit a HTTP GET request to their URL with a series of parameters. I am thinking about using HTTP Targert connector to accomplish this. Does anyone have sample peoplecode?
Currently we are on 8.51.10 Tools...
If there is any better way .. please let me know ..I have used HTTP Get to get XML file from a government sanction list by hitting URL http://www.treasury.gov/ofac/downloads/sdn.xml
There is a delivered PS program that does that for vendor sanctions. I had to get the online setup correctly by creating a new custom Node with HTTP Target Connector. The program name is BSP_IMPORT. The below code is responsible for the calling the node and retrieving the data. Play around with the code below see if you can get it to meet your needs.
BSP_IMPORT_AET.BANKNODE.Value is just the custom external code that I created.
PMT_FLAT_FILE_INBOUND message is just a none rowset based message to use the web service call.
Local TR:FileUtilities:FTP &oFTPUtil = create TR:FileUtilities:FTP();
+/* HTTP */+
+/*******************************************************************************/+
Local Message &msgHTTP;
Local Message &msgResult;
+&msgHTTP = CreateMessage(Message.PMT_FLAT_FILE_INBOUND);+
+&oFTPUtil.PopulateFTPGetIBInfo(&msgHTTP, BSP_IMPORT_AET.BANKNODE.Value);+
+&msgResult = %IntBroker.ConnectorRequest(&msgHTTP);+
+/* check to see if the file is wrapped */+
+&strAllLines = &msgResult.GenXMLString();+
+&strAllLines = Substitute(&strAllLines, Char(26), " "); /* Added this line to remove invalid characters */+
+/*******************************************************************************/+
Edited by: Maher on Mar 20, 2012 3:28 PM -
Web dynpro application using workflow
Hi all,
I have developed a web dynpro application and attached that to the portal, so the user will login into the portal and will access the application. We have a new requirement now, when a user enters the data and hit save button on the web dynpro application, the workflow should trigger and should send the filled out (everything filled in) web dynpro application to his superior, the supervisor should be able to click on a link (which he should get through workflow) and should get the web dynpro application filled in. I am not sure how can I do this, so can you please guide me through.
Thanks,
RajHi Raj,
could I suggest perhaps that you have a good search of SCN - there have been multiple posts about this sort of thing in the past.
for example : the wiki article
[Integrating WebDynpro ABAP applications with UWL for workflow in Portal|http://wiki.sdn.sap.com/wiki/display/WDABAP/IntegratingWebDynproABAPapplicationswithUWLforworkflowin+Portal]
is it perhaps that you do not use the UWL at your site? Or do you want to to send an email to the manager with a link directly to the approval application? The last case is one that I've come across many times before - it just means that you'll need to generate an approval task that is ended by a wf event and send an email to the manager with a URL parameter in the launch of the WDA application so that the app can pick up the details required to display and raise the WF event to complete the approval wf task.
There are all sorts of ways of persisting the information in the form so that the manager can see it in the approval. You can use the workflow container, you can use a db table, you could even use a shared memory area (not that I'd recommend this for this usage). But this is more a case of how to persist information in a workflow and probably a better question (search first, it's probably been answered already) for the WF forum and not the WDA forum.
Good luck in designing and building your application. Perhaps when you are done you could write a blog about your experience and further share how to do this with others.
Cheers,
Chris -
How to send data from WEBI HYPERLINK to SAP R/3
Can someone please help in sending the data from WEBI to R/3 system.
We created a universe on top of a BEX Query and on Top of that we created a web intelligence report.
Now our requirement is when we click on any record in BO web ntelligence report that data should get populated in SAP R/3 system FAGLL03 screen . How to send the data from WEBI to R/3 system.
Edited by: SAP BPS on Feb 5, 2010 6:23 AMHerry,
You can refer the below docs for reference. Instead of receiver JDBC , you have to use Receiver as R/3.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/a068cf2f-0401-0010-2aa9-f5ae4b2096f9
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f272165e-0401-0010-b4a1-e7eb8903501d
I hope it helps.
Best regards,
raj.
Maybe you are looking for
-
Help me Please.. I can log on to the Apple website to manage my account and all the information is correct, but I get "Your Apple ID has been disabled" when I try to get something from App Store on my iPad3 I'm from poland. Thx Balbi
-
The edited music I have in my iTunes library will not sync or transfer to the music on my phone. Such as editing "Artist, Artist Album, Title, etc." and this is very frustrating and annoying. Does anyone have any solutions? I've restored and took off
-
Apple Support: I have tried to purchase albums by Muse dated 2003 and earlier from the iTunes Store in Denmark. For all of these I am getting the response: "Purchase of this item is currently not available. This item is being modified. Please try ag
-
What are the limitations of the 10 Client server License?
I can't find any documentation on the limitations. (Searching Apple's support site is a bear....) I want to set up a web-server, and I think the 10 Client License is good enough to do that. But If I'm going to (somehow) be limited to 10 users at a ti
-
Hi all .. Just an other question ... i'd like to scroll with he mouse wheel a list box as in windows programms. How can i do that, in a easy way ? thanks for your answers