zl程序教程

您现在的位置是:首页 >  其它

当前栏目

CRM Document builder fill-in status fillin

in CRM status Document Builder fill
2023-09-14 09:03:04 时间

Sent: Wednesday, June 26, 2013 1:57 PM

I click “accept” button:
[外链图片转存失败(img-JUeQuBLW-1563588282729)(https://user-images.githubusercontent.com/5669954/32685822-0beba4e4-c6d4-11e7-88b9-811b50da4e1d.png)]

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)(https://user-images.githubusercontent.com/5669954/32685823-0c220908-c6d4-11e7-9fe1-af70d11c93c4.png)]

As a result, the UI will always regard it as not complete since ‘F’ <> ‘X’.

clipboard3

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’.

clipboard4

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.