openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/SUBST_WRITE_UPGRADE_VARIANT:
    post:
      tags:
      - SUGR
      summary: Create a Report Variant or Update Its Parameters
      operationId: /rfc/SUBST_WRITE_UPGRADE_VARIANT
      requestBody:
        content:
          application/json:
            schema:
              properties:
                IV_REPORTNAME:
                  type: string
                  maxLength: 40
                  description: Report for which variant should be written
                IV_VARIANTNAME:
                  type: string
                  default: SAP_UPGRADE
                  maxLength: 14
                  description: Name of variant to be written
                IV_VARIANTTEXT:
                  type: string
                  default: Upgrade variant
                  maxLength: 30
                  description: Short text of variant to be written
                TT_REPORTPARAM:
                  type: array
                  items:
                    type: object
                    properties:
                      SELNAME:
                        type: string
                        maxLength: 8
                        description: 'ABAP/4: Name of SELECT-OPTION / PARAMETER'
                      KIND:
                        type: string
                        maxLength: 1
                        description: 'ABAP: Type of selection'
                      SIGN:
                        type: string
                        maxLength: 1
                        description: 'ABAP: ID: I/E (include/exclude values)'
                      OPTION:
                        type: string
                        maxLength: 2
                        description: 'ABAP: Selection option (EQ/BT/CP/...)'
                      LOW:
                        type: string
                        maxLength: 45
                        description: 'ABAP/4: Selection value (LOW or HIGH value, external format)'
                      HIGH:
                        type: string
                        maxLength: 45
                        description: 'ABAP/4: Selection value (LOW or HIGH value, external format)'
              required:
              - IV_REPORTNAME
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  EV_FUNCRC:
                    type: integer
                    format: int32
                    description: Return code of insert/update attempt
                  TT_REPORTPARAM:
                    type: array
                    items:
                      type: object
                      properties:
                        SELNAME:
                          type: string
                          maxLength: 8
                          description: 'ABAP/4: Name of SELECT-OPTION / PARAMETER'
                        KIND:
                          type: string
                          maxLength: 1
                          description: 'ABAP: Type of selection'
                        SIGN:
                          type: string
                          maxLength: 1
                          description: 'ABAP: ID: I/E (include/exclude values)'
                        OPTION:
                          type: string
                          maxLength: 2
                          description: 'ABAP: Selection option (EQ/BT/CP/...)'
                        LOW:
                          type: string
                          maxLength: 45
                          description: 'ABAP/4: Selection value (LOW or HIGH value, external format)'
                        HIGH:
                          type: string
                          maxLength: 45
                          description: 'ABAP/4: Selection value (LOW or HIGH value, external format)'
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
