How do you call a function module in a web dynpro application ?
Why do you delete my postings ?????????????????????????????
pls see subject
Edited by: Ilhan Ertas on Apr 1, 2009 4:51 PM
Edited by: Ilhan Ertas on Apr 1, 2009 4:52 PM
Its not me deleting them. Perhaps a different moderator or a technical problem within SCN itself.
Someone might be concerned about your question because it is very basic.
You can call a function module from WD the same way you did in any ABAP program - with the CALL FUNCTION syntax. There is a service call wizard that will generate a matching context and calling code for you - but it is just a helper, code generator. Everything it does can be done by hand as well (and often better than the generator).
Similar Messages
-
How to call a function module from the Web Template?
Hi all,
how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
Many thanks for your hints.
Regards, NilsHi!
I am too working on a similar issue.
Probably this helps:
Re: Calling a function module from a Web Template
Regards,
Sri -
Calling a function module from a Web Template
Hi,
I need to call a function module from a web template. Any pointers on how i can do this ? Is this even possible ?
Thanks
ShaileshHi Rael,
We were finally able to call a FM module from the Web. The trick as Heike suggested was to create an ABAP class which inherits from CL_RSR_WWW_HELP_WINDOW. Then you should modify the process_cmd method of this new class in order to call the FM. Now use this class to create a help service. In case you need to pass any parameters to the FM, you will need to pass them as additional parameters while calling the help service.
An example is below.
CMD=PROCESS_HELP_WINDOW&HELP_SERVICE=ZBOOKMARKING&TEXT=mytext&URL=myurl
Where mytext and myurl were the parameters i pass to my FM and ZBOOKMARKING is my help service.
Thanks a Lot to Heike for his help on this !!
Shailesh -
Can you call a function module from within a smartform?
I was told that yu can not call a function module from a smartform - that does not make sense to me because you can do tons of ABAP within a smartform.
Well - can you?
Thanks.
ScottYes, you can call function modules.
-
How do you call a function within a package using OCI in C
I am trying to call a user-defined function in Oracle 8.1.7 using OCI in C. I am getting a ORA-06550 PLS-00221, <function name> is not a procedure or is undefined. Can anyone tell me how I would call a function using OCI?
Thanks.I think I figured it out, but I am now getting a ORA-06512 error; numeric or value error: character string buffer too small.
-
How do you call a function in an attached MovieClip from the current MovieClip?
Hi there,
I have this MovieClip A (converted as a symbol) and put in my
main MovieClip B using attachMovie() , and I am wondering how I can
call a function defined in A from within B.
Is it possible?
ThanksHi kglad,
yes, I did the attachMovie of the symbol B and it seems like
none of the ActionScript written in B was not carried over.
This is how I built B into a symbol :
(1) Two layers ( one for the ActionScript only, the other for
the Components)
(2) I defined the functions to be called remotely by A in the
ActionScript layer
(3) I selected all the components in the Components Layer and
did a Convert To Symbol
(4) I added the Symbol into A's Library
(5) I used attachMovie to instantiate the Symbol of B
I must have missed out something somewhere
Thanks -
Assigning a login module to a Web Dynpro application
Hi everybody,
I would like a Web Dynpro application to use a custom login module for authentication. How can I do this?
What I found is the Security Provider (in the Visual Administrator tool) where I can add a login module to the "form" authentication mechanism for example. But if I do this I think all applications using this mechanism have to use my custom login module, right?
I wonder if I have to add my Web Dynpro application as a component to the Security Provider so that I can assign login modules to it. Am I on the right way? If yes, how can I do this? If I choose "Add" from the "Policy Configurations" tab a popup appears where I can enter the name for a new component. How do I specify my application there?
Thanks in advance for all answers,
TorbenHi,
Web Dynpro applications use the ticket authentication template. U wud need to add your login module to the ticket template's login stack.
Incase you are accessing the Web Dynpro applications thru the EP u wud need to make changes to the authschemes.xml file too.
regards,
Vishal -
How to execute a BI query/view from a web dynpro application?
Hi all,
I am trying to connect to a BI system from a Web Dynpro application. I have to execute a view/query and process the output in my application. Please guide me about how to establish the connection to the BI system from my web dynpro application and then execute the query/view.
I have tried executing/modelling the BI query/view using Visual Composer but I get an error saying 'QueryView Instantiation failed' when I try to drag the view/query on to the design board.
Please guide me and help me achieve this.
Thanks & Regards,
KishanHi Kishan,
Define system for BI in portal and define JCo destination, then from WDJ application use can query BI.
Create the Technical System and connect with JCO Destinations
or
Connecting through the BI Connecters (ex: XMLA Connecter)
Refer below link:-
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/60f35908-ecd4-2910-6c89-e75e1054d9d1?quicklink=index&overridelayout=true
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60f35908-ecd4-2910-6c89-e75e1054d9d1
In this document you will get details related to connector and other admin activity.
Hope this may help you.
Deepak!!! -
How to make use of Portal service in the web dynpro application
hi
I have some portal service and how to use that in the web dynpro application.
and also what is the main diff between Portal Component and web dynpro application.
do we required portal to run web dynpro application.
thanks
mmukeshHi,
>> I have some portal service and how to use that in the web dynpro application.
Yes. U can use Portal service in webdynpro. Check the link given by subathra.
>> and also what is the main diff between Portal Component and web dynpro application
Portal Components are components designed to run in portal server while webdynpro application can run in J2EE WebAS.
>> do we required portal to run web dynpro application.
No for general cases. Just WebAS is sufficient to run webdynpro appl. But if u use portal service in ur webdynpro appl, then make sure both (portal service and webdynpro appl) run on same J2EE engine. That is mandatory.
Regards,
Vijai -
How do you call a function that belongs in a package?
Hello,
Can anyone help me with this issue? My intent is to create a procedure that returns a cursor to the results of the query without passing in the cursor to the function. After reading thru online tutorials, I found that I had to create a function, not a procedure.
I created a .sql file as such:
create or replace package GetEmployeeCursors is
type empResultSet is REF CURSOR;
function Funct1 return empResultSet;
end GetEmployeeCursors;
create or replace package body GetEmployeeCursors is function Funct1 return
empResultSet is
tmpResultSet empResultSet;
begin
open tmpResultSet for
select * from employee;
return tmpResultSet;
end Funct1;
end GetEmployeeCursors;
Both the package and package body were created without any problems.
Then, I tried to call the Funct1() in many ways, including the following:
call System.getEmployeeCursors.Funct1()
call getEmployeeCursors.Funct1()
call Funct1()
All produced the following error message:
ERROR at line 1:
ORA-06576: not a valid function or procedure name
How do I call Funct1()?
Thanks so much in advance,
--AnnaHello Frank,
Thanks for the information regarding not using the system schema when creating packages.
I tried what you suggested to call the Funct1 in many ways:
SQL> mycursor := system.getEmployeeCursors.funct1;
SP2-0734: unknown command beginning "mycursor :..." - rest of line ignored.
SQL> mycursor := getEmployeeCursors.funct1;
SP2-0734: unknown command beginning "mycursor :..." - rest of line ignored.
SQL> mycursor := funct1;
SP2-0734: unknown command beginning "mycursor :..." - rest of line ignored.
SQL> select *
2 from table(system.getEmployeeCursors.funct1);
from table(system.getEmployeeCursors.funct1)
ERROR at line 2:
ORA-22905: cannot access rows from a non-nested table item
Could there be something else I need to do before making the function call?
Thanks alot!
--Anna -
How can I call the function module of the ECC when I save the campaign?
HI Experts!
I want to call function module of the ECC when I click the save button in the campaign view,A badi or userexit is needed,but I don't find, can you tell me which badi or userexit is used to implement?Thanks a lot.
I have tried,but it can't do.
who can tell me which badi and detailed implementation step?
waiting on line. -
Calling a new Browser Window from Web Dynpro Application - Empty Context
Hello,
I want to open a view in a new browser window, and followed the same way which is described in this thread:
Open view in new browser window
My first try was creating two applications, which refer to the same Component Controller. The opening of a new browser window is triggered by an action, which is called in the other application. As both applications have the same Component Controller, I thought, the context content has to be the same, but actually the context attributes are empty after opening of the new window.
In my second try I created two applications with two different Component Controllers, mapped via embedded Interface Controller. The effect is the same - I have no context content in the view.
Please, can anybody help me?
Thank you in advance.
Ilona SeifertI done something like this:
[code]
try {
strURL =
WDURLGenerator.getApplicationURL(
"$<b>PROJECT_PATH</b>$/$<b>PROJECT_NAME</b>$",
"$<b>APPLIC_NAME</b>$");
} catch (WDURLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
strURL += "?par1=";
strURL += var1;
strURL += "&par2=";
strURL += var2;
strURL += "&par3=";
strURL += var3;
[/code]
and after i retrieve them:
[code]
Var1Value= WDWebContextAdapter.getWebContextAdapter().getRequestParameter("var1");
[/code] -
How to call a function module dynamically?
Hi
I am doing a smartform development and here my scenario.
<b>Scenario:</b>
There will be a simple report which will trigger a smartform output. The report has a selection screen and and in one of the field the user will enter the layout name or the layout name will be stored in the variant so that the user need not remember the layout name.
Based on the layout selected i need to show the output.
<b>What i have coded:</b>
In my program after selecting the data i am calling the FM SSF_FUNCTION_MODULE_NAME which will return the function module name to be called.
<b>Question:</b>
How do i call the function module dynamically. I cannot do a single call to the function module using the FM name derived from the above function call. I want to make the interface calling dynamic. We dont want to hardcode the function calls coz we may have many layouts to be called so how is it possible in SAP to call the FM interface dynamically.
~SureshActually you can call the FM dynamically in by taking it into one variable and than use the CALL FUNCTION V_FM_NAME.
But the problem here is, you need to take care about the importing, exporting and tables parameters. They needs to be same for all FMs which you are planning to call. Otherwise system will give you a run time error.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING FORMNAME = LF_FORMNAME
* variant = ' '
* direct_call = ' '
IMPORTING FM_NAME = LF_FM_NAME
EXCEPTIONS NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
CALL FUNCTION LF_FM_NAME
EXPORTING
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_PARAMETERS = ARC_PARAMS
CONTROL_PARAMETERS = LS_CONTROL_PARAM
* mail_appl_obj =
* mail_recipient = ls_recipient
MAIL_SENDER = LS_SENDER
Regards,
Naimesh Patel -
How to call a function module from a transformation
Hi,
Could somebody please let me know how I can call an abap function module from a transformation (abap xslt program). I know how to call the class methods from transformation, but how do i call a function module..?
Thanks,
Shashi.
Edited by: Shashi Kanth Kasam on Apr 8, 2010 12:45 PMYa. I can do that. But I don't want to use a class and a method to call that function module. Want to directly call function module from transformation. Is that possible..?
Thanks,
Shashi -
Upload data from excel with vba by calling a function module
Hello all,
i have a problem with the function module "ALSM_EXCEL_TO_INTERNAL_TABLE". I will call this function module with vba to load data from excel to sap with a Buttonclick. I have copied this function module and set it remotable. But i can´t call it from excel.
Can you give me some tips how can i
upload data from excel with vba by click a button.
The problem seems the function: call method cl_gui_frontend_services=>clipboard_import in the function module, because when i comment this function call the vba-call is true but no results.
How can I call the function module correct with vba?
Thanks a lot for your tips!!!!
Chris
Message was edited by:
Christoph KirschnerHI
Uploading data directly from Excel file format
* Upload data direct from excel.xls file to SAP
REPORT ZEXCELUPLOAD.
PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
begcol TYPE i DEFAULT 1 NO-DISPLAY,
begrow TYPE i DEFAULT 1 NO-DISPLAY,
endcol TYPE i DEFAULT 100 NO-DISPLAY,
endrow TYPE i DEFAULT 32000 NO-DISPLAY.
* Tick don't append header
PARAMETERS: kzheader AS CHECKBOX.
DATA: BEGIN OF intern OCCURS 0.
INCLUDE STRUCTURE alsmex_tabline.
DATA: END OF intern.
DATA: BEGIN OF intern1 OCCURS 0.
INCLUDE STRUCTURE alsmex_tabline.
DATA: END OF intern1.
DATA: BEGIN OF t_col OCCURS 0,
col LIKE alsmex_tabline-col,
size TYPE i.
DATA: END OF t_col.
DATA: zwlen TYPE i,
zwlines TYPE i.
DATA: BEGIN OF fieldnames OCCURS 3,
title(60),
table(6),
field(10),
kz(1),
END OF fieldnames.
* No of columns
DATA: BEGIN OF data_tab OCCURS 0,
value_0001(50),
value_0002(50),
value_0003(50),
value_0004(50),
value_0005(50),
value_0006(50),
value_0007(50),
value_0008(50),
value_0009(50),
value_0010(50),
value_0011(50),
value_0012(50),
value_0013(50),
value_0014(50),
value_0015(50),
value_0016(50),
value_0017(50),
value_0018(50),
value_0019(50),
value_0020(50),
value_0021(50),
value_0022(50),
value_0023(50),
value_0024(50),
value_0025(50),
value_0026(50),
value_0027(50),
value_0028(50),
value_0029(50),
value_0030(50),
value_0031(50),
value_0032(50),
value_0033(50),
value_0034(50),
value_0035(50),
value_0036(50),
value_0037(50),
value_0038(50),
value_0039(50),
value_0040(50),
value_0041(50),
value_0042(50),
value_0043(50),
value_0044(50),
value_0045(50),
value_0046(50),
value_0047(50),
value_0048(50),
value_0049(50),
value_0050(50),
value_0051(50),
value_0052(50),
value_0053(50),
value_0054(50),
value_0055(50),
value_0056(50),
value_0057(50),
value_0058(50),
value_0059(50),
value_0060(50),
value_0061(50),
value_0062(50),
value_0063(50),
value_0064(50),
value_0065(50),
value_0066(50),
value_0067(50),
value_0068(50),
value_0069(50),
value_0070(50),
value_0071(50),
value_0072(50),
value_0073(50),
value_0074(50),
value_0075(50),
value_0076(50),
value_0077(50),
value_0078(50),
value_0079(50),
value_0080(50),
value_0081(50),
value_0082(50),
value_0083(50),
value_0084(50),
value_0085(50),
value_0086(50),
value_0087(50),
value_0088(50),
value_0089(50),
value_0090(50),
value_0091(50),
value_0092(50),
value_0093(50),
value_0094(50),
value_0095(50),
value_0096(50),
value_0097(50),
value_0098(50),
value_0099(50),
value_0100(50).
DATA: END OF data_tab.
DATA: tind(4) TYPE n.
DATA: zwfeld(19).
FIELD-SYMBOLS: <fs1>.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
EXPORTING
mask = '*.xls'
static = 'X'
CHANGING
file_name = filename.
START-OF-SELECTION.
CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
EXPORTING
filename = filename
i_begin_col = begcol
i_begin_row = begrow
i_end_col = endcol
i_end_row = endrow
TABLES
intern = intern
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
WRITE:/ 'Upload Error ', SY-SUBRC.
ENDIF.
END-OF-SELECTION.
LOOP AT intern.
intern1 = intern.
CLEAR intern1-row.
APPEND intern1.
ENDLOOP.
SORT intern1 BY col.
LOOP AT intern1.
AT NEW col.
t_col-col = intern1-col.
APPEND t_col.
ENDAT.
zwlen = strlen( intern1-value ).
READ TABLE t_col WITH KEY col = intern1-col.
IF sy-subrc EQ 0.
IF zwlen > t_col-size.
t_col-size = zwlen.
* Internal Table, Current Row Index
MODIFY t_col INDEX sy-tabix.
ENDIF.
ENDIF.
ENDLOOP.
DESCRIBE TABLE t_col LINES zwlines.
SORT intern BY row col.
IF kzheader = 'X'.
LOOP AT intern.
fieldnames-title = intern-value.
APPEND fieldnames.
AT END OF row.
EXIT.
ENDAT.
ENDLOOP.
ELSE.
DO zwlines TIMES.
WRITE sy-index TO fieldnames-title.
APPEND fieldnames.
ENDDO.
ENDIF.
SORT intern BY row col.
LOOP AT intern.
IF kzheader = 'X'
AND intern-row = 1.
CONTINUE.
ENDIF.
tind = intern-col.
CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
ASSIGN (zwfeld) TO <fs1>.
<fs1> = intern-value.
AT END OF row.
APPEND data_tab.
CLEAR data_tab.
ENDAT.
ENDLOOP.
CALL FUNCTION 'DISPLAY_BASIC_LIST'
EXPORTING
file_name = filename
TABLES
data_tab = data_tab
fieldname_tab = fieldnames.
*-- End of Program
<b>Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT</b>
*Title : Excel Uploading
TYPES: BEGIN OF t_datatab,
col1(25) TYPE c,
col2(30) TYPE c,
col3(30) TYPE c,
col4(30) TYPE c,
col5(30) TYPE c,
col6(30) TYPE c,
col7(30) TYPE c,
col8(30) TYPE c,
col9(30) TYPE c,
col10(30) TYPE c,
col11(30) TYPE c,
END OF t_datatab.
DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
wa_datatab TYPE t_datatab.
Data : p_table type t_datatab occurs 0 with header line.
DATA : gd_scol TYPE i VALUE '1',
gd_srow TYPE i VALUE '1',
gd_ecol TYPE i VALUE '256',
gd_erow TYPE i VALUE '65536'.
DATA: it_tab TYPE filetable,
gd_subrc TYPE i.
field-symbols : <fs>.
*Selection screen definition
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
PARAMETERS: p_file LIKE rlgrap-filename
DEFAULT 'c:test.xls' OBLIGATORY. " File Name
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
REFRESH: it_tab.
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select File'
default_filename = '*.xls'
multiselection = ' '
CHANGING
file_table = it_tab
rc = gd_subrc.
LOOP AT it_tab INTO p_file.
* so_fpath-sign = 'I'.
* so_fpath-option = 'EQ'.
* append so_fpath.
ENDLOOP.
START-OF-SELECTION.
PERFORM upload_excel_file TABLES it_datatab
USING p_file
gd_scol
gd_srow
gd_ecol
gd_erow.
* END-OF-SELECTION.
END-OF-SELECTION.
LOOP AT it_datatab INTO wa_datatab.
WRITE:/ wa_datatab-col1,
wa_datatab-col2,
wa_datatab-col3,
wa_datatab-col4,
wa_datatab-col5,
wa_datatab-col6,
wa_datatab-col7,
wa_datatab-col8,
wa_datatab-col9,
wa_datatab-col10,
wa_datatab-col11.
ENDLOOP.
*& Form UPLOAD_EXCEL_FILE
* upload excel spreadsheet into internal table
* -->P_TABLE Table to return excel data into
* -->P_FILE file name and path
* -->P_SCOL start column
* -->P_SROW start row
* -->P_ECOL end column
* -->P_EROW end row
FORM upload_excel_file TABLES p_table
USING p_file
p_scol
p_srow
p_ecol
p_erow.
DATA : lt_intern TYPE kcde_cells OCCURS 0 WITH HEADER LINE.
* Has the following format:
* Row number | Colum Number | Value
* i.e. 1 1 Name1
* 2 1 Joe
DATA : ld_index TYPE i.
* Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
EXPORTING
filename = p_file
i_begin_col = p_scol
i_begin_row = p_srow
i_end_col = p_ecol
i_end_row = p_erow
TABLES
intern = LT_INTERN
EXCEPTIONS
inconsistent_parameters = 1
upload_ole = 2
OTHERS = 3.
IF sy-subrc <> 0.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'Error Uploading file'.
EXIT.
ENDIF.
IF lt_intern[] IS INITIAL.
FORMAT COLOR COL_BACKGROUND INTENSIFIED.
WRITE:/ 'No Data Uploaded'.
EXIT.
ELSE.
SORT lt_intern BY row col.
LOOP AT lt_intern.
MOVE lt_intern-col TO ld_index.
assign component ld_index of structure
p_table to <fs>.
move : lt_intern-value to <fs>.
* MOVE lt_intern-value TO p_table.
AT END OF row.
APPEND p_table.
CLEAR p_table.
ENDAT.
ENDLOOP.
ENDIF.
ENDFORM. "UPLOAD_EXCEL_FILE
Regards
Pavan
Maybe you are looking for
-
Memory problems: computer freezes on heavy memory usage
Ever since I changed the internal hard drive of my MacBook Pro (I installed a Seagate Barracuda 1Tb disk), I have the following problem: Whenever an application needs a lot of memory (for example Parallels installing a new Windows system, or Acrobat
-
2G iPod Touch won't synch or charge with computer.
I have a 2nd gen. iPod Touch and when i plug it into my computer it won't recognize it, charge it, or synch it. The only thing that happens when you plug it in is the computer makes 3 fast, same pitched tones. It's kind of like when you would normall
-
How do I sync mail accounts if I didn't choose that option during setup?
Is there some way to retroactively choose to sync mail accounts with iTunes after the phone has already been setup (and I chose not to do it at setup)? I looked around in iTunes and couldn't find a setting. I'm having problems setting up one of my IM
-
I accidentally deauthorized my laptop from a second Apple ID. How do I reauthorize it?
When I looked up how to authorize my computer this is what the support page told me to do: To authorize a computer using your Apple ID Open iTunes From the Store menu, choose Authorize This Computer. (In earlier versions of iTunes, access this option
-
Can't save display picture some friend
i'n wanna us how to make our display profile can't be copy by other person.. What the name of that software?? and could my BB bold 9700 using BBM 6.1??