Skip to Content
avatar image
Former Member

Validationfor plant and material

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Sep 30, 2008 at 03:50 PM


    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'.





    Add comment
    10|10000 characters needed characters exceeded