openapi: 3.0.0
info:
  title: SAP API
  version: 1.0.0
servers:
- url: http://localhost:8080
paths:
  /rfc/EDI_SEGMENT_GET:
    post:
      tags:
      - EDI1
      summary: 'EDI Interface: Direct Access to Data Record'
      operationId: /rfc/EDI_SEGMENT_GET
      requestBody:
        content:
          application/json:
            schema:
              properties:
                DOCUMENT_NUMBER:
                  type: integer
                  format: int64
                  description: IDoc Number
                FROM_ACTUAL_POSITION:
                  type: string
                  default: N
                  maxLength: 1
                  description: Name of Data Record
                SEGMENT_NAME:
                  type: string
                  maxLength: 27
                  description: Name of Data Record
              required:
              - DOCUMENT_NUMBER
              - SEGMENT_NAME
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                properties:
                  IDOC_CONTAINER:
                    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.
