Skip to Content
0

Control Header Text edit functionality

Jul 11, 2017 at 07:56 AM

39

avatar image
Former Member

Hello All,

We have one requirement, where we want to have control on PO header text .

1. Make Existing Text in Header text no editable

2. Users can append new text, but should not be able to modify/delete the existing text in PO header text.

any idea on how to achieve same using ABAP, if anyone implemented same plz share your ideas.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
satyapriyanka vana Jul 25, 2017 at 02:52 AM
0

Hi,

Implement BADI ME_PROCESS_PO_CUST. Place the below code in the method 'OPEN'.

SPAN {
font-family: "Courier New";
font-size: 10pt;
color: #000000;
background: #FFFFFF;
}
.L0S33 {
color: #4DA619;
}
.L0S52 {
color: #0000FF;
}
.L0S55 {
color: #800080;
}
.L0S70 {
color: #808080;
}

METHOD if_ex_me_process_po_cust~open.

  DATA : lv_id TYPE tdid,

       it_lines TYPE STANDARD TABLE OF mmpur_textlines,

       w_lines LIKE LINE OF it_lines,

       lv_tformat TYPE mmpur_bool.

  lv_id = 'F16'.

  CALL METHOD im_header->if_longtexts_mm~get_text

    EXPORTING

      im_tdid           = lv_id

    IMPORTING

      ex_textlines      = it_lines

      ex_text_formatted = lv_tformat.



  LOOP AT it_lines INTO w_lines WHERE tdline IS NOT INITIAL.

    w_lines-tdformat = '>X'.

    CONCATENATE '*' w_lines-tdline INTO w_lines-tdline SEPARATED BY space.

    MODIFY it_lines FROM w_lines INDEX sy-tabix.

  ENDLOOP.



  CALL METHOD im_header->if_longtexts_mm~set_text

    EXPORTING

      im_tdid      = lv_id

      im_textlines = it_lines.

ENDMETHOD.

Hope it helps.

Regards,

Priyanka.


po-text.jpg (28.8 kB)
Share
10 |10000 characters needed characters left characters exceeded