2013 Sep 05 3:00 PM
Hello,
I have a problem with dynpro-programming:
This is the coding on my dynpro:
PROCESS ON VALUE-REQUEST.
FIELD zmepo_badi_9000-ateil
MODULE suchhilfe_ateil.
At the dynpro there are two fields: ateil and kstar
In Module suchhilfe_ateil I want to get back the value of zmepo_badi_9000-ateil and
zmepo_badi_9000-kstar. In suchhilfe_ateil I`m using the FB
F4IF_INT_TABLE_VALUE_REQUEST to get a F4 help.
I both fields on Dynpro are empty there is no problem: both fields get filled.
But when the Dynpro is filled and I want to change it with the help of F4, the value of kstar doesn`t change. It`s still the same as before.
It only works if kstar is empty. Then the correct value gets in the correct field.
Here is a part of the coding of MODULE suchhilfe_ateil:
zmepo_badi_9000-z_kstar = lv_kstar.
zmepo_badi_9000-ateil = lv_ateil.
* "Setze Enter
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
functioncode = '/00'
EXCEPTIONS
function_not_supported = 1.
in lv_kstar is the correct value, but on the dynpro it does not change.
I hope anybody can help me!
Thank you.
2013 Sep 05 3:59 PM
Remove those move and force ok_code, better use FM DYNP_VALUES_UPDATE to update the screen without triggering a PAI/PBO cycle. Parameters are very similar to DYNP_VALUES_READ that you should already use to read current value of the other field (e.g. : read z_kstar when F4 executed on ateil)
Regards,
Raymond
2013 Sep 06 10:14 AM
Hello,
thanks for your reply. Now It works, but I have still a problem.
There is a third field I have to fill (same dynpro): Z_ZIELPREIS
If I use 'DYNP_VALUES_UPDATE' it doesn`t fill a value in
ZMEPO_BADI_9000-Z_ZIELPREIS. When I put it in directly, it works, but I have to put Enter when I`m back on the dynpro, than the correct value appears. That would be ok perhaps. But when I restart the F4-Help without Enter, the dynpro-field 'ZMEPO_BADI_9000-Z_ZIELPREIS' has a value. That is not good. Perhaps you can help me again.
Why does DYNP_VALUES_UPDATE not update Z_ZIELPREIS?
Or: How to get the value of Z_ZIELPREIS directly into the Dynpro-Field without Enter? Thanks
zmepo_badi_9000-z_zielpreis = lv_netwr_eur.
* MOVE 'ZMEPO_BADI_9000-Z_ZIELPREIS' TO dflin-fieldname.
* MOVE lv_netwr_eur TO dflin-fieldvalue.
* APPEND dflin TO dftab.
* CLEAR dflin.
MOVE 'ZMEPO_BADI_9000-Z_KSTAR' TO dflin-fieldname.
MOVE lv_kstar TO dflin-fieldvalue.
APPEND dflin TO dftab.
CLEAR dflin.
MOVE 'ZMEPO_BADI_9000-ATEIL' TO dflin-fieldname.
MOVE lv_ateil TO dflin-fieldvalue.
APPEND dflin TO dftab.
CLEAR dflin.
CALL FUNCTION 'DYNP_VALUES_UPDATE'
EXPORTING
dyname = sy-repid
dynumb = sy-dynnr
TABLES
dynpfields = dftab.IF sy-subrc = 0.
CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'
EXPORTING
functioncode = '/00'
EXCEPTIONS
function_not_supported = 1.
ENDIF.
2013 Sep 06 12:25 PM