openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/EDI_SEGMENTS_GET_RANGE:
    post:
      tags:
      - EDI1
      summary: 'EDI interface: Read part of section from data records for IDoc'
      operationId: /rfc/EDI_SEGMENTS_GET_RANGE
      requestBody:
        content:
          application/json:
            schema:
              properties:
                DOCUMENT_NUMBER:
                  type: integer
                  format: int64
                  description: IDoc number
                FROM_SEGMENT:
                  type: integer
                  format: int64
                  description: First segment to be read
                TO_SEGMENT:
                  type: integer
                  format: int64
                  description: Last segment to be read
                RANGE_EDIDD:
                  type: array
                  items:
                    type: object
                    properties:
                      MANDT:
                        type: string
                        maxLength: 3
                        description: Client
                      DOCNUM:
                        type: integer
                        format: int64
                        description: IDoc number
                      SEGNUM:
                        type: integer
                        format: int64
                        description: Number of SAP segment
                      SEGNAM:
                        type: string
                        maxLength: 27
                        description: Segment type
                      PSGNUM:
                        type: integer
                        format: int64
                        description: Number of the hierarchically higher SAP segment
                      HLEVEL:
                        type: integer
                        format: int64
                        description: Hierarchy level
                      DTINT2:
                        type: integer
                        format: int32
                        description: Length field for VARC field
                      SDATA:
                        type: string
                        maxLength: 1000
                        description: Application data
              required:
              - DOCUMENT_NUMBER
              - FROM_SEGMENT
              - TO_SEGMENT
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  NUMBER_OF_MISSING_SEGMENTS:
                    type: integer
                    format: int64
                    description: '''to_segment'' is not in EDIDD: No.of missing segments'
                  RANGE_EDIDD:
                    type: array
                    items:
                      type: object
                      properties:
                        MANDT:
                          type: string
                          maxLength: 3
                          description: Client
                        DOCNUM:
                          type: integer
                          format: int64
                          description: IDoc number
                        SEGNUM:
                          type: integer
                          format: int64
                          description: Number of SAP segment
                        SEGNAM:
                          type: string
                          maxLength: 27
                          description: Segment type
                        PSGNUM:
                          type: integer
                          format: int64
                          description: Number of the hierarchically higher SAP segment
                        HLEVEL:
                          type: integer
                          format: int64
                          description: Hierarchy level
                        DTINT2:
                          type: integer
                          format: int32
                          description: Length field for VARC field
                        SDATA:
                          type: string
                          maxLength: 1000
                          description: Application data
        '400':
          description: Bad request.
        5XX:
          description: Unexpected error.
