Skip to main content

Posts

Showing posts from 2025

SAP ABAP - Extract Number From String

REPORT yextract_number. DATA number(10) VALUE '0123456789'. DATA string_val TYPE char100. WRITE :/ 'First Option ========================'. string_val = '  SHIPMENT 335'. WRITE :/ 'Before', string_val. REPLACE ALL OCCURENCES OF REGEX '[^\d]' IN string_val WITH space. CONDENSE string_val NO-GAPS. WRITE :/ 'After', string_val. WRITE :/ 'First Option ========================'. WRITE :/ '##########################################'. DATA : lv_string TYPE string. DATA : lv_num TYPE string. lv_string = 'A1313.33BBC'. lv_num = lv_string. WRITE :/ 'Second Option ========================'. WRITE :/ 'Before', lv_string. REPLACE ALL OCCURRENCES OF REGEX '([[:alpha:]])' IN lv_num WITH ''. WRITE :/ 'After', lv_num. WRITE :/ 'Second Option ========================'.

SAP Transaction Code S_ALR_87013645 Language Screen is Germany

  1. Open Transaction Code GR53 and fill Report Group 1KMA 2. Run Generate Try open S_ALR_87013645 again and here the result

SAP ABAP - Smartforms as Email Attachment

  *&---------------------------------------------------------------------* *& Report YMAIL01 *&---------------------------------------------------------------------* *& *&---------------------------------------------------------------------* REPORT ymail01. DATA:   lv_subject            TYPE so_obj_des,   lv_attachment_subject TYPE  sood-objdes,   ls_mailto             TYPE zsmail_to,   lt_mailto             TYPE TABLE OF zsmail_to,   lt_otf                TYPE TABLE OF itcoo,   lt_mail_content       TYPE soli_tab,   ls_mail_content       TYPE soli. DATA:   document_output_info TYPE  ssfcrespd,   job_output_info      TYPE  ssfcrescl,   job_output_options   TYPE  ssfcresop,   ssfctrlop...

SAP ABAP - Custom Agent Determination Supplier Invoice Flexible Workflow Approval

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...