Acces to Object of calling Function-Group
Hello ,
in Functiongroup IQS0 I have a Textedit-control. This Function-group calls a FM from another Fuction-group(XQQm).
From XQQM I want to manipulate the Textedit-Control like I can manipulate Data from a calling program.
see:
data:fieldname '(Sapliqs0)Field
' --> can this be the textedit-control
Fieldsymbols: <fs>.
Assign <fs> to (fieldname)
<fs> = 'Manipulated'
Is it possible ?
Best regards
Simone
Hello Simone
You may have a look at the following documentation:
[SAP User Exits and the People Who Love Them|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8]
Regards
Uwe
Similar Messages
-
Maintain object or update function group error
Hi experts,
I had searched the forums but did not find a conclusive solution so i am posting the Question.
I had created a ztable. Maintained table generator then i created a T-code for the table . But when i am executing the t-code its giving me an error message maintain object or update function group. I checked my function group but its active actually i think the screen no which i am giving in table maintainenace generatoris not getting generated.
I tried to figure it out but couldn't .
Any help would be appreciated.
Regards,
Pawan.Hi Matt ,
Thanks for your Reply
To answer your 1st Question
1. How have your created the transaction for the table?
I have created my Transaction for the table through se93. In that i selected 4 option that is transaction with parameter.
In that under transaction gave sm30.gave my viewname i.e table name and update i'e. X.
To answer your 2d Q
Tell use the error message you get in SM30 exactly
It is not a runtime error it is an error like a pop up which comes up when i go to sm30 and click on maintain.
The error is as i have mentioned earlier. -
A list of global objects of the function group "bbp_bid_inv"
Hi everyone,
Somebody have a list of all (or some) global objects ( i mean : internal tables, structures, transparent tables, ...etc) of the function group "bbp_bid_inv" ?
Thanks & regardsfind out in se 80
cheers! -
Adding authorization object for "Function Group"s ?
Is it possible to add any authorization object for any function group ?
We have an issue i.e. whenever user "XYZ" is getting some Windows Excel related error whenever trying call an excel report from BW server. System log related to "XYZ" user shows that -> User "XYZ" has no RFC authorization for the function group "ABCD". The RFC authorization object is S_RFC.
Function Group you can check through SE37->GoTO->Display Function Group
Now is it possible to add authorization for any "Function Group" ?You give authorisation for all function groups by giving auth object S_RFC a * value in field RFC_NAME
However I do not recommend this as giving wide access to RFC's can bypass a lot of the security you have implemented for the users.
In this case, add only the function group that the user requires in this instance into S_RFC -
Function group in tablenaintenance generator.
hi experts,
can anybody please tell me why we create a function group
while creating a table maintenance generator?
what is the utility of creating a function group.
regards
pankajFunction Groups
Function groups are containers for function modules. You cannot execute a function group. When you call a function module, the system loads the whole of its function group into the internal session of the calling program (if it has not already been loaded). For further information, refer to Organization of External Procedure Calls.
The following diagram shows the structure of a function group: The name of a function group, fgrpcan be up to 26 characters long. This is used by the system to create the components of the group (main program and corresponding include programs). When you create a function group or function module in the Function Builder , the main program and include programs are generated automatically.
The main program SAPLfgrp contains nothing but the INCLUDE statements for the following include programs:
キ LfgrpTOP. This contains the FUNCTION-POOL statement (equivalent for a function group of the REPORT or PROGRAMstatement) and global data declarations for the entire function group.
キ LfgrpUXX. This contains further INCLUDEstatements for the include programs LfgrpU01, LfgrpU02,... These includes contain the actual function modules.
キ The include programs LfgrpF01, LfgrpF02,... can contain the coding of subroutines that can be called with internal subroutine calls from all function modules of the group.
The creation of these INCLUDE programs is supported from the ABAP Workbench by forward navigation (for example creation of a subroutine include by double clicking on the name of a subroutine in a PERFORM statement within a function module).
You cannot declare a COMMON PART in a function group. Function groups have their own table work areas (TABLES). Function groups encapsulate data. In this respect, they are a precursor of ABAP Objects (see From Function Groups to Objects ).
All of the function modules in a function group can access the global data of the group. For this reason, you should place all function modules that use the same data in a single function group. For example, if you have a set of function modules that all use the same internal table, you could place them in a function group containing the table definition in its global data.
Function groups, like executable programs and module pools, can contain screens (selection screens and lists) as components. User input is processed either in dialog modules or in the corresponding event blocks in the main program of the function group. There are special include programs in which you can write this code. In this way, you can use function groups to encapsulate single screens or screen sequences.
In SAP, it is a function group - instead of function - that is loaded into active memory.
Function ( or function module ) is the one that you call from the program to do things.
A function group contains functionally related function modules, global variables and procedures .
To display / edit function module you use SE37,
To display / edit function group you use SE80 .
Reward if found helpful,
regards
palak -
Write the ABAP Function Group Problem
Dear All,
I have some question in the ABAP Object.
The function group had some screen logic here.
if i run the function module under this function group, screen logic will be trigger or not?
Regards,
Lukehi ,
ofcourse Screen logic will trigger based on the FM in which this screen has been called. -
Change name of Function group?
How can we change the name of the custom function group which was created by me?
Is there any change to be done ,after changing the name of function group ,to the function module assigned to the earlier function group??Hi,
goto SE80 --> select funcitongroup and name --> press enter --> you can see object list.
In object list --> select function group ---> right clik mouse --> and rename the function group.
Or goto SE37 --> go to function groups --> Change group --> give new name
Thanks,
If helps pls award points -
hi
tehre was a short dump in qas sysatem and i forun that reason wa that the function group zfi creted as in tdv did not moved to QAS
not i dont hvae any idea reagrding what changes done to that function group and i can see that function group in tdv and not in qas
now i want to move all objects fo this funtion group to QAS
from se80 i am able to see all objects in tdv but i want to move this not to qas
so how can i create request for this function group in tdv to include all objects in it and move to Quality
regards
aroraso if i go to se80 and save and activate the function group and create a request for it will all objects under the function group will move to qas right?
-
Copied Function Group to New Function Group Name
After I did this why do some objects have blue text and some have black text in SE80 under the new function group name??
Thanks.HI,
This exists to show you an inactive object on the Function Group.
Try to activate the all objects in Function Group and the color will be changed.
Regards.
Marcelo Ramos -
How to add a function-group to authorization object S_RFC ?
I have implemented a function group, that is to be called from "the outside" via RFC-calls.
Have been told that this func.group has to be added to object S_RFC, and assigned to the user(s) that are going to use this call.
Where, in the SAP-system, do we maintain theese connections ?
(I'm new to the SAP-world, and hope someone will give me some help...Hi
I believe you should insert the authority-check in the fms of your function group:
AUTHORITY-CHECK OBJECT 'S_RFC'
ID 'RFC_TYPE' FIELD <value>
ID 'RFC_NAME' FIELD <value>
ID 'ACTVT' FIELD <value>
This object has to assign to profile of all users who'll use those fms.
You can manage the profile by trx PFCG.
Max -
Calling subroutine in another function group
Hi all,
I want to include a call to subroutine TKKA1000_FUELLEN in function group kkag in my custom program. Can I do that? I come from a C/JAVA baclground in which I could INCLUDE the class or set of programs with a simple statement. can i do the smae here?
regards,
MatHI,
Check the below code....
<b>PERFORM form IN PROGRAM prog.</b>
Additions:
1. ... USING p1 p2 p3 ...
2. ... CHANGING p1 p2 p3 ...
3. ... TABLES itab1 itab2 ...
4. ... IF FOUND
In an ABAP Objects context, a more severe syntaxcheck is performed that in other ABAP areas. See Passsing SY-REPID not allowedand Receiving SY-SUBRC not allowed.
Effect
This variant is similar to variant 2 (externalperform). However, here you can specify the names of both thesubroutine and the program in which it occurs dynamically at runtime.If you do this, you should place the variables form and prog in parentheses. The names in form and prog must beentered in uppercase, otherwise a runtime error occurs. If you do notspecify any additions (such as USING) you do not need to specifythe program after IN PROGRAM. In this case, the system looks forthe subroutine in the current program.
Example
DATA: RNAME(30) VALUE 'WRITE_STATISTIC', "Form and program
"names must
PNAME(8) VALUE 'ZYX_STAT'. "be written in
"upper case
PERFORM (RNAME) IN PROGRAM ZYX_STAT.
PERFORM WRITE_STATISTIC IN PROGRAM (PNAME).
PERFORM (RNAME) IN PROGRAM (PNAME).
All three PERFORM statements have the same effect, that is,they call the subroutine 'WRITE_STATISTIC', which is defined inthe program 'ZYX_STAT'.
Notes
Dynamic PERFORM statements require more CPU time, since the system has to locate the subroutine each time.
Regards,
Vara -
Java.lang.VerifyError - Incompatible object argument for function call
Hi all,
I'm developing a JSP application (powered by Tomcat 4.0.1 in JDK 1.3, in Eclipse 3.3). Among other stuff I have 3 classes interacting with an Oracle database, covering 3 use cases - renaming, adding and deleting an database object. The renaming class simply updates the database with a String variable it receives from the request object, whereas the other two classes perform some calculations with the request data and update the database accordingly.
When the adding or deleting classes are executed, by performing the appropriate actions through the web application, Tomcat throws the following:
java.lang.VerifyError: (class: action/GliederungNewAction, method: insertNewNode signature: (Loracle/jdbc/driver/OracleConnection;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I)V) Incompatible object argument for function call
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:120)
at action.ActionMapping.perform(ActionMapping.java:53)
at ControllerServlet.doResponse(ControllerServlet.java:92)
at ControllerServlet.doPost(ControllerServlet.java:50)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
...The renaming works fine though. I have checked mailing lists and forums as well as contacted the company's java support but everything I have tried out so far, from exchanging the xerces.jar files found in JDOM and Tomcat to rebuidling the project didn't help.
I just can't explain to myself why this error occurs and I don't see how some additional Java code in the other 2 classes could cause it?
I realize that the Tomcat and JDK versions I'm using are totally out of date, but that's company's current standard and I can't really change that.
Here's the source code. I moved parts of the business logic from Java to Oracle recently but I left the SQL statements that the Oracle stored procedures are executing if it helps someone.
package action;
import java.sql.CallableStatement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.StringTokenizer;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import oracle.jdbc.driver.OracleConnection;
* This class enables the creation and insertion of a new catalogue node. A new node
* is always inserted as the last child of the selected parent node.
public class GliederungNewAction implements Action {
public String perform(ActionMapping mapping, HttpServletRequest request,
HttpServletResponse response) {
// fetch the necessary parameters from the JSP site
// the parent attribute is the selected attribute!
String parent_attribute = request.getParameter("attr");
String catalogue = request.getParameter("catalogue");
int parent_sequenceNr = Integer.parseInt(request.getParameter("sort_sequence"));
// connect to database
HttpSession session = request.getSession();
db.SessionConnection sessConn = (db.SessionConnection) session.getAttribute("connection");
if (sessConn != null) {
try {
sessConn.setAutoCommit(false);
OracleConnection connection = (OracleConnection)sessConn.getConnection();
int lastPosition = getLastNodePosition( getLastChildAttribute(connection, catalogue, parent_attribute) );
String newNodeAttribute = createNewNodeAttribute(parent_attribute, lastPosition);
// calculate the sequence number
int precedingSequenceNumber = getPrecedingSequenceNumber(connection, catalogue, parent_attribute);
if ( precedingSequenceNumber == -1 ) {
precedingSequenceNumber = parent_sequenceNr;
int sortSequence = precedingSequenceNumber + 1;
setSequenceNumbers(connection, catalogue, sortSequence);
// insert the new node into DB
insertNewNode(connection, catalogue, newNodeAttribute, parent_attribute, "Neuer Punkt", sortSequence);
connection.commit();
} catch(SQLException ex) {
ex.printStackTrace();
return mapping.getForward();
* Creates, fills and executes a prepared statement to insert a new entry into the specified table, representing
* a new node in the catalogue.
private void insertNewNode(OracleConnection connection, String catalogue, String attribute, String parent_attribute, String description, int sortSequence) {
try {
String callAddNode = "{ call fasi_lob.pack_gliederung.addNode(:1, :2, :3, :4, :5) }";
CallableStatement cst;
cst = connection.prepareCall(callAddNode);
cst.setString(1, catalogue);
cst.setString(2, attribute);
cst.setString(3, parent_attribute);
cst.setString(4, description);
cst.setInt(5, sortSequence);
cst.execute();
cst.close();
} catch (SQLException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
// String insertNewNode = "INSERT INTO vstd_media_cat_attributes " +
// "(catalogue, attribute, parent_attr, description, sort_sequence) VALUES(:1, :2, :3, :4, :5)";
// PreparedStatement insertStmt;
// try {
// insertStmt = connection.prepareStatement(insertNewNode);
// insertStmt.setString(1, catalogue);
// insertStmt.setString(2, attribute);
// insertStmt.setString(3, parent_attribute);
// insertStmt.setString(4, description);
// insertStmt.setInt(5, sortSequence);
// insertStmt.execute();
// insertStmt.close();
// } catch (SQLException e) {
// e.printStackTrace();
* This method returns the attribute value of the last child of the parent under which
* we want to insert a new node. The result set is sorted in descending order and only the
* first result (that is, the last child under this parent) is fetched.
* If the parent node has no children, "parent_attr.0" is returned.
* @param connection
* @param catalogue
* @param parent_attribute
* @return attribute of the last child under this parent, or "parent_attr.0" if parent has no children
private String getLastChildAttribute(OracleConnection connection, String catalogue, String parent_attribute) {
String queryLastChild = "SELECT attribute FROM vstd_media_cat_attributes " +
"WHERE catalogue=:1 AND parent_attr=:2 ORDER BY sort_sequence DESC";
String lastChildAttribute;
PreparedStatement ps;
try {
ps = connection.prepareStatement(queryLastChild);
ps.setString(1, catalogue);
ps.setString(2, parent_attribute);
ResultSet rs = ps.executeQuery();
/* If a result is returned, the selected parent already has children.
* If not set the lastChildAttribute to parent_attr.0
if (rs.next()) {
lastChildAttribute = rs.getString("attribute");
} else {
lastChildAttribute = parent_attribute.concat(".0");
rs.close();
return lastChildAttribute;
} catch (SQLException e) {
e.printStackTrace();
return null;
* This helper method determines the position of the last node in the attribute.
* i.e for 3.5.2 it returns 2, for 2.1 it returns 1 etc.
* @param attribute
* @return position of last node in this attribute
private int getLastNodePosition(String attribute) {
StringTokenizer tokenizer = new StringTokenizer(attribute, ".");
String lastNodePosition = "0";
while( tokenizer.hasMoreTokens() ) {
lastNodePosition = tokenizer.nextToken();
return Integer.parseInt(lastNodePosition);
* This method calculates the attribute of a node being inserted
* by incrementing the last child position by 1 and attaching the
* incremented position to the parent.
* @param parent_attr
* @param lastPosition
* @return attribute of the new node
private String createNewNodeAttribute(String parent_attr, int lastPosition) {
String newPosition = new Integer(lastPosition + 1).toString();
return parent_attr.concat("." + newPosition);
* This method checks if the required sequence number for a new node is already in use and
* handles the sequence numbers accordingly.
* If the sequence number for a new node is NOT IN USE, the method doesn't do anything.
* If the sequence number for a new node is IN USE, the method searches for the next free
* sequence number by incrementing the number by one and repeating the query until no result
* is found. Then all the sequence numbers between the required number (including, >= relation)
* and the nearest found free number (not including, < relation) are incremented by 1, as to
* make space for the new node.
* @param connection
* @param catalogue
* @param newNodeSequenceNumber required sequence number for the new node
private void setSequenceNumbers(OracleConnection connection, String catalogue, int newNodeSequenceNumber) {
// 1. check if the new sequence number exists - if no do nothing
// if yes - increment by one and see if exists
// repeat until free sequence number exists
// when found increment all sequence numbers freeSeqNr > seqNr >= newSeqNr
String query = "SELECT sort_sequence FROM vstd_media_cat_attributes " +
"WHERE catalogue=:1 AND sort_sequence=:2";
PreparedStatement ps;
try {
ps = connection.prepareStatement(query);
ps.setString(1, catalogue);
ps.setInt(2, newNodeSequenceNumber);
ResultSet rs = ps.executeQuery();
// if no result, the required sequence number is free - nothing to do
if( rs.next() ) {
int freeSequenceNumber = newNodeSequenceNumber;
do {
ps.setString(1, catalogue);
ps.setInt(2, freeSequenceNumber++);
rs = ps.executeQuery();
} while( rs.next() );
// increment sequence numbers - call stored procedure
String callUpdateSeqeunceNrs = "{ call fasi_lob.pack_gliederung.updateSeqNumbers(:1, :2, :3) }";
CallableStatement cst = connection.prepareCall(callUpdateSeqeunceNrs);
cst.setString(1, catalogue);
cst.setInt(2, newNodeSequenceNumber);
cst.setInt(3, freeSequenceNumber);
cst.execute();
cst.close();
// String query2 = "UPDATE vstd_media_cat_attributes " +
// "SET sort_sequence = (sort_sequence + 1 ) " +
// "WHERE catalogue=:1 sort_sequnce >=:2 AND sort_sequence <:3";
// PreparedStatement ps2;
// ps2 = connection.prepareStatement(query2);
// ps2.setString(1, catalogue);
// ps2.setInt(2, newNodeSequenceNumber);
// ps2.setInt(3, freeSequenceNumber);
// ps.executeUpdate();
// ps.close();
} // end of if block
rs.close();
} catch (SQLException e) {
e.printStackTrace();
* This method finds the last sequence number preceding the sequence number of a node
* that is going to be inserted. The preceding sequence number is required to calculate
* the sequence number of the new node.
* We perform a hierarchical query starting from the parent node: if a result is returned,
* we assign the parent's farthest descendant's node sequence number; if no result
* is returned, we assign the parent's sequence number.
* @param connection
* @param catalogue
* @param parent_attr parent attribute of the new node
* @return
private int getPrecedingSequenceNumber(OracleConnection connection, String catalogue, String parent_attr) {
int sequenceNumber = 0;
String query = "SELECT sort_sequence FROM vstd_media_cat_attributes " +
"WHERE catalogue=:1 " +
"CONNECT BY PRIOR attribute = parent_attr START WITH parent_attr=:2 " +
"ORDER BY sort_sequence DESC";
try {
PreparedStatement ps = connection.prepareStatement(query);
ps.setString(1, catalogue);
ps.setString(2, parent_attr);
ResultSet rs = ps.executeQuery();
if ( rs.next() ) {
sequenceNumber = rs.getInt("sort_sequence");
} else {
// TODO: ggf fetch from request!
sequenceNumber = -1;
rs.close();
ps.close();
} catch (SQLException e) {
e.printStackTrace();
return sequenceNumber;
}After further googling I figured out what was causing the problem: in eclipse I was referring to external libraries located in eclipse/plugins directory, whereas Tomcat was referring to the same libraries (possibly older versions) in it's common/lib directory.
-
What is the difference between function groups and Object Orientation
Hello all
I have read about this on the help.sap.com site, I still do not understand it completely, can some one explain me with a simple example please ? (Not the increment counter example please !).
Thanks a ton.
Rgds
SameerHello Sameer
When you call a module of a function group for the first time in your program then the entire function group is loaded. However, this can happen only once within your report and all global variables within the function group will have the same values all the time (except they are manipulated via fm's).
In contrast, you can create as many instances of the same class as you want and all of them can have different global attributes. And all these instances are independent of each other.
On the other hand, if fm_A changes global attributes of the function group and fm_B reads these attributes then fm_B read the changed values.
Or in other words:
Function Group = can be instantiated only ONCE
Class = can be instantiated unlimited
Regards
Uwe -
How to add function group to the authorization object S_RFC ?
Hi All,
Can you please tell you how to add the function group FG_DIAGLS_DATA_ENRICHMENT to the authorization object
S_RFC?
In solman_setup under basis configuration when I execute the step "SetupDPC/DCC Web Service URL" its getting failed because of the
following error which i found it in the agent log
"java.rmi.RemoteException:RfcExecutionException; nested exception is:
com.sap.sup.admin.abap.rfc.exception.RfcExecutionException: An
exceptionoccured during the execution of the function
'FM_DIAGLS_PUSH_PHYSICAL_HOST': RFC_NO_AUTHORITY >
com.sap.sup.admin.abap.rfc.exception.RfcExecutionException:An exception
occured during the execution of the function
'FM_DIAGLS_PUSH_PHYSICAL_HOST': RFC_NO_AUTHORITY >
com.sap.mw.jco.JCO$Exception:No RFC authorization for function module
FM_DIAGLS_PUSH_PHYSICAL_HOST. <Mid"
Thanks,
Satheesh EHi,
Please follow below steps:
1) Go to SE01
2) Click on create New workbench request and give desc once popup appears, Click Ok
3) Now open the trasport in edit mode
4) Add
Program ID - R3TR
Object Type - FUGR
Object name - Name of the Function group
>note that if you tranport Function group all the latest Function modules in function group along
>with screens will be included in the transport.
Regards
Shital
Formatted by: Vijay Babu Dudla on Apr 25, 2009 5:08 AM -
Call screen of a function group
Hi experts,
How can I call a screen of a function group from another function and then return to the place of call?
I have my own function and I need to call the screen of a certain function group.Hi.
If there is function module A, which calls screen N assigned to function group B,
so to call screen N,
you should call function module A within your function module.
Maybe you are looking for
-
Long delay repairing a macbook air
Hello to everyone, I live in Argentina. Last september my 2012 MacBook Air crashed. I tried everything and nothing worked. The SSD was dead. I first talked over the phone with an authorized reseller and repairing service (MaximSoft) and they advised
-
Hi all , Iam copying standard pgm of IW38 after copying the program and exectuing iam missing Icon for All Selections in application tool bar . i debugging i got that pgm is calling logical database there is perform for setting Pf status . this perf
-
HT4623 i have a iphone 4, when i go to general it doesn't show update software
i have a iphone 4,when i go to general there is no update software
-
Hello, Suppose i have a input xml: <Name>XYZ</Name> <Roll>12</Roll> <Class>3</Class> Now I want output as: <Header>XYZ</Header> <Body><![CDATA[<Name>XYZ</Name> <Roll>12</Roll> <Class>3</Class>]]> </Body> Please help how wi
-
ICloud Mail on Windows Live Mail 2012
Hi. I have recently bought a new PC as my old one was showing its age (it was 6 years old). On my old PC (running Windows 7 Home Premium 64Bit), I had no issues running iCloud Mail inside Windows Live Mail 2012 using IMAP in the few years However, fo