To validate the documents posted on the clearing transactions FB05, FB1K or FB1D, use the GGB0 validation rules.

Create an 'EXIT' in the ZGGBR000 program and validate POSTAB structure, as follows:
*&---------------------------------------------------------------------* *& Form compe *&---------------------------------------------------------------------* * Validate blocking payment on clearing document *----------------------------------------------------------------------* FORM compe USING bool_data TYPE gb002_015 CHANGING b_result. DATA: BEGIN OF t_postab OCCURS 20. INCLUDE STRUCTURE rfops. DATA: END OF t_postab. FIELD-SYMBOLS: <fs_postab> TYPE ANY TABLE. "Search Open Itens in SAP Memory ASSIGN ('(SAPMF05A)POSTAB[]') TO <fs_postab>. t_postab[] = <fs_postab>[]. "Validation Message LOOP AT t_postab WHERE zlspr NE space. b_result = b_false. EXIT. ENDLOOP. ENDFORM. "compe |
Do not forget to activate the rule in OB28.
Best Regards,
Rodrigo Abreu Costa
@digoabreu
Galo Doido!