report zworkflw line-size 255. *---- Selection Screen ------------------------------------------------- parameters: ebeln like ekko-ebeln memory id bes obligatory, ebelp like ekpo-ebelp memory id bsp. *---- Variables -------------------------------------------------------- data: w_comwa like vbco6, it_doc like ekbe occurs 0 with header line, it_txt like dd07v occurs 0 with header line, begin of it_type occurs 0, vgabe like ekbe-vgabe, text like dd07v-ddtext, end of it_type. *----------------------------------------------------------------------- start-of-selection. call function 'ME_READ_HISTORY' exporting ebeln = ebeln ebelp = ebelp webre = 'X' tables xekbe = it_doc. perform write_docs. *----------------------------------------------------------------------- form write_docs. call function 'GET_DOMAIN_VALUES' exporting domname = 'VGABE' tables values_tab = it_txt exceptions no_values_found = 1 others = 2. case sy-subrc. when 1. write: / 'Warning: No texts found for', 'transaction/event type, purchase order history!'. when 2. write: / 'Warning: Cannot retrieve descriptions for', 'transaction/event type, purchase order history!'. when 0. perform sort_texts. endcase. write: / it_doc-ebeln,it_doc-ebelp,'- Purchasing Document History:'. loop at it_doc. perform write_type using it_doc-vgabe. write: it_doc-belnr, it_doc-buzei, it_doc-budat. endloop. endform. *----------------------------------------------------------------------- form sort_texts. loop at it_txt. it_type-vgabe = it_txt-domvalue_l. it_type-text = it_txt-ddtext. append it_type. clear it_type. endloop. sort it_type. endform. *----------------------------------------------------------------------- form write_type using value(p_vgabe) like ekbe-vgabe. data w_txt(30) type c. read table it_type with key vgabe = p_vgabe binary search. case sy-subrc. when 0. w_txt = it_type-text. when others. w_txt = '?'. endcase. write / w_txt intensified off. endform. *-----------------------------------------------------------------------