cancel
Showing results for 
Search instead for 
Did you mean: 

Validationfor plant and material

Former Member
0 Kudos

Hi gurus

please advise on validation.

On FB50 transaction, Our users want a validation for particular accts say (GL: No 999888)

that if a material is entered in FB50, a plant and profit center must also be entered AND the entered plant and profit center should be the one from the material master MM03.

Please advise steps as how to build validation for the above requirement.

Many thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

rupesh_brahmankar3
Active Contributor
0 Kudos

Dear,

In the at selection-screen event write the following code

tables: keko.

clear: p_matnr, p_werks, keko.

select matnr werks from keko up to 1 rows

into (keko-matnr, keko-werks)

where matnr = p_matnr and

werks = p_werks.

if sy-subrc 0.

message E023 with 'Cost estimate not found for '

p_matnr p_werks 'combination'.

endif.

endselect.

Regards

R.Brahmankar