Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Enable or disable "Possible Entries" matchcode property in GUI Dynpro with ABAP code

Former Member
0 Kudos
2,378

Hi everyone

I request your help because I have a requirement to enable the match code property for a custom field in a GUI Dynpro (set the "Possible Entries key" property set to "1 - show at selection") but only when the transaction meet at specific criteria, otherwise the match code property but remain disabled (set "Possible Entries key" property to initial) to type manually the field value, this criteria must be set inside the selection screen, so I need to setup the code inside PBO section.

I was looking similar issues in several pages, included here, but I had no luck.

Can you help me giving an idea of how to accomplish this?

Thanks in advance

Lorenzo Martín Olmos

1 ACCEPTED SOLUTION

Former Member
0 Kudos
324

I don't know how to do this the way you are asking, but you could try this workaround:

Have two fields - one with possible entries, one without. depending on the criteria, one field is invisible and the other is not. You would also have to have logic to use whichever field is visible.

Actually, although I have never tried it, it looks like you should be able to do this with SCREEN-VALUE_HELP, SCREEN-REQUEST and/or SCREEN-VALUES_IN_COMBO.

Yes - if you set SCREEN-VALUE_HELP = '0'. help will not be available.

Rob

Message was edited by: Rob Burbank

2 REPLIES 2

Former Member
0 Kudos
325

I don't know how to do this the way you are asking, but you could try this workaround:

Have two fields - one with possible entries, one without. depending on the criteria, one field is invisible and the other is not. You would also have to have logic to use whichever field is visible.

Actually, although I have never tried it, it looks like you should be able to do this with SCREEN-VALUE_HELP, SCREEN-REQUEST and/or SCREEN-VALUES_IN_COMBO.

Yes - if you set SCREEN-VALUE_HELP = '0'. help will not be available.

Rob

Message was edited by: Rob Burbank

0 Kudos
324

Hi Rob Burbank

I tried your suggestion and It works . I was pretty sure that was an option that I was missing, but didn't found it by myself. Thanks for giving me the clue:


MODULE ENABLE_MATCH_CODE OUTPUT.

  LOOP AT screen.
       IF screen-name EQ 'FieldName'.
            screen-value_help = '1'. "Possible Entries property
            MODIFY SCREEN.
       ENDIF.
  ENDLOOP.

END MODULE.

Best regards

Lorenzo Martin Olmos