‎2009 Apr 17 12:11 PM
Hi,
I have the following UI:
Field a ___________
Field b ___________ to __________ ->
- I have associated some F4 help to Field a.
- User selects some value say 'abc' in Field a.
- Field b has multi select behaviour (select-options) and has MATCHCODE OBJECT associating it to SRCH HELP (say TEST_SRCH).
- Now TEST_SRCH has reference to Search Help Exit = F4_FNC_MOD (function module).
- Now in Function Module F4_FNC_MOD I want to pass the value of Field a.
Not able to achieve sending field a value to F4_FNC_MOD function module.
Please help.
Regards,
Arpit
‎2009 Apr 17 12:28 PM
I think you are not able to catch the Value of A at runtime.It usually happens that in selection screen event on value-request value of selection-screen parameters are not identified.
Just use:
DATA: tb_dynpfields LIKE dynpread OCCURS 0 WITH HEADER LINE.
MOVE 'A' TO
tb_dynpfields-fieldname.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = <field Name>
dynumb = <Screen Number>
TABLES
dynpfields = tb_dynpfields
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
invalid_parameter = 7
undefind_error = 8
double_conversion = 9
stepl_not_found = 10
OTHERS = 11.
IF sy-subrc <> 0.
* MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
* WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Read the tbale tb_dynpfields to read the dynamic value of pa_werks
READ TABLE tb_dynpfields INDEX 1.
IF sy-subrc = 0.
W_A = tb_dynpfields-fieldvalue.
ENDIF.
Pass W_A to Function ModuleRegards,
Gurpreet
‎2009 Apr 17 1:16 PM
Never worked with Dynpro UIs. Isn't it possible with simple parameter and select-option code.
I just need a report for the same.
Regards,
Arpit
‎2009 Jul 13 3:21 PM