2021 Sep 23 1:09 PM
Hey gurus, I need a little help with objects. I'm starting with this and I'm a bit confused using the super class.
Let's say I have a screen field called 'campo' that based on a condition it must be disabled for input.
METHOD modificar.
super->modificar( if_dynnr = if_dynnr)
<---code for the field 'campo' here--->
........
ENDMETHOD
What can I do to achieve this?
Hey gurus, I need a little help with objects. I'm starting with this and I'm a bit confused using the super class.
Let's say I have a screen field called 'campo' that based on a condition it must be disabled for input.
METHOD modificar.
super->modificar( if_dynnr = if_dynnr)
<---code for the field 'campo' here--->
........
ENDMETHOD
What can I do to achieve this?
2021 Sep 23 1:09 PM
Thank you for visiting SAP Community to get answers to your questions. Since this is your first question, I recommend that you familiarize yourself with Community Q&A , as the overview provides tips for preparing questions that draw responses from our members.
Should you wish, you can revise your question by selecting Actions, then Edit.
By adding a picture to your Profile you encourage readers to respond.
2021 Sep 23 1:31 PM
and while we're at it... posting, deleting and reposting isn't cool.
2021 Sep 23 2:36 PM
I don't understand your question. To have a field "Disabled for input", you use:
DATA ls_screen_element TYPE screen.
LOOP AT SCREEN INTO ls_screen_element.
IF ls_screen_element-name = 'YOURFIELDNAME'.
ls_screen_element-INPUT = '0'.
MODIFY screen FROM ls_screen_element.
ENDIF.
ENDLOOP.I don't get what difficulty you have with ABAP Objects.
2021 Sep 23 4:29 PM
2021 Sep 24 10:41 AM
sandra.rossi
thankyou for your answer.
It seems that my problem is when can I use "normal" abap code when programming with ABAP Objects, like the code you wrote, 'MODIFY SCREEN FROM'.
Sorry for my English, guess is not good enough to explain myself.
2021 Sep 24 5:42 PM
"MODIFY screen FROM ... " is not an ABAP Objects construct. It's the recommended form. "MODIFY screen" without additional words is obsolete.
About English, I guess Google translator works well, so that should not be a problem to explain your issue.