hxxxrz

Untitled

Aug 4th, 2021 (edited)
367
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ABAP 2.85 KB | None | 0 0
  1. class YCLITC_PRINTED_FORM_WWW definition
  2.   public
  3.   inheriting from YCLITC_PRINTED_FORM_TEMPLATE
  4.   create public .
  5.  
  6. *"* public components of class YCLITC_PRINTED_FORM_WWW
  7. *"* do not include other source files here!!!
  8. public section.
  9.  
  10.   methods CONSTRUCTOR
  11.     importing
  12.       !I_FORM_NAME type YSITC_PRINTED_FORM_PARAMS-FORM_NAME
  13.       !IT_VALUES type YTTITC_PRINTED_FORM_VALUES
  14.       !IT_FILES type YTTITC_PRINTED_FORM_FILES optional .
  15. protected section.
  16. *"* protected components of class YCLITC_PRINTED_FORM_WWW
  17. *"* do not include other source files here!!!
  18.  
  19.   types:
  20.     TT_MIME type standard table of W3MIME .
  21.  
  22.   methods READ_TEMPLATE
  23.     redefinition .
  24. private section.
  25. *"* private components of class YCLITC_PRINTED_FORM_WWW
  26. *"* do not include other source files here!!!
  27. ENDCLASS.
  28.  
  29.  
  30.  
  31. CLASS YCLITC_PRINTED_FORM_WWW IMPLEMENTATION.
  32.  
  33.  
  34. * <SIGNATURE>---------------------------------------------------------------------------------------+
  35. * | Instance Public Method YCLITC_PRINTED_FORM_WWW->CONSTRUCTOR
  36. * +-------------------------------------------------------------------------------------------------+
  37. * | [--->] I_FORM_NAME                    TYPE        YSITC_PRINTED_FORM_PARAMS-FORM_NAME
  38. * | [--->] IT_VALUES                      TYPE        YTTITC_PRINTED_FORM_VALUES
  39. * | [--->] IT_FILES                       TYPE        YTTITC_PRINTED_FORM_FILES(optional)
  40. * +--------------------------------------------------------------------------------------</SIGNATURE>
  41.   method CONSTRUCTOR.
  42.   CALL METHOD SUPER->CONSTRUCTOR
  43.     EXPORTING
  44.       IT_VALUES = IT_VALUES
  45.       IT_FILES  = IT_FILES.
  46.  
  47.   Call method Set_Parameters
  48.     exporting
  49.       I_FORM_NAME = I_FORM_NAME.
  50.   endmethod.
  51.  
  52.  
  53. * <SIGNATURE>---------------------------------------------------------------------------------------+
  54. * | Instance Protected Method YCLITC_PRINTED_FORM_WWW->READ_TEMPLATE
  55. * +-------------------------------------------------------------------------------------------------+
  56. * | [--->] IS_PARAMETERS                  TYPE        YSITC_PRINTED_FORM_PARAMS
  57. * | [<---] ES_DATA                        TYPE        YSITC_PRINTED_FORM_DATA
  58. * | [EXC!] FILE_NOT_FOUND
  59. * +--------------------------------------------------------------------------------------</SIGNATURE>
  60.   method READ_TEMPLATE.
  61.   Data:
  62.     Ext type string,
  63.     w_Key    type WWWDATATAB,
  64.     l_SUBRC type  SY-SUBRC.
  65.  
  66.   w_Key-RELID = 'MI'.
  67.   w_Key-OBJID = IS_PARAMETERS-FORM_NAME.
  68.  
  69.   Call method YCLITC_PRINTED_FORM=>READ_WWW_OBJECT
  70.     exporting
  71.       I_KEY = w_Key
  72.     importing
  73.       E_FILE_DATA   = ES_DATA-FILE_TEMPLATE
  74. *      E_MIME_TYPE =
  75. *      E_FILE_SIZE = ES_DATA-FILE_TEMPLATE_SIZE
  76.       E_FILE_EXT  = Ext
  77. **      E_SUBRC = l_SUBRC.
  78.     exceptions
  79.       FILE_NOT_FOUND = 1
  80.       ERROR          = 2
  81.       others         = 99.
  82.  
  83.   ES_DATA-FILE_TEMPLATE_EXT  = Ext.
  84.   endmethod.
  85. ENDCLASS.
Add Comment
Please, Sign In to add comment