Skip to content

Report ZLLM_PROVIDER_MAINTENANCE

AI Generated documentation.

Overview

This report provides maintenance functionality for LLM (Large Language Model) provider configurations stored in table ZLLM_PROVIDERS. Key features include:

  • Displaying provider configurations in an ALV grid
  • Adding/updating providers via popup dialogs with encrypted authentication value handling
  • Deleting providers after confirmation
  • Integration with a BAdI-based encryption mechanism for secure credential storage

Dependencies

  • Custom Objects:
  • Table ZLLM_PROVIDERS (configuration storage)
  • Interface ZIF_LLM_ENCRYPTION (encryption implementation)
  • Exception class ZCX_LLM_AUTHORIZATION
  • SAP Standard:
  • BAdI framework for encryption implementation resolution
  • Function modules POPUP_GET_VALUES and POPUP_TO_CONFIRM

Details

Class Structure

classDiagram  
    class lcl_app {  
        +constructor()  
        +display_providers()  
        +handle_action_add()  
        +handle_action_change()  
        +handle_action_delete()  
        -providers  
        -enc_class  
        -load_providers()  
        -save_provider()  
        -encrypt_auth_value()  
        -decrypt_auth_value()  
    }  
    class lcl_screen {  
        +start()  
        +pai()  
        +pbo()  
        -app  
    }  
    lcl_screen --> lcl_app  
    lcl_app --> ZIF_LLM_ENCRYPTION : Encryption  
    lcl_app --> ZLLM_PROVIDERS : Data Persistence  

Key Implementation Aspects

  1. Encryption Workflow:
  2. Authentication values are encrypted using ZIF_LLM_ENCRYPTION implementation retrieved via BAdI
  3. Values split across two input fields for lengths >132 characters (e.g., OpenAI keys)

  4. ALV Integration:

  5. Field catalog built dynamically with LVC_FIELDCATALOG_MERGE
  6. Sensitive AUTH_VALUE field excluded from direct display

  7. Data Flow for Provider Updates:

sequenceDiagram  
    User->>lcl_screen: Triggers action (Add/Change)  
    lcl_screen->>lcl_app: Calls handler method  
    lcl_app->>lcl_app: show_popup()  
    lcl_app->>User: Displays input dialog  
    User->>lcl_app: Provides credentials  
    lcl_app->>lcl_app: encrypt_auth_value()  
    lcl_app->>ZLLM_PROVIDERS: save_provider()  
    lcl_app->>lcl_app: refresh_display()  
  1. Security Constraints:
  2. Encryption/decryption operations throw ZCX_LLM_AUTHORIZATION for missing privileges
  3. Authentication values never stored in clear text format

  4. UI Handling:

  5. Dedicated screen class (lcl_screen) manages dynpro events
  6. Selection consistency enforced (single-row selection for modifications)