12-01-2010 11:39 AM
HI all,
I need to make PR PR header text mandatory in ME51N or atleast error message I have to display in case PR header text is not entered. I tried with SHD0 and tried to chek the BADI's and user-exits,I didn't find any answer. Please tell me if I have followed the incorrect step or solution
12-01-2010 11:48 AM
Check BADI "ME_PROCESS_REQ_CUST", method "CHECK".
Edit : Call the method IM_HEADER->IF_LONGTEXTS_MM~GET_TEXT with parameter IM_TDID = 'B01' to get the header text in the above mentioned BADI method. If the internal table structure for EX_TEXTLINES is initial, raise an error message.
Edited by: Vinod Kumar on Dec 1, 2010 5:27 PM
12-01-2010 11:48 AM
Check BADI "ME_PROCESS_REQ_CUST", method "CHECK".
Edit : Call the method IM_HEADER->IF_LONGTEXTS_MM~GET_TEXT with parameter IM_TDID = 'B01' to get the header text in the above mentioned BADI method. If the internal table structure for EX_TEXTLINES is initial, raise an error message.
Edited by: Vinod Kumar on Dec 1, 2010 5:27 PM
12-02-2010 8:03 AM
Thanks alot. But I am not able to create IM_HEADER object of type IF_LONGTEXTS_MM, as IM_HEADER is the parameter of main CHECK method of ME_PROCESS_REQ_CUST BAdi. if I try to make some other object of type IF_LONGTEXTS_MM in get_text method, the ME51N is giving dump while saving a PR. Please elaborate your answer.
12-02-2010 8:37 AM
I don't think there is any problem in implementing the validation in CHECK method. See the sample code below
DATA : lt_textlines TYPE mmpur_t_textlines.
REFRESH : lt_textlines.
CALL METHOD im_header->if_longtexts_mm~get_text(
EXPORTING
im_tdid = 'B01'
IMPORTING
ex_textlines = lt_textlines ) .
IF lt_textlines[] IS INITIAL.
MESSAGE 'Header text not available' TYPE 'E'.
ENDIF.
12-02-2010 8:45 AM
Thanks Vinod, I was wrongly using the object class definition syntax, as this is the first time I am working with BAdi
05-13-2013 8:26 AM
Hi Vinod
What about if i have the same requirement but for item text instead ?
please advise me
Regards
Ghadeer
06-13-2023 10:59 AM
Kindly Share the screenshot , method is not exist message display in se18 , kindly share the screenshot step by step on urgent need ?