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

structure

Former Member
0 Likes
771

hi ,

the requirement is to add a new field in the standard report, the output fields are from the structure

FAGLPOSX, I copied the structure to ZFAGLPOSX added my new filed.

the entire output is in it_items(of structure ZFAGLPOSX ) along with my new field.

where as gt_fileds is standard structure FAGLPOSX which does not contain my new filed.

the code is as below in the standard report

gt_fileds[] = it_items[].

call method gd_ref_to_ch_data->change_items "0093193 COMMENTD

CHANGING

ct_items = gt_fileds.

it_items[] = gt_fileds[].

when moving gt_fileds[] = it_items[]. my new output field does not move to gt_fileds as it does not contain the new field in the structure, if i change the gt_fileds structure to Z structure the problem arise in the CALL METHOD BECAUSE

in the code it is

ct_items = gt_fileds.

it_items[] = gt_fileds[].

where as ct_items is standard structure ,

how can i get my new field into it_items.

do i need declare in any other way.

please help

thanks in advance.

<LOCKED BY MODERATOR - USE APPROPRIATE TITLES>

Edited by: Alvaro Tejada Galindo on Jan 7, 2009 12:40 PM

3 REPLIES 3
Read only

Former Member
0 Likes
682

You can change the standard structure and add your own fields without using any access key.

Scroll down to last .INCLUDE of the structure FAGLPOSX in SE11

You will find CI_FAGLPOSX

Now double click on it and a structure CI_FAGLPOSX will be created in which you can add your own fields.

Now your own field is included in the standard structure FAGLPOSX.

(CI_FAGLPOSX " CI here means customer include)

Read only

Former Member
0 Likes
682

Hi,

Define a structure as below,

types: begin of stru

include structure(your structure).

add new field here.

end of stru.

data wa type stru.

data it type standard table of stru.

Read only

former_member404244
Active Contributor
0 Likes
682

Hi,

instead of copying the structure ->FAGLPOSX to Z structure ...Use append method and add the new field to the standard structure FAGLPOSX.

as in the program already the strcure is referred , so ur field will also reflect along with it..

Use append method and add ur field..

u can do it in SE11 , then specify the structure FAGLPOSX and then click on append structure push button and add..then activate the structure..

Regards,

Nagaraj