2010 Sep 24 1:34 AM
Has anyone been able to get default text to appear in the header note of ME51N? I've searched and seen references to BADI ME_REQ_HEADER_TEXT but it doesn't seem to work.
If anyone was able to get default text to appear in the header note of ME51N please let me know. If you could share some detail steps on what you did it would be greatly appreciated.
Thanks,
Chami
2010 Sep 24 2:33 PM
Has anyone been able to get default text to appear in the header note of ME51N? I've searched and seen references to BADI ME_REQ_HEADER_TEXT but it doesn't seem to work.
If anyone was able to get default text to appear in the header note of ME51N please let me know. If you could share some detail steps on what you did it would be greatly appreciated.
Thanks,
Chami
2010 Sep 24 2:33 PM
2010 Sep 28 12:05 AM
Thanks for the information, this helped point me in the right direction. Here's how I got it to work for anyone else that is searching.
BADI: ME_PROCESS_REQ_CUST
Method: Open
I maintained text in SO10 and then inserted the following code to call the text, works perfectly:
IF sy-tcode = 'ME51N'.
DATA: im_tdid TYPE tdid.
data: im_texttype type TEXTTYPE.
DATA: im_textlines TYPE mmpur_t_textlines.
data: im_text_formatted type mmpur_bool.
DATA: wa_textlines LIKE LINE OF im_textlines.
DATA: text_tab TYPE TABLE OF tline,
wa_text_tab TYPE tline.
CALL FUNCTION 'READ_TEXT'
EXPORTING
client = sy-mandt
id = 'ST'
language = sy-langu
name = 'DEFULT_HEADR_TEXT'
object = 'TEXT'
TABLES
lines = text_tab.
IF text_tab IS NOT INITIAL.
LOOP AT text_tab INTO wa_text_tab .
wa_textlines-tdline = wa_text_tab-tdline.
wa_textlines-tdobject = 'TEXT' .
wa_textlines-tdid = 'ST'.
wa_textlines-tdformat = 'SP'.
APPEND wa_textlines TO im_textlines.
ENDLOOP .
ENDIF.
CALL METHOD IM_HEADER->if_longtexts_mm~GET_TEXT
EXPORTING
IM_TDID = 'B01'
IM_TEXTTYPE = im_texttype
IMPORTING
EX_TEXTLINES = im_textlines
EX_TEXT_FORMATTED = im_text_formatted
.
CALL METHOD im_header->if_longtexts_mm~set_text
EXPORTING
im_tdid = 'B01'
im_textlines = im_textlines.
CALL METHOD im_header->if_longtexts_mm~adopt_text
EXPORTING
im_tdid = 'B01'.
ENDIF.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |