‎2006 Oct 03 6:21 PM
Hi.
this function don't work correctly.
the sy-subrc is initial but the values of dynpro fields there aren't modified.
Regards Angela
‎2011 Apr 06 3:45 PM
DYNP_UPDATE_FIELDS will make you all happy while DYNP_VALUES_UPDATE makes everyone sad...
‎2006 Oct 03 6:24 PM
‎2006 Oct 03 6:31 PM
HI,
Look at the below Program ..
data: dyname like d020s-prog value 'TESTPROG',
dynumb like d020-dnum value '100'.
data: begin of dynpfields occurs 3.
include structure dynpread.
data: end of dynpfields.
move 'TABNAME' to dynpfields-fieldname.
move 'Testtable' to dynpfields-fieldvalue.
append dynpfields.
move 'FIELDNAME' to dynpfields-fieldname.
move 'Testfield' to dynpfields-fieldvalue.
append dynpfields.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = dyname
dynumb = dynumb
tables
dynpfields = dynpfields
exceptions
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.Regards
Sudheer
‎2016 Sep 09 11:22 PM
‎2006 Oct 03 6:34 PM
Use the function module DYNP_VALUES_UPDATE and update the internal table for dynp_values
‎2006 Oct 04 8:13 AM
Hi Angela,
DATA: BEGIN OF dynprofelder OCCURS 10.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynprofelder.
REFRESH dynprofelder.
dynprofelder-fieldname = 'SCREEN-NAME1'.
dynprofelder-fieldvalue = SCREEN-NAME1.
APPEND dynprofelder.
dynprofelder-fieldname = 'SCREEN-NAME2'.
dynprofelder-fieldvalue = 'SCREEN-NAME2.
APPEND dynprofelder.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = sy-cprog
dynumb = sy-dynnr
tables
dynpfields = dynprofelder
exceptions
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
others = 8.
Regards,
Ajith
MArk if useful.
‎2006 Oct 04 8:16 AM
hi,
chk this.
DATA: BEGIN OF dynprofelder OCCURS 0.
INCLUDE STRUCTURE dynpread.
DATA: END OF dynprofelder.
REFRESH dynprofelder.
dynprofelder-fieldname = 'SCREEN_FIELD_NAME'.
dynprofelder-fieldvalue = int_orient-ddtext. "screen field value
APPEND dynprofelder.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-cprog
dynumb = sy-dynnr
TABLES
dynpfields = dynprofelder
EXCEPTIONS
invalid_abapworkarea = 1
invalid_dynprofield = 2
invalid_dynproname = 3
invalid_dynpronummer = 4
invalid_request = 5
no_fielddescription = 6
undefind_error = 7
OTHERS = 8.
pls mark all helpful answers.
rgds
anver
‎2006 Oct 04 8:41 AM
Hi.
Thank you for all the your answers.
But I know to use the function. But it doesn't work. In other words the dynpro fields aren't updated.
Regards Angela
‎2006 Oct 04 8:46 AM
‎2006 Oct 04 9:01 AM
Hi Ajith.
This my code:
data:pgwrite like d020s-prog,
dywrite like d020s-dynum,
lt_fields like standard table of dynpread with header line,
lv_tab like z01hrag_campi-tabname.
lt_fields-fieldname = 'P0001-BEGDA'.
lt_fields-fieldvalue = '20060501'.
append lt_fields.
lt_fields-fieldname = 'P0001-PERSK'.
lt_fields-fieldvalue = '13'.
append lt_fields.
if not lt_fields[] is initial.
call function 'DYNP_VALUES_UPDATE'
exporting
dyname = pgwrite
dynumb = dywrite
tables
dynpfields = lt_fields
exceptions
invalid_abapworkarea = 01
invalid_dynprofield = 02
invalid_dynproname = 03
invalid_dynpronummer = 04
invalid_request = 05
no_fielddescription = 06
undefind_error = 07.
endif.
Thank you.
Angela
‎2006 Oct 05 9:18 AM
Hello,
I've the same problem.
My code is equal to Angela's code.
My question is:
the FM DYNP_VALUES_UPDATE can be used only for HELP operations?
Can I use it simply for update the screen fields after the read of the values from tables.
Regards,
Mara
‎2007 May 11 3:47 AM
Hello,
I had the same issue together with GENERATE DYNPRO.
The dynamic created fields are not updated correctly in dynpro PBO event. No way to fix it with with the FM DYNP_VALUES_UPDATE.
My solution was:
- creating a dynamic data structure according to the dynpro fields (e.g. method within class CL_GUI_ALV_GRID)
- field-symbol assigning this dynamic structure (e.g. <UI>)
- naming all field in Dynpro with Prefix "<UI>-"
This works fine. You can transfer fields to dynpro an backwards with the field-symbol <UI>.
Regards,
Joerg
‎2007 Aug 24 11:17 AM
Joerg.
Can you send me a example code to do this:
My solution was:
- creating a dynamic data structure according to the dynpro fields (e.g. method within class CL_GUI_ALV_GRID)
- field-symbol assigning this dynamic structure (e.g. <UI>)
- naming all field in Dynpro with Prefix "<UI>-"
This works fine. You can transfer fields to dynpro an backwards with the field-symbol <UI>.
Thanks,
Joao
‎2011 Sep 14 12:50 PM
Hi,
Are your fields declared in the corresponding generated program ?
If they are not then DYNP_VALUES_READ will work, but you will always lost the content by pressing the ENTER key.
‎2016 Sep 09 11:31 PM
Hi Angela,
DYNP VALUES UPDATE is used to change the screen fields values without a PBO or PAI event, i.e. ON INPUT, ON REQUEST, ON VALUE-REQEST, ON HELP-REQUEST.
For instance, user chooses a value in field a using the F4 value-request. Here you have the chance to update field b depending on the value entered in field a.
I could not see the event in your program triggering the DYNP VALUES UPDATE.
Hope it helps
Clemens
‎2011 Jan 20 5:48 AM
try using this function module.
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
functioncode = '/00'
EXCEPTIONS
function_not_supported = 1.
Regards,
RK
‎2011 Apr 06 3:45 PM
DYNP_UPDATE_FIELDS will make you all happy while DYNP_VALUES_UPDATE makes everyone sad...
‎2015 Mar 30 11:55 PM
‎2016 May 31 2:32 PM
‎2016 Sep 09 10:50 PM
yes,
DYNP_UPDATE_FIELDS works on custom dynpro (remember to user proper dynnr/repid) and custom F4 search help (with Exit) on it, but there is trick - one need to use:
" CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'. " afterwards.
(don't specify any value of "dummy" function code - just call it as specified above)