cancel
Showing results for 
Search instead for 
Did you mean: 

How to add Properties to a Model Class in NWDS

Former Member
0 Kudos

NWDS Question - I am trying to add a new field to an existing Z Model Class - when I navigate to the Model Class Properties, the "NEW" button is grayed out, which does not let me add anything to the Model class. How do I go about adding the last field to the Model class? Is this an access thing?

The table for this model is in the Database with the additional field. Would something need to be done in the R3 side for this to effect?

Thank You

LS.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Larry,

Just reimport, don't delete the model it is no necesary:

1. Reimport the model, it add or update the changes in your RFC.

2. Open your component, double clic in the link between the controler and the model. Or edit mapping

3. Search the new field and Drag and drop, to the context.

Regards.

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks everyone who took the time to respond.

Former Member
0 Kudos

Hi Larry,

If you want to add any field to the model class , you cant do it in NWDS side , you will have to add the field in R/3 (Table or RFC) and then you will have to reimport the model you have created in the Webdynpro,

The Reimport will be effective only if you change the source code of the RFC or change any existing import or export fields size or DataElement. If you alter the structure of the RFC (i mean add new import field or export field) " you will have to restart the server and reimport the model " or " you can create a new model out of the changed RFC" .

Regards,

Sam Charles J.

Former Member
0 Kudos

When I right click on the model, I see you can either Reimport or Delete. What should I do so that I don't have redo everything in the existing model all over again? By Reimporting, would it retain all the existing code and just add the new field? I would want to stay away from deleting and rebuilding the model if its possible.

Apart from these 2 options, there was DTR -> Edit - I tried that (I shouldn't have) and it asked to be checked out which I did and created an activity - would doing this create any issues? We use NWDI for Change Management.

sanyev
Active Participant
0 Kudos

Hi Larry,

You can first try the reimport option. If you are using an Adaptive model then the reimport option will be present. While reimporting it will ask you to checkout couple of files. that is ok. Create an activity and checkout the files. Once the reimport is over do a rebuild of the project and check if the new attribute is getting reflected in the model. If it does then you are done.

If it doesn't then you will have to delete the model and import it again. All your work will not be lost. Once you delete the model all the mappings will be lost. After reimporting the model you can redo the mappings.

Regards,

Sanyev

Former Member
0 Kudos

Larry,

Your best bet would be to go for Re-importing the Model....that will retain the necessary code and the new field you are trying to add would be visible....

Regards,

Shikhil

sanyev
Active Participant
0 Kudos

Hi Larry,

You will have to reimport the Model for the changes to reflect in your NWDS. Basically you will have to delete the existing model and then import the model again. Once the model is imported the new field will be visible. There is no option from the NWDS to add new fields to model nodes.

Regards,

Sanyev