Skip to content

Instantly share code, notes, and snippets.

@oarthursilva
Created June 20, 2022 21:30
Show Gist options
  • Save oarthursilva/78a4f6307044af97bbaae708453c2744 to your computer and use it in GitHub Desktop.
Save oarthursilva/78a4f6307044af97bbaae708453c2744 to your computer and use it in GitHub Desktop.
METHOD if_ex_me_process_po_cust~check.
DATA: lv_tdid TYPE tdid,
lv_texttype TYPE mmpur_texttypes,
lt_text_lines TYPE mmpur_t_textlines,
lt_text_format TYPE mmpur_bool,
lv_header TYPE mepoheader,
lv_lines TYPE i.
* Macro for messages
INCLUDE mm_messages_mac. "useful macros for message handling
lv_tdid = 'F01'.
* Get the Header data
lv_header = im_header->get_data( ).
im_header->if_longtexts_mm~get_text(
EXPORTING
im_tdid = lv_tdid
im_texttype = lv_texttype
IMPORTING
ex_textlines = lt_text_lines
ex_text_formatted = lt_text_format ).
DESCRIBE TABLE lt_text_lines LINES lv_lines.
IF lv_lines = 0.
ch_failed = 'X'.
mmpur_message_forced 'E' 'ME' '083' 'Enter a rejection reason' ' in the long text' '' ''.
ENDIF.
ENDMETHOD.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment