cancel
Showing results for 
Search instead for 
Did you mean: 

Own assignmentblock switchs to Lazy mode if i change it to editable

Former Member
0 Kudos

Hello,

i have created in a own z-component my own assignmentblock.

This own assignmentblock i added to the overviewpage PRDIOOV.

The assignmentblock is now visible in the UI and also the data is displayed correctly.

I have also added a button "Edit" to this own assignmentblock and a eventhandler for this event.

At the moment is the behaviour like this.

As soon i click the button edit the assignmentblock switchs in Lazy-mode.

If i open it once again all fields are editable.

For me it is not clear why it switchs in lazy mode.

Any ideas on this?

Thank you

Best regards

Manfred

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

ManniF,

The controlling of the modes of Views is controlled by the parameter VIEW_AREA in the overview page. Keep a break point in any of the methods of the overview page like TOOL_BAR_GET_BUTTONS and check the value in VIEW_AREA.

A parameter TRAYMODE will bet set for expanded views.

I guess something is happening to this parameter when you click EDIT.

Regards,

Masood Imrani S.

Answers (1)

Answers (1)

CarstenKasper
Active Contributor
0 Kudos

Hi Manfred,

just a guess:

Have a look in the OverviewPages implementation class. If you are lucky, the methods DETACH_STATIC_OVERVIEW_VIEWS and REATTACH_STATIC_OVERVIEW_VIEWS (names might differ slightly as I have no CRM system to check) have been implemented. They are used often to toggle OverviewPage layout.

Another option that comes to my mind is DO_CONFIG_DETERMINATION.

Put a breakpoint and observe if something changes when the view (View Group Context) is put to edit mode.

cheers

Carsten

Former Member
0 Kudos

Hello Carsten,

nice to hear from you and thank you for this helpfull answer.

Yes you are right. I implemented the Method REATTACH_STATIC_OVERVIEW_VIEWS because without this implementation my own assignmentblock was not visible on the overview page.

In the UI configuration in configured my own assignmentblock in "Lazy"-Mode.

If i now have the assignmentblock opened in the overviewpage and click on "Edit" the system jumps again into REATTACH_STATIC_OVERVIEW_VIEWS and sets it back to "Lazy".

If the initial configuration is "Display" not "Lazy" i have not this issue.

Does anybody have an idea on this how the issue can be solved if the initial configuration of the assignmentblock on the overviewpage is lazy?

Thank you

Best regards

Manfred

CarstenKasper
Active Contributor
0 Kudos

Hi Manfred,

easy approach:

On your views implementation class you got a variable VIEW_GROUP_CONTEXT which provides several methods. One of them is IS_VIEW_IN_DISPLAY_MODE( ). You could check for this and set the display style accordingly.

A more correct approach, after having a look at the OverviewPage's implementation class:

The class implements both methods: Detach and Reattach.

Put a breakpoint in both and observe how your view gets stripped from the UI in Detach and you have to reattach it in Reattach.

My first try would be to save the entry in the lt_static_views variable corresponding to your view. Maybe add it to gt_reattach after the last method call in DETACH method.

Then you should be fine, suppose you could even delete your code form the REATTACH method.

cheers Carsten