we have to create one listing condition based on Price list Type for which we have added one custom field as ZZPLTYP.
When we are creating a single record with reference to any price list type the system is not accepting any material for any customer and V118 message is coming.(Material XXXXXXXX is not listed and therefore not allowed).
While checking in Debug mode we have found that if the PLTYP field is blank the error occurs (in line #5) .
I believe there must be other way also that even the PLTYP field is blank system should go forward.
I am pasting the code also for reference.
1. FORM userexit_move_field_to_kompg.
2. IF NOT xvbkd-pltyp IS INITIAL.
3. MOVE xvbkd-pltyp TO kompg-zzpltyp.
5. MOVE ' ' TO kompg-zzpltyp.