Skip to Content

If Payment method is 7 then only posting will be allowed in F-28

Hi Team,

I want to set the validation on Payment method.

If payment method is 7 then only posting will be allowed in F-28 otherwise it will display error message and it should not impact to other tcodes like F-06 which are related to FBZ1.

Could you please let me know how to implement?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Jan 05, 2017 at 03:41 PM

    F-28 is also a FBZ1 in disguise like F-06...

    So in your OB28 validation rule you should use an exit and check the actual transaction, as sy-tcode is FBZ1 for your two examples, use method CL_DYNPRO=>GET_CURRENT_TRANSACTION to get actual current transaction code.

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 05, 2017 at 04:46 PM

    Thanks Raymond,

    I created validation as like below screen and implemented logic in exit as below .

    FORM u107 USING b_result.

    IF bseg-koart = 'D'.

    IF bseg-zlsch = 'D' OR bseg-zlsch = 'V' OR bseg-zlsch = '7' OR bseg-zlsch = 'M'.

    * Do Nothing

    ELSE.

    MESSAGE e999(ztpl) WITH 'Please enter payment method either M,D,V and 7'(012).

    ENDIF. ENDIF. ENDFORM.


    Validation is working fine for F-28 but not able do postings through F-06 when payment method is other than M,D,V and 7

    It should not impact to other tcodes. how to restrict?

    Please suggest me

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 06, 2017 at 02:08 PM

    Thanks Raymond..

    Issue resolved!!

    Add comment
    10|10000 characters needed characters exceeded