openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/MSS_GET_SQLSTATEMENT:
    post:
      tags:
      - STUS
      summary: 'MS SQL Server: Get SQL code and parameters'
      operationId: /rfc/MSS_GET_SQLSTATEMENT
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CON_NAME:
                  type: string
                  default: DEFAULT
                  maxLength: 30
                  description: DBCON name
                INSTNAME:
                  type: string
                  default: ' '
                  maxLength: 40
                OBJ_DB:
                  type: string
                  maxLength: 128
                  description: Database name
                OBJ_SCHEMA:
                  type: string
                  maxLength: 128
                  description: Schema name
                SCHEMA:
                  type: string
                  default: ' '
                  maxLength: 128
                  description: Target Schema
                SPID:
                  type: integer
                  format: int32
                  default: 0
                SPNAME:
                  type: string
                  default: ' '
                  maxLength: 128
                  description: Stored procedure name
                SQLCODE:
                  type: string
                  default: ' '
                  maxLength: 1
                  description: Single-character flag
                SP_CODE:
                  type: array
                  items:
                    type: object
                    properties:
                      TEXTLINE:
                        type: string
                        maxLength: 255
                        description: MS sql server - stored procedure text line
                SP_PARAMS:
                  type: array
                  items:
                    type: object
                    properties:
                      PAR_NAME:
                        type: string
                        maxLength: 30
                        description: MS SQL server - stored procedure parameter name
                      PAR_TYPE:
                        type: string
                        maxLength: 30
                        description: MS SQL server - stored procedure parameter type
                      PAR_VALUE:
                        type: string
                        maxLength: 255
                        description: MS SQL server  stored procedure parameter value
                STMT_LINES:
                  type: array
                  items:
                    type: object
                    properties:
                      TEXTLINE:
                        type: string
                        maxLength: 255
                        description: MS sql server - stored procedure text line
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  FINAL_COMMAND:
                    type: string
                    maxLength: 30000
                  MSQSTMTINFO:
                    type: object
                    properties:
                      SP_NAME:
                        type: string
                        maxLength: 128
                        description: Stored procedure name
                      MOD_TYPE:
                        type: string
                        maxLength: 1
                        description: MS SQL server module type number
                      STMT_NUM:
                        type: string
                        maxLength: 8
                        description: MS SQL server statement number within sap module
                      TIMESTAMP:
                        type: string
                        maxLength: 14
                        description: Creation timestamp of generated stored  procedure
                      OBJ_NAME:
                        type: string
                        maxLength: 40
                        description: MS SQL-Server object name of SAP object causing sp creation
                  TABNAME:
                    type: string
                    maxLength: 128
                    description: Table name
                  SP_CODE:
                    type: array
                    items:
                      type: object
                      properties:
                        TEXTLINE:
                          type: string
                          maxLength: 255
                          description: MS sql server - stored procedure text line
                  SP_PARAMS:
                    type: array
                    items:
                      type: object
                      properties:
                        PAR_NAME:
                          type: string
                          maxLength: 30
                          description: MS SQL server - stored procedure parameter name
                        PAR_TYPE:
                          type: string
                          maxLength: 30
                          description: MS SQL server - stored procedure parameter type
                        PAR_VALUE:
                          type: string
                          maxLength: 255
                          description: MS SQL server  stored procedure parameter value
                  STMT_LINES:
                    type: array
                    items:
                      type: object
                      properties:
                        TEXTLINE:
                          type: string
                          maxLength: 255
                          description: MS sql server - stored procedure text line
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
