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

Moving an Table APPEND into an INCLUDE

Former Member
0 Likes
1,824

Hi,

On an old R/3 system we appended this structure to EKKO

.APPEND ZAEKKO STRU 0

ZZPRIORITY CHAR2 CHAR 2

ZZREPORTEDBY CHAR40 CHAR 40

We upgrade the R/3 system to ECC and had to INCLUDE the "Customer Include for EKKO" like this

.INCLUDE CI_EKKODB STRU 0

RELEASER1 XUBNAME CHAR 12

RELEASER2 XUBNAME CHAR 12

RELEASER3 XUBNAME CHAR 12

RELEASER4 XUBNAME CHAR 12

RELEASER5 XUBNAME CHAR 12

RELEASER6 XUBNAME CHAR 12

So EKKO now has both the new way of adding new fields to a database table and the old way.

BUT I want to move the old append ZAEKKO to the include. How do I do this withouth loosing data.

The only suggestion I've come up with is:

i) Create a new Append with the same fields in the old append, add this new append to the include - but don't activate. Then delete the old append in SE11 - which reactivates the table, then activate the include with the new append with the same field names. This sort of works on DEV but I'm sure i'll loose data when I transport these changes one at a time.

Cheers

David

Hi,

On an old R/3 system we appended this structure to EKKO

.APPEND ZAEKKO STRU 0

ZZPRIORITY CHAR2 CHAR 2

ZZREPORTEDBY CHAR40 CHAR 40

We upgrade the R/3 system to ECC and had to INCLUDE the "Customer Include for EKKO" like this

.INCLUDE CI_EKKODB STRU 0

RELEASER1 XUBNAME CHAR 12

RELEASER2 XUBNAME CHAR 12

RELEASER3 XUBNAME CHAR 12

RELEASER4 XUBNAME CHAR 12

RELEASER5 XUBNAME CHAR 12

RELEASER6 XUBNAME CHAR 12

So EKKO now has both the new way of adding new fields to a database table and the old way.

BUT I want to move the old append ZAEKKO to the include. How do I do this withouth loosing data.

The only suggestion I've come up with is:

i) Create a new Append with the same fields in the old append, add this new append to the include - but don't activate. Then delete the old append in SE11 - which reactivates the table, then activate the include with the new append with the same field names. This sort of works on DEV but I'm sure i'll loose data when I transport these changes one at a time.

Cheers

David

4 REPLIES 4
Read only

Former Member
0 Likes
1,426

Hai David,

Go through the following

1. Go To SE11

2. Select the radio button "Data Type"

3. Enter the structure name "ZXXX"

4. Click create button

5. Dialog box will appear

5. Select the radio button "Structure" from that dialog

6. A new screen "Dictionary: Maintain Structure" will appear

7. Enter the short description

8. Create components ( means fields ) by clicking Buit-in type / component button.

Built-in means SAP standard DATA types

Components means using existing Domain/Data element

Ex:

Component: ABC

data Type: CHAR

9. Now click the save button (Control + S)

10. Click the "Activate" button (Control + F3)

11. Now your structure is ready to use.

Note:

In your case you can go for Component type to declare the fields.

Since you have EMATN, EKTEK and VERKF.

Regards

Sreeni

Read only

0 Likes
1,426

Hi Sreeni,

I probably didn't phrase my question properly.

Table EKKO looks like

RLWRT RLWRT Total value at time of release

REVNO REVNO Version number in Purchasing

.INCLUDE CI_EKKODB Customer Include for EKKO

RELEASER1 XUBNAME User Name in User Master Record

RELEASER2 XUBNAME User Name in User Master Record

RELEASER3 XUBNAME User Name in User Master Record

RELEASER4 XUBNAME User Name in User Master Record

RELEASER5 XUBNAME User Name in User Master Record

RELEASER6 XUBNAME User Name in User Master Record

.APPEND ZAEKKO Extension for the MTM surveyors solution

ZZPRIORITY CHAR2 Version Number Component

ZZREPORTEDBY CHAR40 Character field of length 40

ZZSERVTICK_DOC ZZSERVTICK_DOCNUM Service Ticket Doc Number from CRM

I want to move append ZAEKKO (or its three Z fields) into Include CI_EKKODB (without loosing data).

I can't move ZAEKKO into CI_EKKODB since it it already appended to table EKKO

I can't create the three Z fields in CI_EKKODB since they already exist on EKKO.

I can create a new append ZAEKKO2, add the three Z fields and activate it. But then when I include this in CI_EKKODB and activate it - you can't since EKKO has this include and already has the 3 Z fields

I can do the above step but delete ZAEKKO from EKKO before activating the new version of CI_EKKODB with ZAEKKO2 and then activate EKKO.

But will this sequence transport and not loose data.

Read only

0 Likes
1,426

Hello David

You could try a 2-step approach:

(1.a) Define a new Z-include containing the three Z-fields of your append ZAEKKO.

(1.b) Delete the z-fields from ZAEKKO and include the new z-include.

I assume that the table EKKO can be activated without any loss of data.

(2.a) Delete the z-include from append ZAEKKO.

(2.b) Add the z-include to CI_EKKODB.

I must admit that I do not know if CI-includes allow to include structures (using .INCLUDE). Neither am I sure if the activation can be done without loss of data.

However, if it seems reasonable you could give it a try on your development system (where loss of data should not be a big problem).

Regards

Uwe

Read only

0 Likes
1,426

Hi Uwe,

Tried that and on my test Z Table it worked withouth loosing data.

It does force an activate when you delete the original Append structure.

I then did on EKKO ... but this time the data was lost.

So in the end I've had to write a backup program to store the data in the Z fields.

Regards

David