Creating 1 spool for every 1000 sapscripts
Hi Friends ,
I have a program where i am printing W-2 forms (sapscripts) . There are a total of 3000 forms . I need to be able to split them into 3 spools of 1000 each instead of creating 3000 spools . Please advise as to wat parameters need to be set in the beginning and when starting a new set of spool with 1000 forms .
Thanks,
Teresa
You need to count the records and then for every 1000 you have to make a new SPOOL..
LIke:
LOOP AT ITAB.
CNT = CNT + 1.
ITCPO-TDNEWID = ' '.
IF CNT = 1.
ITCPO-TDNEWID = 'X'.
ENDIF.
OPEN_FORM
wtih OPTIONS = ITCPO.
WRITE_FORM
CLOSE_FORM
IF CNT = 1000.
CLEAR CNT.
ENDIF.
ENDLOOP.
Regards,
Naimesh Patel
Similar Messages
-
Create new log file for every 1000 points
Is it possible to have a new file/folder for every 1000 data points ?
How do you check number of points written to a file?Need A LOT more context here. How are you logging the data? Where is the data coming from? What format are you saving the data?
Any code you can supply that would give us context would help us help you.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines -
Message split for every 1000 records
Hi All,
My scenario is Proxy to File.We have to process thousands of records from r/3 to.I need to create separate XML file for every 1000 records in receiver directory.Is there any solution to achieve this?
Thanks in advance
Kartikeyahere;s the blog krish was referring to..
Night Mare-Processing huge files in SAP XI -
Commit for every 1000 records in Insert into select statment
Hi I've the following INSERT into SELECT statement .
The SELECT statement (which has joins ) has around 6 crores fo data . I need to insert that data into another table.
Please suggest me the best way to do that .
I'm using the INSERT into SELECT statement , but i want to use commit statement for every 1000 records .
How can i achieve this ..
insert into emp_dept_master
select e.ename ,d.dname ,e.empno ,e.empno ,e.sal
from emp e , dept d
where e.deptno = d.deptno ------ how to use commit for every 1000 records .ThanksSmile wrote:
Hi I've the following INSERT into SELECT statement .
The SELECT statement (which has joins ) has around 6 crores fo data . I need to insert that data into another table.Does the another table already have records or its empty?
If its empty then you can drop it and create it as
create your_another_table
as
<your select statement that return 60000000 records>
Please suggest me the best way to do that .
I'm using the INSERT into SELECT statement , but i want to use commit statement for every 1000 records .That is not the best way. Frequent commit may lead to ORA-1555 error
[url http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:275215756923]A nice artical from ASKTOM on this one
How can i achieve this ..
insert into emp_dept_master
select e.ename ,d.dname ,e.empno ,e.empno ,e.sal
from emp e , dept d
where e.deptno = d.deptno ------ how to use commit for every 1000 records .
It depends on the reason behind you wanting to split your transaction into small chunks. Most of the time there is no good reason for that.
If you are tying to imporve performance by doing so then you are wrong it will only degrade the performance.
To improve the performance you can use APPEND hint in insert, you can try PARALLEL DML and If you are in 11g and above you can use [url http://docs.oracle.com/cd/E11882_01/appdev.112/e25788/d_parallel_ex.htm#CHDIJACH]DBMS_PARALLEL_EXECUTE to break your insert into chunks and run it in parallel.
So if you can tell the actual objective we could offer some help. -
Create spool for background jobs which uses submit statement
Hi Gurus,
I have a quick question regarding the backgroud jobs. When we run a program in the background , it should create a spool for us, but, the problem comes when I am running a program in the background, its not creating the spool. This program uses SUBMIT statement. This program collects the data and it will submit to the other program and then retuen. In this case, its not creating a spool. Its very important for us to look at the spool for this program. Does anybody cam across this kind of problem? I need ur inputs.
Thanks in advance, <REMOVED BY MODERATOR>
Regards,
Srinivas.
Edited by: Alvaro Tejada Galindo on Mar 18, 2008 4:31 PMhi check this link ...
Scheduling a submitable program as a background task with the number number in a background request name. After scheduling, the background task is completed by function module JOB_CLOSE and released immediately.
DATA: number TYPE tbtcjob-jobcount,
name TYPE tbtcjob-jobname VALUE 'JOB_TEST',
print_parameters TYPE pri_params.
CALL FUNCTION 'JOB_OPEN'
EXPORTING
jobname = name
IMPORTING
jobcount = number
EXCEPTIONS
cant_create_job = 1
invalid_job_data = 2
jobname_missing = 3
OTHERS = 4.
IF sy-subrc = 0.
SUBMIT submitable TO SAP-SPOOL
SPOOL PARAMETERS print_parameters
WITHOUT SPOOL DYNPRO
VIA JOB name NUMBER number
AND RETURN.
IF sy-subrc = 0.
CALL FUNCTION 'JOB_CLOSE'
EXPORTING
jobcount = number
jobname = 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.
IF sy-subrc <> 0.
ENDIF.
ENDIF.
ENDIF.
https://www.sdn.sap.com/irj/sdn/advancedsearch?cat=sdn_all&query=backgroundsubmit&adv=false&sortby=cm_rnd_rankvalue
sy-subrc Meaning
0 Background task scheduled successfully.
4 Scheduling cancelled by user on the selection screen.
8 Error during scheduling, i.e. when accessing JOB_SUBMIT internally.
12 Error in internal number assignment.
regards,
venkat.
Edited by: venkat appikonda on Mar 18, 2008 6:32 PM -
How to create spool in a RFC? I have the data in an internal table in the RFC, How to send this data to a spool.
hello,
i'm facing at the same probelm, do you solved it ?
tks,
Roberto. -
Powershell creates shortcut for every exe in folder
So i have a script to create a shortcut onto the desktop but i just found out that i need it to create shortcuts for multiple .exe's in a folder and for the life of me i can't figure out how to do this. below is what i have .Powershell$TargetFile = "c:\shared\*.exe"$ShortcutFile = "$env:homedrive\Desktop\test\*.lnk"$WScriptShell = New-Object -ComObject WScript.Shell$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)$Shortcut.TargetPath = $TargetFile$Shortcut.Save()Powershell$TargetFile = "c:\shared\*.exe"$ShortcutFile = "$env:homedrive\Desktop\test\*.lnk"$WScriptShell = New-Object -ComObject WScript.Shell$Shortcut = $WScriptShell.CreateShortcut($ShortcutFile)$Shortcut.TargetPath = $TargetFile$Shortcut.Save()
1. what is a transient variable?A transient variable is a variable that whose value is not going to be serialized2. What is synchronization?With respect to multithreading, synchronization is the capability to control the access of multiple threads to shared resources.Without synchronization, it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object’s value. This often leads to significant errors.3. What’s new with the stop(), suspend() and resume() methods in JDK 1.2?The stop(), suspend() and resume() methods have been deprecated in JDK 1.2.4. Is null a keyword?"null" is not a keyword. .null is a literal.5. What state does a thread enter when it terminates its processing?When a thread terminates its processing, it enters the dead state.....Read More
Read More -
Creating spool for ALV report in background
Hi,
Can we create a spool request if we run in background/forgorund? please help me..
I am very much thankful for your quick responses.Yes we can create it. Execute the report in background using SM36 and then u can view the output using SM35 or the spool request number and tcode SP01.
I hope it helps.
Best Regards,
Vibha
*Please mark all the helpful answers -
System creates group for every share point
Every time I create a new share point on my OS X Server 10.5, a group is created by the system on the fly along with it.
For example, I created a folder nameded Research Office and shared in Server Admin. Then when I assign the permission for the share point in Server Admin, I see a group called Research Office group with a GID of 124. However, this group does not appear in Workgroup Manager so I can not assign members to it.
Anyone see this before?These groups are 'local' (Not LDAP) I still have difficulty wrapping my head around some of the rules about the 'how' this works but assigning LDAP users to this group does work!
OK _To see this group(s)_.
1: Open Workgroup Manager.app.
2: Select /Local/Default in your Authentication list (this spot is between the Toolbar and the 4 (or 5) icons for User, Groups, Computer Groups etc.) We are looking for the place that should say something like 'Authenticated as XXXXX to local directory /Local/Default')
3: Select the Groups icon (3 Shadows standing together)
4: Select Menu View, Show System Users and Groups
5: Now you will be able to select these groups.
_To add LDAP users and groups to this 'local' group._
1: Highlight the group in question
2: Select the Members tab in the right pane
3:Click the plus
4: After the tray slides out, at the top of the tray, you will see a disclosure arrow and Local Directory /Local/Default. Click on it and select /LDAP/127.0.0.1
Now you can select your LDAP users to assign rights.
Peter -
Trigger for every 1000 record insert
Hi
I am working in oracle 9i / Aix 5.3
I need a trigger which should fire whenever my temp_table growing 1000,2000...etc.,
The records should reach me in the body of email.
Like
Hi
The temp_table count has been reached to 1000.
Thanks
second time execution...
Hi
The temp_table count has been reached to 2000.
Thanks
etc.,
How can i achieve this? I'm ok to shell script also for the above functionality
Thanks
RajWhy do you want to do this?
SQL> create table temp_table (x number);
Table created.
SQL> ed
Wrote file afiedt.buf
1 create or replace function temp_table_cnt return number is
2 pragma autonomous_transaction;
3 v_cnt number;
4 begin
5 select count(*) into v_cnt from temp_table;
6 return v_cnt;
7* end;
SQL> /
Function created.
SQL> ed
Wrote file afiedt.buf
1 create or replace trigger trg_a_temp_table
2 after insert on temp_table
3 for each row
4 declare
5 v_cnt number;
6 begin
7 v_cnt := temp_table_cnt();
8 if mod(v_cnt,1000) = 0 then
9 dbms_output.put_line('Email Sent for '||v_cnt||' records.');
10 end if;
11* end;
SQL> /
Trigger created.
SQL> set serverout on
SQL> ed
Wrote file afiedt.buf
1 begin
2 for i in 1..3456
3 loop
4 insert into temp_table values (i);
5 commit;
6 end loop;
7* end;
SQL> /
Email Sent for 0 records.
Email Sent for 1000 records.
Email Sent for 2000 records.
Email Sent for 3000 records.
PL/SQL procedure successfully completed.
SQL>... however I wouldn't consider this good design, as it requires each of the rows to be committed so that the autonomous transaction procedure can count the number of rows on the table. Of course, if the rows are being inserted through, let's say, user input and are committed on a 1 by 1 basis anyway, then it's perfectly acceptable, but I wouldn't use it for bulk insertions. -
I am currently trying to add in a bookmark to Safari that will be automatically created on every account on the Mac.
Is that possible? Or is the only way to do such a thing, to have to add it to each and every Safari on each individual account?HawkStreet wrote:
I am currently trying to add in a bookmark to Safari that will be automatically created on every account on the Mac.
Is that possible?
No, unfortunately.
Or is the only way to do such a thing, to have to add it to each and every Safari on each individual account?
Yes. -
Select query for every 1000 records
Hi all ,
Please help me in the issue . I am using select query Select * from table up to 1000 rows for acheving the records but i want this process to retrigger once the process of 1000 records is compleded again it needs to fetch the next 1000 records and process the same . I am changing the status of the processed records once it is processed . Can can one tell me how to retrigger the select query once the 1000 records are processes.
Thanks in advance,Hi Eric,
After selecting the 1000 records, find the key value of the last record. Build up the range as GT. Again use the select query.
For example,
Select * into table lt_data from ztab
where key in r_key
up to 1000 rows.
regards,
Niyaz -
Setting up Organizer so it doesn't automatically create file for every document scanned
How do I stop PSE Organizer from automatically creating a file folder and storing it in My Pictures every time I scan a document?
Please repost in the Photoshop Elements forum.
-
Create spool for invoice document (SD) with Object Key
Hi developers,
when I save the invoice the system generate a Object Key table NAST-OBJKY.
There is a function or other where I insert the Object Key end the system return me the spool number TSP01-RQIDENT?
Thanks in advance
DomenicoTo my knowledge, there is no connection whatsoever between these two fields. RQIDENT is just a counter, it has nothing to do with the invoice number.
-
Hi Friends,
I have to print like 5000 checks . In my custom program I need to create new spool for every 1000 checks so that I can send them to 5 printers from the Spool .
Please advise What paramenters I need to take care of .
Thanks,You can write simple logic ,just fill the ITCPO Structure in OPEN_FORM FM's
count the records in internal table.
if internal table data reaches 1000 records then use below logic.
if i_data-count = 1000.
itcpo-tddest = p_print.
itcpo-tdnewid = 'X'.
itcpo-tdpreview = 'X'.
itcpo-tdimmed = 'X'.
itcpo-tdcopies = '1'.
endif.
call function 'OPEN_FORM'
exporting
device = 'PRINTER'
dialog = ' '
form = 'ZAUTO_REPLPRINT'
language = sy-langu
options = itcpo.
Thanks
Seshu
Maybe you are looking for
-
Install windows 7 with BootCamp
Hi, When I got to the part of the installation which ask the size of the partition you want to windows7 have; I press install and I got a message that asks for a windows 8 disc. I have a MacBook Pro that I bought that only have 15 days. Any clues? Th
-
I'm am extremely new to this so if there is a link or tutorial that explains what I should be doing, please direct me there, however I was unable to locate one on this site. Challenge: I'm trying to build a mobile app to read a local xml file and pop
-
HT1766 What if backup session fails?
What if backup session fails?
-
How to recover deleted program / smartform from sap ecc 6.0
Hi whats tcode or how can we revert back our delted program or smartform, can we do it form their object? Best regards, dushyant.
-
Oracle Access Manager 10.1.4.0.1 WebPass
Hi, Where can I download Oracle Access Manager WebPass for Sparc machine. I downloaded the whole Access Manager package when I unpack it i found the following webpass file; Oracle_Access_Manager10_1_4_0_1_sparc-s2_NSAPI_WebPass During installtion of