Skip to Content
0

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

Jan 05, 2017 at 02:14 PM

45

avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
Raymond Giuseppi
Jan 05, 2017 at 03:41 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Bala S Jan 05, 2017 at 04:46 PM
0

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


Show 1 Share
10 |10000 characters needed characters left characters exceeded

CIn the form call the method already provided and check the current tcode before returning the error.

0
Bala S Jan 06, 2017 at 02:08 PM
0

Thanks Raymond..

Issue resolved!!

Share
10 |10000 characters needed characters left characters exceeded