GET spool number according to Message type (nast-kschl)
hi all ,
i want to get the oldest spool number for a message type and PO number via abap program
thinks in advancs.
karim .
hi,
field dsnam of the table nast can give spool request name..
may be this field can help u in solving ur issue ..
regards,
prashanti
Similar Messages
-
How can I get the number of missed messages to pop up on my message icon like the would if i missed a call
Hi,
Go to Settings>Notifications Center>Messages, and make sure the Badge App Icon is turned ON.
Cheers,
GB -
I have had an eMac for a few years. I don't know any of the specs. Every time I try to download or install a new version of itunes or OS I get any number of error messages and cannot complete. Help!!!!
It's best to start with figuring out your eMac model and OS in order to answer the question. This article will help you determine your model:
How to locate the serial number and identify your model
And to get the version of Mac OS that's installed:
From the Apple Menu at the left end of your menu bar, select "About this Mac..."
In the resulting Window, you can see the Mac OS version just under the big "Mac OS X":
If the eMac is older and you have never upgraded the system software, it's possible that your OS version is too old to run the current iTunes. The current version requires OS 10.5 (Leopard)or higher, which is a pay-for system upgrade. -
hello experts,
how will i get the spool number of an output in transaction VT03N? i have to get the spool number because i will use it in the print program configured in the transaction's output.
please help me with this.
thank you.hi march,
first goto se38 then any prg execute(F8).
find print (List in menubar)
click print then u can get spool number with last four numbers. u remember the number.
then goto se38 pgm name is RSTXPDFT4. its executed.
u put spool number(last four numbers) only.
its executes then save as extension with pdf in ur system.
Reward if useful,
Regards,
S.Suresh. -
Get spool number for delivery output.
Hi,
Is it possible to get the spool number for a print output type generated for a delivery? I use the Tcode VL02N to view the output types generated for a delivery. I want to use this spool number to generate a PDF file.Hi,
The below mentioned link shows how to get the Spool Request Number for the Output type and convert it to PDF and download. It uses mainly NAST and CMFP table.
Link: http://wiki.sdn.sap.com/wiki/display/ABAP/GettingSpoolRequestNumberfortheOutput+type -
Get Spool number for Smartform
Hi All,
I have created a smartform to print the POs created through ME21n. I have changed the config to use this smartform when a PO is changed/created. Everything is working fine. All I need is the spool number for each of the PO this is being printed. Can you please let me know how I can achieve this through the FM for smartform?
I AM USING 4.6C.
This is how I am using the function module
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = CONTROL
OUTPUT_OPTIONS = OUTPUT
USER_SETTINGS = ' '
EKKO = L_DOC-XEKKO
PEKKO = L_DOC-XPEKKO
DRUVO = L_DRUVO
IMPORTING
JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
TABLES
EKPO = L_DOC-XEKPO
PEKPO = L_DOC-XPEKPO
XAEND = IT_XAEND
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
All your inputs are greatly appreciated.
Thanks!
SandeepHi,
JOB_OUTPUT_OPTIONS is of type SSFCRESOP, which does not have a SPOOLIDS field/table.
I knwo that the function module SSF_CLOSE returns the spool id in a table. But, I am not sure how to use SSF_OPEN and SSF_CLOSE. Can you please throw some light on how I can use these to get the spool numbers?
This is what I have right now.
JOB_OUTPUT_OPTIONS-TDDEST = ITCPO-TDDEST.
JOB_OUTPUT_OPTIONS-TDNEWID = 'X'.
L_FORMNAME = TNAPR-FONAM.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = TNAPR-SFORM
FORMNAME = L_FORMNAME
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 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.
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = CONTROL
OUTPUT_OPTIONS = OUTPUT
USER_SETTINGS = ' '
EKKO = L_DOC-XEKKO
PEKKO = L_DOC-XPEKKO
DRUVO = L_DRUVO
IMPORTING
JOB_OUTPUT_OPTIONS = JOB_OUTPUT_OPTIONS
TABLES
EKPO = L_DOC-XEKPO
PEKPO = L_DOC-XPEKPO
XAEND = IT_XAEND
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
SELECT RQIDENT RQOWNER RQCRETIME FROM TSP01 INTO TABLE IT_TSP01
WHERE RQOWNER = SY-UNAME.
IF SY-SUBRC = 0.
SORT IT_TSP01 BY RQCRETIME DESCENDING.
READ TABLE IT_TSP01 INDEX 1.
SPOOLID = IT_TSP01-RQIDENT.
PERFORM PROTOCOL_UPDATE USING '320' SPOOLID SPACE SPACE SPACE.
ENDIF.
ENDIF.
The SELECT part is wrong, I need to replace this code to get the correct spool numbers.
Thanks in advance.
Sandeep -
Problem in getting spool number of a background job.
Hi all,
In a Z program I am calling a standard program to run as background job. I need to get the report o/p of the standard program. For this I need the spool no of the background job. Now I am querying on table tbtcp by giving jobname. Program name and run date and getting the spool no. but the cache is that the table is not getting updated with the spool no as soon as the job finishes. It is taking some time to update the table ( The time depends on the no of background jobs scheduled. ). So of we query on the table immediately after the background job finishes we are getting spool no as 0. so I am unable to read the spool into Internal tables. Even the table tsp01 is also behaving in the same way. ( it is taking time to update ) .
Any pointers to this will be appreciated .
Regards,
Shiva....This is some prototype that I put together from separate pieces, so it looks funky, but might be helpful. The first step is to SUBMIT the program with EXPORTING LIST TO MEMORY. The next FM reads the list from memory and the next one (optional) converts it to a text format. You might want to search for other FMs in SE37 by 'LIST*'.
DATA list_tab TYPE TABLE OF abaplist.
SUBMIT RPR_TRIP_HEADER_DATA
USING SELECTION-SET 'OLD_LIST'
EXPORTING LIST TO MEMORY
AND RETURN.
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = list_tab
EXCEPTIONS
not_found = 1
OTHERS = 2.
types : t_txt(1000) type c.
DATA: i_txt2 type table of t_txt,
i_txt type list_string_table.
call function 'LIST_TO_ASCI'
EXPORTING
* LIST_INDEX = -1
WITH_LINE_BREAK = 'X'
IMPORTING
LIST_STRING_ASCII = i_txt
* LIST_DYN_ASCII =
TABLES
LISTASCI = i_txt2
LISTOBJECT = list_tab
EXCEPTIONS
EMPTY_LIST = 1
LIST_INDEX_INVALID = 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.
Also check this links:
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/spool-number-of-previously-printed-abap-list-635173# -
How to get spool number when using SUBMIT job
Hi All,
I am calling standard program using SUBMIT through JOB as below. Now I need spool number for this job to covert the output to PDF and send to mail. See the below code and guide me.
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.
data: Zscreen type table of RSPARAMS with header line.
Zscreen-selname = 'PM_AENNR'.
Zscreen-kind = 'P'.
ZSCREEN-LOW = '500000000125'.
APPEND ZSCREEN.
SUBMIT RCC00130 WITH selection-table Zscreen 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 = 5Hi,
Do this way, first get print parameters by using function module 'GET_PRINT_PARAMETERS'
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
destination = 'LP01'
list_name = 'TEST'
list_text = 'SUBMIT ... TO SAP-SPOOL'
immediately = ' '
line_size = '1023'
no_dialog = 'X'
IMPORTING
out_parameters = wa_pri_params
valid = w_valid.
If it returns success then
IF w_valid EQ 'X'.
CONCATENATE 'R'
w_tabix
sy-datum+4(4)
sy-uzeit INTO
wa_pri_params-plist.
ENDIF.
SUBMIT rprccc00
WITH firmennr = w_cid
WITH bel_clus = 'X'
WITH testlauf = ' '
WITH not_lokl = 'X'
WITH file_in = w_arc_out
TO SAP-SPOOL WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS wa_pri_params AND RETURN.
COMMIT WORK AND WAIT.
SELECT rqident
FROM tsp01
INTO w_rqident
UP TO 1 ROWS
WHERE rq2name = wa_pri_params-plist.
ENDSELECT.
CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = w_rqident
no_dialog = 'X'
dst_device = 'LP01'
pdf_destination = 'X'
TABLES
pdf = t_pdf.
Hope it solves your problem
Regards
Krishna -
How to get Spool Number after submtting the program and return
Hi All,
Could you please assist me on this issue. I have ABAP program which will create a spool number and this spool number is generated by submitting the same report. Now when try to retrive the spool number from sy-spono it is displaying as 000000 but it suppose to be the spool which is created during submit program. COuld you please assist me on this issue. I have added the part of code for your reference,
DATA: l_params TYPE pri_params,
l_valid TYPE string,
w_spool_nr like sy-spono,
p_m_werks like marc-werks.
export p_werks to memory id 'P_WERKS'.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
IMPORTING
out_parameters = l_params
valid = l_valid
IF sy-subrc <> 0.
ENDIF.
import p_werks from memory id 'P_WERKS'.
p_m_werks = p_werks.
SUBMIT zmmlist01 with p_werks eq p_m_werks
to SAP-SPOOL
spool parameters l_params
without spool dynpro and return.
write: sy-SPOno.
Thanks & Regards,
Nagaraj KalbaviHi,
You can use the code snippet as below :
SELECT MAX( RQIDENT ) INTO G_SPOOL_NUM
FROM TSP01
WHERE RQCLIENT = SY-MANDT AND
RQOWNER = SY-UNAME.
Also you can use the FM RSPO_FIND_SPOOL_REQUESTS' and pass the relevant parameters to this FM. This should get you the desired results.
Hope this would be of some help!!
Regards,
Lalit Kabra -
To map batch number to serial number for inbound message type WMMBXY
Hi Gurus,
Can anybody guid me how to map batch number to serial number for goods receipt inbound EDI 861 message type WMMBXY .
And can tell me how to assign serial number in Purchase Order for serialized product for perticuler Batch number.hi dsk,
thanks for your earliar reply,
actually iam working on sapscript there i want to add batch number ,but i am not able to clear my doubt from where i get this.
how can i map batch number with corresponding to PO num ber, '
in the report i used structure vbplp with field charg"(batch num).
also i want to know from which table i can get customer part number and Po number .
how can i add batch num ,..
from which table or with which field i can compare itr to get .
sunny -
Hi Friends,
THe GR message functionality in PO with message type MLGR is alright and working .The Texts what ever written in the "Mail Title & Texts" tab of the message type is getting displayed .But how to get the PO Number for which GR is made so that the creator will know the PO for which GR made. I tried to find out in the forum threads but not found anysolution. Some one has done it but has not indicated how to get this.
Will any body help on this.
DhrubaHi
I had the same requirement and found the following below in the forum ... and it works.
But do you know
- how to send the mail to an external email address (instead of via SAP Office). So what needs to be done in order to be able to use transmission medium 5.
- how to send the mail to the requisitioner (and not to the creator of the PO)
I tested out already many things but can't get it to work ..
Here is the solution for your problem on getting the PO (and other things) in the mail :
In transaction M706 for output type MLGR, make sure you have maintained the include by going in the long text, Choose Goto -> Change Editior, and maintain the form here :
"A goods receipt for your purchase order &MSEG-EBELN&
item &MSEG-EBELP& has just been entered.
Material: &MSEG-MATNR& &EKPO-TXZ01&
Quantity delivered: &MSEG-ERFMG&
Vendor: &MSEG-LIFNR&, &AM07M-NAME1&
Posting date: &MKPF-BLDAT&
&MFG&
&MKPF-USNAM&"
Then in MN22, delete the earlier condition record and create a new condition record in MN21
Here in the Communication in the MENU select
Goto -> Execution Parameter. You reach the dialog box Change Execution Parameter. Here you maintain the following data for mail processing:
Execution type U Transaction with memory
Execution element MB03
Memory ID MBN
Par name: RM07M-MBLNR Parameter value: MSEG-EBELN
Save
Then create a PO (please remember to click on the GR message in the header), and create a GR against the PO.
In SBWP, you will get the values and not definitions this time for the message created.
Kind regards
Dirk -
Getting spool number after SUBMIT report statement
Hello Everyone,
Suppose there is a scenario, when 3 users are sharing same session and executing a program simultaneously.
In the program, the users are submitting a program to sap spool such that a spool no is generated.
and based on that spool no, the users read its log...
How will we identify that which spool no belongs to which particular session so that the the user will read its own loag and not the other person/'s log...Hi,
The program can be submitted as a job which has a unique job number and accordingly spool number will be generated which can read.
See code e.g below:
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.
Hope it helps.
Regards,
Mansi. -
How to get spool number within report?
Hi experts,
I have a report that writes some messages to spool. Within this report I want to write out the spool number (where the output goes to) to a Z-table. My question: Where do I get this spool number of the current running report from?
Thanks in advance for your help!
Kind regards, MatthiasHi,
DATA: LC_RQ2NAME LIKE TSP01-RQ2NAME.
F_REPID = Sy-repid.
f_uname = SY-UNAME.
CONCATENATE F_REPID+0(9)
F_UNAME+0(3) INTO LC_RQ2NAME.
CONDENSE LC_RQ2NAME.
SELECT * FROM TSP01
WHERE RQ2NAME = LC_RQ2NAME
ORDER BY RQCRETIME DESCENDING.
F_RQIDENT = TSP01-RQIDENT.
EXIT.
ENDSELECT.
TSP01-RQIDENT will be spool number.
regards,
dhan -
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 -
Get Logical system name from Message type
Hi
I need to call Transaction BD93 for which I need Logical system. I have created a Custom basic type for CLFMAS02.
Now I need to find out in thhe program which logical system is configured for the custoem basic type say 'ZCLFMAS02'.
Is ther any Function module or Logic to get Logical system details from Basic type.?Hi Gautam,
Check with the tables EDP13 and EDP21, the outbound and inbound parameters tables respectively, where you can key-in the message type, basic type and get the corresponding logical systems.
~ Bineah
Maybe you are looking for
-
Bursting with output in Body not as Attatchment
Hi All, Just a quick one to find out if it is possible. I have a request to send an email to each salesperson with some data but they want this data in the email and not as an attatchment. I was wondering whether this is possible with bursting or if
-
The software will not open now and I get a chance to reopen it but then get this message. What is the solution? How do I open this software? Thanks Carl flaggmedia.com Date/Time: 2006-05-03 21:41:58.157 -0500 OS Version: 10.4.6 (Build 8I127) Report V
-
How to get interlinked systems
Hello All, I have a requirement wherein I need to get technical info of all the systems that are linked in a particular landscape. Also I want to know in what direction and how are the transports being done from one system to another. For e.g. Say I
-
Upgrading of WLS 6.1 from SP3 to SP5
Can anyone help me. I am going to upgrade WLS 6.1 from SP3 to SP5. How can i do this ? From where do i download the ServicePack (SP5) ? Is there someting i have to be aware off, about the license ?
-
Just took the 5s out of the box and within minutes it is frozen. The screen is showing panic error message Any ideas?