cancel
Showing results for 
Search instead for 
Did you mean: 

SET method is not getting triggered

RaviTejaGuptha
Active Participant
0 Kudos

Hello Friends,

We have developed a custom view which is having a field. When we are changing the value of the field the SET method of that attribute is not getting triggered.

When i have checked the attribute is missing in FORM_FIELDS of DO_HANDLE_DATA method. On further debugging the attribute is missing in the method  DISPATCH_INPUT (CL_BSP_CONTROLLER2) in lt_fields.

Kindly let me know how to proceed further/suggestions.

Regards,

Ravi Teja

Accepted Solutions (0)

Answers (1)

Answers (1)

deepika_chandrasekar
Active Contributor
0 Kudos

Hi Ravi,

Keep debugger in the context node method SET_S_STRUCT and check when this attribute set method is called any exception is raised?

Regards,

Deepika.

RaviTejaGuptha
Active Participant
0 Kudos

Hello Deepika,

Actually above method is getting triggered after DO_HANDLE_DATA. We are missing the attribute in that method itself. So the code is not getting triggered for the attribute which is having issue. I hope that is correct.

As per my understanding from the HTTP request itself the attribute is missing. But I am not able find the place where it is happening.

One more thing when i press the 'Enter' then "Save" the value is getting saved.

Thanks,

Ravi

deepika_chandrasekar
Active Contributor
0 Kudos

Hi Ravi,

Whether value is saved after you save without pressing enter after changing the value?

Regards,

Deepika.

RaviTejaGuptha
Active Participant
0 Kudos

No Deepika... the SET method should trigger for this i guess.

deepika_chandrasekar
Active Contributor
0 Kudos

Hi Ravi,

Thats what. but how when you press enter and save value is saved. If value is saved then set method is called that time when you press enter.

If that is the case when you dont press enter and save also SET method should get triggered.

Regards,

Deepika.

RaviTejaGuptha
Active Participant
0 Kudos

Hi Deepika,

Actually it should get saved which is not happening.

On further debugging the field is getting missed in the below method

CL_HTTP_REQUEST~IF_HTTP_ENTITY~GET_FORM_FIELDS_CS.

system-call ict
     did
       ihttp_scid_get_form_fields_cs
     parameters
       m_c_msg                            " > c handle
       fields                             " > form fields table
       m_last_error.                      " < return code

No further F5 also .


Any other work around guys.


Thanks,

Ravi

Former Member
0 Kudos

Hi Ravi,

Check whether this field is present in IF_BSP_MODEL~INIT method of that context node.

And if this view is binded to any controller, check the above method of that controller as well.

Thanks & Regards

Richa

RaviTejaGuptha
Active Participant
0 Kudos

Hi Richa,

I have checked the field is present in both places .

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

Put a breakpoint in DISPATCH_INPUT of CL_BSP_CONTROLLER2 and check whether on pressing 'enter' what values are coming to this method.

lt_fields of this method should contain the field name.

In case of any deviation, let me know.

Thanks & Regards

Richa

RaviTejaGuptha
Active Participant
0 Kudos

Hello Richa,

Yes the field is coming when i press enter. That's the difference between the two scenarios.

And if you debug further you can see those fields are getting populated from the above method.

Thanks,

Ravi

Former Member
0 Kudos

Hi Ravi,

If the field is coming in this method, check where in the standard process this field is getting lost.

Thanks & Regards

Richa

RaviTejaGuptha
Active Participant
0 Kudos

Hello Richa,

May be the statements are confusing.

When i press the 'Enter' the field is coming in the method DISPATCH_INPUT, and the value is getting saved as well.

Without 'Enter'(Direct 'Save') , the field is not coming and it is not getting saved.

Regards,

Ravi

Former Member
0 Kudos

Hi Ravi,

Can you please provide the code for 'save' event handler.

Let me know in case of any help.

Thanks & Regards

Richa

RaviTejaGuptha
Active Participant
0 Kudos

Hi Richa,

The EH_ONSAVE is having complete custom FM's with the custom logic.

May I know which part you want to check specifically?

Thanks for your help.

Regards,

Ravi Teja

Former Member
0 Kudos

Hi Ravi,

Put a breakpoint in DISPATCH_INPUT & click on save.

Check  m_subcontrollers variable in this method, changed field should be coming in  <controller>-fields of your component controller.

If this is not coming then set method won't get called.

Let me know in case of any help.

Thanks & Regards

Richa

RaviTejaGuptha
Active Participant
0 Kudos

Hello Richa,

That thing i found from the debugging. I mentioned same in the above comments.

It is not coming under subcontroller. So it is not there in DO_HANDLE_DATA and SET method.

I want to know how these fields are getting filled. Further it is getting filled inside DISPATCH method at

CL_HTTP_REQUEST~IF_HTTP_ENTITY~GET_FORM_FIELDS_CS.

system-call ict
     did
       ihttp_scid_get_form_fields_cs
     parameters
       m_c_msg                            " > c handle
       fields                             " > form fields table
       m_last_error.                      " < return code

No further F5 also .


Any suggestion to fulfill this.


Regards,

Ravi

Former Member
0 Kudos

Hi,

Goto class 'CL_HTTP_REQUEST' and put a breakpoint in method 'IF_HTTP_ENTITY~GET_FORM_FIELDS_CS'.

This method gets called from DISPATCH_INPUT. Check whether the following code gives the changes fields in 'FIELDS' attribute -

system-call ict

     did

       ihttp_scid_get_form_fields_cs

     parameters

       m_c_msg                            " > c handle

       fields                             " > form fields table

       m_last_error.


Thanks & Regards

Richa