Reg:Include structure in a ztable
hi Gurus,
I created a structure which contians field types,sub-structures&table types ,now i want to include this structure to a ztable.I am encountering with an error .
Some Error are mention below:-
1)Select a shorter name for REASON_FOR_CHANGE
2)SECTION is a reserved word (Select another field name)
3)Field ILID: Structured type ZDCAGS_ILID cannot be used in DB table ZDCAGT_TSK_CNSLT
4) Field TEXT: Structured type ZDCAGT_TLINE cannot be used in DB table ZDCAGT_TSK_CNSLT
5)Field VARIAN: Structured type ZDCAGS_ILID cannot be used in DB table ZDCAGT_TSK_CNSLT
6)Field REASON_FOR_CHANGE: Structured type ZDCAGT_TLINE cannot be used in DB table ZDCAGT_TSK_CNSLT
7)Error in code generation for creating table ZDCAGT_TSK_CNSLT in the DB
and the environment is ECC 6.40.
please suggest if any.
thanks in advance,
Ramesh
Hi Ramesh,
I have some Solutions,
1. Reason_for_change - Its field name means Give a shoet name.
2. Section is reserved for SAP. So Select another word.
3. The structure of the three fields are differed. So You can't use this Fields.
Check this..
Thanks.
Reward If Helpful.
Similar Messages
-
What is diff b/w Include Structure and Append Structure at Database Level
Hi Experts,
Could you please let me know what is the main difference between .Include Structure and .Append Structure at SE11?
Thanks in advance and for good answer will give good points.
SekharHi,
1. Append Structures
Append structures can only be assigned to a single table.
Append structures are created in the custome rnamespace ( ZZ or YY)
In case of new versions of the standard table during upgrade, the append structures are automatically appended to the new version of the standard table
Append structures can not be used with cluster and pool tables
Append structures are created in transaction SE11. Display the standard table fields and press the Append structure button.
When you press the button, SAP sugests a name for the new append structure. After you has accepted the name,
a screen will be shown where you can enter the new fields.
Remember to activate.
2. Customizing Includes
Some of the SAP standard tables contains special include statements called Customizing includes. In contrast to Append structures,
Note that customizing includes are created by SAP, but the customer supply the fields for the include.
Customizing includes begin with CI_ and is part of the customer namespace
One Customizing include can be inserted into more than one table.
You can find Customizing includes in SE11 under structures.
Try to take a look at table RKPF which uses the Customizing include CI_COBL (In an IDES system). Next try to add a field to CI_COBL, and activate it. If you go back to table RKPF you will se that your new field has been added.
Regards,
Ferry Lianto -
In a server proxy how can I use a INCLUDE STRUCTURE?
Hi people!!, how can I put an internal table with an INCLUDE statement in a server proxy in abap. If I put the next code the system present me this error: Within classes and interfaces, you can only use "TYPE" to refer to ABAP , Dictionary types, not "LIKE" or "STRUCTURE".
The problem is that I need the STRUCTURE to make a APPEND.
Thanks for the help.
DATA: BEGIN OF bdc_tab .
INCLUDE STRUCTURE bdcdata.
DATA: END OF bdc_tab.Hi Carlos,
Yes. It mainly accepts TYPE statements.
You can use this as:
DATA: BDC_LINE type bdcdata.
DATA: BDC_TAB type table of bdcdata.
When you want to use,
Fill the BDC_LINE.
Then:
Append BDC_LINE to BDC_TAB.
Or:
Loop at BDC_TAB into BDC_LINE.
Cheers,
Bhanu -
Extended syntax check for include structure
Hello Everyone,
While declaring the internal table as:
TYPES: BEGIN OF t_data.
INCLUDE STRUCTURE mara.
TYPES: END OF t_data.
DATA: it_data TYPE table of t_data.
When performing extended check, i get following error:
The current ABAP command is obsolete and problematic, especially so in ABAP
Objects
Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
types, not "LIKE" or "STRUCTURE".
I am using 4.7 version.
Any clue how to avoid this error during extended check.
Regards,
TarunTarun,
With WAS 6.20 you should not declare internal tables with header line or using the old syntax as they are not compatible with OO ABAP.
So, you either declare a TYPE the way you have done, in case you want additional fields apart from the INCLUDE structure, or declare the table directly like the way I have shown.
Good thing, you can even specify the type of internal table that you want to create using this - STANDARD, SORTED, HASH. These tables will help you with the performance issues.
regards,
Ravi
Note : Please mark the helpful answers -
How do I Make Include Structures Expand Automatically?
As usual some of the simplest things take the longest time.
I've created a custom structure in the dictionary. I've also created a custom table in which I include the structure. I expected that after I added the include structure to the custom table, that it would be expanded and display in se11, and behave just as SAP-delivered tables do. For example, look at table PA0001. There are include lines followed by the contents of the include.
In my custom table though, I only see the include line itself. To see the structure I must expand it by pressing the expand button. Each and every time I display the custom table I must manually expand it. I want the behavior I see on every other SAP table.
Any ideas?
Thank you.
TomHi,
if You have include structure in Your table, all fields are displayed only in display mode.
That is the way You see the PA0001 table.
If You create your own table and include structure, in edit mode You can change fields of the include structure,
that is why it is not expanded. But if You change from edit to display mode, SAP does not expand it automatically.
You should display in SE11 this table - all fields will be visible.
Regards,
Przemysław -
How to include structure in Types Definition ???
Hello All,
I want a declaration like this in BSP :-
DATA : BEGIN OF imkop OCCURS 100.
INCLUDE STRUCTURE mkop.
DATA : waers LIKE mepro-waers.
DATA : END OF imkop.
<b>In BSP: Type Definitions</b>
I wrote like this :-
Types : BEGIN OF imkop.
INCLUDE STRUCTURE mkop.
Types : waers type mepro-waers.
Types : END OF imkop.
I'm getting an error saying that I can't use structures in this .
Now what should I do ?
Can anyone help me out ?
Regards,
Deepu.Kdeepu,
we can declare structures as below.
DATA: event_data TYPE REF TO cl_htmlb_event.
TYPES: BEGIN OF row_iid_type,
row_iid TYPE hap_row_iid,
END OF row_iid_type.
DATA:
t_row TYPE STANDARD TABLE OF row_iid_type,
t_row_wa TYPE row_iid_type,
t_message TYPE STANDARD TABLE OF bal_s_msg .
DATA:
lw_body_element TYPE hap_s_body_elements,
lw_body_column TYPE hap_s_body_columns,
lw_body_cell TYPE hap_s_body_cells,
lw_return TYPE bal_s_msg,
warning TYPE i.
regards,
manasa -
Selection-screen (field from .Include structure)
Hi all,
I have a selection screen with several select-options. One of the select-option is
select-options: s_vornr for afvc-vornr.
Where 'vornr' is a .Include structure field in the table 'afvc'. Now my question is, in selection screen when I click on the box for this particular select-option I dont see the circle(from where we can select the existing input values) at the end of the box.
Why is it so and how can get that circle option at the end of the box by sticking to the same table and field(afvc-vornr).
Waiting for your help.
Thankshi,
the field do not have nay value range with it.
you can put the F4 help by using
At Selection-Screen on Value-request <select-option>. event.
e.g.
DATA : rt_values TYPE STANDARD TABLE OF type_values,
rs_values TYPE type_values,
rt_fields TYPE STANDARD TABLE OF type_fields,
rs_fields TYPE type_fields.
CLEAR : rs_values,rs_fields.
REFRESH : rt_values,rt_fields.
Creation of selection list
rs_fields-tabname = 'AFVC'.
rs_fields-fieldname = 'VORNR
rs_fields-selectflag = ' '.
APPEND rs_fields TO rt_fields.
SELECT vornr form AFVC
INTO TABLE t_vornr.
SORT t_vornr.
DELETE ADJACENT DUPLICATES FROM t_vornr.
LOOP AT t_vornr INTO s_vornr.
rs_values = s_vornr-vornr.
APPEND rs_values TO rt_values.
CLEAR rs_values.
ENDLOOP.
FUNCTION 'HELP_VALUES_GET_WITH_TABLE' EXPORTING
fieldname = 'AFVC'
tabname = 'VORNR
titel = 'Counting
IMPORTING
select_value = <select-opion>
TABLES
fields = rt_fields
valuetab = rt_values.
amit
Message was edited by: Amit Khare -
Infotype and Include Structures in HR - ECC50
Hi,
I would like to know what are the changes in each and every infotype like different include structures or added fields or modified or deleted fields. How do you compare 46C version with ECC50.
Is there any way apart from remote version management option?
Thanks,
Kiran.Hi,
I don't know what your actual requirement is.. but the event GET PAYROLL already exists. PL take a look at the Program EXAMPLE_PNP_GET_PAYROLL to get an idea. You can also see the same at this <a href="http://help.sap.com/saphelp_47x200/helpdata/en/33/62ac39d22d11d396e700a0c9306433/frameset.htm">SAP help</a>
Regards,
Suresh Datti -
Problem with primary/secondary keys in table with included structures
Dear ABAPers,
we have a structure which is supposed to be included in the definition of several tables.
The problem is the following:
depending on the application table that includes this structure, 3 or 4 fields of that structure may
or may not be necessary to enhance the table key. As far as I know included structures can only
completely be marked as keys. Therefore I suggested to split up the structure into two parts,
one part with the possible candidates that may become key fields, and the rest, and of course
a structure that unites both of these substructures. So when it comes to reusing this structure
the developer would have the choice to select the structure with all of the fields in case no field
is needed as additional key, or the developer would have to implement both of the substructures
separately with the option to mark the key-part of it as key in his table.
But unfortunetaly this suggestion of mine was refused as being too complicated and I am supposed
to define all the fields in one flat structure and to "enhance" the primary keys (that always will exist)
by secondary keys.
Does anybody know how that is supposed to work without defining double indexes?
I cannot activate a table without having primary keys defined and any unique secondary index would
allways include all of the primary keys.
Thanks in advance for you help
(I'm sorry that you cannot be granted reward points for just reading the extensive problem description)
regards
AndreasDear Rob,
since your answer was helpful and since it was the only one I will grant you full points on that.
Thanks again for your input. In case other developers should look this thread up being confronted
with the same kind of problem, here is how we solved it:
We added an artificial primary key (a number of type NUMC 8) to the table which is supposed to
include the structure. This key alone takes care of the uniqueness of eacht entry.
All the others fields that we want to have available for a fast direct access, including the ones
from the included structure, are put together in a secondary index.
best regards
Andreas -
How to create new bol structure for custom ztable.
Hi gurus,
I am new to SAP CRM 2007. I have a requirement in which I need to create a view which will retreive data from my custom z table. But when you create a view , the wizard ask for Model nodes and, Bol entity, Bol relation etc. Kindly let me know what data I need to enter here so that I can relate to my custom table. I think I need to create a bol structure for my ztable. Kindly guide me in this regard.
Thanks & Regards,
SanjayI would recommend to rather use an encapsulation of the ztable into BOL than just trying to work with value nodes because it heavily simplifies building of the UI and code to load, edit and save.
In order to achieve this you would either have to build a genIL component and assign it to the BOL component set addressed in the runtime repository of the UI component to make it available on the UI layer.
If your table is very simple and does not require relations etc. you might save some work using the approach via "Simple Objects" concept of BOL which provides a pretty generic impelmentation that requires much less code and deep understanding of the BOL/ genIL.
Pleasse refer to the respective IMG node under
Customer Relationship Management -> CRM Cross-Application Components -> Generic Interaction Layer/ Business Object Layer -> Component-specific Settings
Hope this helps.
Peter -
Include structure and extra fields in the same Internal Table
Hi developers,
im trying to declare an internal table with include structure and extra fields,
something like this:
data: BEGIN OF it_loans occurs 0,
include structure zthrca006,
status(10),
pernr like pa0001-pernr,
sname like pa0001-pernr,
tipomov(20),
monto like zthrca006-monto,
data: END of it_loans.
zthrca006 is huge so i dont want to type everithing.What is the issue?
data: BEGIN OF it_loans occurs 0.
include structure zthrca006.
data : status(10),
data : pernr like pa0001-pernr.
data : sname like pa0001-pernr.
data : tipomov(20).
data : monto like zthrca006-monto,.
data: END of it_loans.
Regards,
Ravi
Note - Please mark all the helpful answers -
Error on extended check for types include structure statements
Hi All ,
On Extended check im getting error :
Program: ZFIR_VALUATE_OBSOLETE_STOCK Include: ZFIR_VALUATE_OBSOLETE_STOCK_F Row: 1205
The current ABAP command is obsolete
Within classes and interfaces, you can only use "TYPE" to refer to ABAP Dictionary
types, not "LIKE" or "STRUCTURE".
Internal Message Code: MESSAGE G/B
(The message cannot be hidden using pseudo-comment "#EC .., bzw. durch SET
EXTENDED CHECK OFF/ON)
The error is in below line :
TYPES: BEGIN OF t_fttax.
INCLUDE STRUCTURE fttax.
TYPES: END OF t_fttax.
and fttax is a dictionary strucuture . i made internal table and work area using it .
DATA: i_fttax TYPE STANDARD TABLE OF t_fttax,
wa_fttax TYPE t_fttax.
Need Help ,what i should do to remove this error ?
Regardsdeclare as :
DATA: i_fttax TYPE STANDARD TABLE OF fttax,
wa_fttax TYPE fttax.
No need to declare as :
TYPES: BEGIN OF t_fttax.
INCLUDE STRUCTURE fttax.
TYPES: END OF t_fttax. -
Hi all
I have this code to give dynamic table name in select statement.
Is there a way the include structure tak in the value from my parameter value like name1?
DATA <b>name1</b>(10) TYPE c VALUE 'ZSTUDGARY'.
DATA: BEGIN OF wa OCCURS 0.
INCLUDE STRUCTURE <b>ZSTUDGARY</b>.
DATA: END OF wa.
SELECT *
INTO wa
FROM (name1) CLIENT SPECIFIED.
WRITE: / wa-eyear, wa-contact.
ENDSELECT.I think you are looking for somethign like this. Please check this code
REPORT ztest_gopi_dynamic.
TYPE-POOLS : abap.
FIELD-SYMBOLS: <dyn_table> TYPE STANDARD TABLE,
<dyn_wa>,
<dyn_field>.
DATA: dy_table TYPE REF TO data,
dy_line TYPE REF TO data,
xfc TYPE lvc_s_fcat,
ifc TYPE lvc_t_fcat.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME.
PARAMETERS: p_table(30) TYPE c DEFAULT 'T001'.
SELECTION-SCREEN END OF BLOCK b1.
START-OF-SELECTION.
PERFORM get_structure.
PERFORM create_dynamic_itab.
PERFORM get_data.
PERFORM write_out.
* FORM get_structure *
FORM get_structure.
DATA : idetails TYPE abap_compdescr_tab,
xdetails TYPE abap_compdescr.
DATA : ref_table_des TYPE REF TO cl_abap_structdescr.
* Get the structure of the table.
ref_table_des ?=
cl_abap_typedescr=>describe_by_name( p_table ).
idetails[] = ref_table_des->components[].
LOOP AT idetails INTO xdetails.
CLEAR xfc.
xfc-fieldname = xdetails-name .
xfc-datatype = xdetails-type_kind.
xfc-inttype = xdetails-type_kind.
xfc-intlen = xdetails-length.
xfc-decimals = xdetails-decimals.
APPEND xfc TO ifc.
ENDLOOP.
ENDFORM.
* FORM create_dynamic_itab *
FORM create_dynamic_itab.
* Create dynamic internal table and assign to FS
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = ifc
IMPORTING
ep_table = dy_table.
ASSIGN dy_table->* TO <dyn_table>.
* Create dynamic work area and assign to FS
CREATE DATA dy_line LIKE LINE OF <dyn_table>.
ASSIGN dy_line->* TO <dyn_wa>.
ENDFORM.
* FORM get_data *
FORM get_data.
* Select Data from table.
SELECT * INTO TABLE <dyn_table>
FROM (p_table).
ENDFORM.
* FORM write_out *
FORM write_out.
* Write out data from table.
LOOP AT <dyn_table> INTO <dyn_wa>.
DO.
ASSIGN COMPONENT sy-index
OF STRUCTURE <dyn_wa> TO <dyn_field>.
IF sy-subrc <> 0.
EXIT.
ENDIF.
IF sy-index = 1.
WRITE:/ <dyn_field>.
ELSE.
WRITE: <dyn_field>.
ENDIF.
ENDDO.
ENDLOOP.
ENDFORM.
Regards
Gopi -
Hi,
I'm trying to compile simple construction in ECC 60:
types: begin of t_bbseg.
include structure bbseg.
types: end of t_bbseg.
I have compilation error:
"The type "SI_BBSEG" is unknown"
Is anyone had something like this before?
We are NetWeaver 2004S Unicode enabled.
Thank you,
IharIf you are trying to include BSEG as a structure in the TYPE, use the TYPE keyword instead
types: begin of t_bbseg.
include type bseg.
types: end of t_bbseg.
REgards,
Rich Heilman -
Include structure in smartform
I am trying to define types in smartform Global->Types.
1---types: BEGIN OF tvbdpr1.
INCLUDE STRUCURE vbdpr.----
vbdpr is view
types: END OF tvbdpr1.
it gives error:
"." or "IF FOUND." expected after "STRUCURE".
BUT when i define below there is no error
types: BEGIN OF tkomv1.
INCLUDE STRUCTURE komv.-------it is table
types: END OF tkomv1.
any help thanks
ismailIt was spelling error, thanks
Maybe you are looking for
-
I have ipad linked ro apple tv but only have sound on tv. No picture. Help please
The apple tv is playing audio on television but there is no picture
-
IMac 24 C2D freezing, beach ball, pinwheel
Hello wonderful user community! I am helping my wife with this issue, she's never posted on the ASC before. In the last two weeks my iMac has started behaving strangely. It doesn't seem to matter whether running Spotify, Chrome, Firefox, or other a
-
Will my MacBook Pro be able to play the original Call of Duty? I am not looking to play Call of Duty 2.
-
How to use Correlation set to persist record in BPEL for multiple request
Hi , I need to persist record in BPEL as it a stateful.I am using soa suite 11.1.1.5 v.The purpose is to persist multiple messages from single service/partnerLink(JMSAdapter)and aggregated to form a group message using BPEL correlation set concept Th
-
Cant make an exeble jar of a package !
HI, I have made an application declaring a package 'mypack'. My directory structure is : e: --mypack ----msbase.jar ----mssqlserver.jar ----msutil.jar ----Main.java ----*.java ----*.class I set my classpath as : SET CLASSPATH=".;E:\mypack\msbase.jar;