cancel
Showing results for 
Search instead for 
Did you mean: 

bsp-application views + packages

former_member193202
Participant
0 Kudos

hi folks,

is it possible to put a bsp-view of an bsp-application into another development package than the bsp-application is?

or how could this be done....?

as mimes of an bsp-application can reside in other packages thatn the application does, but what about views????

kind regards,

oliver

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

I haven't tried a view but Pages with Flow Logic, Models, Classes, Methods, Iterator, etc. all work. Just a matter of giving the correct link.

Why not try it and see ?

former_member193202
Participant
0 Kudos

okay, but how, the object catalog entry works on the bsp-application i guess - i looked over tadir-rentiries (o2*-tables), but view don't seem to have individual packages linked to, do they?

maybe you can advise me how to link them to other dev-classes?

kind regards,

oliver

Former Member
0 Kudos

In a controller, DO_REQUEST, you do the call view and give it the location of the view, as in "main.do" well what about "/sap/bc/bsp/sap/zproject/main.do" best way to know is to simply try it.

You are dealing with web objects here and they are located under the root which I believe is "/sap/bc/bsp/sap/" although I could be wrong with that but it is something like that.

former_member193202
Participant
0 Kudos

hi craig,

okay, you're talking about the SICF-Directory, that's true , but what i want to do is use differenct development-packages (classes) for those web-objects, and as i found out a bsp-view belongs to an bsp-application, but cannot have a different development-package assigned other than the bsp-application he's belonging to.

maybe there i a "trick" to solve that....but i have no idea how to do....

king regards,

oliver

former_member181879
Active Contributor
0 Kudos

Views belong to a BSP application, and all of that stuff is one package.

There are many ways to shoot yourself in the foot. But in all cases it does hurt.

Former Member
0 Kudos

Brian you are of course correct on both counts

Mabye I am just missing something here but <b>Oliver</b> are you physically trying to attach a view to a different class or are you just trying to use a view between several Applications?

Physically attaching -> see Brian's post using then see mine.

former_member193202
Participant
0 Kudos

hi guys,

just to explain why we want to do that.

we have a bsp-application bought, where we have to change several views (because of a matter of design), and we do not want to have them in the same development class etc. - for transportation and release circumstances, so our idea was to use a different (z ) development class to have them separated from the 3rd party application.....

maybe someone has a better idea how to establish that????

thomasalexander_ritter
Active Contributor
0 Kudos

I don't think that it will be easy to do that. My initial idea was that you can just call a view which you place in a different namespace using the method create_view( '<application>/<viewname>' ). If this would be possible your third-party vendor would be able to create a table which would allow you to configure which view is called. But like Brian stated in his post this is not possible because the view has to be in the same namespace/application. To prove that take a look at this excerpt from create_view(...).

  l_app_name = if_bsp_page~get_application_name( ).
  l_app_nspace = if_bsp_page~get_application_namespace( ).
  l_current_page = if_bsp_page~get_page_name( ).

  if key is not initial.

    l_page_name = _m_navigation->find_page(
           from_page = l_current_page
           from_application = l_app_name
           from_namespace = l_app_nspace
           key = key ).
  else.
    l_page_name = view_name.
  endif.

  if l_page_name is initial.
    return.
  endif.

former_member181879
Active Contributor
0 Kudos

I know of people that do this. You have application A1 with views V1,V2,V3. They create a new application ZA1, that contains only a view V4. What you then need is some code in the original application to replace its own view V1 with your new view Vz. However, what I never did check on is whether they do the replacement then at controller/view level, and not only view level.

I suspect more that you have to make such a replacement whereby you call an alternative controller in the ZApp, which will then use its own views. I suspect that this might actually work, and be what they do.

Let me ask an expert for an opinion tomorrow.

brian

former_member193202
Participant
0 Kudos

hello brian,

thanks so much so far, we and our 3rd party vendor are heavily interested in the export opinion you are "catching" for us.

kind regards so far,

oliver

former_member215843
Active Participant
0 Kudos

Hi,

the idea behind this concept is that it is not possible to call views from other BSP applications directly. But it is explicitely possible to call controllers of another application.

One scenario, in which this could lead to a problem is, when the customer wants to create his own views and use them instead of the inbuilt ones.

One solution is - if you know in advance that the view may be replaced - to create a template component containing the ready implemented controller and a template view.

This template may be copied and the view filled. Then you should use a delegating table to know, which controller from which application should be called.

This may sound more difficult as it is.

The reason, why view may not be called directly is, that a controller call is better encapsulated than a view call, and we want to minimize the arizing problems.

Bye, Regina

former_member193202
Participant
0 Kudos

hi brian,

did you get an answer from your expert so far?

kind regards

oliver

former_member181879
Active Contributor
0 Kudos

Hmmm...hmmm... You see, she answered you immediately after I emailed her. In principle, you can not swap out the views (they are loaded relative to controller), you can also swap out via some form of delegation table the controller calls (making new controllers+views in separate package). In worst case, if you have to modify SAP shipped application, the only to replace call to one controller with a call to your controller.

Maybe, if you are still not getting to a solution, send me an offline email (or here depending business) with details of what application, and we can review source and see what options are possible.

bye, brian

former_member193202
Participant
0 Kudos

hi brian,

hmm, i did not know that the answer above was "your" expert as i only pass the answers to our 3rd pary vendor, but kind regards for your help i'll diskuss that points with out vender and we'll see.

thanks so much,

oliver