cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

raymond_giuseppi
Active Contributor
0 Kudos

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

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks Raymond..

Issue resolved!!

Former Member
0 Kudos

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

raymond_giuseppi
Active Contributor
0 Kudos

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