Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ABAP-Dictionary

Former Member
0 Likes
976

how to use structure in report using include

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
952

Hi,

See the sample code


TYPES: BEGIN OF t_day, 
         work(8)  TYPE c, 
         free(16) TYPE c, 
       END OF t_day. 

DATA BEGIN OF week. 
  INCLUDE TYPE t_day AS monday    RENAMING WITH SUFFIX _mon. 
  INCLUDE TYPE t_day AS tuesday   RENAMING WITH SUFFIX _tue. 
  INCLUDE TYPE t_day AS wednesday RENAMING WITH SUFFIX _wed. 
  ... 
DATA END OF week. 

Regards

Sandipan

9 REPLIES 9
Read only

Former Member
0 Likes
952

how to use structure in report using include

Read only

0 Likes
952

how to use structure in report using include

Read only

0 Likes
952

you can define types like,

types: begin of itab,

include structure caufv.

end of itab.

or u can directly use strucure types filds like,

aufnr like caufv-aufnr.

or u can use structure to fill filed catelogue in ALV display.

or sturuictures can be used as interface parameters in FM

Read only

Former Member
0 Likes
953

Hi,

See the sample code


TYPES: BEGIN OF t_day, 
         work(8)  TYPE c, 
         free(16) TYPE c, 
       END OF t_day. 

DATA BEGIN OF week. 
  INCLUDE TYPE t_day AS monday    RENAMING WITH SUFFIX _mon. 
  INCLUDE TYPE t_day AS tuesday   RENAMING WITH SUFFIX _tue. 
  INCLUDE TYPE t_day AS wednesday RENAMING WITH SUFFIX _wed. 
  ... 
DATA END OF week. 

Regards

Sandipan

Read only

Former Member
0 Likes
952

Hi,

In report the structure can be included like this


report ZTEST.

DATA:BEGIN OF t_test,
include TYPE zinbound_s,
END OF t_test. 

Here Zinbound_S is a structure.

I think this solves your problem.

Regards

Sandipan

Read only

Former Member
0 Likes
952

You can define structure in program using the data base structure

Data : variable type structure.

OR

DATA : itabl type table of structure.

reward if helps

Read only

prasanth_kasturi
Active Contributor
0 Likes
952

hi,

you can create an include program eith the necessary structure and calling this include in your report you can access the structure

define the strucure using types in include prog ipgm

types : begin of struct.

<your fields >

end of struct.

and in your reporrt use

include ipgm.

and you can acess the structure

if you want to include a structure in internal table of your prog

data begin of itab.

include <struct name>.

data end of itab.

regards

prasanth

Read only

Former Member
0 Likes
952

Hi prasanth,

Declare an include program and define the required structures in that include and activate it .

In report program call that include .

include <includename>.

Reward if useful.

Regards,

Muneesh Gitta.

Read only

Former Member
0 Likes
952

Hi,

Herewith the solution

DATA: BEGIN OF t_vbak occurs 0,

INCLUDE STRUCTURE vbak.

DATA: END OF t_vbak.

Please let me know if you have any clarifications on this.

Thanks & Regards