cancel
Showing results for 
Search instead for 
Did you mean: 

copying a standard view of a component in Zview in same component

dhruv_mehta
Active Contributor
0 Kudos

Dear all ,

              I need to copy a view of Service Order the component is BT116IT_SRVO and View is GenericItem. I need to add Some additional fields in this.

I can enhance the component but the as aper the requirement I dont have to enhance that view but i need to create whole view having same fields as standard with addtional fields. So I need to create new View having same things as GenericItem View.

I created view by Wizard and gave its Model name and Bol entity same as standard ones.

Then I did binding. After that my context node class became standard.

So basically I need BT116IT_SRVO (Component) and GenericItem (View) to be copied in my custom view and in custom view i need to add my Z fields.

Step by step guidance will be appreciated!

P.S : Should I create a whole Z component and attach it to standard? which

way is better?

Thanks

Dhruvin

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dhruvin,

I think you no need to create any zcomponent.

just go to  BT116IT_SRVO enhanced component, select the view GenericItem, right click on it, select the copy view option, a popup raises where you have to specify the details of zview/component name, then the zview will be created in BT116IT_SRVO component and add your z fields as per your requirment.

After the completion of this you have to make few more steps..

In the runtime repository, GenericItem will be assigned to some viewset/window. so remove that view and place your zview.

In the overview page, configurations tab move the GenericItem view to left hand side and your z view to right hand side..

Hope this helps you....

Regard,

Magana

dhruv_mehta
Active Contributor
0 Kudos

When I am making copy of GenricItems.. Context node class remains Standard Ones. I am not Able to redefine any methods. I am sorry if this is stupid to ask but i want my Z classes Which should have Standard Class as parent so that i can redefine the methods.

So how do i get my Z class in Context nodes!

Former Member
0 Kudos

did you try right click on context node and use Enahnce ..option..

it will make context node classes to Z classes..

dhruv_mehta
Active Contributor
0 Kudos

Yes siva thanks for the Quick Reply. I tried that but its giving me an error.

"View not copied or enhanced with wizard; processing not possible"

Can u plz Explain how should I deal with this?

0 Kudos

Hi Dhruvin,

You may refer the discussion: http://scn.sap.com/thread/2013620

Best Regards,

Leon

Former Member
0 Kudos

Please let me know whether the view is Zview or Standard view...You can check this by checing the view Impl Class name space.

If View Impl class start with Z then it should not throw error.

please log out and login again to component workbench and give a try..if view itself is having Standard class...first enhance the View then Enhance the Context node.

Second way of changing the context node class is

Please double click on context class which will be present under the View IMPL class(if it is Z other wise enahcen the view)

then click on Attributes tab of context class and make a new entry like

ZBTSTATUSH Instance Attribute Private Type Ref To ZL_BT115QH__DETAILS_CN02

then please go to create_Context node ( ) method and enter following code

    model = owner->create_model(

        class_name     = 'ZL_BT115QH__DETAILS_CN02' " use your z class name which u want to use

        model_id       = 'BTStatusH' ).      " ur context node name               "#EC NOTEXT
    BTStatusH ?= model.
    CLEAR model.

dhruv_mehta
Active Contributor
0 Kudos

Hey Every one thanks for helping me out. I actually did not copy the view. I created View by right clicking and create and i put BOL Entity as same as GenericItem which i wanted to copy.

I also copied it htm also as i wanted the exact same view.

So now all Classes are Z and i am able to modify them. and i also added this view in

OVViewset so it is visible in my WebUI!

Thanks Every 1.. for helping me out!

Answers (2)

Answers (2)

Former Member
0 Kudos

Please Use copy Funtionality given by SAP. Right Click on the view and use Copy

Can you please be more specific about your requirement.

0 Kudos

Hi Dhruvin,

Not getting why you want to create a new view instead of adding the fields in the same view in a different configuration or enhancing the view. Could you please explain your requirement so that we can guide you better.

Best Regards,

Leon

dhruv_mehta
Active Contributor
0 Kudos

Hi, Let me elaborate my requirement.

1) Theres a Service order in IC webclient. Transaction type is SRVO. Theres an ITEM Assignment block.

Now What client want is that , They dont want to change standard Assignment block We need just a copy of that View and add additional field in the Copy of Custom view.

2) after I create my own Z view i need to give Tree view also.

But at first i am not even able to Copy the view to custom view and add fields to that view!  Please Help me Regarding this as I have Copied the view but Classes of Context Node Remains Standard so i am not able to Redefine the methods. So what are the changes we need to make , to have Custom class.