‎2007 Mar 06 9:30 PM
Hi all,
Iam very new to OO programming.
can any one tell as how i should call a CLASS
FOR FM , i know we use click pattern and give the required FM name and it would bring up the code in the editor and we have to pass the necessary parameters
but how should i call a class , is there a way to call it or do i need to write the code manually
say when i code like this does that mean it has been typed or just called like a FM
If its called like FM , let me know how its called
CALL METHOD cl_gui_frontend_services=>file_open_dialog
EXPORTING
window_title = 'Select file for download'
default_extension = '.txt'
initial_directory = 'C:\'
CHANGING
file_table = li_filetable
rc = lv_return
EXCEPTIONS
file_open_dialog_failed = 1
cntl_error = 2
error_no_gui = 3
OTHERS = 4
.
Thanks
‎2007 Mar 06 9:35 PM
Hi,
You can use pattern (SE38) same as FM.
But instead choose ABAP Object Pattern -> OK -> Select Call Method -> Enter CL_GUI_FRONTEND_SERVICES (Class/Interface) -> Enter FILE_OPEN_DIALOG (Method) -> OK.
Regards,
Ferry Lianto
‎2007 Mar 06 9:34 PM
hai
we can like function module.
in editor ,just click pattern button. in that,select second radio button abap object...
after that, it ask for class, object and other things...
regards,
tamil
‎2007 Mar 06 9:35 PM
Hi,
You can use pattern (SE38) same as FM.
But instead choose ABAP Object Pattern -> OK -> Select Call Method -> Enter CL_GUI_FRONTEND_SERVICES (Class/Interface) -> Enter FILE_OPEN_DIALOG (Method) -> OK.
Regards,
Ferry Lianto
‎2007 Mar 06 9:38 PM
Hi all,
This is what i was looking for
iam awarding points all
Thanks
‎2007 Mar 06 9:43 PM
Hi Ferry,
i don't see call method under AABAP OBJECTS PATTERN
I AM LOOKING IN 4.6C VERSION
LET ME KNOW
THANKS
‎2007 Mar 06 9:48 PM
‎2007 Mar 06 9:37 PM
Hi,
You can use the pattern for abap oo class method also..
Press the pattern button..
Choose the radio button "AABAP Objects patterns"
Give the class name and the method name..It will give the parameters like FM..
Thanks,
Naren
‎2007 Mar 06 9:48 PM
Hi,
IN that screen..
GIve the class name cl_gui_frontend_services and the method name file_open_dialog.
And then press enter..
Thanks,
Naren
‎2007 Mar 06 9:52 PM
Hi,
Sorry ... I am in SAP 4.7 and ECC 5.0.
I am not sure whether is available in 4.6C (i am afraid you need to type by yourself).
When you click on Pattern button (SE38), system should display an option for AABAP Object Patterns (4.7) and ABAP Object Patterns (ECC 5.0).
Then you click on OK button in order to see another selection for OO Statement Pattern (new popup window). In here, you should see Call Method selection and others.
Regards,
Ferry Lianto