HPOMSAP 6.1 Delivering documents to SAPconnect nodes in SAP R/3
Technical Note 19
Sample Programs
Sample Program YRVADOR01 (Example 1)
* A text is printed, if the item is an alternative item. *
*---------------------------------------------------------------------*
FORM ALTERNATIVE_ITEM.
CHECK VBDPA-GRPOS CN '0'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
ELEMENT = 'ALTERNATIVE_ITEM'
EXCEPTIONS
ELEMENT = 1
WINDOW = 2.
IF SY-SUBRC NE 0.
PERFORM PROTOCOL_UPDATE.
ENDIF.
ENDFORM.
*---------------------------------------------------------------------*
* FORM CHECK_REPEAT *
*---------------------------------------------------------------------*
* A text is printed, if it is a repeat print for the document. *
*---------------------------------------------------------------------*
FORM CHECK_REPEAT.
CLEAR REPEAT.
SELECT * INTO *NAST FROM NAST WHERE KAPPL = NAST-KAPPL
AND OBJKY = NAST-OBJKY
AND KSCHL = NAST-KSCHL
AND SPRAS = NAST-SPRAS
AND PARNR = NAST-PARNR
AND PARVW = NAST-PARVW
AND NACHA BETWEEN '1' AND '4'.
CHECK *NAST-VSTAT = '1'.
REPEAT = 'X'.
EXIT.
ENDSELECT.
ENDFORM.
*---------------------------------------------------------------------*
* FORM DELIVERY_DATE *
*---------------------------------------------------------------------*
* If the delivery date in the item is different to the header *
* date and there are no scheduled quantities, the delivery date *
* is printed in the item block. *
*---------------------------------------------------------------------*
FORM DELIVERY_DATE.
IF VBDKA-LFDAT = SPACE AND
VBDPA-LFDAT NE SPACE AND
VBDPA-ETENR_DA = SPACE.