TextEdit ABAP types and objects
Anyone who knows an appropriate ABAP type or ABAP object to store the content of my HTMLB textEdit elements?
Any help will be appreciated.
Thanks!
No solution found.
Similar Messages
-
ALV using ABAP Classes and Objects
Hi All,
I am trying to print the values in my internal table using ALV, using ABAP classes and objects. Here the title for columns are picked based on the title specified in the data element. I want to set the title of my columns by my own. how to achieve this ?. Please provide me a sample code if possible.
thanks & regards,
Navneeth.KHello Navneeth
The following sample report shows how to build and modify a fieldcatalog (routine <b>BUILD_FIELDCATALOG_KNB1</b>).
*& Report ZUS_SDN_ALVGRID_EVENTS
REPORT zus_sdn_alvgrid_events.
DATA:
gd_okcode TYPE ui_func,
gt_fcat TYPE lvc_t_fcat,
go_docking TYPE REF TO cl_gui_docking_container,
go_grid1 TYPE REF TO cl_gui_alv_grid.
DATA:
gt_knb1 TYPE STANDARD TABLE OF knb1.
PARAMETERS:
p_bukrs TYPE bukrs DEFAULT '2000' OBLIGATORY.
* CLASS lcl_eventhandler DEFINITION
CLASS lcl_eventhandler DEFINITION.
PUBLIC SECTION.
CLASS-METHODS:
handle_hotspot_click FOR EVENT hotspot_click OF cl_gui_alv_grid
IMPORTING
e_row_id
e_column_id
es_row_no
sender.
ENDCLASS. "lcl_eventhandler DEFINITION
* CLASS lcl_eventhandler IMPLEMENTATION
CLASS lcl_eventhandler IMPLEMENTATION.
METHOD handle_hotspot_click.
* define local data
DATA:
ls_knb1 TYPE knb1,
ls_col_id TYPE lvc_s_col.
READ TABLE gt_knb1 INTO ls_knb1 INDEX e_row_id-index.
CHECK ( ls_knb1-kunnr IS NOT INITIAL ).
CASE e_column_id-fieldname.
WHEN 'KUNNR'.
SET PARAMETER ID 'KUN' FIELD ls_knb1-kunnr.
SET PARAMETER ID 'BUK' FIELD ls_knb1-bukrs.
CALL TRANSACTION 'XD03' AND SKIP FIRST SCREEN.
WHEN 'ERNAM'.
* SET PARAMETER ID 'USR' FIELD ls_knb1-ernam.
* NOTE: no parameter id available, yet simply show the priciple
CALL TRANSACTION 'SU01' AND SKIP FIRST SCREEN.
WHEN OTHERS.
* do nothing
ENDCASE.
* Set active cell to field BUKRS otherwise the focus is still on
* field KUNNR which will always raise event HOTSPOT_CLICK
ls_col_id-fieldname = 'BUKRS'.
CALL METHOD go_grid1->set_current_cell_via_id
EXPORTING
is_row_id = e_row_id
is_column_id = ls_col_id.
ENDMETHOD. "handle_hotspot_click
ENDCLASS. "lcl_eventhandler IMPLEMENTATION
START-OF-SELECTION.
SELECT * FROM knb1 INTO TABLE gt_knb1
WHERE bukrs = p_bukrs.
* Create docking container
CREATE OBJECT go_docking
EXPORTING
parent = cl_gui_container=>screen0
ratio = 90
EXCEPTIONS
OTHERS = 6.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Create ALV grid
CREATE OBJECT go_grid1
EXPORTING
i_parent = go_docking
EXCEPTIONS
OTHERS = 5.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Set event handler
SET HANDLER:
lcl_eventhandler=>handle_hotspot_click FOR go_grid1.
* Build fieldcatalog and set hotspot for field KUNNR
PERFORM build_fieldcatalog_knb1.
* Display data
CALL METHOD go_grid1->set_table_for_first_display
CHANGING
it_outtab = gt_knb1
it_fieldcatalog = gt_fcat
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* Link the docking container to the target dynpro
CALL METHOD go_docking->link
EXPORTING
repid = syst-repid
dynnr = '0100'
* CONTAINER =
EXCEPTIONS
OTHERS = 4.
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* ok-code field = GD_OKCODE
CALL SCREEN '0100'.
END-OF-SELECTION.
*& Module STATUS_0100 OUTPUT
* text
MODULE status_0100 OUTPUT.
SET PF-STATUS 'STATUS_0100'.
* SET TITLEBAR 'xxx'.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
* text
MODULE user_command_0100 INPUT.
CASE gd_okcode.
WHEN 'BACK' OR
'END' OR
'CANC'.
SET SCREEN 0. LEAVE SCREEN.
WHEN OTHERS.
ENDCASE.
CLEAR: gd_okcode.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Form BUILD_FIELDCATALOG_KNB1
* text
* --> p1 text
* <-- p2 text
FORM build_fieldcatalog_knb1 .
* define local data
DATA:
ls_fcat TYPE lvc_s_fcat.
CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
EXPORTING
* I_BUFFER_ACTIVE =
i_structure_name = 'KNB1'
* I_CLIENT_NEVER_DISPLAY = 'X'
* I_BYPASSING_BUFFER =
* I_INTERNAL_TABNAME =
CHANGING
ct_fieldcat = gt_fcat
EXCEPTIONS
inconsistent_interface = 1
program_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.
LOOP AT gt_fcat INTO ls_fcat
WHERE ( fieldname = 'KUNNR' OR
fieldname = 'ERNAM' ).
ls_fcat-hotspot = abap_true.
ls_fcat-scrtext_s = '<short text>'. " short text of column
ls_fcat-scrtext_m = '<medium text>'. " medium text of column
ls_fcat-scrtext_l = '<long text>'. " longtext text of column
ls_fcat-tooltip = '...'. " ALV control: Tool tip for column header
ls_fcat-coltext = '...'. " ALV control: Column heading
MODIFY gt_fcat FROM ls_fcat.
ENDLOOP.
ENDFORM. " BUILD_FIELDCATALOG_KNB1
Regards
Uwe -
Help in using record type and object type
Hi Experts,
I am new to object types and record types.
I want to return the output of this query using one OUT parameter
from the procedure using RECORD type or OBJECT type.
with out using refcursor.
SELECT empno,ename,sal FROM emp WHERE deptno=30;
Let us assume the query is returning 50 records.
I want to send those 50 records to OUT parameter using record type or object type.
Please provide the for the requirement code using RECORD TYPE and OBJECT TYPE separately.
Your earliest response is appreciated.
Thanks in advance.Hi All,
I have tried this.But it ising not work
CREATE OR REPLACE PACKAGE maultiplevalues_pkg
IS
TYPE t_record IS RECORD
(empno emp.empno%TYPE,
ename emp.ename%TYPE,
sal emp.sal%TYPE);
V_RECORD t_record;
TYPE t_type IS TABLE OF V_RECORD%TYPE;
PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
dept_result OUT t_type);
END;
CREATE OR REPLACE PACKAGE body maultiplevalues_pkg
IS
PROCEDURE maultiplevalues_pROC(p_deptno IN emp.deptno%TYPE,
dept_result OUT t_type)
is
begin
dept_result :=t_type();
for I in(
select EMPNO,ENAME,SAL from EMP WHERE deptno=p_deptno
LOOP
dept_result.extend;
dept_result(i).empno :=i.empno;
dept_result(i).ename :=i.ename;
dept_result(i).sal :=i.sal;
END LOOP;
END;
END;
Please help me OUT return multiple values through single OUT variable in a procedure.
Thanks. -
How to get object type and object key of bapi_acc_gl_posting_post
Hi,
I want to upload data from flat file to FB01 transaction using BAPI. For this i found bapi_acc_gl_posting_post. How should i get the obj type and object key for this bapi.
Please let me know wether this is correct bapi for fb01 transaction.
Thanks in advance,
Regards,
Sun.Hi,
I want to upload data from flat file to FB01 transaction using BAPI. For this i found bapi_acc_gl_posting_post. How should i get the obj type and object key for this bapi.
Please let me know wether this is correct bapi for fb01 transaction.
Thanks in advance,
Regards,
Sun. -
Transaction SMOEAC does not display Object type and Object Name options.
Dear all,
When I go to transaction SMOEAC system does not display fields Object type and Object Name option instead displays an empty frame allowing only to create new objects.
System does not allow and display existing objects to edit.
Most imp with the same ID, I am able to see the existing objects and two fields "Object type" and "Object Name" on different machine. So there is no authorization issue.
My SAP GUI version where these fields are not visible is 640 Final Release with 6405.5.18.1016 version and Patch level 18.
My SAP GUI version here these fields are visible is 640 Final Release with 6404.4.14.1012 version and Patch Level 14.
Any idea what could be the reason?
Regards,
Sandeep ParabWith installation of latest version of SAP GUI 710 final Release resolved my problem.
Regards,
Sandeep -
Object type and object subtipe in configuration of Z component
I created one Z component and I need to have different configuration views. If I create configuration I have only <DEFAULT> value available for object type and subtype. How can I define other available object types for Z component?
Thank you in advance.Hi Robert,
You can go to CRM->UI Framework->UI Framework Definition->Define UI Object Types.
These are generic Object types and can be used for defining configuration of any component.
Alternatively, you can create your own Object types and Sub Object types (hardcoded) in the method where you want to use them. You can look into method DO_CONFIG_DETERMINATION in class CL_BP_HEAD_ACCOUNTDETAILS_IMPL for reference.
Thanks
Vishal -
Stroke types and object corners options like in Indesign.
Hi!
In Illustrator CS3, is there stroke type options and object corner options like in Indesign?
Thanks!
Chris.No.
Some stroke types are easy to make, such as dashes. Dots can be achieved using a round cap and a dash measure that begins with 0 (zero).
Multiple strokes are trickier. Use the Appearance panel to add a new stroke. You can offset different strokes to achieve stoke/transparent/stroke patterns or stack a white or coloured stroke over another stroke to achieve black/white/black strokes.
More elaborate stroke options are possible in Illustrator using pattern brushes.
As for corner effects, this is one place where Illustrator falls flat on its face. The only corner effect you can apply is a rounded corner, and the effect applies to the entire path, not corner-by-corner as in InDesign. Illustrator’s rounded corners also such for anything other than 90° corners. -
Need help in writing ABAP for and Object
Hi ,
I am an ABAPer and I need a help related to BW.
As per the Client Requirement ,I need to write ABAP for object ZC_MRPAMC.
what he expects is :
0MRP_CONTROL is an attribute of 0MAT_PLANT. There can be only one 0MRP_CONTROL per 0MAT_PLANT.
Assign the attribute value of 0MRP_CONTROL to ZC_MRPAMC per 0MAT_PLANT.
How to assign value of 0MRP_CONTROL to ZC_MRPAMC per 0MAT_PLANT.
Kindly give me the steps.
Thanks.
Anu.Hi,
U can use FM RSAU_READ_MASTER_DATA.
Give as input the info object(I_IOBJNM=0MAT_PLANT) and attribute name(I_ATTRNM=0MRP_CONTROL).
Output u will get the value of that attribute which u want(E_ATTRVAL=ZC_MRPAMC).
Hope it helps
Regards,
Rathy -
E-Recruiting - Attachment Types and Object Relationships
Can someone help me to understand why SAP recommends attachment types to be linked to the Application object and not to the Candidacy object? I've always created attachment types specific to certain candidacy activities to that object as appropriate. Is there a technical implication that I am not aware of? If so, please advise. Thank you for your help.
Hi Roman and experts
We have an issue where we have created 2 attachments:
Attachment type 10 PDR
Attachment type 17 Mamual Application Form
both of subtype text "Resume" which we have attached to object type NA Candidate.
What is happening is that once a candidate has attached these to his/her application then they automatically are attached to any past and future applications as well. I assume if we had assigned them to object type ND Application instead then they would be unique to the application ie: not attach to all applications?
Also can an attachment type only be assigned to object type NA or object type ND eg: could 10 PDR be assigned to both candidate and application?
Many thanks
Dawn -
How to get object type and object key from Bapi_acc_gl_posting_post
Hi,
Currently iam implementing FB01 transaction thru Bapi_acc_gl_posting_post.
I got object key by including document no, fiscal year and Document data
I got object type from TTYP table. But iam not sure it is correct.
After implemeting the BAPI return code is giving successfull and i commited the process.
But at last data is not updating in BKPF table. There is no document number displayed at BKPF...Please go thru and do the needful its urgent.
Thanks in advance....
Regards,
GangaHi Max,
I have executed it and it is working only for GL posting but i need to make this for different accounting types like vendors, customers, material customers etc.
I found BAPI_ACC_DOCUMENT_POST. when i executed it is giving error as 'Line entered several Times'.
I following is my code. If time permits please go thru my code and do the need ful..
Thanks in advance.
REPORT zk_fi_fb01 .
Data: v_objkey(20) type c.
Data: Docheader type BAPIACHE09.
Data: ACCOUNTGL LIKE BAPIACGL09 occurs 0 with header line,
ACCOUNTRECEIVABLE like BAPIACAR09,
ACCOUNTPAYABLE like BAPIACAP09 occurs 0 with header line,
CURRENCYAMOUNT like BAPIACCR09 occurs 0 with header line,
RETURN like BAPIRET2 occurs 0.
Data: obj_typ like BAPIACHE09-OBJ_TYPE,
OBJ_KEY like BAPIACHE09-OBJ_KEY,
OBJ_SYS like BAPIACHE09-OBJ_SYS.
*Data: gv_belnr type belnr_d.
*Data:file_Na type String.
Data: lsys like TBDLS-LOGSYS.
*START OF SELECTION
START-OF-SELECTION.
*CALL FUNCTION 'NUMBER_GET_NEXT'
EXPORTING
nr_range_nr = '19'
object = 'RF_BELEG' "'FIAA-BELNR'
QUANTITY = '1'
SUBOBJECT = '7777'
TOYEAR = '2007'
IGNORE_BUFFER = ' '
IMPORTING
NUMBER = gv_belnr
QUANTITY =
RETURNCODE =
*CALL FUNCTION 'OWN_LOGICAL_SYSTEM_GET'
IMPORTING
OWN_LOGICAL_SYSTEM = lsys
EXCEPTIONS
OWN_LOGICAL_SYSTEM_NOT_DEFINED = 1
OTHERS = 2
*IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
*ENDIF.
*concatenate gv_belnr '7777' '2007' into v_objkey.
*Filling Document Header Details
*Docheader-OBJ_TYPE = 'BEBD'.
*Docheader-OBJ_key = V_objkey.
*Docheader-OBJ_SYS = lsys.
docheader-BUS_ACT = 'RFBU'.
Docheader-USERNAME = sy-uname.
Docheader-COMP_CODE = '7777'.
Docheader-DOC_DATE = '20070724'.
Docheader-PSTNG_DATE = '20070725'.
Docheader-FISC_YEAR = '2007'.
Docheader-DOC_TYPE = 'KZ'.
*Item data for ACCOUNTGL
ACCOUNTGL-ITEMNO_ACC = '0000000001'.
ACCOUNTGL-GL_ACCOUNT = '0000000501'.
ACCOUNTGL-DOC_TYPE = 'KZ'.
ACCOUNTGL-COMP_CODE = '7777'.
ACCOUNTGL-FISC_YEAR = '2007'.
ACCOUNTGL-PSTNG_DATE = '20070725'.
*ACCOUNTGL-DE_CRE_IND = 'S'.
append ACCOUNTGL.
ACCOUNTGL-ITEMNO_ACC = '0000000002'.
ACCOUNTGL-GL_ACCOUNT = '0000400002'.
ACCOUNTGL-DOC_TYPE = 'KR'.
ACCOUNTGL-COMP_CODE = '7777'.
ACCOUNTGL-FISC_YEAR = '2007'.
ACCOUNTGL-PSTNG_DATE = '20070725'.
*ACCOUNTGL-DE_CRE_IND = 'H'.
append ACCOUNTGL.
*Account payable
ACCOUNTPAYABLE-ITEMNO_ACC = '0000000001'.
ACCOUNTPAYABLE-GL_ACCOUNT = '0000000102'.
ACCOUNTPAYABLE-COMP_CODE = '7777'.
append ACCOUNTPAYABLE.
ACCOUNTPAYABLE-ITEMNO_ACC = '0000000002'.
ACCOUNTPAYABLE-GL_ACCOUNT = '0000400002'.
ACCOUNTPAYABLE-COMP_CODE = '7777'.
append ACCOUNTPAYABLE.
*Currency Amount
CURRENCYAMOUNT-ITEMNO_ACC = '0000000001'.
CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
MOVE 1000 TO CURRENCYAMOUNT-AMT_DOCCUR.
Append CURRENCYAMOUNT.
CURRENCYAMOUNT-ITEMNO_ACC = '0000000002'.
CURRENCYAMOUNT-CURRENCY_ISO = 'INR'.
MOVE '1000-' to CURRENCYAMOUNT-AMT_DOCCUR.
Append CURRENCYAMOUNT.
clear CURRENCYAMOUNT.
clear ACCOUNTGL.
clear ACCOUNTPAYABLE.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = Docheader
CUSTOMERCPD =
CONTRACTHEADER =
IMPORTING
OBJ_TYPE = obj_typ
OBJ_KEY = obj_key
OBJ_SYS = obj_sys
tables
ACCOUNTGL = ACCOUNTGL[]
ACCOUNTRECEIVABLE =
ACCOUNTPAYABLE = ACCOUNTPAYABLE
ACCOUNTTAX =
currencyamount = CURRENCYAMOUNT
CRITERIA =
VALUEFIELD =
EXTENSION1 =
return = return.
if sy-subrc = 0.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
EXPORTING
WAIT = ' '.
endif.
if sy-subrc = 0.
WRITE: / OBJ_KEY,
OBJ_TYP,
OBJ_SYS. -
MVC in ABAP programs and objects
Hello,
Is there an example of using the Model-View-Controller outside of BSP? Or a guided procedure not using Netweaver?
I have several related data entry screens that I would like to implement in one transaction with as little maintenance as possible.
Or perhaps there is a better way, maybe?Hello Oscar
Perhaps my answers in the following threads may give you some input.
Abap Objects
Regards
Uwe -
Any experience with Object Types and Forms6i / 9i ???
Has anyone got any experience in working with Object Types and Object Views together with Forms 6i or 9i???
TIA
Rob ZoeteweijHi AnneCarmen,
Check this small video, http://project02.businesscatalyst.com/Jing/2012-07-13_0508.swf
This is just an example where I am trying to demonstrate how the html embedded into the frame sticks to only one image and not to all the other images. Also, how to keep the thumbnails. Under menu options you can modify the transition and speed option as per your need.
Regards,
Abhishek Maurya -
Difference b/w DATA TYPE and DATA OBJECT & differences b/w TYPE and LIKE
hai
can any one say the differences between Data type and Data Object.
And also differences between TYPE and LIKE
thanks
Ganihi,
_Data Types and Data Objects_
Programs work with local program data that is, with byte sequences in the working memory. Byte sequences that belong together are called fields and are characterized by a length, an identity (name), and as a further attribute by a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
In the ABAP type concept, fields are called data objects. Each data object is thus an instance of an abstract data type. There are separate name spaces for data objects and data types. This means that a name can be the name of a data object as well as the name of a data type simultaneously.
Data Types
As well as occurring as attributes of a data object, data types can also be defined independently. You can then use them later on in conjunction with a data object. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program using the TYPESstatement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
All programming languages distinguish between various types of data with various uses, such as .. type data for storing or displaying values and numerical data for calculations. The attributes in question are described using data types. You can define, for example, how data is stored in the repository, and how the ABAP statements work with the data.
Data types can be divided into elementary, reference, and complex types.
a. Elementary Types
These are data types of fixed or variable length that are not made up of other types.
The difference between variable length data types and fixed length data types is that the length and the memory space required by data objects of variable length data types can change dynamically during runtime, and that these data types cannot be defined irreversibly while the data object is being declared.
Predefined and User-Defined Elementary Data Types
You can also define your own elementary data types in ABAP using the TYPES statement. You base these on the predefined data types. This determines all of the technical attributes of the new data type. For example, you could define a data type P_2 with two decimal places, based on the predefined data type P. You could then use this new type in your data declarations.
b. Reference Types
Reference types are deep data types that describe reference variables, that is, data objects that contain references. A reference variable can be defined as a component of a complex data object such as a structure or internal table as well as a single field.
c. Complex Data Types
Complex data types are made up of other data types. A distinction is made here between structured types and table types.
Data Objects
Data objects are the physical units with which ABAP statements work at runtime. The contents of a data object occupy memory space in the program. ABAP statements access these contents by addressing the name of the data object and interpret them according to the data type.. For example, statements can write the contents of data objects in lists or in the database, they can pass them to and receive them from routines, they can change them by assigning new values, and they can compare them in logical expressions.
Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running (field length, number of decimal places, and data type). You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
A data object is a part of the repository whose content can be addressed and interpreted by the program. All data objects must be declared in the ABAP program and are not persistent, meaning that they only exist while the program is being executed. Before you can process persistent data (such as data from a database table or from a sequential file), you must read it into data objects first. Conversely, if you want to retain the contents of a data object beyond the end of the program, you must save it in a persistent form.
Declaring Data Objects
Apart from the interface parameters of procedures, you declare all of the data objects in an ABAP program or procedure in its declaration part. These declarative statements establish the data type of the object, along with any missing technical attributes. This takes place before the program is actually executed. The technical attributes can then be queried while the program is running.
The interface parameters of procedures are generated as local data objects, but only when the procedure is actually called. You can define the technical attributes of the interface parameters in the procedure itself. If you do not, they adopt the attributes of the parameters from which they receive their values.
ABAP contains the following kinds of data objects:
a. Literals
Literals are not created by declarative statements. Instead, they exist in the program source code. Like all data objects, they have fixed technical attributes (field length, number of decimal places, data type), but no name. They are therefore referred to as unnamed data objects.
b. Named Data Objects
Data objects that have a name that you can use to address the ABAP program are known as named objects. These can be objects of various types, including text symbols, variables and constants.
Text symbols are pointers to texts in the text pool of the ABAP program. When the program starts, the corresponding data objects are generated from the texts stored in the text pool. They can be addressed using the name of the text symbol.
Variables are data objects whose contents can be changed using ABAP statements. You declare variables using the DATA, CLASS-DATA, STATICS, PARAMETERS, SELECT-OPTIONS, and RANGESstatements.
Constants are data objects whose contents cannot be changed. You declare constants using the CONSTANTSstatement.
c. Anonymous Data Objects
Data objects that cannot be addressed using a name are known as anonymous data objects. They are created using the CREATE DATAstatement and can be addressed using reference variables.
d. System-Defined Data Objects
System-defined data objects do not have to be declared explicitly - they are always available at runtime.
e. Interface Work Areas
Interface work areas are special variables that serve as interfaces between programs, screens, and logical databases. You declare interface work areas using the TABLES and NODESstatements.
What is the difference between Type and Like?
Answer1:
TYPE, you assign datatype directly to the data object while declaring.
LIKE,you assign the datatype of another object to the declaring data object. The datatype is referenced indirectly.
Answer2:
Type is a keyword used to refer to a data type whereas Like is a keyword used to copy the existing properties of already existing data object.
Answer3:
type refers the existing data type
like refers the existing data object
reward if useful
thanks and regards
suma sailaja pvn -
Can Any one give me Clear definition of Data type and Data objects.
Concept i know clearly.. but unable to explain it..
Regards,
PrasannaData consists of strings of bytes in the memory area of the program. A string of related bytes is called a field. Each field has an identity (a name) and a data type. All programming languages have a concept that describes how the contents of a field are interpreted according to the data type.
In the ABAP type concept, fields are called data objects. Each data object is an instance of an abstract data type. Data types in ABAP are not just attributes of fields, but can be defined in their own right. There are separate name spaces for data objects and data types. This means that a name can at the same time be the name of a data object as well as the name of a data type.
<b>Data Types:</b>
As well as occurring as attributes of a data object, data types can also be defined independently. The definition of a user-defined data type is based on a set of predefined elementary data types. You can define data types either locally in the declaration part of a program (using the TYPES statement) or globally in the ABAP Dictionary. You can use your own data types to declare data objects or to check the types of parameters in generic operations.
Data types can be divided into elementary, reference, and complex types
<b>Data objects:</b>
Data objects are the physical units with which ABAP statements work at runtime. Each ABAP data object has a set of technical attributes, which are fully defined at all times when an ABAP program is running. The technical attributes of a data object are its length, number of decimal places, and data type. ABAP statements work with the contents of data objects and interpret them according to their data type. You declare data objects either statically in the declaration part of an ABAP program (the most important statement for this is DATA), or dynamically at runtime (for example, when you call procedures). As well as fields in the memory area of the program, the program also treats literals like data objects.
ABAP contains the following kinds of data objects
Literals
Named Data Objects
Predefined Data Objects
Dynamic Data Objects -
Hi Friends,
What is the difference between Data type and Data object?
Best Regards,
VRV Singhhi
good
Each ABAP program define its own data types using the statement.
TYPES dtype TYPE type ...
and declare its own variables or instance attributes of classes using the statement
DATA var {TYPE type} ...
Within the program or a class, you can also define local data types and variables within procedures. Local variables in procedures obscure identically-named variables in the main program or class.
When creating data types and data objects, there are a number of naming convention that also apply for other local program definitions, such as procedures. These are described in detail in the keyword documentation.
The Additions TYPE and LIKE
The additions TYPE type and LIKE dobj are used in various ABAP statements. The additions can have various meanings, depending on the syntax and context.
· Definition of local types in a program
· Declaration of data objects
· Dynamic creation of data objects
· Specification of the type of formal parameters in subroutines
· Specification of the type of formal parameters in methods
· Specification of the type of field symbols
Constructing New Data Types
The TYPE addition allows you to construct new data types in the TYPES, DATA; CONSTANTS; and STATICSstatements. In the TYPES statement, these are local data types in the program. In the other statements, they are attributes of new data objects, meaning that the newly defined data types are not free-standing. Rather, they are linked to database objects.This means that you can refer to them using the LIKEaddition, but not using TYPE.
To construct new data types, the addition TYPE can be used with the following type constructors:
· Construction of reference types
REF TO type|dobj
· Construction of structured data types
BEGIN OF struc_type.
END OF struc_type.
· Construction of table types
tabkind OF linetype
These data types only exist during the runtime of the ABAP program.
Referring to Known Data Types or Data Objects
Using the additions TYPE or LIKE in the TYPESstatement, local data types in a program can be referred to known data types or data objects. This is mainly the case with user-defined elementary data types. If you declare variables using the additions TYPE type or LIKE dobj with statement DATA, the data type of var is already fully defined before the declaration is made.
The known types or data that are referred to must be visible at the point where the data type or variable is declared.
A known data type can be any of the following:
· A predefined ABAP type to which you refer using the TYPE addition
· An existing local data type in the program to which you refer using the TYPE addition
· The data type of a local data object in the program to which you refer using the LIKE addition
· A data type in the ABAP Dictionary to which you refer using the TYPE addition. To ensure compatibility with earlier releases, it is still possible to use the LIKE addition to refer to database tables and flat structures in the ABAP Dictionary. However, you should use the TYPE addition in new programs.
The LIKE addition takes its technical attributes from a visible data object. As a rule, you can use LIKE to refer to any object that has been declared using DATA or a similar statement, and is visible in the current context. The data object only has to have been declared. It is irrelevant whether the data object already exists in memory when you make the LIKE reference.
· In principle, the local data objects in the same program are visible. As with local data types, there is a difference between local data objects in procedures and global data objects. Data objects defined in a procedure obscure other objects with the same name that are declared in the global declarations of the program.
· You can also refer to the data objects of other visible ABAP programs. These might be, for example, the visible attributes of global classes in class pools. If a global class cl_lobal has a public instance attribute or static attribute attr, you can refer to it as follows in any ABAP program:
DATA dref TYPE REF TO cl_global.
DATA: f1 LIKE cl_global=>attr,
f2 LIKE dref->attr.
You can access the technical properties of an instance attribute using the class name and a reference variable without first having to create an object. The properties of the attributes of a class are not instance-specific and belong to the static properties of the class.
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2ff3358411d1829f0000e829fbfe/content.htm
thanks
mrutyun^
Maybe you are looking for
-
I have just installed PE 7 and when I open a project the screen is frozen for five to six minutes before I can start working. Is this because I have a dual head video card? Matrox P650 PCLe128 If I set the screen resolution at 800x600 it will open a
-
I'm having the strangest problem: i can't change my alarm tone. I have a microSD card inserted, it has mp3s on it, the phone recognizes each and every one of them, i use some of them as ringtones etc. So everything seems to be working. However, when
-
Best Practices for securing VTY lines?
Hi all, The thread title makes this sound like a big post but it's not. If my router has say., 193 VTY lines as a maximum, but by default running-config has only a portion of those mentioned, should I set any configs I do on all lines, or just on th
-
RMAN> register database; database registered in recovery catalog RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =============================
-
Multiple bin-release folders after 4.6 upgrade
Hi, I've searched for an answer for this and I assume its a dumb question, but after upgrading to Flash Builder 4.6 from 4.5 whenever I run an Export Release Build I get a new bin-releaseX folder. Is there a configuration item I can set to make it re