Possibility to write Functional module in "end routines"
Hello guys,
Can you please tell me whether we can write functional module in end routines or not??? If yes,then what is the procedure?
Thanks in advance,
Regards,
Bunty.
End routines are a feature of BI 7.0, allowing you to take the end results of a transformation, and muck it about with ABAP.
It is not possible to WRITE function modules in end routines. But it is possible to use them. Function modules exist inside function groups - not end routines.
Similar Messages
-
POPUP_UNIT_CONVERSION SAP Function module in Transformation routine
Hi Experts,
I'm using above function module to convert the value of measuring document. I have the unit value in and unit value out, I need help on how to achieve this with function module in the routine... I wrote below code but it is giving me errors...
CALL FUNCTION POPUP_UNIT_CONVERSION
EXPORTING
VALUE_IN = 'SOURCE_FIELDS-DESIR'
INDICATOR_VALUE = ' '
UNIT_IN = 'SOURCE_FIELDS-MSSIE'
UNIT_OUT = 'SOURCE_FIELDS-RECDU'
POSITION_COLUMN = '20 '
POSITION_ROW = '5'
IMPORTING
VALUE_out.
RESULT = VALUE_out.
Can any of you guys used this before , can you please sugget the code. Thanks
-GaneshHi Ganesh,
I suggest to use Function Module UNIT_CONVERSION_SIMPLE. The Function Module you mentioned seems to be applicable for dialog processing.
The coding could look as follows:
CALL FUNCTION 'UNIT_CONVERSION_SIMPLE'
EXPORTING
INPUT = SOURCE_FIELDS-DESIR
UNIT_IN = SOURCE_FIELDS-MSSIE
UNIT_OUT = SOURCE_FIELDS-RECDU
IMPORTING
OUTPUT = RESULT.
Best regards,
Sander -
Is it possible to change function module?
Hi ABAPER's
Once we activate smart form we will get one system generated fuction module.
my question ? Is it possible to make changes in that function module.
Thanks & Regards
sathsihHi,
You cannot do directly in the FM, if you want you can modify the smartform. Automatically you will have the changes.
Thanks,
Sriram POnna. -
Commentary write function module
Hi all ,
I am new to oo alv . I have a requirement of commentary write for header. Well i would like to know whether we should use the same reuse_alv_commentar_write function module even in oo alv or are there any other function modules. Give me any standard program if any?
sample code will be apprecited.Hi,
Check out the includes,
BCALV_TEST_HEADER_PAI
BCALV_TEST_HEADER_PBO
Regards,
Azaz Ali. -
Calling a function module from within a transformation routine
I created a routine within a transformation and experience the following weird behavior now:
When I call a function module within that routine, the load fails with the following error message:
Exceptions in Substep: Rules
When I click on the button next to this text, it point me to my function module call.
What I do not understand is, that the following two scenarios work fine:
- Having the same function call (with fake values) in a plain ABAP program works beautilfully
- If I copy the content of my function module directly into my transformation routine, everything works fine as well
I am now wondering whether the routine does not "see" the function module I am calling. The module resides in a different package. Is that a problem? Do I have to include something first?
Here is the code that calls my FM (
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC
PSOURCEUOM = SOURCE_FIELDS-BASE_UOM
PUSITM = SOURCE_FIELDS-/BIC/USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = RESULT
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
Thanks a lot for your help. Points will be assigned.
DennisGood catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
DATA:
SOURCEVAL TYPE /BIC/OIINVQTY,
SOURCEUOM TYPE /BIC/OIUSUOM,
USITM TYPE /BIC/OIUSITM,
TARGETUOM TYPE /BIC/OIUSUOM,
CONVERTED_COST TYPE /BIC/OIINVQTY.
DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
" get the Production UOM
SELECT SINGLE I~/BIC/USPRDUOM
FROM /BIC/PUSITM AS I
INTO PRODUCTION_UOM
WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
IF ( SY-SUBRC = 4 ). " no records found
"RAISE PARTNO_NOT_FOUND.
RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
ENDIF.
" load the parameters
SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
USITM = SOURCE_FIELDS-/BIC/USITM.
" then you can call the FM
CALL FUNCTION 'Z_CA_CONVERT_US_COST'
EXPORTING
PSOURCEVAL = SOURCEVAL
PSOURCEUOM = SOURCEUOM
PUSITM = USITM
PTARGETUOM = PRODUCTION_UOM
IMPORTING
PTARGETVAL = CONVERTED_COST
EXCEPTIONS
CONVERSION_NOT_MAINTAINED = 1
PARTNO_NOT_FOUND = 2
OTHERS = 3.
" ... [do the rest]
Thanks for your help,
Dennis -
Guys, Can someone tell me the difference between writing function modules and writing routines and when to use each? I know how to get to routines screen to write those routines but I have no clue about function modules. If someone can tell me how to write them or direct me to a document that explains the process will be much appreciated.
Thanks,
RGhi,
chk out the links
Enhancements in SAP BW
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/59069d90-0201-0010-fd81-d5e11994d8b5
Customer Enhancements in SAP NetWeaver BI (Exits, BAdIs and ABAP in the SAP NetWeaver BI Back End)
http://www.sap.com/community/pub/showdetail.epx?itemID=5257
Ramesh -
Function Module (Spell_words) ??? Used in smartforms
Hi Folks,
I got a urgent requirement.. I have developed a smart form for Excise invoice ....
I want to display amount Of Excise Duty in Words...
Will it possible to call function module (SPELL_WORDS) in smartforms,pl let me know if it is possible.. plz give me steps...
Full Points will be rewarded.
Thanx and regards,
ShashankYou can look at footer window
Keep the cursor on footer window -> right click -> create -> program lines
in general attributes column ,write the perform routine,in conditions tab you can use input parameters as well output parameter.
now you need to call form routine.
goto global definition,click on form routines tab,here you can use form routine.
you can call spell_word fm in form routine.
Thanks
seshu -
I have two options to populate values for two info - objects (both are attributes of 0Mat_Sales):
1. Read Master data
2. End routine logic
The reason why I am toying with the second approach is because some of the transaction records do not have a value for Distribution Channel and Sales Org. We are
therefore writing some end routine logic to populate these records with a suitable value.
If I read from master data will the transformation logic also take into consideration the logic written to populate Distribution Channel and Sales Org or is there
a possibility that this could be missed.
In effect what is called first the logic that is written in the end routine or the reading from Master data?
ThanksHi Deo,
Master data rading step will be performed first as it is executed for individual record and it is part of transformation. But the logic you are going to write is part of End routine and it will be executed for each data package at the end just before updating data to target.
If you use both the methods then the logic written in End routine will overwrite the result calculated by Read master data.
Regards,
Durgesh. -
Function Module where-used list does not find update rule programs
We have function modules called in update rules. The where-used list in the function builder does not find the update rule programs.
For example, function DATE_GET_WEEK is called in an update rule to InfoCube YCUBE001. The activated program name for this update rule is GP3PWI6PKM5Y3K75A370DIS8I77. When I goto SE37, enter the function DATE_GET_WEEK, click the where-used button, check the programs option and search. The system does not find the program GP3PWI6PKM5Y3K75A370DIS8I77.
Without this search capability it is difficult to do an impact analysis of changing function modules. Does anyone know of a solution?hi,
i think the reason is the code of update rules' generated program are stored line by line in table(rsaabap), update rules program itself stored in table rsupdrout, link with field codeid, another useful table is rsupdinfo which store infocube, infosource related. other info may stored in some other rs* and rsa* tables.
try to create following program in your system, and run, type in the function module name, and will display out the update rules program id, with additional useful info : which infoprovider, infosource, and detail info of the routine and infoobject in the update rule that using that function module. you may modify the program to have better display out list.
hope this helps.
REPORT Z_FM_UPDRUL_WHEREUSED.
data : lv_sfm,
lv_line type string,
lv_where type string.
tables : rsaabap,RSUPDROUT,rsupdinfo.
select-options:
s_fm for rsaabap-LINE.
start-of-selection.
loop at s_fm.
concatenate s_fm-low ' ' into lv_sfm.
concatenate '%' s_fm-low into lv_line.
concatenate lv_line '%' into lv_line.
write : / 'function module', 'update rule id', 'routine id', 'infoobject', 'infocube', 'infosource'.
select * from rsaabap
where line like lv_line and objvers = 'A'.
select * from rsupdrout
where codeid = rsaabap-codeid and objvers = 'A'.
select single * from rsupdinfo
where updid = rsupdrout-updid and objvers = 'A'.
write: / lv_sfm, rsupdrout-updid, rsaabap-codeid,
rsupdrout-iciobjnm, rsupdinfo-infocube,
rsupdinfo-isource.
endselect.
endselect.
endloop. -
Function Module : SCMS_BINARY_TO_TEXT
Hi,
I use the follwoing Function Module to convert from Binary to Text.I call it in the following way:
DO 10 times.
CALL FUNCTION 'SCMS_BINARY_TO_TEXT'
EXPORTING
INPUT_LENGTH = 255
APPEND_TO_TABLE = 'X'
WRAP_LINES = 'X'
TABLES
BINARY_TAB = LT_BINARY
TEXT_TAB = LT_TEXT_OUT
ENDDO.
This is because my input table LT_BINARY has binary fields of length 255 and i want the result to be returned as a concatenated text in the output table LT_TEXT_OUT.
But every time the next 255 chars are appended to the output table LT_TEXT_OUT, i get the text in a new line and not continuously.
So instead of getting continous text, i am getting text seperated by a new line after every 255 chars.
How can i get continuous text????Hi,
Every time this internal table <b>LT_TEXT_OUT</b> will be appended with the converted text, it is not possible from this Function module to get the data in a single line.
if you want to meet your requirment, then use the same code which you have written, then add this code.
create one more internal table and loop the Internale table <b>LT_TEXT_OUT</b> and move to the new internal table,
lets take an example, if you want the first 2 lines in a single row, then write with in the loop..
move: LT_TEXT_OUT to New_inernal table.
if sy-tabix = 2.
move: LT_TEXT_OUT to New_inernal table+255(255).
endif.
like this way you can write the code to meet your requirment.
hope this helps you to solve the Problem
Regards
Sudheer -
BC data source and functional module
Hi Gurus
I know that we can extract data via functional module in case of generic extractor but when we use business content data source ( for ex.0MAT_PLANT_ATTR) is it possible to use functional module to extract the data?
How can we find the functional module? my requirement is I need to enhance this data source with few more attributes.
Pl help. also advise where I need to write the code?You can see if it FM based or not, in RSA2, or, in table ROOSOURCE (on the source system).
In general, it is not possible/advisable to change the BC extractor FMs.
Right way to go about is to use enhancements. For this case 0MAT_PLANT_ATTR, if the other attributes are coming from same material tables, you may be able to get those by enhancing the extract structure.
If not, you can enhance the extract structure, and write the code in the user-exit provided for extending master data extraction (function EXIT_SAPLRSAP_002 - check its documentation in SE37). -
Difference between a programe&function module in R/3 & BW
Hi Gurus
i would like to know differenece between programe and function module in R/3
and BW, so can some one give me a brief idea about it cheers thanks .....Hi,
Function modules are ABAP routines that are administered in a central function library. They apply across applications and are available throughout the system. You must assign function modules to a function pool that is called a function group. A function group is nothing but a container for the function modules. Now create a function group and then a function module.
it is a kind of standrad program where u can use it in differnt local programes .
take an example standrad function module "REUSE_ALV_CHECKBOX_SET" suppose u want to create a checkbox in output screen u dont need to write a program for that u can use above mentioned function module in ur programe.
hope this information helps u
Regards,
Gurudatt Bellary -
Testing Function Module before using in DataSource?
Hi Experts,
After writing a Function module for Transaction DataSouce (by copying RSAX_BIW_GET_DATA_SIMPLE), is there any way to test the Function Module before using in Transaction DataSource? (to see how many records it retrieves).
Also can somebody please throw some light in understanding the source code of RSAX_BIW_GET_DATA_SIMPLE function module, as it has many declarations like E_T_DATA,
I_T_SELECT which will be used in the new function module?
Looks like, the function module RSAX_BIW_GET_DATA_SIMPLE uses only one table SPFLI.
If it is just one table why do we need to write function module to extract data?
Forgive me for my lack of ABAP knowledge.
Thank you,
LakshmiThe generic function moduel is used when there is no BW extractor and you cannot get to the data via a view or table
The extractor is quite simple
You create a extract strcuture of data to send to BW
Then you create the function module - e_t_data takes on the extract structure
The select options read data via the infopackage selection from BW (and thus when you create your datasource you shoudl click the fields to be select option)
So in the ABAP
You read the select option and put them into a range
You select from which ever tables you need to in R3 and put into an itab
You then loop aroudn the itab and manipulate the data or read other tables
The data finally ends up in e_t_data
The whole thing gets looped around based on the size of the data package - ie if it is 10000 records then the fetch next cursor after 10000 records will send the package of e_t_data out to the refc scheduler and down the line to BW - then the fetch next cursor will get the next 10000 records for the next
I use this all the tiem (so sorry for the brain dump)
I especially use it for virtual cubes - ie to get real time data from R3 from within BW - the data is not requested by ipak but by the query at runtime against a Virtual cube which connects to this generic extractor
Note: this generic extractor can also live on the BW side - ie you can use it instead of APD to snapshot cube or DSO data to send as an ipak into another cube -
Calling Subroutine of a Function Module
Hi friends,
I need to call a routine which exists in a function module from anopther function module.
The routine is in a include program (ie type I).
is there any way....PERFORM add_relations in program L2012F03.
-
Function Module to send SOAP message
Is that possible to use function module to send out SOAP message from CRM to external system?
Thanks a lot in advanceHello Rokie,
Please go through these links.
http://help.sap.com/saphelp_nw04s/helpdata/en/fc/5ad93f130f9215e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/14/ef2940cbf2195de10000000a1550b0/content.htm
regards,
Muralidhar Prasad.C
Maybe you are looking for
-
How can I set the default line height?
Greetings, I have a report that displays observed behavior in a list format like the one below: Behavior Observed: Withdrawn Happy Sad angry There are 5 responses as to the severity of the behavior or it is left blank if
-
Jsp data display as a result of a button click
i have a textfield in a jsp along with a SEARCH button. the search button searches the database for the existence of the value entered in the textfield. how should i code so that at the click of search button the dbase is searched (for the entered va
-
How do you restore the previous button & remove / hide the autosync button?
The 'Previous' button at the bottom of the toolbar has disappeared and now it only shows the sync / autosync button & reset. How do I restore the Previous button? (LR 5.4)
-
KM/TREX search through links, it it possible?
Hi, I'm asking for a search (using KM + TREX) in an specific folder (Folder A). This folder contains links below it. The search result is not bringing files (file FB1 and file FC1) located in folders to which these links point to. Is there something
-
I followed the instructions from your website on how to block all co9kies and i did not work. You used to have a simple menu for blocking and unblocking cookies, which seems to have disappeared. If I can't block cookies, then I will have to use anoth