Skip to main content

SAP ABAP - Find User Exit of Transaction Code With Custom Program

 




REPORT zfindexits.

TABLES tstctadirmodsaptmodacttrdirtfdirenlfdirtstct.
DATA jtab LIKE tadir OCCURS WITH HEADER LINE.
DATA field1(30).
DATA v_devclass LIKE tadir-devclass.

PARAMETERS p_tcode LIKE tstc-tcode OBLIGATORY.

START-OF-SELECTION.

SELECT SINGLE FROM tstc WHERE tcode EQ p_tcode.

IF sy-subrc EQ 0.

  SELECT SINGLE FROM tadir
    WHERE pgmid 'R3TR' AND object 'PROG' AND obj_name tstc-pgmna.

  MOVE tadir-devclass TO v_devclass.

  IF sy-subrc NE 0.
    SELECT SINGLE FROM trdir WHERE name tstc-pgmna.
    IF trdir-subc EQ 'F'.
      SELECT SINGLE FROM tfdir WHERE pname tstc-pgmna.
      SELECT SINGLE FROM enlfdir WHERE funcname tfdir-funcname.

      SELECT SINGLE FROM tadir WHERE
        pgmid 'R3TR' AND object 'FUGR' AND obj_name EQ enlfdir-area.

      MOVE tadir-devclass TO v_devclass.
    ENDIF.
  ENDIF.

  SELECT FROM tadir INTO TABLE jtab
    WHERE pgmid 'R3TR' AND object 'SMOD'  AND devclass v_devclass.

  SELECT SINGLE FROM tstct WHERE sprsl EQ sy-langu AND tcode EQ p_tcode.

  FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
  WRITE:/(19'Transaction Code - '20(20p_tcode45(50tstct-ttext.
  SKIP.

  IF NOT jtab[] IS INITIAL.

    WRITE:/(95sy-uline.
    FORMAT COLOR COL_HEADING INTENSIFIED ON.
    WRITE:/1 sy-vline,
    'Exit Name',
    21 sy-vline ,
    22 'Description',
    95 sy-vline.
    WRITE:/(95sy-uline.

    LOOP AT jtab.
      SELECT SINGLE FROM modsapt WHERE sprsl sy-langu AND name jtab-obj_name.
      FORMAT COLOR COL_NORMAL INTENSIFIED OFF.

      WRITE:/1 sy-vline,
      jtab-obj_name HOTSPOT ON,
      21 sy-vline ,
      22 modsapt-modtext,
      95 sy-vline.
    ENDLOOP.

    WRITE:/(95sy-uline.
    DESCRIBE TABLE jtab.
    SKIP.

    FORMAT COLOR COL_TOTAL INTENSIFIED ON.
    WRITE:'No of Exits:' sy-tfill.
  ELSE.

    FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
    WRITE:/(95'No User Exit exists'.
  ENDIF.
ELSE.

  FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
  WRITE:/(95'Transaction Code Does Not Exist'.
ENDIF.

AT LINE-SELECTION.

  GET CURSOR FIELD field1.
  CHECK field1(4EQ 'JTAB'.
  SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
  CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.

Comments

Popular posts from this blog

How to Create a REST API in SAP ABAP — Step-by-step Guide

How to Create a REST API in SAP ABAP — Step-by-step Guide Summary: This tutorial shows how to build a REST API in SAP ABAP by creating a handler class, configuring SICF service, registering endpoints with cl_rest_router , implementing endpoint logic (example GET method), and testing the API. Based on an internal implementation reference. Why expose REST APIs from SAP? REST APIs allow SAP systems to integrate with web, mobile, and external services using standard HTTP and JSON payloads. Implementing REST endpoints in ABAP provides secure, reusable, and maintainable integration points for modern applications. Prerequisites Access to an SAP system with authorization to create classes (SE24) and SICF services (SICF). Familiarity with ABAP object-oriented concepts and basic SAP transaction codes. ABAP classes CL_REST_RESOURCE , CL_REST_ROUTER and utilities like /UI2/CL_JSON . High-level overview (4 steps) Create an API handler class (e.g. ZCL_API_HANDLER ). R...

SAP ABAP - User Exit Set Batch Characteristic Value In MIGO Goods Receipt

Customer Exit  :  MBCFC004 ( EXIT_SAPMM07M_004) Set Up Customer Exit for Classification of User-Defined Characteristics You use SAP enhancement MBCFC004 EXIT_SAPMM07M_004, which contains function module exit EXIT_SAPMM07M_004 to classify user-defined characteristics automatically during goods movements in Inventory Management. This is only possible for characteristics which are not assigned values during quality inspection. Requirements 1. The class of the batch to be classified must be known.  This means that a class must be assigned either to the material or at least to one batch of this material. 2. The exit call must be activated for the respective movement type in activity Activate batch classification during goods movements in IM using indicator 'Extended classification' . Open tcode OMC...

IT Asset Management Dengan PHP MySQL

Pada postingan kali saya akan share sebuah aplikasi IT Asset management yang fungsinya untuk memonitoring semua Asset khusus IT, contohnya : Laptop/komputer , Printer, Router, Hardisk, dll. Dalam aplkasi ini kita bisa mengetahui Asset IT posisinya dimana dan digunakan oleh siapa. untuk data-data yang dibutuhkan antara lain : 1. data kategori asset dalam menu ini kita bisa meng-input jenis2 kategory asset : tambah kategori asset : 2. data department 3. data karyawan 4. data department per karyawan 5. data asset location  6. data satuan asset dan untuk transaksi yang ada dalam aplikasi ini adalah,  1. create asset, pada menu create asset ini kita akan mengalokasikan sebuah asset ke karyawan/personnel tampilannya seperti berikut: setelah klik tombol save akan muncul seperti dibawah : untuk melihat detail asset yang sudah dibuat tadi, kita bisa pilih...