07-28-2015 9:32 AM
Hi,
Plz tell me how to insert a interface METHOD in ABAP code as we do in the case of inserting function in ABAP code using PATTERN Button.
I want insert 'Call method lo_class->zif_acct~get_acct_detail",
But when i use ABAP object patterns,Select call method,Then give the instance name , class/interface name and the method name.
I only get ' Call method lo_class->get_acct_detail.'
So i have to manually correct it .
Please Help.
Regards
Blue
07-28-2015 9:47 AM
07-28-2015 10:52 AM
Thanks,Ctrl + Space worked, but doubleclick method name in new hint box and whole method pattern not appear, if something wrong? Thanks
07-28-2015 11:07 AM
What code is written before cursor when you are trying CTRL+SPACE? Is it whole method?
Sometimes you need do it twice to insert pattern.
First time CTRL+SPACE selects method from class/interface and then CTRL+SPACE (+then ENTER or doubleclick) inserts pattern.
But I am afraid that some older SAP releases do not have this feature. Only partially working code completion, without patter..
EDIT: no idea why my post was hidden?...
07-28-2015 12:55 PM
Two times Ctrl Space is not required.
You are talking about the case where partial method name is given before Ctrl Space and multiple matches are found.
I do Ctrl+Space, up/down arrows to select match from list and then Shift+Enter.
Shift+Enter always works for me.
07-28-2015 9:55 AM
Dear Roger,
Follow the below steps. In this example, I am using class object "CL_GUI_FRONTEND_SERVICES" and method "GUI_UPLOAD".
Click on Pattern. Choose,radio button "ABAP Object Pattern". Press continue
You can try other Radio button option. I have displayed one way of doing it. Enter your class name and method name as shown below. Press continue.. that it you are there. 🙂
Regards,
SaiRam
07-28-2015 10:25 AM
Hi Dear SaiRam,
I follow your step, only get ' lo_class->get_acct_detail' no 'lo_class->zif_acct~get_acct_detail'.
zif_acct is Class Interface created in SE24.
I'm not get code what i wish. Can you help me again?
07-28-2015 10:54 AM
Dear Roger,
I mis-read your initial question. I though how to include class method using pattern.
I guess, you need to create your own pattern as SAP does not provide one for interface method. To do so you need to go to the editor in change mode and from menu go to Utilities--> More Utilities --> Edit Pattern --> Create Pattern (you can create your own pattern for the interface method). It is recommended to create custom pattern if at all it will be used very frequently.
Once pattern is created you can come back to editor and call the newly created pattern using Other Pattern.
Regards,
SaiRam
07-28-2015 11:09 AM
Create my own pattern maybe solution,But i'm not know how to do it. Thanks you.
07-28-2015 12:49 PM
It is working on my system, ABAP release 7.31.
I called ABAP objects pattern and wrote instance as LO, class/interface as CL_ABAP_C_READER and then F4 help to get IF_ABAP_C_READER~READ, and press enter.