How to use CALL METHOD
Hi Xperts,
how To CAll Methods In SE38.
isit just like calling function module .
Can any one guide me through the process with small example and TCODE.
Thank You in Advance.
Hi,
to call a method u should use syntax from SAP help...
Static Method Call
1. [CALL METHOD] meth_identifier( parameter_list ).
CALL METHOD meth_identifier parameter_list.
Short Forms
2. [CALL METHOD] { meth_identifier( )
| meth_identifier( a )
| meth_identifier( p1 = a1 p2 = a2 ... ) }.
Dynamic Method Call
3. CALL METHOD meth_identifier { parameter_list
| parameter_tables }.
Effect
Call of a method in ABAP Objects. There is a difference between a static method call, in which the method ID must be fully known in the program, and a dynamic method call, in which the method ID is determined entirely or in parts at runtime. The static method call can be executed in different forms. In one form, the parameters are passed in a parenthetical expression, in the other without a parenthetical expression. For the parenthetical expression, short forms are allowed. With the dynamic method call, you are not allowed to specify the parameters in parentheses and you must use the statement CALL METHOD.
When you call an instance method using a reference variable and the static type of the reference variable is a superclass of the dynamic type, then you can use the dynamic method call to call all visible methods of the dynamic type, whereas with the static method call, you can call only the visible methods of the static type.
Note
Functional methods cannot only be called with CALL METHOD, but also at operand positions.
rewards points if answer was helpful,
Regards,
Tejas
Similar Messages
-
How to close parent window when we use call method l_window_manager- create
hi...
how to close parent window when we use call method l_window_manager->create_external_window
thank you.hi
good
go through this link,hope this ll help you to solve your problem
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/63a47dd9-0b01-0010-3d8e-de27242bf011
thanks
mrutyun^ -
How to use the method for field-exit to trigger the workflow?
Dear all,
I want the workflow to trigger , when ever the check box for DELIVERY COMPLETED is checked in ME22N .
I have developed a method in SE18 for the corresponding field and defined function module SWE_EVENT_CREATE with BOR bus2012 and event CHANGED.
Now how to use this method to make my workflow to trigger?Shall I create an event in delegated bus2012 and can I call this method?
Thanks and regards,
S.SureshHi
You want to place your method which is defined for particular filed.right?
For that you can go for BADI. First you check whether any badi is getting called form that tcode ME22N. Then to place your method, implement that BADI. So whenever that BADI is getting called, it will call your event. Through Event workflow will be getting triggered.
Regards,
Hemalatha. -
Issue with Capturing Long text using CALL METHOD EDITOR- GET_TEXT_AS_STREAM
HI Experts,
Standard Long text is capturing using CALL METHOD EDITOR->GET_TEXT_AS_STREAM
but not working for Custom Long text – Only changes
Here is the Issue:
1) Created Custom Long text in TAB. --> Good
2) Entered few lines in custom Long text --> Good
Click on Standard Tab , Leaving Custom tab and Custom Long text-->Good
4) In PAI of Custom Tab – Changes captured using CALL METHOD 1 ( See below Code 1)--> Good
5) Entered few lines in Standard Long text in Standard Tab -->Good
6) Click another Standard Tab
7) In PAI of Standard Tab – Changes captured using CALL MEHTOD 2 ( See Below Code 2)-->Good
8) Come back to Standard Tab / Standard Long Text , Enter few more lines.
9) Change the Tab , IN PAI of Standard Tab/Standard Text , Changes Captured using CALL METHOD2 ( See Below CODE 3) --> Good
10) Go to Custom Tab , Custom Long text , Entered few more lines--> Good
11) Click on any other tab, Triggered again PAI of Custom tab / Custom Long text using Call Method1 ( See Below Code 4) -->Good triggered PAI same CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM.
12) But additional lines are not captured , saying ZERO LINES in Internal Table and IF_MODIFIED = NO -->Issues lies here.
CODE1 ( Custom Long text entry capturing – First Few Lines )
Custom Long text Entries are stored in LS_OUTTAB-TEXT first time when entered few lines and LV_MOD is 1.
PAI of Custom tab
CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = CL_GUI_TEXTEDIT=>TRUE
IMPORTING
TEXT = LS_OUTTAB-TEXT ( FIlled with Lines entered in custom long text )
IS_MODIFIED = LV_MOD ( Value 1 , Modified )
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
OTHERS = 3
CODE2 ( Standard Long Text Entry Capturing – First Few Lines )
Standard Long text Entries are stored in SELECTED_TEXT first time when entered few lines and FLAG_MODIFIED is 1.
PAI of Standard tab
CALL METHOD EDITOR->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = YTRUE ( Value 1 , Modified )
IMPORTING
TEXT = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
IS_MODIFIED = FLAG_MODIFIED.
CODE 3 ( Standard Long Text Entry Capturing – Second time Few Lines )
Standard Long text Entries are stored in SELECTED_TEXT second time when entered few lines and FLAG_MODIFIED is 1.
PAI of Standard tab
CALL METHOD EDITOR->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = YTRUE
IMPORTING
TEXT = SELECTED_TEXT ( FIlled with Lines entered in standard long text )
IS_MODIFIED = FLAG_MODIFIED. ( Value 1 , Modified )
CODE4 ( Custom Long text entry capturing – Second Time Few Lines )
Custom Long text Entries are not stored in LS_OUTTAB-TEXT Second Time when entered few lines and LV_MOD is 0.
PAI of Custom tab
CALL METHOD TEXT_EDITOR1->GET_TEXT_AS_STREAM
EXPORTING
ONLY_WHEN_MODIFIED = CL_GUI_TEXTEDIT=>TRUE
IMPORTING
TEXT = LS_OUTTAB-TEXT ( ZERO ENTRIES )
IS_MODIFIED = LV_MOD ( NOT MODIFIED Flag )
EXCEPTIONS
ERROR_DP = 1
ERROR_CNTL_CALL_METHOD = 2
OTHERS = 3
Can anyone help me out of this.
With Regards,
Bala MExcellent Eitan,
Here is what I am trying to Achieve.
In Create Notification IW21 , They need 5 Long Text in Custom Tab ( Say Tab Name is MBR ).
TAB1 NOTIFICATION Standard Information , TAB2 REFERENCE OBJ , TAB 3 MalFunction , Breakdown Standard one...... TAB 7 ( Custom Tab ).
In Custom Tab , I added 5 LONG TEXT ( its 5 WHY Concept ).
When the User enters data in 5 Long text , it should store long text along with Notification number when save.
But Notification number will be generated @ the time of SAVE , but before that its just shows as
%0000000001 ( and Number will be generated 1000065479) at Save.
How to achive this .
I did this:
Added 5 Custom Container. and In PBO / PAI
PROCESS BEFORE OUTPUT.
MODULE STATUS_0100.
PROCESS AFTER INPUT.
MODULE USER_COMMAND_0100.
IN PBO
CREATE OBJECT TEXT_EDITOR1 , CREATE OBJECT TEXT_EDITOR2, CREATE OBJECT TEXT_EDITOR3 like wise 5
CALL METHOD TEXT_EDITOR1->SET_TEXT_AS_R3TABLE , CALL METHOD TEXT_EDITOR2->SET_TEXT_AS_R3TABLE .. Like wise 5 , So when the user Click on Custom Tab ( MBR ).
It give 5 Long text.
When he click tab1 or tab2 or tab3 .. and again tab MBR , still data is available.
How to store this data for future retrival ( IW22 or IW23 ) ?
Its working fine when I enter first time and goes here and there and finall save .
IN SAVE BADI , I imported the Long text and created Standard Text SO10 with Notification Number with LONG1 , LONG2 .. means 1000065479LONG1 as standard text.
But not working when I entered first time and go to tab1 and tab2 and then to MBR tab and added few more lines , its not exporting full lines and in IMPORT ( SAVE BADI ) giving ZERO Lines.
Please help and thanks for your quick response. -
How to use secondary method in workflow?
Hi friends,
can anyone plz let me know how to use secondary methods in workflow? it would be helpful if u explain with an example..
thanks and regards,
Arun.SHi Arun Kumar,
The Sec Method can be used in the user decision step. The secondary methods are executed along with the user decision step. You have 3 options. Either execute a secondary method before executing the user decision step or after execution of user decision step or while executing the user decision.
For this define the methods either in Methods before execution of workitem execution to execute it before user decision step or Methods after execution of workitem so as to execute it after the execution of user decision.
In order to execute a method along with user decision step execution use secondary methods (amodal call.)
Let me know if you have any queries.
Regards,
Raj -
How to use getContent() method in custom JSP Provider to display a HTML Pag
Hi,
If anybody knows how to use getContent() method to use in custom jsp providers (developed by ourselves) so that it can be used to retrieve a jsp page (a simple html page) ..
I want the code in the provider java file to for the getContent method...
Pls. get back to me asap....if any body has implemented a custom jsp provider...as it's urgent...
I have alreday placed the JSP file in the directory structure /etc/opt/SUNWps/desktop/default/channel_dir..But still the jsp is not being displayed..
Pls get me the getContent() method code to retrive the JSP file..
satyabrataHi,
You don't have to do anything in the custom JSPProvider's getContent method except the call { return super.getContent(request,response); } . If all you want is just to show your jsp, then create a channel from the default JSPProvider, and edit the property contentPage of that channel from samplecontent.jsp to your jsp name, save the changes and login again. You should see your JSP.
Sanjeev. -
How to use a method in sequence diagram from a class diagram
Hello, can someone tell me how to use the method from class diagram in sequence diagram? so far i only can add a classifier to the object lifeline but i still cannot add the method from the class...
thxNow that Web Services is around, I'd look at possibly implement a Web Service call in your applet, which can then be given back any object(s) on return. Set up your server side to handle Web Service calls. In this way, you can break the applet out into an application should you want to (with very little work) and it will still function the same
-
I am getting a error while using CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
The error is class "CL_SSF_XSF_UTILITIES is unknown. How to correct that?? please help I am new to object oriented programming??
Edited by: priya singh on Nov 18, 2008 2:14 PMThis is my code.
REPORT ZSAVE_FUNCTION .
D A T A D E C L A R A T I O N S *
DATA: v_bitmap TYPE xstring, "graphic data
v_file TYPE string, "file name
v_length TYPE i. "length of binary file
DATA: BEGIN OF it_bitmaps OCCURS 0,
object TYPE tdobjectgr, "object
name TYPE tdobname, "name
id TYPE tdidgr, "id
tdbtype TYPE tdbtype, "graphic type
END OF it_bitmaps.
DATA: itab TYPE TABLE OF x.
*class cl_ssf_xsf_utilities definition.
public section.
methods : get_bds_graphic_as_bmp
DATA: L_GRAPHIC_XSTR TYPE XSTRING.
*method cl_ssf_xsf_utilities
S E L E C T I O N - S C R E E N *
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_object TYPE tdobjectgr, "object
p_btype TYPE tdbtype, "graphic type
p_name TYPE tdobname, "name
p_id TYPE tdidgr. "id
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME.
PARAMETERS: p_file TYPE rlgrap-filename. "file name
SELECTION-SCREEN END OF BLOCK b2.
*A T S E L E C T I O N - S C R E E N O N V A L U E - R E Q U E S T *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_name.
*-- Creating f4 help for the parameters
PERFORM get_f4_object_name.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
*-- Getting the current value entered
PERFORM get_current_value.
*-- Value Request Functionality For Input File Name
PERFORM f4_value_request.
S T A R T O F - S E L E C T I O N *
START-OF-SELECTION.
*--Getting the graphic as a BMP file
PERFORM get_graphic_bmp.
*--Convert the Xstring format to binary format
PERFORM convert_to_binary.
*--Download the graphic
PERFORM download_graphic.
*& Form get_current_value
Get the current file path entered
FORM get_current_value .
DATA: BEGIN OF li_dynp_value_tab OCCURS 0.
INCLUDE STRUCTURE dynpread.
DATA: END OF li_dynp_value_tab.
DATA: l_program_name LIKE d020s-prog,
l_dynpro_number LIKE d020s-dnum.
l_program_name = sy-cprog.
l_dynpro_number = sy-dynnr.
REFRESH li_dynp_value_tab.
li_dynp_value_tab-fieldname = 'P_FILE'.
APPEND li_dynp_value_tab.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = l_program_name
dynumb = l_dynpro_number
TABLES
dynpfields = li_dynp_value_tab
EXCEPTIONS
invalid_abapworkarea = 04
invalid_dynprofield = 08
invalid_dynproname = 12
invalid_dynpronummer = 16
invalid_request = 20
no_fielddescription = 24
undefind_error = 28.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
READ TABLE li_dynp_value_tab INDEX 1.
p_file = li_dynp_value_tab-fieldvalue.
ENDFORM. " get_current_value
*& Form f4_value_request
Provinding the f4 for the given path
FORM f4_value_request .
*-- if the file is to be downloaded to presentation server
CALL FUNCTION '/SAPDMC/LSM_F4_FRONTEND_FILE'
EXPORTING
pathname = p_file
CHANGING
pathfile = p_file
EXCEPTIONS
canceled_by_user = 1
system_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " f4_value_request
*& Form GET_GRAPHIC_BMP
Get the graphic as a BMP file
FORM get_graphic_bmp.
CALL METHOD cl_ssf_xsf_utilities=>get_bds_graphic_as_bmp
EXPORTING
p_object = p_object
p_name = p_name
p_id = p_id
p_btype = p_btype
RECEIVING
p_bmp = L_GRAPHIC_XSTR
EXCEPTIONS
not_found = 1
internal_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " GET_GRAPHIC_BMP
*& Form CONVERT_TO_BINARY
Converting the xstring to binary format
FORM convert_to_binary .
CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
EXPORTING
buffer = v_bitmap
IMPORTING
output_length = v_length
TABLES
binary_tab = itab.
ENDFORM. " CONVERT_TO_BINARY
*& Form DOWNLOAD_GRAPHIC
Download the graphic
FORM download_graphic .
v_file = p_file.
CONCATENATE p_file '.BMP' INTO v_file.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_length
filename = v_file
filetype = 'BIN'
TABLES
data_tab = itab
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3
invalid_type = 4
no_authority = 5
unknown_error = 6
header_not_allowed = 7
separator_not_allowed = 8
filesize_not_allowed = 9
header_too_long = 10
dp_error_create = 11
dp_error_send = 12
dp_error_write = 13
unknown_dp_error = 14
access_denied = 15
dp_out_of_memory = 16
disk_full = 17
dp_timeout = 18
file_not_found = 19
dataprovider_exception = 20
control_flush_error = 21
OTHERS = 22.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " DOWNLOAD_GRAPHIC
*& Form GET_F4_OBJECT_NAME
Get F4 values for object names
FORM get_f4_object_name .
DATA: dynpfld_mapping TYPE STANDARD TABLE OF dselc WITH HEADER LINE,
return_tab TYPE STANDARD TABLE OF ddshretval WITH HEADER LINE.
*--Selecting the values to be provided as f4 help
SELECT tdobject
tdname
tdid
tdbtype
FROM stxbitmaps
INTO TABLE it_bitmaps.
*--To update the values in the remaining fields
dynpfld_mapping-fldname = 'F0001'.
dynpfld_mapping-dyfldname = 'P_OBJECT'.
APPEND dynpfld_mapping.
dynpfld_mapping-fldname = 'F0002'.
dynpfld_mapping-dyfldname = 'P_NAME'.
APPEND dynpfld_mapping.
dynpfld_mapping-fldname = 'F0003'.
dynpfld_mapping-dyfldname = 'P_ID'.
APPEND dynpfld_mapping.
dynpfld_mapping-fldname = 'F0004'.
dynpfld_mapping-dyfldname = 'P_BTYPE'.
APPEND dynpfld_mapping.
*--Providing f4 help with the selected values
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'TDOBNAME'
dynpprog = sy-repid
dynpnr = sy-dynnr
dynprofield = 'P_NAME'
value_org = 'S'
TABLES
value_tab = it_bitmaps
dynpfld_mapping = dynpfld_mapping
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDFORM. " GET_F4_OBJECT_NAME -
Interface/Method question (how to use the method insert_table)
Hi people!
I'm working with DOI (desktop office integration).
So far I've been able to reflect flat variables from my ABAP program into a Word Doc, but when it comes to internal tables I'm not sure how to achieve this.....
I find out in the interface i_oi_word_processor_document the method insert_table, but I can't find a single simple example on how to use it....
If no one knows how to use this method, does anyone know how to reflect an internal table fron my program into a Word Doc by another mean?
Thanks in advance!!!
Regards,
LauraHi Laura
If you want you can use direct OLE calls. For this, you can refer to the tutorial <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/c1d54348-0601-0010-3e98-bd2a2dcd9e6c">"An Easy Reference For OLE Automation"</a> published at SDN.
Kind Regards
*--Serdar
[email protected] -
How to use protected method in jsp code
Could anyone tell me how to use protected method in jsp code ...
I declare a Calendar class , and I want to use the isTimeSet method ,
But if I write the code as follows ..
========================================================
<%
Calendar create_date = Calendar.getInstance();
if (create_date.isTimeSet) System.out.println("true");
%>
============================================================
when I run this jsp , it appears the error wirtten "isTimeSet has protected access in java.util.Calendar"The only way to access a protected variable is to subclass.
MyCalendar extends Calendar
but I doubt you need to do this. If you only want to tell if a Calendar object has a time associated with it, try using
cal.isSet( Calendar.HOUR ); -
How to use the method "getChildrenRemoved()" declared in ElementChange?
How to use the method "getChildrenRemoved()" declared in DocumentEvent.ElementChange?
I have tried to use it,but the code below alway say "Yes"....
I really have no ideas about why ec is always a null.
public void removeUpdate(DocumentEvent ee) {
DocumentEvent.ElementChange ec = ee.getChange(doc.getDefaultRootElement());
if(ec == null)
System.out.println("Yes");
} -
How to use this method in JSTL?help me please!
I know I can use "<C:set >" like as
<c:set var="clabel3" value="${portalCustomizeBean.portalPage}"/> ,
but now I want to use one method of portalCustomizeBean object not a attribute of it !!!!!
who would tell me how to use?
this is wrong in my code:
<c:set var="clabel" value="${portalCustomizeBean.currentPageLabel}"/>
<c:set var="clabel3" value="${portalCustomizeBean.toEntitiesExceptSpaceEscape(clabel)}"/>
but how to use "toEntitiesExceptSpaceEscape" method in JSTL?????Why can't you just assign the method's return value to a variable and then print that? A bit of scriptlet code will do the trick. (As much as we all hate to use scriptlet code.)
I believe you'll be able to do what you want in the 1.1 standard JSTL, but for now this will suffice. - MOD -
How to use these method of class CL_GUI_PDFVIEWER
how to use these methods in the class CL_GUI_PDFVIEWER
1) CREATE_ANNOTATION
2) GET_ANNOTATION_INFO
3) SET_ANNOTATION_SETTINGSHi,
Refer
https://forums.sdn.sap.com/click.jspa?searchID=10926572&messageID=1803295
Regards
Kiran -
how to use native methods
----- BEGIN CANNED RESPONSE -----
Download and read Sheng Liang's book, ftp://ftp.javasoft.com/books/specs/jni.pdf
Read the JNI specs on java.sun.com site ( http://java.sun.com/j2se/1.4.2/docs/guide/jni/index.html )
Beware with the JNI tutorial on the java.sun.com site - it is slightly outdated, and the samples need modifications to compile
----- END CANNED RESPONSE ----- -
How to use addPasswordToPasswordHistory method
Hi
Can some one please tell me how to use the method addPasswordToPasswordHistory from the class WSUser.I have a requirement to add user password to password history whenever user changes his password through my custom password change workflow.Custom workflow changes the password in idm but it will not add the previous password to the password history.
It will be helpfull if you paste the code to use this method
Regards
Karthik PHi Amar
Thanks for the reply
I tried setting the password through setPassword method but its giving an exception ==>java.lang.NoSuchMethodException: java.lang.String.setPassword(com..waveset.util.EncrypteData)
Then I decrypted the password but no luck getting ==>java.lang.NoSuchMethodException: java.lang.String.setPassword() exception.
Am i missing something here.do i need to pass the encrypted password in byte array format? if yes how to do that.
Here encrypted password is coming from a form.
regards
karthik p
.
Maybe you are looking for
-
Ad Mob not working in Application Loader Error
Hi Adobe AIR community, I've been having this problem for a while now. Basically I have been using AIR for iOS 15.0, Flash CC (2014) and Milkman Games Ad Mob ANE v.4.4.0. I can test my apps perfectly on both iPhone and iPad devices. The Ad Mob banner
-
Is it possible to write chars to a standard terminal window (command prompt) at a given position? And with other colors?
-
SGD 4.7 - Cannot enable Active Directory authentication
I've followed the steps in the Admin Guide, and have a service object created. Running tarantella service list --name service_name produces the following output (obfuscated): Name: service_name Enabled: 1 Url: ad://url_to_dc Base-domain: same as ab
-
Oracle 8i Database Connection Error
Hello I have installed Oracle8i Enterprise on WinNT 4.0.However I am unable to connect to the database thru' SQLPlus and I am getting the above error "TNS COULD NOT RESOLVE SERVICE NAME".I also checked the same thru' Net8i assistant and tried testing
-
HT4906 i had iPhoto and now that i erased the hard drive i phot is gone
my computer came with iphoto i recently resored the computer to its original purchase state and now the iphoto is missing. any idea why?