2008 May 23 6:43 AM
Hi,
The declaration is :
DATA: BEGIN OF BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
I don't know the meaning about the above the declaration,especially, at "INCLUDE STRUCTURE".
Please,explain it.
Thanks very much.
2008 May 23 7:54 AM
Hi
The declaration is :
DATA: BEGIN OF BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
1. In the declaration,
Data : begin of bdcdata occurs0
An internal table ''bdcdata'' is getting created .
2. include structure bdcdata
it includes structure BDCDATA in the internal table that is created above ie bdcdata
It means all fields (names , datatypes and length )that are in standard structure BDCDATA are included in the internal table.
the other way of writing it is :
data : begin of itab occurs 0.
include structure BDCDATA.
data : end of itab.
Another form,
data : begin of itab occurs 0,
f1 type BDCDATA-PROGRAM,
f2 type BDCDATA-DYNPRO,
f3 type BDCDATA-DYNBEGIN,
f4 tyoe BDCDATA-FNAM,
f5 type BDCDATA-FVAL,
end of itab.
hope its helpful.
Reward points if useful.
Regards
Megha Sharma
Hi,
The declaration is :
DATA: BEGIN OF BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
I don't know the meaning about the above the declaration,especially, at "INCLUDE STRUCTURE".
Please,explain it.
Thanks very much.
2008 May 23 6:45 AM
HI
It means you include all fields of BDCDATA in your ITAB.
Otherwise you have to do like this
data: begin of itab
f1 like bdcdata-f1,
f2 like bdcdata-f2
-
end of itab.
Regards
Aditya
2008 May 23 6:46 AM
It will include all the elements/fields declared in structure BDCDATA.
Generally we use this statement when we dont want to write Types and Data statement.
If we dont write the statement above then we need to write like this :
Data : Begin of IT_DATA occurs 0,
program type bdcdata-program,
dynpro type bdcdata-dynpro,
.
.
End of IT_DATA.
reward If found Helpfull.
2008 May 23 6:47 AM
Hi Chen,
This declaration creates an internal table BDCDATA. The line type for the internal table is the standard structure BDCDATA.
Double click on BDCDATA (include structure BDCDATA line) and you will see the structure details.
Regards,
Aravinda Sarma M.
2008 May 23 6:48 AM
Hi,
1.You are declaring a Internal table with the structure field of BDCDATA like program,dynpro,dynbegin,fnam,fvalue.
2.we are using it in the BDC .
Regards,
Shiva Kumar
2008 May 23 6:48 AM
Hi,
BDCDATA is the standard structure and where in the declaration you are including the whole structure for internal table rather than assigning each and every fields of the structure.
Hope this clears your doubt.
Regards,
Ramkumar.K
2008 May 23 6:58 AM
Hi
it creates BDCDATA internal table structure of BDCDATA.
when double click on BDCDATA , it goes to stucture BDCDATA, there we can see fields of BDCDATA
EX:
data: begin of t_zregion occurs 20.
include structure zregion.
data: end of t_zregion.
thanks
sitaram
2008 May 23 7:05 AM
HI
THE INCLUDE STATEMENT INCLUDES ALL THE FIELDS OF THE STANDARD STRUCTURE BDCDATA IN YOUR INTERNAL TABLE.
KINDLY CLOSE THE QUESTION.
AND REWARD IF HELPFUL.
REGARDS
NIHARIKA
2008 May 23 7:16 AM
hi
first,
bdcdata is a structure in ddic. whenever u declare internal table u declare it based on some structure rite.
bdcdata has five components in its structure which makes the bdc run (ie). wen u do recording for bdc's u are capturin some screens and fields. these five components constitute of screen no. field name that u r capuring on the screen etc..
so to include a structre for ur internal table use u have used include structure in the progarm.. now ur internal table bdcdata is having the structure of bdcdata 0f ddic.
hope this clears ur doubt
reward points if helpful
regards
mano
2008 May 23 7:54 AM
Hi
The declaration is :
DATA: BEGIN OF BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
1. In the declaration,
Data : begin of bdcdata occurs0
An internal table ''bdcdata'' is getting created .
2. include structure bdcdata
it includes structure BDCDATA in the internal table that is created above ie bdcdata
It means all fields (names , datatypes and length )that are in standard structure BDCDATA are included in the internal table.
the other way of writing it is :
data : begin of itab occurs 0.
include structure BDCDATA.
data : end of itab.
Another form,
data : begin of itab occurs 0,
f1 type BDCDATA-PROGRAM,
f2 type BDCDATA-DYNPRO,
f3 type BDCDATA-DYNBEGIN,
f4 tyoe BDCDATA-FNAM,
f5 type BDCDATA-FVAL,
end of itab.
hope its helpful.
Reward points if useful.
Regards
Megha Sharma
2008 May 23 12:30 PM
Thanks.
May I write as the following style?
DATA: BEGIN OF BDCDATA OCCURS 0,
INCLUDE STRUCTURE BDCDATA,
END OF BDCDATA.
2008 May 23 12:33 PM
2008 May 23 1:05 PM
nah, it has to be
DATA: BEGIN OF BDCDATA OCCURS 0.
INCLUDE STRUCTURE BDCDATA.
DATA: END OF BDCDATA.
or syntax error.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |