PERFORM fill_parameters(sapmzdoc) TABLES so_crt
USING kunnr
lifnr
p_ddes
p_doc
p_item
' '.
CALL SUBSCREEN parmaeters.
GET CURSOR FIELD field_name LINE line_number.
line_number = tc_300-top_line + line_number - 1.
* get the data
OPEN DATASET docs-file_name FOR INPUT IN BINARY MODE.
IF sy-subrc <> 0.
CONCATENATE 'Could not open file' docs-file_name
INTO message SEPARATED BY space.
EXIT.
ENDIF.
DO.
READ DATASET docs-file_name INTO pdf LENGTH lv_size.
IF sy-subrc <> 0.
EXIT.
ENDIF.
pdf_size = pdf_size + lv_size.
APPEND pdf.
ENDDO.
CLOSE DATASET docs-file_name.
TYPES: lt_pdf_line(134) TYPE c.
DATA: l_url(80) TYPE c,
l_pdf_data TYPE STANDARD TABLE OF lt_pdf_line.
l_pdf_data[] = p_pdf[].
* transfer data to data provider
CALL METHOD pdf_html_control->load_data
EXPORTING
url = 'smart.pdf'
size = pdf_size
type = 'text'
subtype = 'pdf'
IMPORTING
assigned_url = l_url
CHANGING
data_table = l_pdf_data[]
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
message = 'Internal IT error'.
ENDIF.
* show data
CALL METHOD pdf_html_control->show_data
EXPORTING
url = l_url
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
message = 'Internal IT error'.
ENDIF.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
4 | |
2 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |