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

DELETE COLUM

Former Member
0 Likes
1,228

I HAVE ITAB

1/AND I WANT TO DELETE THE COLUMN MANDT

2/AND MAKE ORGNIZE WITH MY CILMN HOW I CAN DO IT

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,187

Hi rani,

1. AND I WANT TO DELETE THE COLUMN MANDT

I don't think we can do that.

regards,

amit m.

Hi rani,

1. AND I WANT TO DELETE THE COLUMN MANDT

I don't think we can do that.

regards,

amit m.

9 REPLIES 9
Read only

Former Member
0 Likes
1,188

Hi rani,

1. AND I WANT TO DELETE THE COLUMN MANDT

I don't think we can do that.

regards,

amit m.

Read only

Former Member
0 Likes
1,187

Hi,

We cannot delete the column MANDT. Could you explain me point 2 clearly.

Regards,

Ram Mohan.

Read only

0 Likes
1,187

hi Rani,

We cannot delete MANDT field. If you are working with a Ztable then donot include that field in the Ztable this way you can avoid viewing MANDT field than deleting.

Regards,

Santosh

Read only

Former Member
0 Likes
1,187

Hi,

go to the internal table definition ,

if its defined with all the fields like

DATA : BEGIN OF ITAB OCCURS 0,

MANDT,

MATNR,

*--AND SO ON.

END OF ITAB.

If ITAB is defined in this way comment out MANDT here & also where ever they are using SELECT & populating ITAB there also you have to comment out MANDT.

if they used any INCLUDE structure in the ITAB definition, you cant do any thing with that, just copy all the fields & define your internal table as above(with only the fields you want).

2. i am not getting what you are asking !!!

regards

srikanth

Read only

Former Member
0 Likes
1,187

Hi rani,

Can you explain the second point

2/AND MAKE ORGNIZE WITH MY CILMN HOW I CAN DO IT

Sameena

Read only

Former Member
0 Likes
1,187

Hi ,

May be you had decalred your itab like this.

data :itab like vbak occurs 0 with header line.

In this cas itab will contain all coulumns of vbak including MANDT.

To avoid this you can declare itab in this way.

data : begin of itab occurs 0 ,

vbeln like vbeln ,

....

..

end of itab.

Then use like this.

select * from vbak into corresponding fields of itab

where <your condition>

<i>Hope This Info Helps YOU.</i>

Regards,

Raghav

Read only

Former Member
0 Likes
1,187

Hi,

You can not delete the column, but you can delete the data in the column.

Loop at itab into wa.

clear wa-field1.

modify itab from wa.

endloop.

<b>Alternatively</b>: create another itab like ur existing itab except that column which u want to delete.

then move data ito this table.

rgds,

latheesh

Message was edited by: Latheesh Kaduthara

Read only

Former Member
0 Likes
1,187

Hi,

Are you using dynamic internal table or normal internal table.

ITAB means internal table only Right,

Dynamic internal table you can control at the starting level, But Run time it is not possible to remove the column and add new one.

Regards

vijay

Read only

Former Member
0 Likes
1,187

Hi ,

ans for1:-

Declare a filed-sybol for that itab.

Ex:

FIELD-SYMBOLS: <fs_itab> LIKE LINE OF iatb.

loop at itab assing ASSIGNING <fs_itab>.

<fs_itab>-mandt = SPACE.

endloop.

*bcz we cannot delete the colomn in internal table

*or u can skip MANDT while u r selecting,if u r selecting like * FROM then use above LOOP..ENDLOOP.

for 2:-

I didn't get what you r asking...

pls. cxplain clearly..

Regards,

Ramesh