HPOMSAP 6.1 Delivering documents to SAPconnect nodes in SAP R/3
48 Technical Note
Sample Programs
Sample Program YRVADOR01 (Example 1)
*& Form HEADER_NOTICE_PRINT
*&---------------------------------------------------------------------*
* This routine prints the notice-rules of the contract-header. *
*----------------------------------------------------------------------*
* --> p1 text
* <-- p2 text
*----------------------------------------------------------------------*
FORM HEADER_NOTICE_PRINT.
DATA: US_TEXT(1) TYPE C. "Kz. falls Text für Kündigungsbed.
* Kündigungsbedingungen auf Kopfebene.
CLEAR US_TEXT.
LOOP AT TKOMSERVHN.
VEDKN = TKOMSERVHN.
IF US_TEXT IS INITIAL.
* For the first time a headertext is printed.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADER_TERMS_OF_NOTTXT'
EXCEPTIONS
ELEMENT = 1
WINDOW = 2.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
ENDIF.
US_TEXT = CHARX.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'HEADER_TERMS_OF_NOTICE'
EXCEPTIONS
ELEMENT = 1
WINDOW = 2.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDLOOP.
* If notice-rules exists a empty line is printed.
IF NOT US_TEXT IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'EMPTY_LINE'
EXCEPTIONS
ELEMENT = 1
WINDOW = 2.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDIF.
ENDFORM. " HEADER_NOTICE_PRINT
*eject