cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh of Web-UI screen after Execution of GET_ Method of Field

Former Member
0 Kudos

Hi All,

I have a requirement to refresh the whole Web-UI screen after filling the data in one field without pressing Enter on the screen.

Field Properties and Attributes of the field:

1. This Field is a Display only Field in the Screen

2. It has a pick list

3. It has P Method to refresh , Since it is a Display Field it will not get into

WHEN if_bsp_wd_model_setter_getter=>fp_server_event.

METHOD GET_P_PRIORITY.

CASE iv_property.

WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.

rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.

WHEN if_bsp_wd_model_setter_getter=>fp_server_event.

rv_value = 'DDLB_PRIORITY_SELECT'.

ENDCASE.

ENDMETHOD.

4. It has ALL the methods implemented except GET_A_<FIELD>.

Try outs from my end:

I have called the CALL METHOD GET_P_<FIELD> inside the method GET_<FIELD> --> No result

CALL METHOD GET_P_PRIORITY

EXPORTING

IV_PROPERTY = 'ServerEvent'

RECEIVING

RV_VALUE = L_RV_VALUE.

Regard's,

Lokesh

Accepted Solutions (0)

Answers (1)

Answers (1)

prasenjit_sharma
Active Contributor
0 Kudos

Hi,

I do not think that is a good solution. Even if you are able to refresh the page, it will cause the GET method to get called again. What are you trying to achieve here?

Regards

Prasenjit

Former Member
0 Kudos

Hi Prasenjit,

I am trying to refresh the Web-Ui Screen as per the below requirement.

Consider for Example.

1. I have one filed consider F1 it has pick list and refresh method(P_) is active. it's an Input field.

2. I have 2'nd Filed F2 (Standard Field). I am filling this filed accordance with the value in F1. it has pick list and refresh method(P_) is active. it's a Display field.--

3. I have 10 more Fields(Data and Time) in one more assignment block these fields are filled accordance with the value in F2 : This is SAP Standard Functionality.

4. In SAP Standard Functionality the field F2 is an Input Field..Now as per our customer requirement it should be automated and should be Display filed. Since in our case F2 is display filed (P_Method refresh - Server_event code will not get executed)

Process:

Here when I select one entry from F1 Field Refresh will happen to Web-Ui Screen and F2 is filled with the data..Now I want to refresh Web-Ui Screen so that 10 more Fields(Data and Time) in one more assignment block fields get updated.

Regard's,

Lokesh

prasenjit_sharma
Active Contributor
0 Kudos

Hi Lokesh,

As I understand you want to update the value of the field F2 based on the value selected in the field F1. And updation of the subsequent fields happen on select of the field F2 automatically. Is that correct?

You may do the following, in the GET_P method of your field F1 enter the following code.

WHEN if_bsp_wd_model_setter_getter=>fp_server_event
       OR  if_bsp_wd_model_setter_getter=>fp_onclick.
      rv_value = 'SEL_FIELDF1'.

This will trigger the event SEL_FIELDF1 when you select the dropdown value of F1.

Now create an event-handler method for F1 in the controller class. The method name would be EH_ONSEL_FIELDF1

In this method, you can do two things

1. update the field F2 based on the field value of F1. OR

2. trigger the event SUBMITORENTER of your viewset.

This should solve you problem since as soon as you select a value of F2 the other fields will also get updated.

Let me know if that works or you need more help.

Regards

Prasenjit

Former Member
0 Kudos

Hi Prasenjit,

I have been on holiday so far, hence the late respond.

As I understand you want to update the value of the field F2 based on the value selected in the field F1. And updation of the subsequent fields happen on select of the field F2 automatically. Is that correct?

In the above comments I want to clarify something to u,

I have already updated the F2 Value depends on the Value of F1.

and Updation of subsequent fields happen not on selection of F2 in my case bcz it's a Display field. I want refresh of the screen in or after method Get_<F2>

2. trigger the event SUBMITORENTER of your viewset.
This should solve you problem since as soon as you select a value of F2 the other fields will also get updated.

In the above comments I want to clarify something to u,

I am not getting Event 'SUBMITORENTER' in IMPL Class.

I can't select the Field value of F2 Since it is a Display Filed. In STD it will work bcz it is Input Field.

Hope now ur clear with my requirement.

Regard's,

Lokesh

Edited by: Lokesh on Dec 28, 2009 5:20 PM

Former Member
0 Kudos

H Prasenjit,

The issue got resolved by Creating a New Event and assigned in P_method of F1 and Setting Field F2 in that Event.

Regard's,

Lokesh.