Posts

SAP ABAP - Custom Agent Determination Supplier Invoice Flexible Workflow Approval

Image
Approval Supplier Invoice document (MIR7) using flexible workflow with custom agent determination. Using custom agent determination for supplier invoice approval with flexible workflow in SAP involves several steps. Below is a step-by-step guide to help you set this up: Step 1: Understand the Requirement In my case, custom agent determination need to maintain with custom table. Below the custom table needs: After create both of tables, need to create custom CDS view which will be used in custom logic apps code First CDS View ZInvoiceWf  @AbapCatalog.sqlViewName: 'ZIWFINVOICE' @AbapCatalog.compiler.compareFilter: true @AbapCatalog.preserveKey: true @AccessControl.authorizationCheck: #CHECK @ClientHandling.algorithm: #SESSION_VARIABLE @EndUserText.label: 'Supplier Invoice Workflow' @VDM.viewType: #COMPOSITE @VDM.lifecycle.contract.type: #SAP_INTERNAL_API @ObjectModel.usageType.sizeCategory: #M @ObjectModel.usageType.serviceQuality: #A @ObjectModel.usageType.dataClass: #MA...

SAP ABAP - Remove Special Character With Regex

Image
REPORT yregex. DATA mystring1 TYPE string. DATA mystring2 TYPE string. mystring1 = 'mystringa)aksak*1<>!@#$%^&*()~'. mystring2 = 'mystringa)aksak*1<>!@#$%^&*()~'. REPLACE ALL OCCURRENCES OF REGEX '[^0-9a-zA-Z]+' IN mystring2 WITH space. WRITE:/ mystring1. WRITE:/ mystring2.

SAP ABAP - Upload G/L Account (FS00) Custom Program

Image
Custom Structure for program Screen Element List Screen FLow Logic Gui Status Download template  Here   TYPES:   BEGIN OF ty_excel,     bukrs      TYPE bukrs,     saknr      TYPE saknr,     glacc_type TYPE char1,     ktoks      TYPE ska1-ktoks,     txt20      TYPE txt20,     txt50      TYPE txt50,     waers      TYPE waers,     kdfsl      TYPE skb1-kdfsl,     bewgp      TYPE skb1-bewgp,     mwskz      TYPE skb1-mwskz,     xmwno      TYPE skb1-xmwno,     mitkz      TYPE skb1-mitkz,     altkt      TYPE skb1-altkt,     infky      TYPE skb1-infky,     togru      TYPE skb1-togru,     zuawa      TYPE...

SAP ABAP - PDF Viewer From Application Server Directory

Image
  AL11 REPORT ysap_pdf_viewer. DATA : lt_data TYPE TABLE OF x255. DATA : wa_line TYPE x255. DATA: lo_docking_container TYPE REF TO cl_gui_docking_container. DATA: lo_html    TYPE REF TO cl_gui_html_viewer. DATA: lv_url TYPE char255. DATA: ok_code(20). DATA filename TYPE string. PARAMETERS fname TYPE localfile. ** Selection screen value request AT SELECTION-SCREEN ON VALUE-REQUEST FOR fname.   CALL FUNCTION 'KD_GET_FILENAME_ON_F4'     EXPORTING       static    = 'X'     CHANGING       file_name = fname.   IF sy-subrc <> 0. * Implement suitable error handling here   ENDIF. START-OF-SELECTION.   filename = '/usr/sap/attachment/'. "AL11 Directory   filename = |{ filename }{ fname }|. * Read PDF File   PERFORM read_file. * Display to screen   PERFORM display_pdf. *&---------------------------------------------------------------------* *&      Form  r...