‎2009 Nov 06 2:04 PM
Hello expert.
This is my problem
I have 3 input fields
FIELD1
FIELD2
FIELD3
Field1 has martchcode, and i want after select the value from the search help of field1, that field2 and field3 be completed with some data
I put the code to complete the field2 and field3 in the PBO, but, the pbo doesnt execute until the user press enter.
How can i do, that after the user select the value from the help, but without press enter, the field be completed?
Thanks!!!
‎2009 Nov 06 3:37 PM
Hi Mariano,
you can create a custom search help where you define field2 and field3 additionally as export parameters and everything is done, probaly without any programming.
Regards,
Clemens
‎2009 Nov 06 2:30 PM
Question is not clear
If you are executing Help which process on value request event.... the control should go to PBO automatically when you add the fields.
So write the help functionality under POV event. Read help on it or post clearly
‎2009 Nov 06 2:38 PM
Sorry for mi english Sampath.
this is mi code:
porcess before output.
module complete_fields.
process on value-request.
field field1 module module_field1.
and the module execute the function F4IF_INT_TABLE_VALUE_REQUEST
But the PBO is not executed after select a value for field1.
‎2009 Nov 06 2:47 PM
Hi Friend ,
Please see this program for Dropdown value's
DEMO_DYNPRO_DROPDOWN_LISTBOX
DEMO_DROPDOWN_LIST_BOX
Also see this link for more infomation[http://help.sap.com/saphelp_nw04/helpdata/en/9f/dbabe435c111d1829f0000e829fbfe/content.htm]
Regards,
‎2009 Nov 06 4:17 PM
Check out the return tab of the function module. If you get them in the tab then you can map them to your fields.
If it does not go through PBO... use dunpro update fm (some one already posted here)
‎2009 Nov 06 3:12 PM
Hi Mariano,
See the code below:
t_dynpread-fieldname = p_fieldname.
t_dynpread-fieldvalue = p_fieldvalue.
APPEND t_dynpread.
CALL FUNCTION 'DYNP_UPDATE_FIELDS'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
request = sy-ftype
TABLES
dynpfields = t_dynpread
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
‎2009 Nov 06 3:37 PM
Hi Mariano,
you can create a custom search help where you define field2 and field3 additionally as export parameters and everything is done, probaly without any programming.
Regards,
Clemens
‎2009 Nov 06 4:08 PM
Hello Clemens, thanks,
I have create the search help.
My quiestion is:
How map the 2 others parameters to the field2 and field3?
Thanks!
‎2009 Nov 06 4:35 PM
Hi
U can do it in the POV event:
AT SELECTION-SCREEN ON VALUE-REQUEST for a selection-screen
PROCESS ON VALUE-REQUEST for a dynpro (in this case the abap code has to be placed in a MODULE)
The logic is always the same, after selecting the data of the first field, it needs to select and transfer the data to other input fields.
It needs to use the fm DYNP_VALUES_UPDATE in order to fill the fields not managed in the events:
PARAMETERS: P_BUKRS LIKE T001-BUKRS,
P_BUKR1 LIKE T001-BUKRS,
P_BUKR2 LIKE T001-BUKRS.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_BUKRS.
DATA: DYNAME LIKE D020S-PROG,
DYNUMB LIKE D020S-DNUM,
DYNPFIELDS TYPE TABLE OF DYNPREAD WITH HEADER LINE.
DATA: RETURN_TAB LIKE DDSHRETVAL OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
TABNAME = 'T001'
FIELDNAME = 'BUKRS'
TABLES
RETURN_TAB = RETURN_TAB.
READ TABLE RETURN_TAB INDEX 1.
MOVE RETURN_TAB-FIELDVAL TO P_BUKRS.
CHECK P_BUKRS = 'MAAB'.
DYNAME = SY-REPID.
DYNUMB = SY-DYNNR.
DYNPFIELDS-FIELDNAME = 'P_BUKR1'.
DYNPFIELDS-FIELDVALUE = 'AAAA'.
APPEND DYNPFIELDS.
DYNPFIELDS-FIELDNAME = 'P_BUKR2'.
DYNPFIELDS-FIELDVALUE = 'BBBB'.
APPEND DYNPFIELDS.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
DYNAME = DYNAME
DYNUMB = DYNUMB
TABLES
DYNPFIELDS = DYNPFIELDS.Max
‎2009 Nov 06 6:00 PM
Hi Mariano,
define the desired values as export in search help interface. Connection is done via data element on screen.
Regards,
Clemens
‎2009 Nov 06 6:04 PM
Hello, thank a lot for the answers, i took max`s solution.
thanks again!