How to create function module in abap for VirtualProvider in bi
how to create function module in abap for VirtualProvider in bi ???????????????
can any one help me with simple example ?????????????????
Moderator message : Duplicate post locked. Read forum rules before posting.
Edited by: Vinod Kumar on Jun 15, 2011 4:40 PM
Hi ,
Thanks for replies about my question??.
If i am using the exit in my char relation ship how can i debugg that exit???
if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
Thanks.
Similar Messages
-
How to create function module for getting customer name
Hi Experts,
How to create function module? when in import parameter kunnr values to be passed it must give name1 details according to the customer number...
how to write the logic in source code....
Regards,
Thiru. R1. First of all create function group.
2. Create function module using this function group.
3. If only one kunnr is needed at a time, create import parameter for it. But if many kunnr to be entered at a time,use table.
4. Fetch name1 for each kunnr from KNA1 table.
"->> if many kunnr
if not t_kunnr[] is initial.
select kunnr as kunnr name1 as name1
into table t_kunnr_name1
from kna1
for all entried in table t_kunnr
where kunnr = t_kunnr-kunnr.
endif.
sort t_kunnr_name1 by kunnr name1.
delete adjacent duplicates from t_kunnr_name1 comparing kunnr name1.
table t_kunnr_name1 will contain kunnr and its name1.
I hope logic is clear for you now.
Regards,
Aparna -
How to create function module step by step
hi experts,
i am new to ABAP.
can anybody tell me the step by step process on how to create a function module for adding two numbers without using editor screen.
ex: 2+3=5.Hi,
You can only create function modules and function groups using the Function Builder in the ABAP Workbench. For further information, refer to Creating New Function Modules. This section uses an example to illustrate how a function module is created from the point of view of ABAP programming.
Function Groups and Function Modules:
Firstly, we create a new function group DEMO_SPFLI to hold the function module. Then, we can create the new function module.
Parameter Interface:
You can specify the types of interface parameters in function modules in the
same way as the parameter interfaces of subroutines. Since function
modules can be used anywhere in the system, their interfaces can only contain
references to data types that are declared systemwide. These are the elementary
ABAP data types, the systemwide generic types, such as ANY TABLE, and types
defined in the ABAP Dictionary. You cannot use LIKE to refer to data types
declared in the main program.
Exceptions:
Our function module needs an exception that it can trigger if there are no entries
in table SPFLI that meet the selection criterion. The exception NOT_FOUND
serves this function.
Source Code:
Having defined the parameter interface and exceptions, we can now write the
source code of our function module. To do this, choose Source code in the
Function Builder. This opens the ABAP Editor for the include program
L<fgrp>U<xx> (see Function Groups). This is the include that will
hold the program code for the function module;
Data in Function Modules
You can use the TYPES and DATA statements to create local data types and
objects. The interface parameters also behave like local data objects. In
addition, you can access all of the global data of the main program. This data is
defined in the include program L<fgrp>TOP. To open this include, choose Goto
Global data. The global data behaves like the instance attributes of a class.
The first time you call a function module in a particular function group, the data is
loaded into memory. It can then be accessed and changed by all of the function
modules in the group. The system retains the values until the next time a function
module is called.
Calling Subroutines
You use subroutines for local modularization. Function modules can
also use this technique. The function module that they call are defined in the
corresponding main program.
If you only want to call a subroutine from a single function module, it is best to
define them in the same include program as the function module itself, directly
after the ENDFUNCTION statement. These subroutines can be called from all
function modules in the function group, but for clarity, they should only be called
from the function module that precedes them.
If you want to define a subroutine that will be called from several different function
modules, you can define a special include program for it with the name
L<fgrp>F<xx>.
Raising Exceptions
There are two ABAP statements for raising exceptions. They can only be used in
function modules:
RAISE <except>.
and
MESSAGE..... RAISING <except>.
The effect of these statements depends on whether the calling program handles
the exception or not. If the name <except> of the exception or OTHERS occurs
in the EXCEPTIONS addition of the CALL FUNCTION statement, the exception is
handled by the calling program.
If the calling program does not handle the exception
The RAISE statement terminates the program and switches to debugging mode.
The MESSAGE ..... RAISING statement display the specified message. How the
processing continues depends on the message type.
If the calling program handles the exception, both statements return control to the
program. No values are transferred. The MESSAGE ..... RAISING statement
does not display a message. Instead, it fills the system fields SY-MSGID, SYMSGTY,
SY-MSGNO, and SY-MSGV1 to SY-MSGV4.
Source Code of READ_SPFLI_INTO_TABLE
The entire source code of READ_SPFLI_INTO_TABLE looks like this:
FUNCTION READ_SPFLI_INTO_TABLE.
""Local interface:
*" IMPORTING
*" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
*" EXPORTING
*" VALUE(ITAB) TYPE SPFLI_TAB
*" EXCEPTIONS
*" NOT_FOUND
SELECT * FROM SPFLI INTO TABLE ITAB WHERE CARRID = ID.
IF SY-SUBRC NE 0.
MESSAGE E007(AT) RAISING NOT_FOUND.
ENDIF.
ENDFUNCTION.
The function module reads all of the data from the database table SPFLI where
the key field CARRID is equal to the import parameter ID and places the entries
that it finds into the internal table SPFLI_TAB. If it cannot find any entries, the
exception NOT_FOUND is triggered using MESSAGE...RAISING. Otherwise, the
table is passed to the caller as an exporting parameter.
Regards,
Chandru -
How to create function module in real time
hi experts,
can somebody explain a real time requiremwnt , to create a function module.
its very urgent.
i want elaborately.
regards,
subhasis.hi,
In real time
1. as per my knowledge we create function modules to Inbound IDOC /outbound processing..
2.Interface between a program..
Example we need to take some data from a report say materials and plant and process some bapi and return logfiles to the report we can use FM here too.
To create a function module
First you need to create a function group (function group holds a number of function modules relevant)
SE37>goto>function groups-->create group ..click this create group..
Now in the pop up enter the function groupname Eg: ZW_FG1 plus short text and saveit
Now again goto SE37--> enter new Function module name eg:ZW_FM1
and press F5.
Now again a popup you need to enter
function group name : ZW_FG1
and short test and save it..
Now the Function module is created under the Function group ZW_FG1.
write your export import table parameters and you source code.
rewards if useful
regards,
nazeer
Message was edited by:
nazeer shaik -
How to create Function Module with TABLE parameter (for internal table)
Hi Guys,
I am trying to create a function module by using TABLE parameter. I have to pass an internal table to this function module for processing.
But it saying : TABLES parameters are obsolete!
And I am not going further.
Please suggest any work arround.
ThanksHi,
create a table type in SE11..
Then use that in your function module importing/exporting/changing parameter for passing internal tables..
Thanks,
Naren -
How to create function module to update z tables?
Hi,
I am new to ABAP. I checked the forum but did not find relevant solutions.
I have 2 z tables - ZFLIGHT and ZCUSTOMER. I have a few entries in each table.
I want to write a report to update the entries in the table using function modules. For that I have created a function module - zflight_fm and also a function group- zflight_fg and assigned the function group to the Fm. I do not know how to proceed further, what to put as import, export parameters, tables, changing etc. Further I want exceptions to handle the successful update of the entries.
Thanks and regards,
SmruthiSteps:
1) Changing --->a) Zflight TYPE ZFLIGHT(DDIC Ref) OR Zflight TYPE ANY TABLE
b) ZCustomer TYPE ZFLIGHT(DDIC Ref) OR ZCustomer TYPE ANY TABLE
2) Execptions:
a) Upload_failed_Flight
b) Upload_Failed_Customer
3) Exporting ---> a) Information what rows are uploaded
Source Code:
Insert Zflight from Zflight(changing parameter).
If insert failed
RAISE Upload_failed_Flight.
endif.
Insert ZCustomer from ZCustomer(changing parameter).
If insert failed
RAISE Upload_failed_Customer.
endif.
Regards,
Gurpreet -
Hi,
I am trying to create a function module using RSAX_BIW_GET_DATA_SIMPLE as a template. Can someone tell me how can I modify and rename this module. Also, how can I create extract structure from the function module.
I have tried to create a module in the module group by right cliking and then 'create', but it wouldn't let me do that way instead it giving me message 'function module name is reserved for SAP'. I get this message no matter what name I provide.
Basically I am trying to create a function module to extract data from SD module into BW. I appreciate your help with reward.
Thanks,
Rao.Hi,
It is almost the same but a different transaction.
1. Goto SE37.
2. Follow the path
Goto --> Function Group --> Create Group
3. Then enter a function name Z***** and click create.
The following link gives you more information about the functions and groups and others:
http://cma.zdnet.com/book/abap/ch19/ch19.htm
If you are looking for ENHANCEMENT kind of a thing then follow the following path:
1. Log onto R/3
2. TCODE: SMOD
3. Enhancement RSAP0001.
4. Double click on the one you are looking for i.e. Transaction / Master Data.
5. In the Function Module Double click on the INCLUDE.
Hope it helps,
Regards,
GPK.
Message was edited by: Praveen -
How to call function module in BPS for step by step execution.??
Hi All,
I used the Exit(function module) in char relation ship for derivation,combination check and proposal defined the source char and target char and function module for Derivation,every thing working fine.But how can i call the function module once i entered the data in my planning layout.Just i need to validate my function module working fine or not???
How can i debug the function modules in BPS ,because we are using the exits in different places,please any one can explain each place how we can do the debug??Where we have to put the break points?? .
Just give the path i can try in my system BPS 4.0 version we are using.
Note:I know how to debug the function module only.but I don't know Using BPS screen's .
Thanks,Hi ,
Thanks for replies about my question??.
If i am using the exit in my char relation ship how can i debugg that exit???
if i am using BPS0 how to do it???If i am using BPS_WB how to do it??
Case1.Variable (type Exit) I known how to do debugg this one in BPS0 but i'm not sure in BPS_WB??
Case2:Char Relation Ship(Type Exit) how to do in BPS0 and BPS_WB??.
Thanks. -
How to Create Function Module BAPI_GETGLACCPERIODBALANCES Carry Forward
Dear All,
In SAP there is a Function Module BAPI_GETGLACCPERIODBALANCES to carry forward balance GL account. But in this case GL account (Balance Sheet) that i used (BS200150) using IO Number as is cost object, I want to know if there is a function module standard provide by SAP that can get carry forward balance the GL account per IO Number if in the Year End Closing , we run T-code F.16 to carry forward balance that posting in previous fiscal year, or we have to create a new function module, how to create it?
Kindly help with this issue
Thanks,
Regards
Aries SYes, I tried passing constant '10.000', but still quantity is not getting updated.
My code is:
CALL FUNCTION 'BAPI_CUSTOMERRETURN_CREATE'
EXPORTING
SALESDOCUMENTIN =
RETURN_HEADER_IN = RETURN_HEADER_IN
RETURN_HEADER_INX = RETURN_HEADER_INX
SENDER =
BINARY_RELATIONSHIPTYPE = 'VORA'
INT_NUMBER_ASSIGNMENT =
BEHAVE_WHEN_ERROR =
LOGIC_SWITCH =
TESTRUN =
CONVERT = ' '
IMPORTING
SALESDOCUMENT = SALESDOCUMENT
TABLES
RETURN = RETURN
RETURN_ITEMS_IN = RETURN_ITEMS_IN
RETURN_ITEMS_INX = RETURN_ITEMS_INX
RETURN_PARTNERS = RETURN_PARTNERS
RETURN_SCHEDULES_IN = RETURN_SCHEDULES_IN
RETURN_SCHEDULES_INX = RETURN_SCHEDULES_INX
RETURN_CONDITIONS_IN =
RETURN_CFGS_REF =
RETURN_CFGS_INST =
RETURN_CFGS_PART_OF =
RETURN_CFGS_VALUE =
RETURN_CFGS_BLOB =
RETURN_CFGS_VK =
RETURN_CFGS_REFINST =
RETURN_TEXT =
RETURN_KEYS =
EXTENSIONIN =
PARTNERADDRESSES = -
How to upload Excel file in BI using function module in abap program
How to upload Excel file in BI using function module in abap program?
Hi Anuj,
To upload the file , you can try a standard program "RSEPSFTP" .
while you execute the program , a selection screen appears in which the inputs should be give as
RFC destination - The target server name
FTP command- PUT
local file - your file name
local directory - path of your local file
remote file - your target file name
remote directory - where it has to be stored
Hope this is useful for you
Thanks & regards
Anju -
How to use this function module on abap hr GET_PDSNR_RANGE
how to use this function module on abap hr GET_PDSNR_RANGE
thankx.PASS INETRNAL TABLE WITH SOME DATA TO TABELLE FOR GENERATING PDSNR SEQUENCE
-
To find Function Module is used for How many times
Hi Gurus.
How to find a Function module is used for how many times since it is created.. we went through the Tcode STAT , ST03, STAD, STATTRACE but in ST03 we can find it for Program but we could not find it for Function module , So can any one please suggest us . we are using ECC 6.0 version.
Thanks and Regards,
Chaitanya.Hi Chaithu,
Go to SE37,enter your function module, click on where used list button on the application bar.
All the program used your function module used is displayed.
Regards,
Venkat. -
How to delete Thr created functional module dynamically
Hi All,
How to delete Thr created functional module dynamically
Regards,
Lisa
Message was edited by:
Lisa RoyHi,
You can use the function module RS_FUNCTION_DELETE to do that.
Make sure you are not deleting any standard FM's.
Example
call function 'RS_FUNCTION_DELETE'
exporting
funcname = 'ZFM_NAME" " Function modue name
suppress_popups = 'X' " TO suppress any pop-ups that come when you delete
exceptions
error_message = 1
cancelled = 2
function_released = 3
others = 4.
Regards,
Sesh -
How to create functional location for IE02
hi all,
can anyone please tell me that how to create functional location for IE02?
Regards saurabh.To attach a functional location to an equipment, please make sure the following settings,
1- You have defined the installation allowed at functional location for the following equipment category.
2- Make sure status of your equipment is AVLB not ESTO.
then Goto IE02 in the structure tab ---> click change installation location and install the functional location.
Regards,
EJ -
Function module in BW for Balance Sheet
Dear all,
i have a request to create a FM for BW module.I'm new at abap in BW so i want kindly to ask you to help me with some material or knowledge that you have.
The specific request is for Balance Sheet. It is done in BW with routine but i have to add this routines in one functional modul.The misunderstanding for me is that this routine use some standard form (like compute_data_field which is call dynamically ) for input parameter and i'm not sure in my FM how to take the same input parameter.
If someone have some expirience with this i will rewards with points
Thank you.In the BeX, when you are creating the query, you need to create a variable to the object by doing the following:
1 Select the object in the leftside
2 create new variable
3 in the variable select the eleboration with customer exit
4 after creating the variable, go into transaction CMOD
5 Select the project for BW, if you don't have one, just create it. (You need to include it into the data packet for BW, if you don't have you must create it otherwise you'll get the data packet tmp and you cannot transport it)and select the Henancement Assignment RSAP0001.
3 In the components area you'll get 4 functional exit:
EXIT_SAPLRSAP_001
EXIT_SAPLRSAP_002
EXIT_SAPLRSAP_003
EXIT_SAPLRSAP_004
click on the first exit and than click on INCLUDE ZXRSAU01
in this include you go in the change mode and input this kind of code:
WHEN 'name of the variable'.
PERFORM and input your code.
Rgs
Antonino
Maybe you are looking for
-
Exception in thread "main" java.sql.SQLException: ORA-00604
Just tried to compile the code "Example 2-1 Determing the JDBC Driver Version" from "2day plus Java Developoer Guide".. import java.sql.*; import oracle.jdbc.*; import oracle.jdbc.pool.OracleDataSource; public class JDBCVersion public static void mai
-
Hello friends, can anyone suggest me how to apply ETDS in SAP Buisiness One as well as WCT Tax (Work Contract Deduction Tax). If possible please provide me notes regarding this.
-
Module pool screen modification
Hi, I have developed a screen. In that, the listbox gets filled up with some values for eg. customer. after user selects the customer from the listbox, the label field should get the customer name after pressing enter key. how to do it? rgrds Madhuri
-
Backup is too large for iCloud after Adding iPhone?
Hi, I just added an iPhone 5c to my iCloud backup. Previously it had just been my iPad 3. All was well. After I added my iPhone 5c, I enabled Photostream to upload all of my photos from the iPhone to iCloud to share on my iPad. It was after this that
-
Ive changed devices phone and computer but i cant seem to retreive all my bought ringtones?
i just want to know how can i get my ringtones back that ive already purshased in the last 4 yrs of me having an iphone