Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Default Header Note ME51N: Create Purchase Requisition

Former Member
0 Likes
1,889

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,295

Hi,

find the link .... it is for ME21n ...

U need to change only l_dynumb = '1105' and sy-tcode.

Regards,

Amitava

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

2 REPLIES 2
Read only

Former Member
0 Likes
1,296

Hi,

find the link .... it is for ME21n ...

U need to change only l_dynumb = '1105' and sy-tcode.

Regards,

Amitava

Read only

0 Likes
1,295

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.