Pdf output from abap spool
Would like to know how to use the spool at the backend to create the pdf output in webdynpro. Thanks
Appreciate if anyone can help me on this. Thanks!!
Similar Messages
-
How can I print PDF attachments from ABAP report in transaction ME23N?
Hi,
Users attach PDF files using "services for objects" in transaction ME23N.
How can I print the PDF attachments from ABAP report ?
Thanks in advance,,Hi,
check this link,this might help you to solve your problem
/people/thomas.jung3/blog/2005/04/28/setting-up-an-adobe-writer-for-abap-output
Regards
Kiran Sure -
Facing challenges during creation of replica of .IDF file/Pdf output from 4.7 system into of Adobe forms in ECC 6.0 system.
If anybody has easy way to make those forms...
Please suggest...Hi Shabeer,
the first thing is that you are running on a very very low RAM.
For ECC 6.0 with dual stack SAP System to run you should have atleast 4 GB of RAM.
For your Dispatcher issue kindly check the status of your Oracle database and the connection from SAP To Database.
You can check the oracle status using brtools utility.
Regards,
Prem -
Layout to be generated as PDF output in a Spool
Hi ,
I am generating a layout using smartform. My requirement is layout has to be generated as PDF output in a Spool.
Please let me know how to write the code in my driver program to generate the spool or any FMs related to this.
Thanks in advance.
Regards,
Jyothi
<MOVED BY MODERATOR TO THE CORRECT FORUM>
Edited by: Alvaro Tejada Galindo on Jul 14, 2009 12:44 PMhi
use below sample code hope this may help u out
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
IMPORTING
fm_name = fname
CALL FUNCTION fname
IMPORTING
job_output_info = impdata..
i_itcoo[] = impdata-otfdata[].
CALL FUNCTION 'CONVERT_OTF_2_PDF'
EXPORTING
use_otf_mc_cmd = 'X'
IMPORTING
bin_filesize = binsize
TABLES
otf = i_itcoo
doctab_archive = idocs
lines = t_pdf
EXCEPTIONS
err_conv_not_possible = 1
err_otf_mc_noendmarker = 2
OTHERS = 3.
CALL METHOD cl_gui_frontend_services=>file_save_dialog
CHANGING
filename = filename
path = path
fullpath = fullpath.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = bin
filename = fullpath
filetype = 'BIN'
TABLES
data_tab = t_pdf
EXCEPTIONS
OTHERS = 99.
thank you
surya -
Create PDF output from Web Layout Report
Is there a way I can create a PDF output from a Web Layout Report? (NOT from a Paper Layout). The reason I ask because editing on the .jsp Web Layout is very easy and flexible while editing on the Payer Layout is very difficult. Thanks.
- ToddHi Todd,
Please refer to this link:
paper layout & web layout
As for your second statement, it is a matter of opinion and I beg to differ that .... "Web Layout is very easy and flexible while editing on the Payer Layout is very difficult."
Best Regards,
John -
PDF output from payment program (trancode F110)
We currently use 3rd party software to create PDF files of individual remittance advices from the payment run program, by passing the spool output print stream to this software, which recognises each different vendor remittance, and creates a separate file for each one.
Due to cost restrictions, we want to no longer use the external software and want to do this all within SAP.
I have looked at various functions available to create PDF output, and think CONVERT_OTF_2_PDF is the one to use, however, when I have tried a simple test of this FM, it creates one pdf file for the spool output, but we need to create separate PDF files for each different remittance advice, per vendor.
Can someone suggest a way that we can do this?
Thanks,
Michael.
PS. I am an ABAPer.Hello,
Maybe you can start with Adobe forms in SAP, for printing the technology is free, it is quite an emerging one and there are plenty of tutorials. Maybe you can start from here: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c2567f2b-0b01-0010-b7b5-977cbf80665d and create your own customer forms.
Note there is SAP ADobe forms forum under NetWeaver and you can find me and other SAP Adobe people there.
Regards, Otto -
How to generate PDF output from OracleXMLQuery
I want to generate a PDF out put from XML by using JSP. For this i writen jsp and xsl. My jsp code works fine if i include html formated xsl and it displays as a text when i pass pdf formated xls.
Here i am providing my jsp code.
I don't want to use XSQL, please provide me information ASAP.
<%@ page import = "java.sql.*,oracle.xml.sql.query.OracleXMLQuery" %>
<% Connection conn = null;
Statement stmt = null;
ResultSet rset = null;
String dbURL = "jdbc:oracle:thin:@localhost:1521:oracle9i";
try{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
conn = DriverManager.getConnection(dbURL, "scott", "tiger");
stmt = conn.createStatement ();
rset = stmt.executeQuery ("SELECT * " +
"FROM scott.emp ORDER BY ename");
OracleXMLQuery xq = new OracleXMLQuery(conn, rset); %>
<% xq.setStyleSheet("emptablefo.xsl"); %>
<%= xq.getXMLString() %>
<% } catch (java.sql.SQLException e) { %>
SQL error: <%= e %>
<% }
finally {
if (stmt != null) stmt.close();
if (rset != null) rset.close();
if (conn != null) conn.close();
} %>
Thanks,
Ramana>
if the report output format is xls this code is generating the pdf output
>
looks like pdf is default output in template definition in xml publisher resp
so for r12 use FND_REQUEST.ADD_LAYOUT as example
v_request_id number;
xml_layout boolean;
xml_layout := FND_REQUEST.ADD_LAYOUT('XXCUSTOM','XXCONCNAME','en','00','EXCEL');
v_request_id := fnd_request.submit_request(application => 'XXCUSTOM',
program => 'XXCONCNAME',
description => NULL,
start_time => NULL,
sub_request => FALSE,
argument1 => p_date
);also see http://andyblg.wordpress.com/2012/08/23/run-concurrent-program-twice-with-different-layout-r12/ -
Best way to produce PDF output from Classic ASP
I have Adobe Professional 9.2 and LiveCycle ES Designer 8.1. I need to change a Classic ASP web application to produce a PDF report. The way I see it I have three options:
1) create native PDF output using open source libraries.
2) create an FDF form with Adobe Pro as a template and use FDF libraries from Adobe to substitute text in the template
3) create an XML form with LiveCycle as a template and do direct text substitution into the XML.
I created a PDF with LiveCycle and prior to saving, unchecked the "save PDF files compressed" in tools/options. I don't want any text boxes, just labels, and in some of the labels I will put distinguishable text. When the web application uses the template it will find various text strings in the XML stream and substitute.
What's the best way to do this? Is there a better way of doing substitution into the LiveCycle template? I would like to stay with LiveCycle. But from code samples I've seen, FDF substitution is very straightforward and possibly easier. I also thought LiveCycle is supposed to be the way to go instead of Adobe Pro. ThanksI cannot speak about theother methods but I can speak about the XFA method. In most cases people will bind the xml to the rawValue property of the field thereby filling the field with the value. However there are other bindable properties. Caption is one of them. first you have to turn on the Dynamic Properties. Click on th efield you want to control on on the Object palette click the icon as shown below:
A new menu will open like this:
Turn that option on and the Caption will turn a different color and will become a link. Click on the link and then you can map the caption to a node in your XML structure. This assumes that you have created a Data Connection to bind with.
Paul -
Grayscale pdf output from Illustrator (?)
Some of my real estate clients want me to do grayscale versions of their flyers in addition to the color version sometimes. Is there a way to take a cmyk pdf that was output from Illustrator (complete with vectors and images, etc) and output to a new grayscale pdf correctly? There seems to be no way to do that in Illustrator aside from editing them within the app (not the best way). Illustrator does a bad job with converting embedded/linked cmyk bitmap images to grayscale...they end up over-saturated and look incorrect.
Converting all vectors is easy with Ai CS3's Live Color, so no worries there. I'm just looking for an easy automated way to do this from the cmyk Ai file.Mr. Met wrote:
I thought that only applied to CS4 and/or snow leopard thing. I have CS3/OS 10.4.11 and have no problems printing to postscript.
Right, it's a problem in Snow Leopard. It looked to me as if you were answering the question of what method to use in Snow Leopard, and print to PS is problematic. For that matter, the result is the same if you print to PS and distill or do it in one step by printing to PDF if you use the same settings, so unless you use a watched folder for distiller, I can't see any reason to use two steps. -
I am asked to publish some WebHelp content as PDF prior to the infrastructure being available to publish WebHelp.
My wish is to publish it as PDF but not with a "Printed documentation" look. I want to create a PDFthat looks like Web pages. What is the best way to do this?
My thought is to publish to Word, then tweak and then save as PDF.
In RH 9 , what tools are available for creating a good-looking HTML output from Word?Thank you Peter. I don't need the PDF output to look exactly like my HTML (even if it were possible, which it isn't). But I want the PDF output to be in a style of presentation optimised for online reading and navigating (rather than printing). There seem to be a number of limitations with both the template and the CSS approach.
For example, I can force the page size and orientation of the PDF output by modifying the style map template. But some settings don't seem to come across: headers, footers, two-column layout. It seems that RH9 overrides these settings when it produces its "print" output. So the clean-up tasks post-generation render this effort impractical in cases where the source files will be changing frequently. I suppose a clever macro writer could automate the cleanup tasks, but I don't happen to have one at my disposal. -
Is any one else have issues with interactive PDF output from InDesign CC (2014)
I am currently trying to produce a document with a level of interactivity I have achieved many times before.
The interactivity is just a web style menu, show/hide the menu shows button set one, clicking on those shows a second set of buttons, and clicking in one of those goes to destination page and hides all menu buttons once more.
When output from ID CC 2014 the result is loads of missing buttons and no working menu.
Its not a corrupt ID file. I tried a brand new empty file, recreated basic structure with simple one state buttons and achieved similarly useless results.
If I back save using IDML and open in CS5, export from there, it works beautifully, so problem is not as many have been recently, to do with Acrobat browsers.
If I back save and open in InDesign CC (not 2014), export from there, it doesn't work, so problem is shared there!
Anybody any suggestions? Experienced similar and found a cure?
SOLVED BY A COLLEAGUE:
You can (no longer) use full stops/decimal points in button naming. Menu was hierarchically labelled as 1, (1.1, 1.2), (1.1.1, 1.1.2) etc.
Renamed 1_1, 1_1_2 etc and all functionality has returned. Why you could and now you can't, who knows!
Hope this helps you if you stumble across here with the same issue.Thank you for reporting this.
I would consider this a bug in InDesign CC v9.x and v10.x and would report it:
Adobe - Feature Request/Bug Report Form
(Cannot test it right now.)
Uwe -
How to generate a PDF document from ABAP program
Hi experts,
I have arequirement where in i need to create a PDF document using program. I have all the data collected into tables and i have used the calss CL_FP_PDF_OBJECT.
A pdf document is successfully created, but unable to open it because of some error. I guess some encryption is missing.
As an alternative I have created a smartform and generated its OTF data in my program and created a PDF. This is working fine.
But as per my requirement, i cannot go for a smart form.
Any help to resolve this issue will be highly appreciated.
Thanks & regards,
Asrar Ahamed MA
Infosys Tech. Ltd. INDIAHi Asrar ,
create a report with this Copy and give your program name in the selection screen whose output need to be in PDF.
*report zanusha_spool_to_pdf.
---TABLES----
tables:
tsp01.
---STRUCTURES---
data:
mstr_print_parms like pri_params,
mc_valid(1) type c,
mi_bytecount type i,
mi_length type i,
mi_rqident like tsp01-rqident.
---INTERNAL TABLES---
data:
mtab_pdf like tline occurs 0 with header line,
mc_filename like rlgrap-filename.
---SELECTION SCREEN---
parameters:
p_repid like sy-repid, " Report to execute
p_linsz like sy-linsz default 132, " Line size
p_paart like sy-paart default 'X_65_132'. " Paper Format
start-of-selection.
concatenate 'c:\'
p_repid
'.pdf'
into mc_filename.
*-- Explicitly set line width, and output format so that
*-- the PDF conversion comes out OK
mstr_print_parms-linsz = p_linsz.
mstr_print_parms-paart = p_paart.
*-- Make sure that a printer destination has been set up.
*-- If this is not done the PDF function module ABENDS
if mstr_print_parms-pdest = space.
mstr_print_parms-pdest = 'LOCL'.
endif.
*-- Setup the Print Parmaters
call function 'GET_PRINT_PARAMETERS'
exporting
authority = space
copies = '1'
cover_page = space
data_set = space
department = space
destination = space
expiration = '1'
immediately = space
in_archive_parameters = space
in_parameters = space
layout = space
mode = space
new_list_id = 'X'
no_dialog = 'X'
user = sy-uname
importing
out_parameters = mstr_print_parms
valid = mc_valid
exceptions
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
others = 4.
submit (p_repid) to sap-spool without spool dynpro
spool parameters mstr_print_parms
via selection-screen
and return.
*-- Find out the spool number
perform get_spool_number using sy-repid
sy-uname
changing mi_rqident.
*-- Convert Spool to PDF
call function 'CONVERT_ABAPSPOOLJOB_2_PDF'
exporting
src_spoolid = mi_rqident
no_dialog = space
dst_device = mstr_print_parms-pdest
importing
pdf_bytecount = mi_bytecount
tables
pdf = mtab_pdf
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.
*-- Download the file
call function 'DOWNLOAD'
exporting
bin_filesize = mi_bytecount
filename = mc_filename
filetype = 'BIN'
importing
act_filename = mc_filename
tables
data_tab = mtab_pdf.
FORM get_spool_number *
Get the most recent spool created by user/report *
--> F_REPID *
--> F_UNAME *
--> F_RQIDENT *
form get_spool_number using f_repid
f_uname
changing f_rqident.
data:
lc_rq2name like tsp01-rq2name.
concatenate f_repid+0(9)
f_uname+0(3)
into lc_rq2name.
select * from tsp01 where rq2name = lc_rq2name
order by rqcretime descending.
f_rqident = tsp01-rqident.
exit.
endselect.
if sy-subrc ne 0.
clear f_rqident.
endif.
endform." get_spool_number
Thanx
Anusha. -
Sending Data to PDF Forms from ABAP Program.
Hi Experts,
I left ABAP Programing for a while around 1+ years Due to some personal problems
Now I have struck up with new issue. Its ADOBE PDF forms.
I am Entirely new to this topic & knows about Nothing.
My requirement is to display a report in PDF form. Its totally Independent form from NACE.
I have written a Driver program & retrieved all the DATA into a Final internal table.
Now All that I need is to display the same Internal Table data into PDF form output.
Can anyone help me how to send this data(47 records in Internal table with 8 fields in Internal table) to PDF.
Please help me out Experts with any suggestions.
Thanks & Regards,
Dileep .CHi,
if u pass your internal table to smartform we can achieve . because we can convert smartform output into pdf easily.
Regards,
karthikeyan k s,
Edited by: karthikeyanks on Nov 19, 2010 12:58 PM -
Display Smartform Pdf output in ABAP Webdynpro application
Hello,
there is a solution for displaying Smartform output in Java Webdynpro application in this forum. Since i want to start an project in ABAP Webdynpro i need a solution for this technology since i don't want to recreate all the paperwork again using Adobe. Is there any solution available?
Thanks
Udo AhleHello,
this is the solution which i was able to implement using the hints given by Heidi and Thomas. Thank you for the support. With this solution it is possible to reuse oldstyle sapscripts and smartforms in todays environment. Here is the sample code which solves the problem:
In WDA you define for example a pushbutton to start the display of the PDF.
In the onaction method you implement:
method ONACTIONSHOW_PDF .
data LX_pdf type xstring.
* get PDF from existing sapscript or smatform
call function 'Y_PDF_GET' destination '46c'
IMPORTING
ex_PDF = LX_PDF.
* append the pdf to the response
cl_wd_runtime_services=>attach_file_to_response(
i_filename = 'Hello.PDF'
i_content = lx_pdf
i_mime_type = 'application/pdf'
i_in_new_window = 'X'
i_inplace = 'X' ).
endmethod.
The function 'Y_PDF_GET' is implemented as follows:
FUNCTION Y_PDF_GET .
*"*"Local interface:
*" EXPORTING
*" VALUE(EX_PDF) TYPE XSTRING
*" TABLES
*" ET_OTF STRUCTURE ITCOO OPTIONAL
data: lf_filesize type i,
lt_otf type table of ITCOO,
lt_lines type table of tline,
tline type tline.
* start sapscript or smatforms and return
perform make_otf.
CALL FUNCTION 'READ_OTF_FROM_MEMORY'
TABLES
OTF = lt_otf
EXCEPTIONS
MEMORY_EMPTY = 1
OTHERS = 2
et_otf[] = lt_otf.
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
FORMAT = 'PDF'
* MAX_LINEWIDTH = 132
* ARCHIVE_INDEX = ' '
IMPORTING
BIN_FILESIZE = lf_filesize
TABLES
OTF = lt_otf
LINES = lt_lines
EXCEPTIONS
ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
* convert tline to xstring as needed in
* in web dynpro
field-symbols <X>.
data: st(268) type c.
data l1 type i.
data len type i.
data maxline type i value 134.
l1 = 0.
loop AT lt_lines INTO tline.
clear st.
st+l1(maxline) = tline.
len = maxline + l1.
l1 = maxline - strlen( tline ).
ASSIGN st TO <x> TYPE 'X'.
CONCATENATE ex_pdf <x>(len) INTO ex_pdf.
endloop.
ENDFUNCTION.
The make_otf for sapscript is the following:
* the next attribute enables the otf output.
* no other output will be generated
<b>options-TDGETOTF = 'X'</b>
CALL FUNCTION 'OPEN_FORM'
EXPORTING
* APPLICATION = 'TX'
* ARCHIVE_INDEX = ARCHIVE_INDEX
ARCHIVE_PARAMS = ARCHIVE_PARAMS
DEVICE = DEVICE
DIALOG = ' '
FORM = FORM
LANGUAGE = language
OPTIONS = OPTIONS
* IMPORTING
* LANGUAGE =
* NEW_ARCHIVE_PARAMS =
* RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
OTHERS = 6.
*... make some write forms
data lT_OTF type table of ITCOO.
* get the otf data
CALL FUNCTION 'CLOSE_FORM'
* IMPORTING
* RESULT = result
TABLES
OTFDATA = lt_otf
EXCEPTIONS
UNOPENED = 1
OTHERS = 2.
* put otf into memory for later usage
if not lt_otf is initial.
CALL FUNCTION 'SAVE_OTF_TO_MEMORY'
* EXPORTING
* MEMORY_KEY = 'DEF_OTF_MEMORY_KEY'
TABLES
OTF = lt_otf.
endif.
For Smartforms technology it is possible to implement the same concept. -
Generate PDF format from ABAP List using 'RSPO_SR_OPEN'
Hi All,
I need some help on the following code. I have 2 cases.
First case:
I am using the function Module 'RSPO_SR_OPEN' to create spool from the List Output.
Once I get the Spool number from Above function Module I will submit it through report RSTXPDF5 to get spool request for PDF data created.
I will use this spool number in the report RSTXPDFT5 to download it to Local system in PDF format.
PDF will be generated but I am unable to open the PDF, some conversion error.
Second Case:
Instead of using function Module 'RSPO_SR_OPEN' , I will use standard Print button on the application toll bar to generate the spool number and then remaining step follows.
In this case PDF file is generating as per the requirement.
Now my question is why system does not work properly when I am using function module 'RSPO_SR_OPEN' .
I have attached the code for your reference:
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'EMAIL'.
IF SY-LSIND EQ 1.
Send mail to User ID
PERFORM SEND_MAIL.
LEAVE TO LIST-PROCESSING.
ENDIF.
WHEN 'MM03'.
SET PARAMETER ID 'MAT' FIELD I_MARA-MATNR.
CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
WHEN 'LIST'.
data: pdf_spoolid like tsp01-rqident.
data: gd_spool_nr1(11) type c,
gd_spool_nr2(10) type c.
RANGES : R_SPOOL FOR TSP01-RQTITLE.
Function Module to Create Spool Number
call function 'RSPO_SR_OPEN'
exporting
dest = c_device
LAYOUT = 'X_65_200'
copies = '1'
doctype = 'LIST'
importing
spoolid = gd_spool_nr
exceptions
operation_failed = 1
others = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Report to Generate spool number for PDF convert
submit RSTXPDF5 with spoolno = gd_spool_nr
with dstdevic = 'LOCL' and return .
if sy-subrc eq 0.
gd_spool_nr2 = gd_spool_nr.
condense gd_spool_nr2 no-gaps.
concatenate '00000' gd_spool_nr2 '*' into gd_spool_nr1.
R_SPOOL-LOW = gd_spool_nr1.
R_SPOOL-OPTION = 'CP'.
R_SPOOL-SIGN = 'I' .
APPEND R_SPOOL.
To select PDF Spool Number from TSP01 based on Title
select single * from tsp01 where rqtitle IN R_SPOOL.
if sy-subrc eq 0.
Report to Download PDF spool to GUI
submit RSTXPDFT5 with spoolid = tsp01-rqident and return.
endif.
endif.
ENDCASE.
Thanks & Regards,
NagarajHi,
Check this code,
REPORT Z_CREATE_PDF_ABAPLIST NO STANDARD PAGE HEADING.
PF-status containing a PDF button in the report Output to generate
PDF form
SET PF-STATUS 'Z_PDF'.
*Table Declarations
TABLES: MARA, MARC, MAKT.
Internal Table Declarations
DATA: BEGIN OF TS_MARA OCCURS 0,
MATNR LIKE MARA-MATNR,
MTART LIKE MARA-MTART,
MATKL LIKE MARA-MATKL,
LVORM LIKE MARA-LVORM,
WERKS LIKE MARC-WERKS,
MAKTX LIKE MAKT-MAKTX,
END OF TS_MARA.
Selection Screen Parameters
SELECTION-SCREEN BEGIN OF BLOCK B1.
SELECT-OPTIONS: S_MATNR FOR MARA-MATNR OBLIGATORY,
S_WERKS FOR MARC-WERKS OBLIGATORY.
SELECTION-SCREEN END OF BLOCK B1.
TOP-OF-PAGE.
write: 40 'Generating PDF from List Output' color 1 intensified on.
skip 1.
write: /1 'Date :', SY-DATUM,
/1 'User ID :', SY-UNAME,
/1(112) SY-ULINE.
START-OF-SELECTION.
Perform for Basic Selection
PERFORM GET_MARA.
Perform to Display Data
PERFORM DISPLAY_MARA.
AT USER-COMMAND.
User Command to generate PDF Form
AT USER-COMMAND.
CASE SY-UCOMM.
WHEN 'PDF'.
DATA: L_PARAMS TYPE PRI_PARAMS,
L_VALID TYPE STRING,
W_SPOOL_NR LIKE TSP01-RQIDENT.
TO GET PRINT PARAMETERS
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING
OUT_PARAMETERS = L_PARAMS
VALID = L_VALID.
IF SY-SUBRC <> 0.
ENDIF.
Internal table for Selection Screen
DATA: BEGIN OF I_RSPARAMS OCCURS 0.
INCLUDE STRUCTURE RSPARAMS.
DATA: END OF I_RSPARAMS.
Store the current selection screen details
CALL FUNCTION 'RS_REFRESH_FROM_SELECTOPTIONS'
EXPORTING
CURR_REPORT = SY-REPID
IMPORTING
SP =
TABLES
SELECTION_TABLE = I_RSPARAMS
EXCEPTIONS
NOT_FOUND = 1
NO_REPORT = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
SUBMIT TO GET THE SPOOL NUMBER
SUBMIT Z_CREATE_PDF_ABAPLIST WITH SELECTION-TABLE I_RSPARAMS
TO SAP-SPOOL
SPOOL PARAMETERS L_PARAMS
WITHOUT SPOOL DYNPRO
AND RETURN.
SELECT THE RECENTLY CREATED SPOOL
SELECT MAX( RQIDENT ) INTO W_SPOOL_NR FROM TSP01
WHERE RQCLIENT = SY-MANDT
AND RQOWNER = SY-UNAME.
*REPORT TO GENERATE SPOOL NUMBER FOR PDF CONVERT
SUBMIT RSTXPDF5 WITH SPOOLNO = W_SPOOL_NR
WITH DSTDEVIC = 'LOCL' AND RETURN .
IF SY-SUBRC EQ 0.
CLEAR W_SPOOL_NR.
SELECT THE RECENTLY CREATED SPOOL FOR PDF
SELECT MAX( RQIDENT ) INTO W_SPOOL_NR FROM TSP01
WHERE RQCLIENT = SY-MANDT
AND RQOWNER = SY-UNAME.
*REPORT TO DOWNLOAD PDF SPOOL TO GUI
SUBMIT RSTXPDFT5 WITH SPOOLID = W_SPOOL_NR
AND RETURN.
ENDIF.
ENDCASE.
*& Form GET_MARA
text
--> p1 text
<-- p2 text
FORM GET_MARA .
CLEAR : TS_MARA.
REFRESH: TS_MARA.
To select Materials based on Selection Criteria
SELECT A~MATNR A~MTART A~MATKL A~LVORM B~WERKS INTO CORRESPONDING
FIELDS OF TABLE TS_MARA FROM MARA AS A
INNER JOIN MARC AS B ON A~MATNR EQ B~MATNR
WHERE A~MATNR IN S_MATNR
AND B~WERKS IN S_WERKS.
LOOP AT TS_MARA.
SELECT SINGLE * FROM MAKT WHERE MATNR EQ TS_MARA-MATNR
AND SPRAS EQ SY-LANGU.
MOVE MAKT-MAKTX TO TS_MARA-MAKTX.
MODIFY TS_MARA INDEX SY-TABIX.
ENDLOOP.
ENDFORM. " GET_MARA
*& Form DISPLAY_MARA
text
--> p1 text
<-- p2 text
FORM DISPLAY_MARA .
CLEAR : TS_MARA.
WRITE: /1 '|', 2(18) 'Material Number' COLOR 7,
21 '|', 22(5) 'Plant ' COLOR 7,
28 '|', 29(13) 'Material Type ' COLOR 7,
42 '|', 43(14) 'Material Group ' COLOR 7,
57 '|', 58(13) 'Deletion Flag ' COLOR 7,
71 '|', 72(40) 'Description ' COLOR 7,
112 '|'.
WRITE: /1(112) SY-ULINE.
LOOP AT TS_MARA.
WRITE: /1 '|', 2(18) TS_MARA-MATNR,
21 '|', 22(5) TS_MARA-WERKS,
28 '|', 29(13) TS_MARA-MTART,
42 '|', 43(14) TS_MARA-MATKL,
57 '|', 58(13) TS_MARA-LVORM,
71 '|', 72(40) TS_MARA-MAKTX,
112 '|'.
WRITE: /1(112) SY-ULINE.
ENDLOOP.
ENDFORM. " DISPLAY_MARA
Thanks & Regards,
Nagaraj Kalbavi
Maybe you are looking for
-
I've already allowed photo sharing on my device (latest ios) but I cannot see the folder for photos on icloud. How do I get this to show up?
-
Report 2KEE does not reconcile with report KE5Z
Hi, Ran report 2KEE for period 1. Now I drill down in this report to see the details. The summary in report does not reconcile with sum of it's details. Report details reconcile with KE5Z for the same period and account. Kindly explain why 2kee summa
-
APEX 3.1.2 upgrade issue!!!
Hi, Interesting I just installed 11g (on Vmware) and updated APEX to 3.1.2. The script log seems without errors and the SELECT STATUS FROM DBA_REGISTRYWHERE COMP_ID = 'APEX'; shows VALID. BUT, I can't even login as admin on .../apex/apex_admin!!! And
-
Mail getting delayed up to a day.
Hi all- I'm having a weird problem where incoming mail is getting delayed sometimes upto a day. I can see in the logs that the mail is being sent and cryus delivering the message to the appropriate mailbox, yet the user doesn't get the message for so
-
Safari menu... fan slow down... Curious
I notice that when I open a pulldown menu or a bookmarks menu, the fan on my iMacG5 slows down. If I inadventantly leave a menu in the down position the fan continues to run at the slow speed. As soon as I click to close the dropdown menu, the fan re