How to create new spool request in smartforms??????
hi all,
i have to ctreate a new spool request for a smartform...
The driver program for this smartform is a standard program.
when i run the transaction, the spool for standard sap-script gets created but not for my smartform.
the code is something like this:-
wa_ssfcompop-TDDEST = 'LOCL'.
wa_ssfcompop-TDIMMED = space.
wa_ssfcompop-TDNEWID = 'X'.
wa_ssfcompop-TDFINAL = 'X'.
*wa_ssfcompop-XSF = 'X'.
wa_SSFCTRLOP-no_dialog = 'X'.
CALL FUNCTION v_fm_name
EXPORTING
CONTROL_PARAMETERS = wa_SSFCTRLOP
OUTPUT_OPTIONS = wa_ssfcompop
wa_rldri = xrldri
wa_rldrp = xrldrp
wa_rldru = xrldru
wa_t329p = xt329p
wa_resb = xresb
wa_rldrc = xrldrc
wa_vblkk = xvblkk
wa_vblkp = xvblkp
wa_rldrh = xrldrh
wa_rlvek = xrlvek
wa_reftab = xreftab
wa_lthu = xlthu
v_date = v_date
v_time = v_time
v_label = v_label
v_bzeit = v_bzeit
v_name1 = v_name1
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
it_rldri = xrldri
it_rldrh = xrldrh
it_rldrc = xrldrc
it_vblkk = it_vblkk
it_vblkp = it_vblkp
it_rldrp = it_rldrp
it_rldru = it_rldru
it_t329p = it_t329p
it_resb = it_resb
it_rlvek = it_rlvek
it_reftab = it_reftab
it_lthu = it_lthu
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc NE 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Help would be greatly appreciated and definitely rewarded
hi
good
Use the function module 'GET_PRINT_PARAMETERS'.
sample:
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
ARCHIVE_ID = C_CHAR_UNKNOWN
ARCHIVE_INFO = C_CHAR_UNKNOWN
ARCHIVE_MODE = C_CHAR_UNKNOWN
ARCHIVE_TEXT = C_CHAR_UNKNOWN
AR_OBJECT = C_CHAR_UNKNOWN
ARCHIVE_REPORT = C_CHAR_UNKNOWN
AUTHORITY = C_CHAR_UNKNOWN
copies = g_copies
COVER_PAGE = C_CHAR_UNKNOWN
DATA_SET = C_CHAR_UNKNOWN
department = ''
destination = g_destination
expiration = g_days
immediately = ' '
IN_ARCHIVE_PARAMETERS = ' '
IN_PARAMETERS = ' '
layout = 'X_65_200'
line_count = 65
line_size = 200
list_name = g_listname
list_text = g_listtext
MODE = ' '
new_list_id = 'X'
PROTECT_LIST = C_CHAR_UNKNOWN
no_dialog = 'X'
receiver = 'SAP*'
release = ' '
REPORT = C_CHAR_UNKNOWN
sap_cover_page = 'X'
HOST_COVER_PAGE = C_CHAR_UNKNOWN
PRIORITY = C_NUM1_UNKNOWN
SAP_OBJECT = C_CHAR_UNKNOWN
TYPE = C_CHAR_UNKNOWN
USER = SY-UNAME
USE_OLD_LAYOUT = ' '
UC_DISPLAY_MODE = C_CHAR_UNKNOWN
DRAFT = C_CHAR_UNKNOWN
ABAP_LIST = ' '
USE_ARCHIVENAME_DEF = ' '
DEFAULT_SPOOL_SIZE = C_CHAR_UNKNOWN
PO_FAX_STORE = ' '
NO_FRAMES = C_CHAR_UNKNOWN
IMPORTING
OUT_ARCHIVE_PARAMETERS =
out_parameters = g_params
valid = g_valid.
IF g_valid <> space.
NEW-PAGE PRINT ON PARAMETERS g_params NO DIALOG.
IF NOT tb_output3[] IS INITIAL.
LOOP AT tb_output3 INTO wa_output3.
PERFORM write_summary.
ENDLOOP.
ENDIF.
Reward if useful...
thanks
mrutyun^
Similar Messages
-
Hi all,
Can anybody tell me how to create a spool request for a background job programatically
Regards
Yathish
Message was edited by: Yathish
Rich thanks for your reply,
But there is no write statement in the backbround job. Can u please explain me how to do it in detail
Thanks in advance
Yathish
Yathish GundlupetThat's right, in order for a program to produce a spool request, it either must create a list output using WRITE statements, or it must produce a sapscript or smartform output.
In the first case, a simply WRITE statement at the end of your program will work.
WRITE:/ 'Program has completed successfully'.
Regards,
Rich Heilman -
How to create multiple spool requests at once?
We are setting up alarms in CCMS for when the spool is about to get full.
I want to create several thousand spools automatically to try the alarm settings out and make sure that it works.
This doesn't seem possible to do in SPAD, as only one spool is created, and the maximum to create at a time is 250.
It also seems that it the minimum value that the system takes is 99.000 so I'm not able to lower this value to make an easier percentage alarm test.
I would like to either fake the number of spools so that the alarm is triggered, or if anyone can explain how to create a job that increases the number of spoolrequests so that I can verify the alarm thersholds.
Thanks
TomasHi ..
One thing you can do. Create two separate test program. In one program write simple one write statement and from another program submit the previous prog via job .
do 1000 times.
call function 'JOB_OPEN'
exporting
jobname = l_name "Job Name
importing
jobcount = l_number "Job Number
exceptions
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
others = 4.
if sy-subrc = 0.
Submit the job in background
submit z2nd_prog
via job l_name number l_number and return.
if sy-subrc = 0.
call function 'JOB_CLOSE'
exporting
jobcount = l_number
jobname = l_name
strtimmed = 'X'
exceptions
cant_start_immediate = 1
invalid_startdate = 2
jobname_missing = 3
job_close_failed = 4
job_nosteps = 5
job_notex = 6
lock_failed = 7
others = 8.
enddo. -
How to create an spool request
Hi guys,
can any one tel me how to write an table content into an spool.
points wil be rewarded
ravi
nullWritten by Anon.
Friday, 26 January 2007
Comprehensive list of function modules and descriptions of what they do.....
ABAP_DOCU_DOWNLOAD
Download ABAP documentation in HTML format.
APPL_LOG_DELETE
With this function module you delete logs in the database according to specified selection conditions
APPL_LOG_DISPLAY
With this function module you can analyze logs in the database.
APPL_LOG_DISPLAY_INTERN
With this function module you can analyze logs in local memory, e.g. when you have only collected log records at runtime and do not want to write to the database.
APPL_LOG_INIT
This function module checks whether the specified object or sub-object exists and deletes all existing associated data in local memory.
APPL_LOG_READ_DB
With this function module you read the log data in the database for an object or sub-object according to specified selection conditions.
APPL_LOG_READ_INTERN
With this function module you read all log data whose log class has at least the specified value, from local memory, for the specified object or sub-object.
APPL_LOG_SET_OBJECT
With this function module, you create a new object or sub-object for writing in local memory. With a flag you can control whether the APPL_LOG_WRITE_... messages are written in local memory or are output on the screen.
APPL_LOG_WRITE_DB
With this function module you write all data for the specified object or sub-object in local memory to the database. If the log for the object or sub-object in question is new, the log number is returned to the calling program.
APPL_LOG_WRITE_HEADER
With this function module, you write the log header data in local memory.
APPL_LOG_WRITE_LOG_PARAMETERS
With this function module, you write the name of the log parameters and the associated values for the specified object or sub-object in local memory. If this function module is called repeatedly for the same object or sub-object, the existing parameters are updated accordingly. If you do not specify an object or sub-object with the call, the most recently used is assumed.
APPL_LOG_WRITE_MESSAGE_PARAMS
With this function module you write a single message, with parameters, in local memory. Otherwise the function module works like APPL_LOG_WRITE_SINGLE_MESSAGE.
APPL_LOG_WRITE_MESSAGES
With this function module you write one or more messages, without parameters, in local memory.
APPL_LOG_WRITE_SINGLE_MESSAGE
With this function module you write a single message, without parameters, in local memory. If no header entry has yet been written for the object or sub-object, it is created. If you do not specify an object or sub-object with the call, the most recently used is assumed.
ARFC_GET_TID
will return the IP address of the terminal in hex.
BAL_CNTL_CREATE
Create Control for log display
BAL_CNTL_FREE
Release Control
BAL_CNTL_REFRESH
Put new data in log display
BAL_DB_DELETE
Delete logs from the database
BAL_DB_DEQUEUE
Unlock log
BAL_DB_ENQUEUE
Lock log
BAL_DB_LOAD
Load logs from the database
BAL_DB_LOAD
Load log(s)
BAL_DB_SAVE
Save logs in the database
BAL_DB_SAVE
Save log(s)
BAL_DB_SAVE_PREPARE
Prepare save
BAL_DB_SEARCH
Find logs in the database
BAL_DSP_LOG_DISPLAY
Display messages in memory
BAL_DSP_LOG_DISPLAY
Display Log
BAL_DSP_LOG_PARAMETERS
Either output extended long text or call a callback routine (based on the data in BAL_S_LOG-PARAMS)
BAL_DSP_LOG_TECHNICAL_DATA
Output all log header data
BAL_DSP_MSG_LONGTEXT
Display message long text
BAL_DSP_MSG_PARAMETERS
Either output extended long text or call a callback routine (based on the data in BAL_S_MSG-PARAMS)
BAL_DSP_MSG_TECHNICAL_DATA
Output technical data of a message such as work area, error number, etc.
BAL_DSP_OUTPUT_FREE
End output
BAL_DSP_OUTPUT_INIT
Initialize output
BAL_DSP_OUTPUT_SET_DATA
Set dataset to be displayed
BAL_DSP_PROFILE_DETLEVEL_GET
Message hierarchy in DETLEVEL
BAL_DSP_PROFILE_NO_TREE_GET
Display without tree (fullscreen)
BAL_DSP_PROFILE_POPUP_GET
Display without tree (popup)
BAL_DSP_PROFILE_SINGLE_LOG_GET
Standard profile (SLG1) for one log
BAL_DSP_PROFILE_STANDARD_GET
Standard profile (SLG1) for a lot of logs
BAL_GLB_AUTHORIZATION_GET
Assign authorization
BAL_GLB_AUTHORIZATION_RESET
Reset authorization
BAL_GLB_CONFIG_GET
Read configuration
BAL_GLB_CONFIG_SET
Set configuration
BAL_GLB_MEMORY_EXPORT
Put function group memory in ABAP-MEMORY
BAL_GLB_MEMORY_IMPORT
Get function group memory from ABAP-MEMORY
BAL_GLB_MEMORY_REFRESH
(Partially) reset global memory
BAL_GLB_MEMORY_REFRESH
(Partially) initialize memory
BAL_GLB_MSG_CURRENT_HANDLE_GET
Get current message handle
BAL_GLB_MSG_DEFAULTS_GET
Get message defaults
BAL_GLB_SEARCH_LOG
Find logs in memory
BAL_GLB_SEARCH_MSG
Find messages in memory
BAL_LOG_CREATE
Create log with header data
BAL_LOG_CREATE
Create log with header data
BAL_LOG_DELETE
Delete log (from database also at Save)
BAL_LOG_EXIST
Check existence of a log in memory
BAL_LOG_HDR_CHANGE
Change log header
BAL_LOG_HDR_CHECK
Check log header data for consistency
BAL_LOG_HDR_READ
Read log header and other data
BAL_LOG_MSG_ADD
Put message in log
BAL_LOG_MSG_ADD
Put message in log
BAL_LOG_MSG_CHANGE
Change message
BAL_LOG_MSG_CHANGE
Change message
BAL_LOG_MSG_CHECK
Check message data for consistency
BAL_LOG_MSG_CUMULATE
Add message cumulated
BAL_LOG_MSG_DELETE
Delete message
BAL_LOG_MSG_DELETE
Delete message
BAL_LOG_MSG_EXIST
Check existence of a message in memory
BAL_LOG_MSG_READ
Read message and other data
BAL_LOG_MSG_REPLACE
Replace last message
BAL_LOG_REFRESH
Delete log from memory
BAL_LOG_REFRESH
Delete log from memory
BAL_MSG_DISPLAY_ABAP
Output message as ABAP-MESSAGE
BAL_OBJECT_SELECT
Read Application Log objects table record
BAL_OBJECT_SUBOBJECT
Check whether object and subobject exist and the combination is allowed
BAL_SUBOBJECT_SELECT
Read subobject table record
BP_EVENT_RAISE
Trigger an event from ABAP/4 program
BP_JOBLOG_READ
Fetch job log executions
CHANGEDOCUMENT_READ_HEADERS
Get the change document header for a sales document, and put the results in an internal table.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CHANGEDOCUMENT_READ_POSITIONS
Get the details of a change document, and store them in an internal table. This will tell you whether a field was changed, deleted, or updated.
Example:
CALL FUNCTION 'CHANGEDOCUMENT_READ_HEADERS'
EXPORTING
objectclass = 'EINKBELEG'
objectid = l_objectid
username = space
TABLES
i_cdhdr = lt_cdhdr.
LOOP AT lt_cdhdr WHERE udate IN s_aedat.
CALL FUNCTION 'CHANGEDOCUMENT_READ_POSITIONS'
EXPORTING
changenumber = lt_cdhdr-changenr
TABLES
editpos = lt_editpos.
LOOP AT lt_editpos WHERE fname = 'LOEKZ'
AND f_new = 'L'.
p_desc = text-r01. " Cancel Contract
ENDLOOP.
ENDLOOP.
CLAF_CLASSIFICATION_OF_OBJECTS
Return all of the characteristics for a material
CLOI_PUT_SIGN_IN_FRONT
Move the negative sign from the left hand side of a number, to the right hand side of the number. Note that The result will be left justified (like all character fields), not right justifed as numbers normally are.
CLPB_EXPORT
Export a text table to the clipboard (on presentation server)
CLPB_IMPORT
Import a Text Table from the Clipboard (on presentation server)
COMMIT_TEXT
To load long text into SAP
CONVERSION_EXIT_ALPHA_INPUT
converts any number into a string fill with zeroes, with the number at the extreme right
Example:
input = 123
output = 0000000000000...000000000000123
CONVERSION_EXIT_ALPHA_OUTPUT
converts any number with zeroes right into a simple integer
Example:
input = 00000000000123
output = 123
CONVERT_ABAPSPOOLJOB_2_PDF
convert abap spool output to PDF
CONVERT_OTF
Convert SAP documents (SAPScript) to other types.
Example:
CALL FUNCTION "CONVERT_OTF"
EXPORTING FORMAT = "PDF"
IMPORTING BIN_FILESIZE = FILE_LEN
TABLES OTF = OTFDATA
LINES = PDFDATA
EXCEPTIONS ERR_MAX_LINEWIDTH = 1
ERR_FORMAT = 2
ERR_CONV_NOT_POSSIBLE = 3
OTHERS = 4.
CONVERT_OTFSPOOLJOB_2_PDF
converts a OTF spool to PDF (i.e. Sapscript document)
http://help.sap.com/saphelp_nw2004s/helpdata/en/9f/dba5ef35c111d1829f0000e829fbfe/content.htm -
HI experts,
how to create the spool request for smartform. can anyone help me. give me the complete procedure.
thanks in advance for ur responce.The user which send the smartform to the spool (probably wf-batch) needs an output device. You can maintain this in SU01.
Just look at sample code:
1.Send Smart Form output to spool using the FM <ws_formname> (FM name derived from the export parameters of SSF_FUNCTION_MODULE_NAME).
//Start of Code Sample
DATA : ws_formname TYPE rs38l_fnam.
TYPES: BEGIN OF ty_script,
trans_ref LIKE eanl-anlage,
cont_ref TYPE e_edmideservprovcontractid,
trans_code TYPE char05,
trans_reason TYPE char05,
market_sect LIKE eanl-zzmktscode,
efffrm_date LIKE sy-datum,
mprn LIKE iflot-zzmprn,
mlc TYPE char01,
subbuild_no(40) TYPE c,
build_no LIKE adrc-str_suppl1,
dep_fare LIKE adrc-str_suppl3,
post_town LIKE adrc-city1,
post_code LIKE adrc-post_code1,
asset_code LIKE egerh-kombinat,
paymnt_code(2) TYPE c,
model_code LIKE equi-typbz,
manuf_code LIKE equi-herst,
year_manuf LIKE equi-baujj,
serial_no LIKE equi-sernr,
meter_code TYPE char01,
meter_mech(2) TYPE c,
meas_cap TYPE zmeasur_cap,
role_code TYPE char03,
market_name LIKE eservice-serviceid,
status TYPE char01,
END OF ty_script.
DATA: i_scriptdata TYPE STANDARD TABLE OF ty_script
WITH HEADER LINE.
DATA: wa_output_options TYPE ssfcompop,
wa_control_params TYPE ssfctrlop,
wa_spoolnum TYPE rspoid,
wa_printdata TYPE efg_strn_printdata.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'Your Form Name'
IMPORTING
fm_name = ws_formname
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
CALL FUNCTION ws_formname
EXPORTING
control_parameters = wa_control_params
c = wa_printdata
IMPORTING
job_output_info = wa_job_output_info
TABLES
i_scriptdata_input = i_scriptdata(Your Script Data)
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
MOVE wa_job_output_info-spoolids] TO wa_spoolids[.
READ TABLE wa_spoolids INTO wa_spoolnum INDEX 1.
IF sy-subrc = 0.
DATA :id LIKE tsp01-rqident.
MOVE wa_spoolnum TO id.
ENDIF. .
Comments-Id Contains the Spool Request for the given smart form
//End of Code Sample
Convert Smart Form Output to Raw
Format
2.Convert the Spool Output to OTF using the FM RSPO_RETURN_SPOOLJOB.
//Start of Code Sample
data i_soli LIKE soli occurs 0 with header line.
CALL FUNCTION 'RSPO_RETURN_SPOOLJOB'
EXPORTING
rqident = id
desired_type = 'OTF'
TABLES
buffer = i_soli
EXCEPTIONS
no_such_job = 1
job_contains_no_data = 2
selection_empty = 3
no_permission = 4
can_not_access = 5
read_error = 6
type_no_match = 7
OTHERS = 8.
Comments- i_soli contains the OTF data
//End of Code Sample
3.Convert the OTF using FM
SX_OBJECT_CONVERT_OTF_RAW.
DATA content_bin TYPE solix_tab.
DATA objhead TYPE soli_tab.
DATA i_soli_tab TYPE soli_tab.
DATA boolean TYPE sx_boolean.
DATA length TYPE so_obj_len.
LOOP AT i_soli.
APPEND i_soli TO i_soli_tab[].
ENDLOOP.
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_RAW'
EXPORTING
format_src = 'OTF'
format_dst = 'RAW'
CHANGING
transfer_bin = boolean
content_txt = i_soli_tab
content_bin = content_bin
objhead = objhead
len = length
Convert Smart Form Output to Raw
Format
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
REward points if useful. -
New transport request for smartform.
hi to all,
i want to create new transport request number for already developed smartform..
for that smartform already transport request is there,its also released.
as per requirement i modified something,now i want to move into production.
how to create new transport request.
plz giv me reply asap.
thanks n regards
murtyhi anand,
small modification in my req. is
for smartform one transport reqst is there,its nt released.
after some modifications whatever done,after cmpletion of dat,i saved,at that time it's nt asking new transport req.....,
i think if alreadsy is there,thats y its nt asking.
but in properities date n time is there,those r same wenever the transport req.. was created,those r displayed.
they r asking 2days date n time wid new modifications of smartform.
if that previous transport request,can i move into production,is there any problm wid dat.
or otehrwise my idea is i can copy this form into someoder name,previous one i can delete ,from this i can copy into my previous name,now it must b ask new request.
i can use this one in my program also widout changing any thing in my driver program.
plz giv me some suggestions on this thing.n giv me reply asap.
regards
satya -
Creating spool requests using smartforms
hi folks,
I need help in this area...
I have an ABAP print program that I run to create monthly statements. There are two categories while running the monthly statements identified by the code '6' or '7' Now, i have to create separate spool requests so that while running the print program for these monthly customers.
How can I do this?
SanthoshOk, first lets say that ACCITAB has the records that are printed in the main window of the form. The number of pages for each customer depends on how many records are present in the ACCITAB for the customer.
For example.... ACCITAB.
<b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
1234 08/26/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
1234 08/27/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/21/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/22/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/23/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/24/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/25/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
5678 08/26/2005 <b>Customer Invoice Date Passed Due</b>
1234 08/25/2005 $1.00
1234 08/26/2005 $1.00
1234 08/27/2005 $1.00
5678 08/21/2005 $1.00
5678 08/22/2005 $1.00
5678 08/23/2005 $1.00
5678 08/24/2005 $1.00
5678 08/25/2005 $1.00
5678 08/26/2005 $1.00
.00
Lets say we have two customers in our table, customer 1234 has only two records associated with him, customer 5678 has like 75 lets say. Here you will need to loop at this table and count how many records are there for each customer and store it in another internal. Maybe you can have a separate internal table for each category.
Types: begin of titab,
kunnr type kna1-kunnr,
count type i,
end of titab.
Data: itab_1 type table of titab with header line.
Data: itab_2_5 type table of titab with header line.
Data: itab_6_M type table of titab with header line.
One for 1 pagers, one of 2-5 pagers, and one for 6 and more pages.
Now loop thru ACCITAB and at the end of a customer you need to write a record to one of these tables with the record count. Use the AT END statement. You will need to determine the maximum number of printed lines that your form handles in the MAIN window. Example, how many printed lines does it take to make the form go to the next page. You need to find what this number is.
When you have this number, now you can do some logic which will split the customers into there categorys.
Let's say that the max is 50 lines per page.
Data: counter type i.
LOOP AT ACCITAB.
counter = counter + 1.
at end of kunnr.
IF counter < '50'.
itab_1-kunnr = accitab-kunnr.
itab_1-count = counter.
append itab_1.
elseif counter => '51'
and counter =< '250'.
itab_2_5-kunnr = accitab-kunnr.
itab_2_5-count = counter.
append itab_2_5.
elseif counter => '251'.
itab_6_m-kunnr = accitab-kunnr.
itab_6_m-count = counter.
append itab_6_m.
ENdif.
clear counter.
endat.
ENDLOOP.
Now you have the customers split out into separate internal tables depending on how many pages for thier statement. Now you can start printing.
call fucntion 'OPEN_FORM'.
Loop at itab_1.
* Do the logic which prints your form.
endloop.
call fucntion 'CLOSE_FORM'.
call fucntion 'OPEN_FORM'.
Loop at itab_2_5.
* Do the logic which prints your form.
endloop.
call fucntion 'CLOSE_FORM'.
call fucntion 'OPEN_FORM'.
Loop at itab_6_m.
* Do the logic which prints your form.
endloop.
call fucntion 'CLOSE_FORM'.
Please remember to award points for helpful answers. Thanks.
Regards,
Rich Heilman -
How to enhance the Tcode(F871) program to create new payment request ?
Hi
My requirement is that create new payment request (F871)
I want to copy the standard tcode(F871) program and make some change like invisible the field and change the level of the field .
But when I copy the standard program of the tcode(F871) and create a zprogram with a ztcde......execute the tcode(ztcode)....it is showing error before doing any chance in the progam.
So what change I will do in my zprogram so that when I execute the ztcode It will work...........
Regards
DeboWhen I execute the above message coming below the blank screen.
-
New Spool Request for each purchase order
Hi all,
Whenever i create Purchase Order, spool is generated. But when i create one more purcahse Order new spool is not getting generated.
It is goind inside the same pool.
I want the spool number, so i can generate the pdf for the PO form and send it through mail through workflow.
Kindly adivce me how to generate new spool evertime when new PO is created.
Regards,
Rahul.Hi,
Generated Spool request number is in table TSP01.
Retrieve that number and pass to function module CONVERT_ABAPSPOOLJOB_2_PDF to generate PDF.
SO_DOCUMENT_SEND_API1
This function module enables you send a new document including any existing attachments. The document and the attachments are transferred in the same table. They are created when sent and can also be placed in the sender's outbox.
Regards,
Supriya. -
How to delete the spool request number
HI Masters,
My program creates a spool request. And i want to delete that spool request number? How to delete that??
Thanks in advance.hi
good
The program are RSPO0041 or RSPO1041.
This is handy whenever you encounter a user who managed to create a lot of spool requests which are choking your system.
Deleting them with SP01 will be too slow and you will get time out if it exceed the online time limit specify by your basis people.
<b><REMOVED BY MODERATOR></b>
thanks
mrutyun^
Message was edited by:
Alvaro Tejada Galindo -
Always generation of new spool request when using message type WNAK
Hey!
I have one question regarding the printout of message type WNAK.
In SAP standard the print program RWBNASTV and entry routine ENTRY_ABR_NATRAB is used.
Now I want to ensure that at every printout generates a new spool request.
Problem is that when a user prints a purchase order and after that a Sett. Crdt Agrmt (WNAK) the second printout is attached to the previous spool.
How can I ensure that there is always a new spool file generated without copying the print program and the corresponding function modules before OPEN_FORM?
In the print conditions I only know the function "Immediately print" but that is no help if the printout is attached to the purchase order which was printed before.
Is there no flag which escpecially ensures that for this message type should be always be generated a new spool request?!?!
I hope you know something else.
With kind regards.
MarkI alreadey copied the print program and the function modules but I am still looking for another solution because I think that is not the best solution for the problem.
I changed following in include LWNPNFO0 (copied to LYWNPNFO0):
--- Konvertierung der Kommunikationsdaten: --
MOVE-CORRESPONDING pi_nast TO lvs_snast.
MOVE sy-repid TO lvf_program.
CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
EXPORTING
pi_comm_type = lvs_comm_type
pi_comm_values = lvs_comm_values
pi_screen = pi_screen
pi_newid = 'X'
pi_country = pi_tocountry
pi_repid = lvf_program
pi_snast = lvs_snast
IMPORTING
pe_itcpo = lvs_itcpo
pe_device = lvf_device
pe_mail_recipient = lvs_recipient
pe_mail_sender = lvs_sender
EXCEPTIONS
comm_type_not_supported = 1
recipient_creation_failed = 2
sender_creation_failed = 3
OTHERS = 4.
IF sy-subrc <> 0.
MOVE sy-subrc TO po_retcode.
PERFORM error_message_arrang_append_sy TABLES ptx_error_messages
USING pi_kona
dummy_vake.
ENDIF.
CHECK po_retcode = 0.
*--- Öffnen des Formulars:
CALL FUNCTION 'OPEN_FORM'
EXPORTING
archive_index = toa_dara
archive_params = arc_params
device = lvf_device
dialog = ' '
form = pi_formular
language = pi_nast-spras
OPTIONS = lvs_itcpo
mail_sender = lvs_sender
mail_recipient = lvs_recipient
EXCEPTIONS
canceled = 1
device = 2
form = 3
OPTIONS = 4
unclosed = 5
mail_options = 6
archive_error = 7
OTHERS = 8.
IF sy-subrc NE 0.
Edited by: Mark Müller on Jul 30, 2009 10:36 PM -
Hi all,
Whenever i create Purchase Order, spool is generated. But when i create one more purcahse Order new spool is not getting generated.
It is goind inside the same pool.
I want the spool number, so i can generate the pdf for the PO form and send it through mail through workflow.
Kindly adivce me how to generate new spool evertime when new PO is created.
Regards,
Rahul.Hi,
Check the TDNEWID parameter while generating the spool.
Check this link : [http://help.sap.com/saphelp_nw04/helpdata/en/84/1f14b517aa11d5b67b006094192fe3/content.htm]
Please post this question in ABAP section.
Cheers,
Raja.D -
How to get the spool id or how to create a spool id for the report .
hi,
how to get the spool id or how to create a spool id for the report .
this spool id i have to use it in CONVERT_ABAPSPOOLJOB_2_PDF fm to get the pdf download file.
my requirement is to download a pdf file from the alv grid list.Hi Raghu,
Execute this program.
REPORT ZTEST_3318 .
tables: usr01.
perform send_report_to_spool.
*& Form send_report_to_spool
text
form send_report_to_spool.
data: loc_dest like pri_params-pdest,
wf_listname type char12,
wf_listtext like PRI_PARAMS-PRTXT,
wf_copies type i,
wf_days type i,
wf_PARAMS LIKE PRI_PARAMS, " achieving file PRI_PARAMS.
wf_valid type c.
clear : wf_listname , loc_dest , wf_listtext .
move: 'AP interface' to wf_listname .
move: 'AP interface' to wf_listtext .
select single spld into usr01-spld from usr01 where bname eq sy-uname .
if sy-subrc eq 0 .
move: usr01-spld to loc_dest .
endif .
call function 'GET_PRINT_PARAMETERS'
EXPORTING
destination = loc_dest
copies = 1
list_name = wf_listname
list_text = wf_listtext
immediately = ' '
release = ' '
new_list_id = 'X'
expiration = 1
line_size = 200
line_count = 65
layout = 'X_65_200'
sap_cover_page = 'X'
receiver = 'SAP*'
department = ''
no_dialog = 'X'
IMPORTING
out_parameters = wf_params
valid = wf_valid.
if wf_valid <> space.
new-page print on parameters wf_params no dialog.
perform write_summary .
new-page print off.
endif .
endform. "send_report_to_spool
*& Form write_summary
text
--> p1 text
<-- p2 text
FORM write_summary .
data: begin of itab occurs 0,
matnr type matnr,
end of itab.
select matnr
from mara
into table itab
up to 10 rows.
loop at itab.
write: / itab-matnr.
endloop.
ENDFORM. " write_summary
This will create spool in SP01.What data you want to put in Spool write it in form write_summary.I have done coding for testing purpose
After that use that spool for your purpose.
If Useful award point -
RV120W- How to create new unique self-signed certificate?
Hello,
how to create new unique self-signed certificate on RV120W? I can create request for singning by external CA, but I cannot create new unique self-signed certificate itself. Any idea? Did I miss something? Many thanks!
AbudefSo basically RV120W does not support self-signed certificate? It only allows to generate private key and certificate signin request. There is no chance to replace default generic ssl/vpn certifice within router itself? Could you please give me an advice, how to sign that request by some "CA"? I mean no commercial CA, I need something free running under Windows os. Many thanks!
-
Number of pages in new spool request
Hello.
I use FM RSPO_RETURN_ABAP_SPOOLJOB to extract lines from a given spool. Then I open a new spool with FM RSPO_SR_OPEN. Each line of the table coming out of RSPO_RETURN_ABAP_SPOOLJOB is written to the new spool. Afterwards i close the new spool with FM RSPO_SR_CLOSE.
So far so good. This works fine.
My problem is that when i take a look into transaction SP01 the old spool has a certain number of pages. SP01 maintains that the new spool has 0 pages.
How does that come? How can I solve this?
Thx in advance
MikeThank you all.
My problem was that during the process of data extraction (old spool -> internal table) the NEW-PAGE-tags are deleted or at least they were not transferred into the table. And so the could not have been written into the new spool.
Solution:
Every 65 lines, that are written into the new spool request, I call RSPO_SR_PAGE_BREAK.
Thank you anyway.
MIKE
Maybe you are looking for
-
MDM catalog integration with SRM 7.0
Hi all, We will be upgrading from SRM 5.0 to SRM 7.0 We currently have CCM .....Few questins on catalog enablement for us with SRM 7: 1.With SRM 7,0,can we use CCM oor MDM is the only option??? 2.Is it better to have MDM as a seperate server and enab
-
Working with .bat files in jcdk
Hi when i want to use (converter or any command) from the bin of the java card development kit,the same error arise which is: out of environment space Exception in thread "main" java.lang.NoClassDefFoundError: apdutool/bat I have set the environment
-
I recently re-installed and upgraded my Apple operating system and was running without the Hub Manager when I noticed in the firewall log a particular server had been making numerous attempts to connect to my computer. When I called it back I got the
-
Quicktime render errors-output module fails
Hi everyone, I'm having more and more trouble lately rendering out a simple uncompressed (codec = none) 1280x720 or 1920 x 1080 Quicktime. This used to be my standard output format, ready for further encoding. But now almost every render to uncompres
-
ActiveMQ-CPP client hangs when connect ActiveMQ-CPP client & OpenMQ broker
I am trying to connect an ActiveMQ-CPP client with an Oracle OpenMQ broker via STOMP. Both manufacturers claim this will work, and I have been able to get an ActiveMQ-CPP client to connect to an ActiveMQ broker via STOMP, an OpenMQ client with an Ope