Sent: Wednesday, June 26, 2013 1:57 PM
I click “accept” button:
[外链图片转存失败(img-JUeQuBLW-1563588282729)(user-images.githubusercontent.com/5669954/326…)]
The code sets status as hard code “F”. I don’t understand this since the accepted status only has three valid values: P, X and space:
[外链图片转存失败(img-SaQO0sBb-1563588282730)(user-images.githubusercontent.com/5669954/326…)]
As a result, the UI will always regard it as not complete since ‘F’ <> ‘X’.
answer
Its is an error. The idea was to have different accept options in the application.
The ‘finish with default’ button on the dialog screen should only accept all variables that are marked as ‘D’ and the ‘finish with default’ button on the document summary should only set the variables to accepted that are marked as ‘F’.
METHOD /ipro/if_action~finish_with_defaults.
CHECK mv_mode EQ gc_mode_update OR
mv_mode EQ gc_mode_review_update OR
mv_mode EQ gc_mode_create.
CHECK mo_current_varroot IS BOUND.
mo_current_varroot->/ipro/if_docb_variable~set_accepted( ).
IF piv_fillins_only IS INITIAL.
mo_current_varroot->/ipro/if_docb_variable~set_accepted( 'D' ). " dialog variables only
ELSE.
mo_current_varroot->/ipro/if_docb_variable~set_accepted( 'F' ). " Fill-in variables only
ENDIF.
ENDMETHOD.
The variable logic needs to be enhanced to check the visibility and depending on that you can set the mv_accepted to ‘X’ or ‘ ‘.
F or D should only be used for the check logic but not as value.
METHOD /ipro/if_docb_variable~set_accepted.
IF me->mv_valid EQ gc_true.
me->mv_accepted = piv_accepted.
me->set_changed( ).
ENDIF.
ENDMETHOD.