How to pass value coming from a program to a transaction
hi gurus,
In my requirement i will get a value from a program and i need to send this value to a field present in a transaction.
can any one help me in this matter.
First got to the data element of the field to which you want to pass the value to and check the Parameter ID in the Further Characterstics tab
For Example it is XYZ
Then
In BADI
Set Parameter ID 'XYZ' Field P_FIELD_VALUE.
Call Transaction 'ABCD'.
santhosh
Similar Messages
-
HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
HI,
HOW TO PASS THE DATA FROM SELECTION SCREEN TO STANDARD TRANSACTION?
thanks,
samba.By selection screen, what do you mean? There is no selection screen in WDA as there was in classic dynpro. Do you mean you are using the Select-Options reusable component? Are you wanting to call a standard transaction via ITS - SAPGUI for HTML? Please provide more details to your question.
-
How to Pass internal table from a program to Samrt form
Hi Pals
I want to pass an internal table which I have declared in the program to Smartform..can you please help
me asap.
Regards
PraveenHai.
check link.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRSF/BCSRVSCRSF.pdf
check this.
How to create a New smartfrom, it is having step by step procedure
http://sap.niraj.tripod.com/id67.html
step by step good ex link is....
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
Here is the procedure
1. Create a new smartforms
Transaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. 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
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
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
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
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 FM_NAME
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.
Smartform
you can check this link here you can see the steps and you can do it the same by looking at it..
http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.html
SMARTFORMS STEPS.
1. In Tcode se11 Create a structure(struct) same like the Internal table that you are going to use in your report.
2. Create Table type(t_struct) of stracture in se11.
3. In your program declare Internal table(Itab) type table of structure(struct).
4. Define work area(wa) like line of internal table.
5. Open Tcode Smartforms
6. In form Global setting , forminterface Import parameter define Internal table(Itab) like table type of stracture(t_struct).
7. In form Global setting , Global definitions , in Global data define Work area(wa) like type stracture(struct).
8. In form pages and window, create Page node by default Page1 is available.
9. In page node you can create numbers of secondary window. But in form there is only one Main window.
10. By right click on page you can create windows or Go to Edit, Node, Create.
11. After creating the window right click on window create table for displaying the data that you are passing through internal table.
12. In the table Data parameter, loop internal internal table (Itab) into work area(wa).
13. In table there are three areas Header, Main Area, Footer.
14. Right click on the Main area create table line by default line type1 is there select it.
15. Divide line into cells according to your need then for each cell create Text node.
16. In text node general attribute. Write down fields of your work area(wa) or write any thing you want to display.
17. Save form and activate it.
18. Then go to Environment, function module name, there you get the name of function module copy it.
19. In your program call the function module that you have copied from your form.
20. In your program in exporting parameter of function pass the internal table(itab).
SAP Smart Forms is introduced in SAP Basis Release 4.6C as the tool for creating and maintaining forms.
SAP Smart Forms allow you to execute simple modifications to the form and in the form logic by using simple graphical tools; in 90% of all cases, this won't include any programming effort. Thus, a power user without any programming knowledge can
configure forms with data from an SAP System for the relevant business processes.
To print a form, you need a program for data retrieval and a Smart Form that contains the entire from logic. As data retrieval and form logic are separated, you must only adapt the Smart Form if changes to the form logic are necessary. The application program passes the data via a function module interface to the Smart Form. When activating the Smart Form, the system automatically generates a function module. At runtime, the system processes this function module.
You can insert static and dynamic tables. This includes line feeds in individual table cells, triggering events for table headings and subtotals, and sorting data before output.
You can check individual nodes as well as the entire form and find any existing errors in the tree structure. The data flow analysis checks whether all fields (variables) have a defined value at the moment they are displayed.
SAP Smart Forms allow you to include graphics, which you can display either as part of the form or as background graphics. You use background graphics to copy the layout of an existing (scanned) form or to lend forms a company-specific look. During printout, you can suppress the background graphic, if desired.
SAP Smart Forms also support postage optimizing.
Also read SAP Note No. 168368 - Smart Forms: New form tool in Release 4.6C
What Transaction to start SAP Smart Forms?
Execute transaction SMARTFORMS to start SAP Smart Forms.
Key Benefits of SAP Smart Forms:
SAP Smart Forms allows you to reduce considerably the implementation costs of mySAP.com solutions since forms can be adjusted in minimum time.
You design a form using the graphical Form Painter and the graphical Table Painter. The form logic is represented by a hierarchy structure (tree structure) that consists of individual nodes, such as nodes for global settings, nodes for texts, nodes for output tables, or nodes for graphics.
To make changes, use Drag & Drop, Copy & Paste, and select different attributes.
These actions do not include writing of coding lines or using a Script language.
Using your form description maintained in the Form Builder, Smart Forms generates a function module that encapsulates layout, content and form logic. So you do not need a group of function modules to print a form, but only one.
For Web publishing, the system provides a generated XML output of the processed form.
Smart Forms provides a data stream called XML for Smart Forms (XSF) to allow the use of 3rd party printing tools. XSF passes form content from R/3 to an external product without passing any layout information about the Smart Form.
SmartForms System Fields
Within a form you can use the field string SFSY with its system fields. During form processing the system replaces these fields with the corresponding values. The field values come from the SAP System or are results of the processing.
System fields of Smart Forms
&SFSY-DATE&
Displays the date. You determine the display format in the user master record.
&SFSY-TIME&
Displays the time of day in the form HH:MM:SS.
&SFSY-PAGE&
Inserts the number of the current print page into the text. You determine the format of the page number (for example, Arabic, numeric) in the page node.
&SFSY-FORMPAGES&
Displays the total number of pages for the currently processed form. This allows you to include texts such as'Page x of y' into your output.
&SFSY-JOBPAGES&
Contains the total page number of all forms in the currently processed print request.
&SFSY-WINDOWNAME&
Contains the name of the current window (string in the Window field)
&SFSY-PAGENAME&
Contains the name of the current page (string in the Page field)
&SFSY-PAGEBREAK&
Is set to 'X' after a page break (either automatic [Page 7] or command-controlled [Page 46])
&SFSY-MAINEND&
Is set as soon as processing of the main window on the current page ends
&SFSY-EXCEPTION&
Contains the name of the raised exception. You must trigger your own exceptions, which you defined in the form interface, using the user_exception macro (syntax: user_exception <exception name >).
Example Forms Available in Standard SAP R/3
SF_EXAMPLE_01
Simple example; invoice with table output of flight booking for one customer
SF_EXAMPLE_02
Similar to SF_EXAMPLE_01 but with subtotals
SF_EXAMPLE_03
Similar to SF_EXAMPLE_02, whereby several customers are selected in the application program; the form is called for each customer and all form outputs are included in an output request
check this:
http://help.sap.com/saphelp_nw04s/helpdata/en/a5/de6838abce021ae10000009b38f842/content.htm
http://www.sapbrain.com/ARTICLES/TECHNICAL/SMARTFORMS/smartforms.html
http://www.sapbrain.com/TUTORIALS/TECHNICAL/SMARTFORMS_tutorial.html
check this linkls------>
https://www.sdn.sap.com/irj/sdn/collaboration
http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
http://www.sap-img.com/smartforms/sap-smart-forms.htm
Insert Images in smartforms
regards.
sowjanya.b. -
How to passing value into Captivate from html?
How to passing value into Captivate from html?
Or
How to communicate between objects in one slides?Hi czhao0378 and welcome to the forums!
Captivate does not natively allow you to communicate your own
data, either internally or externally. The only way to make this
happen is to create your own functionality, either via custom-built
Flash objects or JavaScript code executed in the browser or a
combination of both.
The only example I've seen of any "data passing" inside
Captivate is a custom text input/output solution that was posted on
the Captivate Developer Exchange:
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&loc=en_us&extid=1253 021
This solution consists of an input box that takes information
from the user on one slide and a second box that displays that
information on another slide. The functionality was built in Flash
and is embedded in Captivate as a Flash "animation". Unfortunately,
since this is a custom functionality, the information is not
included in the user completion results Captivate can pass to a
Learning Management System.
Since the solution mentioned above relies on a Flash
Actionscript variable to hold the information that is displayed,
you can also pass the information from HTML to Captivate using the
"SetVariable" command in JavaScript. This would at least allow you
to display your own HTML-based data inside Captivate.
Beyond that, I'm not aware of any other way to gather and
pass data in Captivate. -
How to pass value from jsp to java bean
I have huge problem . How to pass value from jsp value to java bean.Please replay me soon
Use the <jsp:setProperty> tag. There are several ways to use it. The one you probably want is:
<jsp:setProperty name="bean_name" property="property_name" value="the_value_you_want_to_set"/> -
How to pass values at runtime in JDBC - XI - File scenario
Hi friends,
In my scenario, data is coming from R/3 and i need to filter records from oracle database based on this data. There are 4 database tables that need to be queried using 2 select statements. The resultset after the execution of query will be mapped to the target flat file structure.
here are my queries:
1) Can I avoid BPM as data needs to be collected from the two database calls which involves two sender JDBC adapter instances with only one target structure?
2) Can I use stored procedure in this scenario? If yes, than how to pass values to stored procedure at runtime via sender JDBC adapter.
Thanks and regards,
Nitin aggarwal.Hi Nitin,
"..So i want to know if i can write multiple select statements in the stored procedure.."
Read the below line that is mentioned in the SAP help documentation fro Sender JDBC adapter:-
<i>Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.</i>
I dont think it can be achieved...but there must be some workaround for this. You can probably use a join statement.
Read this, again from the documentation:-
<i>The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.</i>
Regards,
Sushumna -
How to pass value to select-option parameter using SET PARAMETER Command
Hi,
Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
Passing values to parameter id
set parameter id 'VKS' field kschl.
set parameter id 'VKO' field vkorg.
set parameter id 'VTW' field vtweg.
set parameter id 'KDA' field erdat.
set parameter id 'MAT' field matnr_from.
Change condition price.
call transaction 'VK12' and skip first screen.
Thanks in advance.
Regards,
Balamurugan.Hi,
instead of using set parameters and dden call transaction use this..........
submit RV13A004 WITH SELECTION-TABLE rspar
Effect
If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
SELNAME (length 8),
KIND (length 1),
SIGN (length 1),
OPTION (length 2),
LOW (length 45),
HIGH (length 45).
To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
Notes
In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
Cheers
Will. -
How to pass the data from web dynpro to workflow.
hi gurus,
how to pass the data from web dynpro to workflow.
Regards
vijayHi
you can use function module
data ls_input_container TYPE swr_cont.
data lt_input_container TYPE TABLE OF swr_cont.
CALL FUNCTION 'SAP_WAPI_START_WORKFLOW'
EXPORTING
task = ptask
IMPORTING
return_code = lv_return_code
new_status = lv_new_status
TABLES
input_container = pinput_container
message_lines = lt_message_lines
message_struct = lt_message_struct.
where you pass the data in imnternal table "pinput_container" as
ls_input_container-element = 'KUNNR'.
ls_input_container-value = ls_skna1-kunnr ."wd_this->lv_kunnr.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'CLUSER'.
ls_input_container-value = lv_cluser.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'BUKRS'.
ls_input_container-value = lv_bukrs. " youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VKORG'.
ls_input_container-value = ls_sknvv-vkorg. " youe value as per requirement
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'VTWEG'.
ls_input_container-value = ls_sknvv-vtweg. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
ls_input_container-element = 'SPART'.
ls_input_container-value = ls_sknvv-spart. "youe value as per requirement.
APPEND ls_input_container TO lt_input_container .
*Also Forgot to mention where ptask is your workflow ID *
Regards,
Arvind
Edited by: Arvind Patel on May 14, 2010 7:38 AM -
How to pass values of the prompt through Action Link - URL in 11g
Hi All,
I am in OBIEE 11g v6.
Let's say, I have two dashbaord pages P1 and P2.
P1 page contains
1. Prompt PR1 - containing a single column EmpName
2. Report R1
P2 page contains
1. Prompt PR2 - containing a single column EmpName (same column as in PR1)
2. Report R2
Requirement :
Let's say a user select a value = David from the EmpName column in prompt PR1. In the Report R1, on one the measure columns 'Sales', I am using an action link - Navigate to URL ( I can't use Navigate to BI Content for some reasons). In the URL, I am giving the URL to page P2. Can I pass the selected value (which is David) to the EmpName column of the Prompt PR2 of Page P2 so that Report R2 is automatically limited by David when I land on that page through the URL?
Few things to consider are, I can't use EmpName column in my report R1 on page P1, I just want to pass the value of a common column from one prompt on Page1 to another prompt on Page2. Is that possible. Can anybody please help?
Thanks,
RonnyHmm can you give a try one more time with
Add EmpName name and hide it on report R1 on page P1
and set EmpName as Is Prompted on report R2 on page P2 and with my earlier steps should work.
Other option is read this doc once that helps you how to pass value thru url.
http://docs.oracle.com/cd/E21043_01/bi.1111/e16364/apiwebintegrate.htm#z1005224
You need to have a EmpName as Is Prompted on report R2 on page P2
If helps pls mark -
How to pass values to Oracle store procedure in Crystal Report
Hi all,
I am newbie on passing values to stored procedure parameters. I created a Crystal Report using the Crystal Report wiward with PULL method and data come from Oracle stored procedure. In an ASP.NET page, I have stored two values in Session and need to pass them as input parameters to Oracle stored procedure to print the report. In Crystal reports 2010 once you connect to a stored-procedure as data source, it automatically creates the parameter fields with Crytal Report Viewer. Please show me how I pass values to store procedure at runtime automatically.
'Set the parametter value
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
End Sub
I tried to apply above codes from Brian Bischof book but display the error from the following lines:
myReport.SetParameterValue("@P_COURSE", "CoursetNo")
myReport.SetParameterValue("@P_CLASS", "ClassNo")
I also enclosed my code. Any experts, please let me know anything wrongs on my code . I tried several methods that searching via google, but did not solve my issues. Thanks.
Edited by: avt2K7 on Mar 15, 2011 7:02 AMHi,
Thank you for your response. Here are the detailed code and error as following:
Please show what I am missing in my below VB.NET codes:
===========================================================================================
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
LogonToTables("username", "password", "servername", "")
End Sub
Private Sub LogonToTables(ByVal myUserId As String, ByVal myPassword As String, ByVal myServerName As String, ByVal myDataBaseName As String)
Dim Course, Class As String
Course = Session.Item("CourseNumber"))
Class = Session.Item("ClassNumber"))
Dim myReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument
myReport.Load(Server.MapPath("CrystalReport1.rpt"))
Dim myTableLogonInfo As CrystalDecisions.Shared.TableLogOnInfo
'Set the database properties and security credentials
Dim myConnectionInfo As New CrystalDecisions.Shared.ConnectionInfo
myConnectionInfo.ServerName = "servername"
myConnectionInfo.DatabaseName = ""
myConnectionInfo.UserID = "username"
myConnectionInfo.Password = "password"
'Apply the ConnectionInfo to the report tables
Dim myTables = myReport.Database.Tables
For Each myTable As CrystalDecisions.CrystalReports.Engine.Table In myTables
myTableLogonInfo = myTable.LogOnInfo
myTableLogonInfo.ConnectionInfo = myConnectionInfo
myTable.ApplyLogOnInfo(myTableLogonInfo)
Next
'Set the parametter value to Crystal Report parameter named P_COURSE and P_CLASS
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
End Sub
=================================================================================
I put a break point to debug but display the error at the following lines:
myReport.SetParameterValue("@P_COURSE", "Course")
myReport.SetParameterValue("@P_CLASS", "Class")
Eventhough, if I set a specific value to Course=1000 and Class = math and still receive the error:
Invalid index. (Exception from HRESULT: 0x8002000B (DISP_E_BADINDEX))
I tried several sources from Google search but it is not working. I really appreciate any detailed code either in C# or VB.NET to solve my issues. Thanks in advance. -
How to pass a JavaBean from servlet to JSP?
Hi there,
I am working on a project that needs to handle quite a few client requests and I want to use the Front Controller pattern that is described in the J2EE pattern page.
The steps described in the front controller pattern is that:
1. A servlet (controller) process the client request.
2. It calls the appropriate cammand object and the cammand object gets the data from the data source and returns a JavaBean that contains the required data.
3. The servlet dispatch to the appropriate View (jsp page)
4. The JSP page displays the data in the JavaBean to the user.
However, I don't know how to pass the JavaBean from the servlet to the JSP page when the servlet forwards the control to the JSP page. Should I make the JavaBean with a request scope or higher? If so, how to uses it in the JSP page? Just refer by the ID of the JavaBean.
If any one knows there is an example or tutorial on how to use this pattern, please let me know.
Thank you !
Regards
EdmundCould you please give more info? i tried to do this, but always get a "Class not found exception":
response$jsp.java:65: Class org.apache.jsp.TestBean not found. TestBean bean = null;
although the class TestBean (no package name => defalt package) is in the WAR file and the Servlet seems to instantiate it (otherwise an exception would occur sooner in the TestServlet code).
my JSP code is:
<%@ page language="java" info="Response page" %>
<jsp:useBean id="bean" class="TestBean" />
<%
TestBean bean2 = (TestBean) request.getAttribute("TheBean");
%>
<html>
<body>
Your value: <%= bean2.getValue() %><BR>
My val: <%= bean2.getNewValue() %><BR>
<P>
Date: <%= new Date() %>
<P>
Neuen Wert eingeben
</body>
</html>
-------------- -
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. -
Default method - how to pass value to method container?
Hello,
I am dealing with a hyperlink in 'Objects and Attachements' section of the workitem.When i click on the link, the default method of the business object gets called automatically.
My question is: How to pass values to the default method (i.e. method container) as i don't invoke the method in my workflow explicitly? The method gets called when we click on the hyperlink.
Regards,
Monica.Hello Monica,
a default method doesn't require parameters (and cannot make use of them), as they are designed to be called from various situation, such as the view from a workflow container, the display button within a workitem or the attachment list. So this is part of the system design.
To make an object dependent of workitem values I usually follow two different design patterns:
<b>1) Using a flowitem/workitem instance with a special default method</b>
- Create a subobject from type WORKITEM (if I'm going to use values from the current workflow instance) or subobject from type WORKINGWI (if I'm going to use values from the current dialog workitem).
- Do not make a general substitution for this new object type
- If using a ZWORKITEM, create an instance of this object type before the dialog step and then pass this object to the dialog workitem
- If using ZWORKINGWI, assign the object instance during the data flow to the step.
- In the properties of the object choose (any one) default method
- Within the coding you have the reference to the workitem/flowitem as object-key-... and you can further use functions/methods to read the workitem/flowitem container and do whatever has to be done
<b>2) Retrieving values from the current workitem on-the-fly</b>
Within the coding of the default method call the function module SWO_QUERY_REQUESTER that returns the instance/id of the current workitem-in-work (with is also set when using the hyperlink from a workitem). If the list is empty, there's no active workitem, otherwise use functions/methods to read the workitem container.
--> edit: Solution is not release safe, is it aint working with SAP R/3 Enterprise and higher
Best regards,
Florin
Message was edited by:
Florin Wach -
How to pass values between views in FPM - GAF
Hi Experts ,
i have a doubt in FPM how to pass values between views .
For Example: i am having 2 views - 1 ) overview , 2 ) edit using the GAF
in 1st view (overview ) i have a table displaying the employee details , i will select a single employee from that table for editing .
how to pass the selected employee details to the 2 nd view (edit ) .
Thanks & regards
chinnaiya PHi chinnaiya pandiyan,
Please follow below steps:
1. To achieve this u need to create two context nodes in the component controller.
2. Say one is EMPLOYEE_DATA and other is SELECTED_DATA.
3. Set the Cardinality of EMPLOYEE_DATA to 0..n and SELECTED_DATA to 1..1.
4. Add same attributes to both nodes. (probably all those fields that are required in table and/or in edit view.
5. Map both these nodes to OVERVIEW view.
6. Map only SELECTED_DATA node to EDIT view.
7. Create table in OVERVIEW view based on EMPLOYEE_DATA node.
8. Create edit form in EDIT view based on SELECTED_DATA node.
9. While navigating from OVERVIEW view to EDIT view, read the selected element of EMPLOYEE_DATA node and copy it to an element of SELECTED_DATA node. This should be written in PROCESS_EVENT method of component controller inherited from FPM component.
10. Now u got the selected data in SELECTED_DATA node which will be displayed in EDIT view.
Regards,
Vikrant -
How to pass values to select options of custom transactions?
I have to call custom transaction-ZMM_POST from my custom report.
I have to pass values to select options(Not to parameters) of ZMM_POST from my report only.
Please tell me how to pass values to select options of custom transactions?Have you tried this?
DATA: T_RSPARAMS TYPE STANDARD TABLE OF RSPARAMS WITH HEADER LINE.
T_RSPARAMS-SELNAME = "S_BUKRS".
T_RSPARAMS-KIND = "S".
T_RSPARAMS-SIGN = "I".
T_RSPARAMS-OPTION = "BT".
T_RSPARAMS-LOW = "100".
T_RSPARAMS-HIGH = "300"
APPEND T_RSPARAMS.
SUBMIT Z_DUMMY WITH SELECTION-TABLE T_RSPARAMS.
Greetings,
Blag.
Maybe you are looking for
-
How do I disable the Symantics TouchPad on my HP Envy 14t notebook?
I have tried to modify the sensitivity of the touchpad on my laptop, but it's still so touchy it's driving me crazy. The other issues I looked at here in the Community forum don't pertain to the machine or utilities I have. I want to COMPLETELY DISAB
-
Is it possible to run more than one case at a time?
Using a case structure, is it possible to have more than 1 case running at a time? I'm currently using a for loop's iteration terminal to select which case to run but each case contains a for loop with a timer delay. I want them all to run simultaneo
-
Back up from time machine and first new tm machine back up on new mac
hi i just made a back up from time machine into a new iMac... no i need to configure again TM for the new mac but even if i use the same TM disc the first new back up doesn't write onto the old one so I need to make a new back up from scratch... can'
-
Console keeps repeating message???
I don't have a clue about this stuff but I think I'm suppose correct this? I CAN print stuff but I must of done something wrong because I keep getting the following message in console: 2009-08-16 14:58:37.561 HP Director (All-in-One)[733] CFLog (0):
-
I had to reinstall Flash MX 2004 Professional when my at work computer, a Dell PC, was replaced but it installed Flash MX 2004 instead. I Don't WANT Flash MX 2004 I want Flash MX 2004 Professional.What do I do?