ALV o/p TO PDF Converison using CONVERT_ABAPSPOOLJOB_2_PDF
Hi Geeks,
My rquirement is to attach the output of ALV report to the mail as PDF file.I am using FM "CONVERT_ABAPSPOOLJOB_2_PDF" for converting the ALV ouput to PDF format but when i check the data in PDF fomat table , it's corrupted and thus pdf file opens with error in the mail.
Can anyone have some suggestion please !!!
Usefull answer will be rewarded !!!
Harmeet,
Code is :
Preparing the recepeint list
LOOP AT S_EMAIL1.
CLEAR : TBL_RECLIST.
TBL_RECLIST-RECEIVER = S_EMAIL1-LOW.
TBL_RECLIST-REC_TYPE = 'U'.
APPEND TBL_RECLIST.
ENDLOOP.
LOOP AT S_EMAIl2.
CLEAR : TBL_RECLIST.
TBL_RECLIST-RECEIVER = S_EMAIL2-LOW.
TBL_RECLIST-REC_TYPE = 'U'.
APPEND TBL_RECLIST.
ENDLOOP.
PDF spooling (For generating spool number)
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
SRC_SPOOLID = lv_spool
NO_DIALOG = c_no
DST_DEVICE = c_device
PDF_DESTINATION =
IMPORTING
PDF_BYTECOUNT = LV_BYTE_COUNT
PDF_SPOOLID =
LIST_PAGECOUNT =
BTC_JOBNAME =
BTC_JOBCOUNT =
TABLES
PDF = TBL_PDF_OUTPUT[]
EXCEPTIONS
ERR_NO_ABAP_SPOOLJOB = 1
ERR_NO_SPOOLJOB = 2
ERR_NO_PERMISSION = 3
ERR_CONV_NOT_POSSIBLE = 4
ERR_BAD_DESTDEVICE = 5
USER_CANCELLED = 6
ERR_SPOOLERROR = 7
ERR_TEMSEERROR = 8
ERR_BTCJOB_OPEN_FAILED = 9
ERR_BTCJOB_SUBMIT_FAILED = 10
ERR_BTCJOB_CLOSE_FAILED = 11
OTHERS = 12
IF sy-subrc = 0.
LOOP AT TBL_PDF_OUTPUT.
TRANSLATE TBL_PDF_OUTPUT USING ' ~'.
CONCATENATE LV_BUFFER TBL_PDF_OUTPUT INTO LV_BUFFER.
ENDLOOP.
TRANSLATE LV_BUFFER USING '~ '.
DO.
TBL_OBJBIN = LV_BUFFER.
APPEND TBL_OBJBIN.
SHIFT LV_BUFFER LEFT BY 255 PLACES.
IF LV_BUFFER IS INITIAL.
EXIT.
ENDIF.
ENDDO.
ENDIF.
DESCRIBE TABLE TBL_OBJBIN LINES LV_TBL_LINE.
Prepare document
LV_DOC-OBJ_NAME = 'ERROR'.
LV_DOC-OBJ_DESCR = 'ERROR IN OBZT MAINTENANCE ACTION REQUIRED'.
Prepare for attachement
TBL_OBJPACK-TRANSF_BIN = 'X'.
TBL_OBJPACK-HEAD_START = 1.
TBL_OBJPACK-HEAD_NUM = 0.
TBL_OBJPACK-BODY_START = 2.
TBL_OBJPACK-BODY_NUM = LV_TBL_LINE.
TBL_OBJPACK-DOC_TYPE = 'PDF'.
TBL_OBJPACK-OBJ_NAME = 'ATTACHEMENT'.
TBL_OBJPACK-OBJ_DESCR = 'Error in tax code with OBZT'.
TBL_OBJPACK-DOC_SIZE = ( LV_TBL_LINE - 1 ) * 255 + STRLEN( TBL_OBJBIN ).
APPEND TBL_OBJPACK .
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = LV_DOC
PUT_IN_OUTBOX = ' '
COMMIT_WORK = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
PACKING_LIST = TBL_OBJPACK[]
OBJECT_HEADER = TBL_OBJHEAD[]
CONTENTS_BIN = TBL_OBJBIN[]
CONTENTS_TXT =
CONTENTS_HEX =
OBJECT_PARA =
OBJECT_PARB =
RECEIVERS = TBL_RECLIST[]
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
ENDIF.
ENDIF.
Similar Messages
-
Error in Spool to PDF conversion using 'CONVERT_ABAPSPOOLJOB_2_PDF'.
Hi
I am sending classical report output from the Spool to PDF using 'CONVERT_ABAPSPOOLJOB_2_PDF'.
This is done through a batch job.
Step 1 is RVKRED01 report
Step 2 is a program that picks up the spool number of step1 and converts the spool to PDF.
Now in step 2 I am getting following error.
TEMSE_READ_LISTLINE error, TemssPart 1
What can be the reason?
What can be the solution?HI,
I checked your FM CONVERT_ABAPSPOOLJOB_2_PDF.
in the include LSTXWFPL line 1006, the IF condition is failing (if eop = 'X'. "end of part, read next part? )
so you are getting that message,
you can check that failing job in the debugging mode why it was failing at that point.
Note: for checking the background job you need to do below things.
1) go to sm37, and select you job.
2) and just type "JDBG" in the command line it goes to the debugging mode of your job.
by this way you will find. how and why its that error.
Alternative to your FM ( CONVERT_ABAPSPOOLJOB_2_PDF ) you can also use the
FM FPCOMP_CREATE_PDF_FROM_SPOOL. -
ABAP Rpt to PDF using CONVERT_ABAPSPOOLJOB_2_PDF issues in Batch
Hi,
We just upgraded to 731 level 09. Our program using CONVERT_ABAPSPOOLJOB_2_PDF works in the foreground. The PDF contains the report, It does not work in the background. The program does capture the spool number, but the PDF created is empty. The program did work in the background before the upgrade. Has anyone else experienced this? Any suggestions?
Regards,
GregHello,
Check below note.
1667737 - RSTXPDFT4: Conversion in background terminates
Also, as per note check user profile for default printer.
Regards,
Sameer -
How to print the top of page part along with the ALV list and generate PDF
HI all,
I have created one ALV by using oops concept .
and also am able to get the top of page where I have One standard logo on the right hand side
and some details on the left side .
Now my requirement is to while printing the list the logo and other top of page details should appear
In the PDF output but currently while am pressing the print preview button only the alv data is coming
am already using the method
handle_top_of_page
FOR EVENT print_top_of_page
OF cl_gui_alv_grid,
may be am missing something ... How to get the top of page along with the logo printed ?Hi Surya,
After generating the grid display click on print button,
a spool number is generated. capture the spool number and convert it to pdf using the fm:
CONVERT_ABAPSPOOLJOB_2_PDF and save the file
Hope this will solve your problem.
Regards,
R K. -
hi all,
I am having a single alv report which should run in background & generate spool and after data convert the spool to pdf and send to mail. I want all these in a single alv report & it should be schedule in background.
First I copied the ALV report code then after I used the FM CONVERT_ABAPSPOOLJOB_2_PDF,
SO_DOCUMENT_SEND_API1 subsequently.
I have done so but the spool is not getting generated for my ALV.
I want helpHi,
I have output multiple ALV lists to spool using the following procedure. OO ALV is displayed during foreground, but not in background. I hope your standards permit that.
Code: Select all
form print_data.
data: l_repid like sy-repid,
t_events type slis_alv_event occurs 0 with header line.
if cb_srpls = '' and cb_cnsmt = ''.
exit.
endif.
l_repid = sy-repid.
g_usage_disp_var-report = l_repid.
g_usage_disp_var-variant = p_usglyt.
g_srpls_disp_var-report = l_repid.
g_srpls_disp_var-variant = p_srplyt.
When the report was run in background, we display the ALV list two
times. One time for consumption and another time for surplus. In
order to accomplish that, we display the second list during the
END-OF-LIST event of the first list. Depending on which list the user
want displayed, this logic becomes little tricky.
if sy-batch = 'X'.
if cb_srpls = 'X'. "We want surplus to be displayed
if cb_cnsmt = 'X'. "We want the consumption also
t_events-name = slis_ev_end_of_list.
t_events-form = 'DISPLAY_SURPLUS_LIST'.
append t_events.
else.
perform display_surplus_list.
endif.
endif.
if cb_cnsmt = 'X'.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_callback_program = l_repid
i_structure_name = 'ZSS_MAT_SURPLUS1'
i_save = 'X'
is_variant = g_usage_disp_var
it_events = t_events[]
tables
t_outtab = t_usage_catg.
if sy-subrc <> 0.
exit.
endif.
endif.
else.
call screen '0100'.
endif.
endform. " print_data
FORM display_surplus_list *
form display_surplus_list.
data: l_layout type slis_layout_alv.
l_layout-list_append = 'X'.
l_layout-colwidth_optimize = 'X'.
call function 'REUSE_ALV_LIST_DISPLAY'
exporting
i_structure_name = 'ZTM_MAT_SURPLUS'
i_save = 'X'
is_layout = l_layout
is_variant = g_srpls_disp_var
tables
t_outtab = t_surplus.
if sy-subrc <> 0.
exit.
endif.
endform.
Regards,
Jagadish -
ALV output converted into PDF format and send that PDF to user through mail
Hi Experts,
I have report earlier its output was in alv grid.
Now i want that ALV output converted into PDF format.And that PDF output send to user through mail.
Can u please tell how to do?
My code is here(output is displaying in ALV grid).
INCLUDE <icon>.
TYPE-POOLS: slis, kkblo.
TABLES : zmsd_freight_hdr, zmsd_freight_det, zmsd_blinfo, zmsd_diheader.
TABLES : lfa1.
DATA : t_hdr LIKE zmsd_freight_hdr OCCURS 0 WITH HEADER LINE,
T_DET LIKE ZMSD_FREIGHT_DET OCCURS 0 WITH HEADER LINE,
t_bl LIKE zmsd_blinfo OCCURS 0 WITH HEADER LINE,
t_di LIKE zmsd_diheader OCCURS 0 WITH HEADER LINE.
DATA: BEGIN OF t_det OCCURS 0.
INCLUDE STRUCTURE zmsd_freight_det.
DATA type(30).
DATA: END OF t_det.
DATA: v_target2(30),
v_zsammg LIKE t_det-zsammg,
v_gsttotal LIKE t_det-zamount.
DATA : BEGIN OF t_data OCCURS 0,
zsammg LIKE zmsd_freight_hdr-zsammg,
zdidbl LIKE zmsd_freight_hdr-zdidbl,
zvkorg LIKE zmsd_freight_hdr-zvkorg,
zinvno LIKE zmsd_freight_hdr-zinvno,
zttlamt LIKE zmsd_freight_hdr-zttlamt,
zstatus LIKE zmsd_freight_hdr-zstatus,
ztype LIKE zmsd_freight_hdr-ztype,
zconfirm LIKE zmsd_freight_hdr-zconfirm,
zconfirmdate LIKE zmsd_freight_hdr-zconfirmdate,
erdat LIKE zmsd_freight_hdr-erdat,
ernam LIKE zmsd_freight_hdr-ernam,
erzet LIKE zmsd_freight_hdr-erzet,
aedat(10),
aenam LIKE zmsd_freight_hdr-aenam,
aezet LIKE zmsd_freight_hdr-aezet,
zline LIKE zmsd_freight_det-zline,
zfptype LIKE zmsd_freight_det-zfptype,
zchrcode LIKE zmsd_freight_det-zchrcode,
zcurcode LIKE zmsd_freight_det-zcurcode,
zqty LIKE zmsd_freight_det-zqty,
zuom LIKE zmsd_freight_det-zuom,
zrate LIKE zmsd_freight_det-zrate,
zamount LIKE zmsd_freight_det-zamount,
zexrate LIKE zmsd_freight_det-zexrate,
zccode LIKE zmsd_blinfo-zccode, "MADK991565
zccode like ZMSD_FREIGHT_HDR-zfcode, "MADK991565
zbldate(10),
zbl LIKE zmsd_blinfo-zbl,
type(3),
waerk LIKE zmsd_freight_det-zcurcode,
zamountl LIKE zmsd_freight_det-zamount,
END OF t_data.
DATA : w_layout TYPE slis_layout_alv,
w_catalog TYPE slis_fieldcat_alv,
t_catalog TYPE slis_t_fieldcat_alv,
w_sort TYPE slis_sortinfo_alv,
t_sort TYPE slis_t_sortinfo_alv.
DATA V_ZINVNO like T_HDR-ZINVNO. "MADK991565
DATA : v_count TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK a0 WITH FRAME TITLE text-001.
PARAMETERS : p_zvkorg LIKE zmsd_freight_hdr-zvkorg OBLIGATORY .
SELECT-OPTIONS : s_zdidbl FOR zmsd_freight_hdr-zdidbl ,
s_zccode FOR lfa1-lifnr ,
s_status FOR zmsd_freight_hdr-zstatus ,
s_ztype FOR zmsd_freight_hdr-ztype ,
s_erdat FOR zmsd_freight_hdr-erdat ,
s_ernam FOR zmsd_freight_hdr-ernam ,
s_zconfd FOR zmsd_freight_hdr-zconfirmdate .
PARAMETERS : p_zconf AS CHECKBOX .
SELECTION-SCREEN END OF BLOCK a0.
SELECTION-SCREEN BEGIN OF BLOCK a1 WITH FRAME TITLE text-002.
PARAMETERS : p_hdr RADIOBUTTON GROUP rad DEFAULT 'X' ,
p_det RADIOBUTTON GROUP rad .
SELECTION-SCREEN END OF BLOCK a1.
INITIALIZATION.
AT SELECTION-SCREEN.
START-OF-SELECTION.
PERFORM get_data.
PERFORM process.
PERFORM display.
END-OF-SELECTION.
PERFORM fm_get_num_pages.
AT USER-COMMAND.
AT LINE-SELECTION.
TOP-OF-PAGE.
PERFORM fm_top_of_page USING '7010' sy-title space.
FORM get_data.
SELECT *
FROM zmsd_freight_hdr
INTO TABLE t_hdr
WHERE zvkorg EQ p_zvkorg
AND zdidbl IN s_zdidbl
AND zstatus IN s_status
AND ztype IN s_ztype
AND erdat IN s_erdat
AND ernam IN s_ernam
AND zconfirmdate IN s_zconfd
AND ZFCODE IN S_ZCCODE. "MADK991565
IF p_zconf = 'X'.
DELETE t_hdr WHERE zconfirm NE 'C'.
ENDIF.
CHECK NOT t_hdr[] IS INITIAL.
SELECT *
FROM zmsd_blinfo
INTO TABLE t_bl
FOR ALL ENTRIES IN t_hdr
WHERE zsammg = t_hdr-zsammg.
SORT t_bl BY zsammg.
SELECT *
FROM zmsd_diheader
INTO TABLE t_di
FOR ALL ENTRIES IN t_hdr
WHERE zsammg = t_hdr-zsammg.
SORT t_di BY zsammg.
IF P_DET = 'X'. "MADK933361
SELECT *
FROM zmsd_freight_det
INTO TABLE t_det
FOR ALL ENTRIES IN t_hdr
WHERE zsammg = t_hdr-zsammg
AND ZINVNO = T_HDR-ZINVNO . "MADK991565
SORT t_det BY zsammg zline. "MADK991565
SORT T_DET BY ZSAMMG ZINVNO ZLINE. "MADK991565
ENDIF. "MADK933361
ENDFORM.
FORM process.
REFRESH t_data.
CLEAR v_gsttotal. "MADK933361
LOOP AT t_hdr.
Start of MADK933361
CLEAR: v_target2.
v_zsammg = t_hdr-zsammg.
V_ZINVNO = T_HDR-ZINVNO. "MADK991565
AT NEW zsammg. "MADK991565
AT NEW ZINVNO. "MADK991565
PERFORM get_gst_value.
ENDAT.
End of MADK933361
PERFORM move_header.
CHECK t_data-zccode IN s_zccode.
IF p_det = 'X'.
CSF Project Changes Starts DEV34 MADK985782
LOOP AT T_DET WHERE ZSAMMG = T_HDR-ZSAMMG..
LOOP AT t_det WHERE zsammg = t_hdr-zsammg AND
zinvno = t_hdr-zinvno.
CSF Project Changes Ends DEV34 MADK985782
PERFORM move_header.
CHECK t_data-zccode IN s_zccode.
MOVE-CORRESPONDING t_det TO t_data.
t_data-zamountl = t_data-zamount * t_data-zexrate.
APPEND t_data.
CLEAR t_data.
ENDLOOP.
ELSE.
APPEND t_data.
CLEAR t_data.
ENDIF.
AT END OF zsammg.
CLEAR v_gsttotal.
ENDAT.
*Start of changes for IS090901289-PIA MADK991565
AT END OF ZINVNO.
CLEAR V_GSTTOTAL.
ENDAT.
*End of changes for IS090901289-PIA MADK991565
ENDLOOP.
ENDFORM.
FORM move_header.
MOVE-CORRESPONDING t_hdr TO t_data.
t_data-zttlamt = t_data-zttlamt + v_gsttotal. "MADK933361
t_data-waerk = 'SGD'.
IF NOT t_hdr-aedat IS INITIAL.
WRITE: t_hdr-aedat TO t_data-aedat.
ELSE.
CLEAR : t_data-aedat.
ENDIF.
READ TABLE t_bl WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
IF sy-subrc EQ 0.
t_data-zccode = t_bl-zccode. "MADK991565
T_DATA-ZCCODE = T_HDR-ZFCODE. "MADK991565
IF NOT t_bl-zbldate IS INITIAL.
WRITE: t_bl-zbldate TO t_data-zbldate.
ENDIF.
t_data-zbl = t_bl-zbl.
t_data-type = 'DBL'.
ELSE.
READ TABLE t_di WITH KEY zsammg = t_hdr-zsammg BINARY SEARCH.
IF sy-subrc EQ 0.
t_data-zccode = t_di-zdiforcode. "MADK991565
T_DATA-ZCCODE = T_HDR-ZFCODE. "MADK991565
t_data-type = 'DI'.
ENDIF.
ENDIF.
ENDFORM.
FORM display.
IF t_data[] IS INITIAL.
MESSAGE s398(00) WITH 'No Data Selected'.
EXIT.
ENDIF.
DATA : l_repid LIKE sy-repid.
l_repid = sy-repid.
REFRESH t_catalog.
CLEAR t_catalog.
w_layout-cell_merge = 'X'.
PERFORM map_fields.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_user_command = 'ALV_USER_COMMAND'
is_layout = w_layout
it_fieldcat = t_catalog[]
i_grid_title = sy-title
i_save = 'A'
it_sort = t_sort[]
TABLES
t_outtab = t_data
EXCEPTIONS
program_error = 1
OTHERS = 2.
IF sy-subrc <> 0.
ENDIF.
ENDFORM.
FORM map_fields.
Sort Order
CLEAR v_count.
PERFORM sf USING 'ZDIDBL' 'X' 'X'.
Fields to be displayed
CLEAR v_count.
IF p_hdr = 'X'.
PERFORM af USING :
DESCRIPTION FIELD LEN RTABLE RFIELD
'DI/DBL ' 'ZDIDBL' '14' ' ' ' ',
'Type ' 'TYPE' '04' ' ' ' ',
'Forwarder Code ' 'ZCCODE' '14' ' ' ' ',
'BL Number ' 'ZBL' '14' ' ' ' ',
'BL Date ' 'ZBLDATE' '10' ' ' ' ',
'Invoice Number ' 'ZINVNO' '15' ' ' ' ',
'Extraction ' 'ZSTATUS' '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
'Freight Type ' 'ZTYPE' '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE ',
'Confirmation ' 'ZCONFIRM' '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
'Confirm Date ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
'ZCONFIRMDATE',
'Total Amount ' 'ZTTLAMT' '18' ' ' ' ',
'Created On ' 'ERDAT' '10' ' ' ' ',
'Created By ' 'ERNAM' '10' ' ' ' ',
'Changed On ' 'AEDAT' '10' ' ' ' ',
'Changed By ' 'AENAM' '10' ' ' ' '.
ELSE.
PERFORM af USING :
DESCRIPTION FIELD LEN RTABLE RFIELD
'DI/DBL ' 'ZDIDBL' '14' ' ' ' ',
'Type ' 'TYPE' '04' ' ' ' ',
'Forwarder Code ' 'ZCCODE' '14' ' ' ' ',
'BL Number ' 'ZBL' '14' ' ' ' ',
'BL Date ' 'ZBLDATE' '10' ' ' ' ',
'Invoice Number ' 'ZINVNO' '15' ' ' ' ',
'Extraction ' 'ZSTATUS' '05' 'ZMSD_FREIGHT_HDR' 'ZSTATUS ',
'Freight Type ' 'ZTYPE' '05' 'ZMSD_FREIGHT_HDR' 'ZTYPE ',
'Confirmation ' 'ZCONFIRM' '05' 'ZMSD_FREIGHT_HDR' 'ZCONFIRM',
'Confirm Date ' 'ZCONFIRMDATE' '10' 'ZMSD_FREIGHT_HDR'
'ZCONFIRMDATE',
'Total Amount ' 'ZTTLAMT' '18' ' ' ' ',
'Freight Payment ' 'ZFPTYPE' '14' ' ' ' ',
'Charge Code ' 'ZCHRCODE' '10' ' ' ' ',
'Currency ' 'ZCURCODE' '08' ' ' ' ',
'Quantity ' 'ZQTY' '13' ' ' ' ',
'UoM ' 'ZUOM' '04' ' ' ' ',
'Rate ' 'ZRATE' '15' ' ' ' ',
'Amt(Foreign Curr)' 'ZAMOUNT' '16' ' ' ' ',
'Exchange Rate ' 'ZEXRATE' '13' ' ' ' ',
'Amt(Local Curr) ' 'ZAMOUNTL' '16' ' ' ' ',
'Created On ' 'ERDAT' '10' ' ' ' ',
'Created By ' 'ERNAM' '10' ' ' ' ',
'Changed On ' 'AEDAT' '10' ' ' ' ',
'Changed By ' 'AENAM' '10' ' ' ' '.
ENDIF.
ENDFORM.
FORM af USING text
field
len
table
reffield.
v_count = v_count + 1.
w_catalog-col_pos = v_count.
w_catalog-fieldname = field.
w_catalog-ref_tabname = table.
w_catalog-ref_fieldname = reffield.
w_catalog-seltext_s = text.
w_catalog-seltext_m = text.
w_catalog-seltext_l = text.
w_catalog-outputlen = len.
IF field = 'ZTTLAMT' OR field = 'ZAMOUNTL'.
w_catalog-no_zero = 'X'.
w_catalog-cfieldname = 'WAERK'.
w_catalog-datatype = 'CURR'.
ENDIF.
IF FIELD = 'ZRATE' OR FIELD = 'ZAMOUNT'.
IF field = 'ZAMOUNT'.
w_catalog-no_zero = 'X'.
w_catalog-cfieldname = 'ZCURCODE'.
w_catalog-datatype = 'CURR'.
ENDIF.
IF field = 'ZQTY' OR field = 'ZRATE'.
w_catalog-no_zero = 'X'.
w_catalog-datatype = 'DEC'.
ENDIF.
APPEND w_catalog TO t_catalog.
CLEAR w_catalog.
ENDFORM.
FORM sf USING fieldname sortup group.
v_count = v_count + 1.
CLEAR w_sort.
w_sort-fieldname = fieldname.
w_sort-spos = v_count.
w_sort-up = sortup.
w_sort-group = group.
APPEND w_sort TO t_sort.
ENDFORM.
FORM alv_user_command USING in_ucomm LIKE sy-ucomm
in_selfield TYPE slis_selfield.
DATA: lfs_data LIKE t_data.
IF in_ucomm = '&IC1'.
READ TABLE t_data INDEX in_selfield-tabindex INTO lfs_data.
CHECK NOT lfs_data-zdidbl IS INITIAL.
IF lfs_data-type = 'DBL'.
DATA: l_zdbl LIKE zmsd_diheader-zdinum.
l_zdbl = in_selfield-value.
EXPORT l_zdbl TO MEMORY ID 'VBL'.
CALL TRANSACTION 'ZMSD_BL01'.
ENDIF.
IF lfs_data-type = 'DI'.
DATA: v_dinum LIKE zmsd_diheader-zdinum.
v_dinum = in_selfield-value.
EXPORT v_dinum TO MEMORY ID 'VDI'.
CALL TRANSACTION 'ZMSD_DI01'.
ENDIF.
ENDIF.
ENDFORM.
FORM get_gst_value.
LOOP AT t_det WHERE zsammg = v_zsammg
AND ZINVNO = V_ZINVNO. "MADK991565
CHECK t_data-zccode IN s_zccode.
t_det-zamount = t_det-zamount * t_det-zexrate.
SELECT SINGLE y0mmtarget2
INTO v_target2
FROM y0mmipstranslate
WHERE y0mmdatatype = '70' AND
y0mmsource = t_det-zchrcode.
SELECT SINGLE y0mmtarget1
INTO t_det-type
FROM y0mmipstranslate
WHERE y0mmdatatype = '76' AND
y0mmsource = v_target2.
IF t_det-type NE '3Z'.
v_gsttotal = v_gsttotal +
( t_det-zamount * 5 / 100 ).
ENDIF.
ENDLOOP.
Regards,
Raj.Hello,
Following is the procedure to convert alv output to spool and then it to PDF Format.
After we display the ALV, we can check whether it is running in the background using system field u2018sy-batchu2018. Then,we call an function module named u2018GET_JOB_RUNTIME_INFOu2019 to get the current job information. Then go to spool request table tbtcp to get the spool id.
Get current job details
CALL FUNCTION u2018GET_JOB_RUNTIME_INFOu2019
IMPORTING
eventid = gd_eventid
eventparm = gd_eventparm
external_program_active = gd_external_program_active
jobcount = gd_jobcount
jobname = gd_jobname
stepcount = gd_stepcount
EXCEPTIONS
no_runtime_info = 1
OTHERS = 2.
SELECT * FROM tbtcp
INTO TABLE it_tbtcp
WHERE jobname = gd_jobname
AND jobcount = gd_jobcount
AND stepcount = gd_stepcount
AND listident <> u20180000000000u2032
ORDER BY jobname
jobcount
stepcount.
READ TABLE it_tbtcp INTO wa_tbtcp INDEX 1.
Finally, we can call function module u2018CONVERT_ABAPSPOOLJOB_2_PDFu2018 to convert spool reqeust(which is stored in OTF format) to PDF format. Then we can call either function module u2018SO_DOCUMENT_SEND_API1u2032 or SAP BCS (Business Communication Service) to send the pdf as an email attachment.
CALL FUNCTION u2018CONVERT_ABAPSPOOLJOB_2_PDFu2019
EXPORTING
src_spoolid = gd_spool_nr
no_dialog = c_no
dst_device = c_device
IMPORTING
pdf_bytecount = gd_bytecount
TABLES
pdf = it_pdf_output
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
Regards,
Sayali
Edited by: Sayali Paradkar on Apr 20, 2010 12:51 PM -
While reading PDF document using Speak Screen option, iBooks doesn't turn pages automatically
I have been using the speak screen option in iOS 8 to read books and pdf documents in iBooks app. iBooks app turned pages automatically and kept on reading the screen till i updated my phone to iOS8.3. Now, the app stops reading the screen once the page is completed. I have to stop my vehicle, unlock phone, open iBooks app, swipe down with two fingers. It's irritating.
Earlier, I have read dozens of books and pdf documents using this function while doing exercise or routine tasks. now it's not possible unless someone helps.
Thanks for your support in advance.
Mukesh@Mukeshnnms
Unfortunately, I am having precisely the same issue since updating to iOS 8.3 with my iPhone 5s.
I just filled out a bug report here > https://www.apple.com/feedback/iphone.html, which I've often read on these forums is the best way to get some resolution. I don't know if you read the list of "fixes" for 8.3 or not (here: iOS 8.3), but, it includes the following:
"Fixes an issue in Speak Screen where speech will not start again after pausing"
So...apparently, in fixing THAT problem, they broke something else. At least for some of us...
<Note to self: WAIT even longer than usual to do updates, read about bugs first.> -
Does anyone know how i can view PDF files using Galaxy Note 2?
Does anyone know how i can view PDF files using Galaxy Note 2?
This is what i have been doing;
I click on the file i wish to view (via a portal)
this file goes to notification widget (i drag down screen)
notification/message says download complete
i click on notification/message
nows it says complete action using (here i only have 2 icon options 1= DB Text Editor 2 = HTML Viewer)
I have installed Adobe Reader.Can you confirm if the downloaded file is a pdf file, that is it ends with .pdf?
-
How to extract text from a PDF file using php?
How to extract text from a PDF file using php?
thanks
fabio> Do you know of any other way this can be done?
There are many ways. But this out of scope of this forum. You can try this forum: http://forum.planetpdf.com/ -
How to generate a PDF output using batch file in 10G
Hello,
I am using .bat file to generate a report PDF output. I have done this many times in 6i but for 10G I am unable to do the same.
Can someone please look at the syntax below and let me know where I am going wrong.
I understand that reports are different for 6i and 10G specially .rep file but I am sure we should be able to generate a PDF file using 10G. Please let me know.
Thanks
IQ
Contents of .bat file follow
ECHO Opening parameter form. Please do not close this window.
C:\
FOR /F "tokens=1 " %%I IN ('time /t') DO (SET _TIME=%%I)
FOR /F "tokens=2 " %%I IN ('date /t') DO (SET _DATE=%%I)
SET EXP_DATE=%_DATE:~6,4%%_DATE:~0,2%%_DATE:~3,2%_%_TIME:~0,2%%_TIME:~3,2%
SET FILENAME=SEND_EMAIL_%EXP_DATE%_%USERNAME%.PDF
CD C:\Users\Documents
RWCONVERTER REPORT=C:\Users\Documents\send_email.rep USERID=scott/tiger@ORCL1 ORIENTATION=LANDSCAPE DESFORMAT=PDF DESTYPE=FILE
DESNAME=C:\Users\\%FILENAME% PRINTJOB =NORwconverter is not used to run reports:
rwconverter (Reports Converter) enables you to convert one or more report definitions or PL/SQL libraries from one storage format to another.
I think you mean rwrun:
rwrun (Reports Runtime) runs a report by starting its own in-process server (not to be confused with the default in-process Reports Server), which runs in the same JVM as the rwrun process.
This bat file has to run on the server. There is no Reports installation on the client anymore.
If you want to run a report from a client, you can make a bat file that calls the report url
See: http://download.oracle.com/docs/cd/E14571_01/bi.1111/b32121/pbr_cla002.htm#i634710 -
Urgent: Issue while displaying the PDF Reports Using XDO Common region
Hi all,
In our product code we are trying to display the PDF Reports, using the xdo common region.
Previously we were writing the pdf reports direclty onto the response direclty.
This displays the report onto the browser but if navigate throw browser back button, it doesn't displays the report as the response stream is empty while navigating through back button.
So to solve this issue, i tried to write the report using the OAHTMLWebBean and xdo common region. Here is the code:
ByteArrayOutputStream xdoOutput = new ByteArrayOutputStream();
XDOUtility.retrieveReport(xdoOutput,
parameters,
prop,
appMod
BlobDomain bxdoOutput = new BlobDomain();
bxdoOutput.setBytes(xdoOutput.toByteArray());
String redirectURL = DocumentHelper.getOutputURL(pageContext,
bxdoOutput,
"Report",
"PDF");
OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean (pageContext, OAWebBeanConstants.HTML_WEB_BEAN, null, "IFRAME");
outRegion.setHTMLAttributeValue("src", redirectURL);
outRegion.setHTMLAttributeValue("width", "100%");
outRegion.setHTMLAttributeValue("height", "100%");
outRegion.setHTMLAttributeValue("title","Report");
outRegion.setHTMLAttributeValue("name","Report");
pageContext.getPageLayoutBean().addIndexedChild(outRegion);
This successfully displays the report in the XDO Common region. But now the issue is that there are hyperlinks in the Report displayed where from where the user can navigate to other detail pages.
When we click on these links, a new session starts in the xdo common region.
Is it possible that when the user click the links in the report displayed, instead of starting a new session in the xdo region, the detail pages is displayed with in the older session.
Regards
SandeepHi all,
In our product code we are trying to display the PDF Reports, using the xdo common region.
Previously we were writing the pdf reports direclty onto the response direclty.
This displays the report onto the browser but if navigate throw browser back button, it doesn't displays the report as the response stream is empty while navigating through back button.
So to solve this issue, i tried to write the report using the OAHTMLWebBean and xdo common region. Here is the code:
ByteArrayOutputStream xdoOutput = new ByteArrayOutputStream();
XDOUtility.retrieveReport(xdoOutput,
parameters,
prop,
appMod
BlobDomain bxdoOutput = new BlobDomain();
bxdoOutput.setBytes(xdoOutput.toByteArray());
String redirectURL = DocumentHelper.getOutputURL(pageContext,
bxdoOutput,
"Report",
"PDF");
OAHTMLWebBean outRegion = (OAHTMLWebBean)createWebBean (pageContext, OAWebBeanConstants.HTML_WEB_BEAN, null, "IFRAME");
outRegion.setHTMLAttributeValue("src", redirectURL);
outRegion.setHTMLAttributeValue("width", "100%");
outRegion.setHTMLAttributeValue("height", "100%");
outRegion.setHTMLAttributeValue("title","Report");
outRegion.setHTMLAttributeValue("name","Report");
pageContext.getPageLayoutBean().addIndexedChild(outRegion);
This successfully displays the report in the XDO Common region. But now the issue is that there are hyperlinks in the Report displayed where from where the user can navigate to other detail pages.
When we click on these links, a new session starts in the xdo common region.
Is it possible that when the user click the links in the report displayed, instead of starting a new session in the xdo region, the detail pages is displayed with in the older session.
Regards
Sandeep -
How to read pdf files using java.io package classes
Dear All,
I have a certain requirement that i should read and write PDF files at runtime. With normal java file IO reading is not working. Can any one suggest me how to proceed probably with sample code block
Thanks in advance.hi I also have the pbm. to read pdf file using JAVA
can any body help meWhy is it so difficult to read the thread you posted in? They say: java.io is pointless, use iText. So why don't you?
or also I want to read a binary encoded data into
ascii,
can anybody give me a hint how to do it.Depends on what you mean with "binary encoding". ASCII's binary encoding, too, basically. -
How do I open to a specific page or destination in a pdf file using Buddy API Xtra?
Hello,
I'm working with a CD ROM catalog that utilizes the Buddy API Xtra to open PDF files when a link is clicked. The client would like to be able to open to a specific page within a pdf file.
I can open a pdf file using the Buddy API baOpenfile() function but I'm having trouble opening to a specific page when I add #page=4:
baOpenfile("@\pdfs\Powder Cores\Magnetics_Powder_Core_Catalog_2011.pdf#page=4","normal")
I've also tried working with the code below which seems to me like it should work... I didn't realize that the "open..." part of it was a function in Director.
on mouseUp me
pageNum = 4
theApp = baShortFileName(baFindApp("pdf"))
theDoc = baShortFileName("@\pdfs\Powder Cores\Magnetics_Powder_Core_Catalog_2011.pdf")
theArgs = "/s /A page=" & string(pageNum) & "&pagemode=bookmarks"
-- (translates to "/A page=4" in this example)
open theApp && theArgs && theDoc
end
Thoughts?
Thank you in advance!Thank you Dee! This works perfect!
It would be cool to know how to use bashell() for this.
The help files give the following examples:
Result = baShell( Operation, Filename, Args, WorkDir, State )
ok = baShell( "open", "c:\windows\notepad.exe", "myfile.txt" , "", "normal" )
ok = baShell( "edit", "myfile.htm" , "", "", "normal" )
So I tried:
on mouseUp me
-- Close the program group
tWindowList = baWindowList( "" , "pdf" , false )
if tWindowList <> [] and count(tWindowList) > 0 then baCloseWindow(tWindowList[1])
pageNum = 4
theApp = baFindApp("pdf")
theDoc = _movie.path & "pdfs\Powder Cores\Magentics Powder Core Catalog.pdf"
theArgs = "/A ""E&"page="&string(pageNum)&"=OpenActions""E
baShell( "open", theApp, theDoc , theArgs, "normal" )
end
It opens the pdf file without going to a specific page. Any thoughts as to why it wouldn't accept theArgs?
Thanks again! -
How to send the ALV GRID output to spool by using the print button in std t
How to send the ALV GRID output to spool by using the print button in standard tool bar.
We have created a button in the va02 transaction. If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept. But i am unable to send the output to spool using the print button in the standard tool bar.
I am able to display the Print parameter dialog box but i am not able to send it to spool.
Kindly help.
Thanks In Advance.
G.V.RamanaHi Shaik,
There is not properties button in my print screen.
MODULE user_command_0900 INPUT.
WHEN 'EXCEL'.
PERFORM excel_download.
WHEN 'PRI'.
PERFORM print_output.
form Print_output.
CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
EXPORTING
columns = 80
device = 'ANY '
lines = 65
maxpenality = 1999
TABLES
layouts = lt_layouts1
EXCEPTIONS
unknown_device = 1
OTHERS = 2.
IF sy-subrc = 0.
LOOP AT lt_layouts1.
IF lt_layouts1-penality < 1000 AND
lt_layouts1-penality < l_min_penality.
l_layout = lt_layouts1-layout.
l_min_penality = lt_layouts1-penality.
ENDIF.
ENDLOOP.
IF NOT l_layout IS INITIAL.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
mode = 'CURRENT'
line_size = 80 "#EC *
new_list_id = l_new_list_id
no_dialog = l_no_dialog
layout = l_layout
IMPORTING
out_archive_parameters = rs_arc_params
out_parameters = rs_pri_params
valid = l_valid
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4.
IF sy-subrc NE 0. " INS SLIN
ENDIF. " INS SLIN
IF rs_pri_params-linsz LT 80 OR
rs_pri_params-linsz LT gt_stack-s_lprint-width.
gt_stack-print_line_break = 'X'.
ELSE.
CLEAR gt_stack-print_line_break.
ENDIF.
IF l_valid NE 'X'.
rs_pri_params = ls_pri_params_sav.
rs_arc_params = ls_arc_params_sav.
ENDIF.
ENDIF.
ENDIF.
endform. " Print_output
CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
EXPORTING
is_layout = gs_layout_cost_tot_grand
CHANGING
it_fieldcatalog = gt_fcat_cost_tot_grand[]
it_outtab = gt_cost_tot_grand[].
Please check my code -
How do I get multiple people to sign a PDF form using a Touchscreen PC?
I have created a PDF form, using Acrobat XI Pro, to record a client training session. The form is being completed using Adobe Reader (on a Panasonic Touchbook running Windows 7), so I have extended it to allow saving and signing. On the form I have a digital signature field for each trainee (next to a text field for their name) and a digital signature field for the trainer.
Creating a proper digital signature, signable using a password, is fine for the trainer, but the trainees will only be seen once. Often/usually they do not have email addresses so emailing for a signature, using EchoSign/DocuSign is out, but I have a touch-screen computer so should just be able to pass it round for a quick signature. Also, the form will be completed offline, with the trainer turning up on a site, not having access to the internet.
Clicking on the signature field does not provide a way to create the handwritten signature, and although the sign tab shows EchoSign in Adobe reader, allowing you to create such a signature this is shown as disabled (I imagine because I have extended the form).
This is the last piece to the puzzle. Any ideas?
Thank,
Len
p.s. I did see a version using a flash object on ADEP 10, http://forums.adobe.com/message/3998457#3998457 but this seems a little hacky, plus I would prefer to use acrobat Pro because it does everything else I want it to do.I have created a PDF form, using Acrobat XI Pro, to record a client training session. The form is being completed using Adobe Reader (on a Panasonic Touchbook running Windows 7), so I have extended it to allow saving and signing. On the form I have a digital signature field for each trainee (next to a text field for their name) and a digital signature field for the trainer.
Creating a proper digital signature, signable using a password, is fine for the trainer, but the trainees will only be seen once. Often/usually they do not have email addresses so emailing for a signature, using EchoSign/DocuSign is out, but I have a touch-screen computer so should just be able to pass it round for a quick signature. Also, the form will be completed offline, with the trainer turning up on a site, not having access to the internet.
Clicking on the signature field does not provide a way to create the handwritten signature, and although the sign tab shows EchoSign in Adobe reader, allowing you to create such a signature this is shown as disabled (I imagine because I have extended the form).
This is the last piece to the puzzle. Any ideas?
Thank,
Len
p.s. I did see a version using a flash object on ADEP 10, http://forums.adobe.com/message/3998457#3998457 but this seems a little hacky, plus I would prefer to use acrobat Pro because it does everything else I want it to do.
Maybe you are looking for
-
Tecra A9 - Is it possible to upgrade the video card?
Hey there, I have a Tecra A9 PTS52E and it has Intel integrated graphics. I've read that this means I might not be able to upgrade to a better graphics card. Is this true? Thanks
-
Logic Crashing, food for thought...
I posted this in another thread, but thought it might be worth posting separately. First, keeping in mind that crashes probably happen to Logic users all around the world running different versions on different computers with varying amounts of plugs
-
Recently had router replaced with BT Homehub 5 because of damage from electrical storm. Ever since then HP Officejet 6700 keeps dropping wireless connection and I have to reinstall. Can anyone help please?
-
Assignment field in FB03 is updated with a TM PO, and not the material PO
Hi Experts, I am facing an issue. Issue: The assignment field in accounting document generated during GR is updated with the TM PO number(Trade PO) and not the Material PO . this happens while Posting goods receipt in VL32N tcode. Please let me know
-
Can't Install Photoshop CS6 Trial?
Hello, I'm having trouble installing the trial mode for Photoshop CS6. I have already logged in through the installer then clicked the download link again, but it asks me to log in again (the installer) instead of installing it. Please help me out! T