Current position:  Home > Default > ZTable new entries need to be validated

ZTable new entries need to be validated

Time:November 30
Advertisement
hi,
Ztable new entries need to be validated.Only the F4 help value should be populated in fields.Few fields are not bringing the F4 help.And when I am trying to save any random data into the field,its saving in the ztable.
i want ONLY F4 HELP values to be saved into the ZTABLE.
Please advice.
Advertisement
Hi,
1. For Possible entries :
   Create the foreign key relationship for the fields in the custom table.
2. For Other validations againt the data entered for the field.
You have to Generate the table maintenance for this custom table in SE11.
After generating the table maintenace for this table there will be a program name
and screen number for this table.
The program name can be identified after running the maintenance generator.
System->Status->Program(screen)
System->Status->Screen number
The program will be generated with SAPLZXXXXXXX
For eg :
Function group : ZEURMM000
Program name   : SAPLZEURMM000
Screen number  : from the table maintenance generator
You can find the PAI of for this table.
Write new module between chain and endchain statement.
CHAIN.
    FIELD ZMM001-ZPLANT .
    FIELD ZMM001-ZDES .
    MODULE get_Zdes.            "Added new code
    MODULE SET_UPDATE_FLAG ON CHAIN-REQUEST.
ENDCHAIN.
MODULE get_zdes iNPUT.
data : lv_zdes type ZMM001-ZDES.
  CLEAR ZMM001-ZDES.
  SELECT SINGLE zdes
     INTO lv_ZDES
     FROM CHECK_TABLE  "The values needs to be validated
     WHERE  PLANT = ZMM001-ZPLANT
        AND ZDES = CHECK_TABLE-ZDES.
if sy-subr <> 0.
message.
endif.
ENDMODULE.                 " GET_CARNO_DES  INPUT
All the User PAI statements can be performed in the subrouine LZEURMMXXXO01 of the generated program SAPLZEURMM000.
Best Regards,
Senthilraj Selvaraj