ABAP oo problem
Hi all
I'm try to start with abap oo and have problem with code below.
When i generate this all is ok.
When try to activate there is error
Statement 'LDB->read_spfli()' is not defined . please check your ...
Anyone help ?
PS. Using SAP 46c
Regards
Bartek.
report test.
CLASS ldb DEFINITION
class ldb definition.
public section.
methods read_spfli.
events spfli_ready exporting value(values) type spfli.
private section.
data: spfli_wa type spfli.
endclass.
CLASS ldb IMPLEMENTATION
class ldb implementation.
method read_spfli.
select * from spfli into spfli_wa.
raise event spfli_ready exporting values = spfli_wa.
endselect.
endmethod.
endclass.
CLASS report DEFINITION
class report definition.
public section.
methods start.
private section.
data spfli_tab type table of spfli.
methods: get_spfli for event spfli_ready of ldb
importing values,
display_spfli.
endclass.
CLASS report IMPLEMENTATION
class report implementation.
method start.
data ldb type ref to ldb.
create object ldb.
set handler me->get_spfli for ldb.
ldb->read_spfli().
display_spfli().
endmethod.
method get_spfli.
append value to spfli_tab.
endmethod.
method display_spfli.
write:/ 'display_spfli'.
endmethod.
endclass.
Message was edited by: Bartek Szmajdzinski
Hi Bartek
In ABAP OO, we call methods by the following statement:
CALL METHOD <obj_ref>-><method_name>
EXPORTING
<Parameters to export>
IMPORTING
<Parameters to import>
EXCEPTIONS
<exceptions> .
Just like calling function modules. If the method does not have any parameters, you can say
CALL METHOD <obj_ref>-><method_name>() .
According to your needs, use
CALL METHOD ldb->read_spfli().
*--Serdar
Similar Messages
-
BI setup: WebAS ABAP Setting - Java to ABAP communication problem
Hello,
i've got a problem during intallation of BI in Netweaver 2004s. The Diagnostics & Support Desktop Tool reports errors in WebAS ABAP Settings. These errors are:
- "Web Template Validation failed due Java to ABAP communication problem (return code:ERSBOLAP018)" with the suggested solution "Check Connector Connection of System Object in Portal System Landscape". What does it mean?
- "Call ABAP->Java for function RSWR_RFC_SERVICE_TEST failed for destination <destination>" and "Call ABAP->Java for function RSRD_MAP_TO_PORTAL_USERS failed for destination <destination>" with suggested solution "Check the data of the destination in transaction SM59. Check that the target host is running and has registered a program id in the gateway." Run of transaction SM59 returns no errors.
Further i've take a look in the log 'dev_jrfc.trc' and there i found the errors:
- Exception thrown by application running in JCo Server
java.lang.RuntimeException: Bean RSRD_MAP_TO_PORTAL_USERS not found on host <host>
- Exception thrown by application running in JCo Server
java.lang.RuntimeException: Bean RSWR_RFC_SERVICE_TEST not found on host <host>
- Exception thrown by application running in JCo Server
java.lang.RuntimeException: Bean RSWR_PREEXECUTION_PROXY not found on host <host>
Can these errors be the cause of the WebAS ABAP Setting error displayed in the Diagnostics & Support Desktop Tool? How they can be solved?
Thanks for your help,
MartinHello Chetan,
thanks for your response. Maybe i've described my problem not clear enough. There is no problem of installation and usage of support & dektop tool, but of installation of BI. The support & dektop tool indicates the errors described above with no other hints. My questions is, if anybody knows, what is the cause of the errors and what i must do, to install BI correctly.
Cheers,
Martin -
HTTP to ABAP Proxy - Problem with "Current User" parameter
Hi experts,
We have a HTTP to ABAP proxy sceario, where I used an HTTP Destination to connect to the proxy.
We're trying to use the option "Current User" in that destination in order to login to ECC with the same user that in PI adapter plain.
The user exists i both systems, PI and ECC, with the same password.
Checking that parameter we get the following error:
<SAP:Error><SAP:Category>XIServer</SAP:Category><SAP:Code>INTERNAL.UNAUTHORIZED</SAP:Code><SAP:P1>401 </SAP:P1><SAP:P2>Unauthorized</SAP:P2><SAP:P3>(See attachment HTMLError for details)</SAP:P3></SAP:Error>
We think that PI is not getting the password.
Does aybody know how to do this?
Thanks and regards,
LUIS B.Hi Chirumamilla,
If we put user and password in SM59 (unchecking "Current User") the commuication works without problems.
We don't want to leave a user set there, beacuse we are looking to access to PI with different users and login to ECC with the same user.
Thanks, -
Hi friends,
I am trying Abap mapping in my scenario.
I am using DOM parsers
By default the first line of the output xml document generated is
<b><?xml version="1.0" ?></b>
But I want to add encoding to it. i.e it should be
<b><?xml version="1.0" encoding="UTF-8"?></b>
I have written the code to change this , but it is not working. my code is
data: temp1 type string.
temp1 = 'UTF-8'.
data : encode type ref to IF_IXML_ENCODING.
encode->set_character_set( CHARSET = 'UTF-8' ).
data: odocument type ref to if_ixml_document.
odocument = ixmlfactory->create_document( ).
odocument->SET_ENCODING( encode ).
This code is giving exception
- <u><CX_XMS_SYSTEM_ERROR>
<ID>APPLICATION_PROGRAM_ERROR</ID>
<P1>Z_COSTCENTER_ABAP_MAPPING</P1>
<P2>SAP-ABAP</P2>
<P3>UNCAUGHT_EXCEPTION</P3>
<P4>Program Z_COSTCENTER_ABAP_MAPPING=====CP Include Z_COSTCENTER_ABAP_MAPPING=====CM001 Line 1</P4>
<INFO />
<CATEGORY />
<AREA />
<RETRY />
</CX_XMS_SYSTEM_ERROR>
<CX_XMS_SYSERR_MAPPING />
</cls:CX_XMS_SYSERR_MAPPING>
- <cls:CX_SY_NO_HANDLER id="o215">
- <CX_ROOT>
<TEXTID>1F09B73915F6B645E10000000A11447B</TEXTID>
<PREVIOUS href="#o216" />
<KERNEL_ERRID>UNCAUGHT_EXCEPTION</KERNEL_ERRID>
- <INTERNAL_SOURCE_POS>
<PROGID>196</PROGID>
<CONTID>47</CONTID>
</INTERNAL_SOURCE_POS>
</CX_ROOT>
<CX_NO_CHECK />
- <CX_SY_NO_HANDLER>
<CLASSNAME><b>CX_SY_REF_IS_INITIAL</b></CLASSNAME>
</CX_SY_NO_HANDLER></u>
Can anyone please tell me how to add the encoding parameter in the Output XML document which we are building through ABAP MAPPING.
Thanks,
YomeshHi Yomesh,
Did you solve this problem. If yes could you please tell. I am also facing the same problem.
Regards,
Dinakar -
Hi all,
I am trying to develope an itegration scenario as follows:
ABAP System ---> XI -
Java System
For communication between ABAP System and XI there is a Proxy, however it is not working out.
The message from ABAP system does not go to XI.
I got the following message in SXMB_MONI of ABAP Sytem:
SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
<SAP:Category>XIProtocol</SAP:Category>
<SAP:Code area="PARSER">ITEM_MISSING</SAP:Code>
<SAP:P1>Envelope</SAP:P1>
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack>XML element Envelope missing in SOAP message header (SAP XI Extension)</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Someone has solved a problem like that?
Regards
FabioHi Fabio,
I would request to to check for two things,
1. Whats ur was version? Is it 640? else can you try to change the Commumnication channel in xi adapter to message protocal as xi2.0 ,, i think you used it as xi3.0
2. retest it.
3. If it still gets the same error refer the thread,
XI Proxy Problems
All the best,
Anirban. -
ABAP Dump Problem - SYNTAX_ERROR
Error in ABAP application program.
The current ABAP program "SAPMSSY1" had to be terminated because one of the
statements could not be executed.
Hello Gurus
In our quality system, we are facing problem in this ABAP Dump it generates more than 10000 times & we are unable to find the rectification
Can somebody help us to get rectification
Runtime Error SYNTAX_ERROR
Date and Time 29.07.2007 23:59:59
This is probably due to an error in the ABAP program.
In program "SAPLMEWP ", the following syntax error occurred
in the Include "LMEWPU01 " in line 236:
"Different number of parameters in FORM and PERFORM (routine: CREATE_IT"
"EM_ADDR, number of formal parameters: 3, number of actual parameters: "
"4)."
Author and last person to change the Include are:
Author "SAP "
Last changed by "PRZEDPELSKI "1. no relation to the Oracle Database at all, please use the right forum (ABAP Server related).
2. if the related programs are official unmodified SAP Source Code file a problem report on http://service.sap.com
peter -
Problem trying to ftp a pdf from abap - SCMS_TEXT_TO_XSTRING problem
Hi All,
I am trying to ftp a pdf from sap with Abap but I have hit a problem with FM SCMS_TEXT_TO_XSTRING.
I am converting a spool file with function CONVERT_OTFSPOOLJOB_2_PDF then trying to use SCMS_TEXT_TO_XSTRING to prepare the pdf for FTP_R3_TO_SERVER.
The problem is when I try and convert the pdf with SCMS_TEXT_TO_XSTRING it will miss any space characters at the end of a table line. Internally it is using STRLEN to determine the line size which causes it to miss a space char at the end of any line.
So my question is, is there a better way of converting the pdf ready for ftp or any known work arounds for this problem ?
Cheers
AllanNevermind, I just made a copy of SCMS_TEXT_TO_XSTRING and modified it to suit, works fine now.
-
Hi Friends,
I am working on SAP GUI 710 & ECC 6. When I am debugging, new abap debugger is opening and I can do analysis normally. When we finish the debugging and want to exit, the debugging session is not closing and i get the following message on top of beugging window "ABAP Debugger Control Session 3 (Exclisive)". I want to know if there is any settings to be done to aviod this.
Thanks.............
Regards,
ChanduHi Prabhakar,
What actually you are quoting as a problem is standard behavior of ECC 6 New debugger. As you open first debugger session it always display in header "ABAP Debugger Control Session # (Exclusive/ Not exclusive)' and this debugger will be separately closed when the full program will be executed and if you are in mid of execution then this debugger will not be closed. I simulated the scenario for a print program ad checked the same.
Please re vert back in case of still problem persist.
Thanks,
Anshul -
Hi All,
I have one ABAP query which has been created for vendor details. Its using standard sap LDB KDF. Now there are some fields in vendor classification which are not there in LDB. so i need to add these fields in ABAP query.
those fields are in other tables, ehich are not been used in standard LDB.
Can anybody suggest me. Its really urgent issue.
Regards
Azad.
If any further clarification required about the problem please get back to me.Azad,
You will need to change the Infoset using tcode SQ02 (Probably copy current infoset and change in the new one), in new info set you can add tables and even custom fields with ABAP code behind them.
Thanks. -
Hi All
I have the following ABAP problem.
I wrote a program that delimits(Just editing the end date) the Qualification and Person relationship in HRP1001.
The problem is that I update the database directly, and all appears to be working fine but it appears that the Buffer for infotype 1001 does not get updated and therefore if you view the data in transaction PPPD it still displays the previous end date and not the updated end date.
Is there a way to refresh the buffer for infotype 1001 so that the data in PPPD reflects the actual database data?
Help will be greatly appreciated and rewarded .
Kind regardsHi All
I have the following ABAP problem.
I wrote a program that delimits(Just editing the end date) the Qualification and Person relationship in HRP1001.
The problem is that I update the database directly, and all appears to be working fine but it appears that the Buffer for infotype 1001 does not get updated and therefore if you view the data in transaction PPPD it still displays the previous end date and not the updated end date.
Is there a way to refresh the buffer for infotype 1001 so that the data in PPPD reflects the actual database data?
Help will be greatly appreciated and rewarded .
Kind regards -
MiniSap MBS "Abap Objects" problem HELP
Hi All,
I just bought ABAP objects book MiniSap MBS released in 2001, and managed to istall with no problems.
My problem is that in the object navigator , i can not see the object selector.
Has anyone been through this problem and how to fix it??
I am talking about SAP MBS 4.6 Not the AS web 6.2.Check this thread:
Object Navigator
Peter -
Webdynpro ABAP Caching Problem in Portal
Hi All,
We have developed custom applications using Webdynpro - ABAP, using FPM and accessing those applications through SAP Netweaver Portal 7.0. I have deactivated all the caching techniquies in Portal @ iview level and Page level, Portal Runtime and ContentFetch side, But still causing the same problem.
I have a doubt, wether this is happening because of SAP Logon Caching @ SAP WAS system level. I have checked the SSO parameter settings in RZ10 Profile parameters. Our basis people have set both accept and create parameter value = 1. Is this causing issue?
Or Is there any other settings which is required to do in Portal or SAP system level. Please let us know , really appreciate your value suggestions and help.
Please find the below links, which im referring to...
http://help.sap.com/saphelp_nwmobile71/helpdata/en/d2/91553b4d53273de10000000a114084/frameset.htm
http://help.sap.com/SAPHELP_NWPI71/helpdata/EN/48/69eb40e8a607d6e10000000a42189c/content.htm
Thanks in Advance
PRadeep
Edited by: Pradeep on Jan 28, 2009 9:10 AMThe delete icon will not show up in the line of the favorite/templates, if no hours are recorded on it. There is no transfer to the backend either, unless hours are recorded on these working time attributes. also ensure note 1986356 is implemented for details column check CAC2 for the CATS profile attached to the user in CVR in Su3
-
OO ABAP having problems retrieving value from screen dropBox field
Hi,
I am a new in ABAP, and need some advice.
I have a class and in its definition I have class-data: dropBox (same name as in screen) field from the screen. When I create a instance of a class and fill with data dropBox. data is populated properly using F4IF_INT_TABLE_VALUE_REQUEST method. But I can not retrieve the selected value. In screen dropBox field 'conversion exit' is set to ALPHA.
Tried to do it without a class it works, and I can get data.
Question is, can I do it using a class the way I explaining at the beginning of discussion.
Am I missing something?
Thanks,
AivarasIt is not possible to have screen field attribute and use it. Solved my problem of returning value by increasing the value of Defined length on screen field.
-
WD Abap - URL Problem with special characters (german umlaut)
hi all,
we're running erp 6.0 unicode system and have an wd abap application which receives url -parameters , in the form.
.....?IV_ID=Müller
In the WD Abap startup Event the string Müller is shown as M#ller ....i surfed a lot thru oss but did not find any solution for that´?
any help would be great
kind regards,
oliverHello Koen,
ok, but our problem is that an external customer calls an application of us and we have no influence on the url-parameter he sends us.
he always tells us that with other companies sending url-parameters like IV_ID=Müller works???? -
SCAN ABAP-SOURCE : problems to recognize all DATA declarations
Hi all !
My problem is simple :
When I scan a program, all data declarations structures are not recognized :
SCAN ABAP-SOURCE t_code_prgm TOKENS into t_tokens
STRUCTURES into t_structures
STATEMENTS into t_statements
LEVELS into t_levels
WITH INCLUDES
WITH ANALYSIS.
In "t_structures", for some data declarations, the scan find statement types "d" (DATA) and "t" (TYPES), but not others ("k" --> constants ...etc...)
With DATA, SCAN recognize itab like "DATA : BEGIN OF itab ....", but no "DATA wa_data type ..." !!!
Do someone know why ?
I need this to scan programs and control how DATA are named.
Thanks !
Stephane.Hi,
If RSA3 is giving the error that means the data source is not ready yet.
May be you should again do the transports and see if there is no difference between the development and production system.
Also make sure that you have maintained all the settings for the CO-PA to work as it was in the developement system.
Also
Try to run a delta after 2 hours of initialization in production dont schedule it immeadiately.
Are you sure that delta and init and RSA3 was running fine in quality and developmenet system in the same way as you are trying here??
Thanks
Ajeet
Maybe you are looking for
-
The sleep, restart, and shut down in the apple menu do not respond. There is no box asking if I really want to do this. Also, the restart after downloading software does nothing.
-
SSH sessions over Putty die unexpectedly & commandline entry is slow
I have a Sun Ultra-60 running Solaris 9 at patch level 118558-05. Users of this server report that their ssh sessions over Putty to this server die unexpectedly anywhere from one to two times per week. The users are usually in a vim session at the ti
-
Material Documents number range
Can set number range for Material documnets as a year dependent ? How to set it? In our system I am not able to set new number range for the new Fiscal Year . There are predefined number ranges . with validity year 9999. and year field displays gray
-
I can be reached at this email during the day [email protected]
-
Hi guys I have a big problem with my photoshop on my windows pc. Its running very slowly even if I try to rotate a normal picture or paint a simple line. Its lagging hard and not running smoth. My setup: Windows 7 x64 CPU: AMD A10 Series A10-6800K (4