ABAP

Vikipedi, özgür ansiklopedi

ABAP (Advanced Business Application Programming) , Alman yazılım şirketi SAP AG tarfından geliştirilen üst seviye bir nesne tabanlı programlama dilidir. SAP'ın serverını programlama için kullanılır. Syntaxı COBOL a benzemektedir.


Örnek:

*-----------------------------------------------------------------------
* set an exclusive lock at level object-type & object-id
*-----------------------------------------------------------------------
 IF NOT lf_bapi_error = true.
   IF ( NOT istourhd-doc_type IS INITIAL ) AND
      ( NOT istourhd-doc_id IS INITIAL ).
     CALL FUNCTION 'ENQUEUE_/DSD/E_HH_RAREF'
          EXPORTING
               obj_typ        = istourhd-doc_type
               obj_id         = istourhd-doc_id
          EXCEPTIONS
               foreign_lock   = 1
               system_failure = 2
               OTHERS         = 3.
     IF sy-subrc <> 0.
*       terminate processing...
       lf_bapi_error = true.
*       ...and add message to return table
       PERFORM set_msg_to_bapiret2
            USING    sy-msgid gc_abort sy-msgno
                     sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4
                     gc_istourhd gc_enqueue_refdoc space
            CHANGING lt_return.
     ENDIF.
   ENDIF.
 ENDIF.    " bapi error