ABAP program to Cancel messages in Scheduled/Recorded status?
Hi,
Thanks for reading my post...
Can anyone tell me whether there is an ABAP program available (or a variant) that will Cancel messages that are in Scheduled (or Recorded) status?
Messages to be sent from ECC to PI were not sent and are left in Recorded status in ECC. I cannot find the documentation to explain what this status is, but I'm presuming that it's similar to the Scheduled status in PI (though there's not much documentation about that either - for example, what's the difference between the 'green flag' Scheduled and the 'green flag' Released for Processing (WS)? ). {Note to SAP: Could we have a state transition diagram please? Simple, concise and effective.}
Anyway, the 'tick-pencil' button in SXMB_MONI (aka. CTRL-F8) can be used to cancel the messages in Scheduled/Recorded status. But I'm looking for an ABAP program to do this. The documentation seems to 'suggest' that this button might do the same thing as the ABAP program RSXMB_CANCEL_MESSAGES. However, this ABAP program does not cancel messages in Scheduled status (only the messages in Error), whereas the SXMB_MONI CTRL-F8 'tick-pencil' will cancel messages in Scheduled status if they are selected.
Is there another ABAP program available to cancel messages in Scheduled status - or is it possible to create a variant of RSXMB_CANCEL_MESSAGES that will do this? (I'm not an ABAP programmer and I've never created a variant, but looking at the code, it seemed it might be possible to get the program to read messages in Scheduled status rather than Error status.)
Many thanks for any help.
Mark
Messages are in scheduled status because they still in the queue in either 'READY' status or 'EXECUTING' status (see SMQ1/SMQ2). You don't want to automatically cancel messages that are in scheduled status because that means you are also going to cancel good messages. However, in some cases, you may want to cancel such messages especially when the message in the queue has been in 'Executing' status for long time (happens in case of long running mapping program or dropped connection etc). Such cases warrant manual intervention and hence the behavior as noted by you.
If you can tell me why exactly you want to cancel messages that are in scheduled status, I can help you more.
Thanks
KK
Similar Messages
-
ABAP program is cancel , Function ROLLBACK on connection failed
We have an ABAP program (Z), the following program executes this task:
1.-Read table A (about 3 million records)
2.-Read table B (about 6 million records)
3.-Instert in to B table the match between A and B table
When the program run in batch or dialog process, it stops without apparently reason, it don not trace any log in ST22 transaction. When we trace it in SM21 trace the following log:
18:30:23
DIA
004
100
SE38
BZ
Y
Unexpected return value 1 when calling up DbSlR
18:30:23
DIA
004
100
SE38
BY
J
Function ROLLBACK on connection R/3 failed
18:30:24
DIA
004
100
SE38
R3
9
Error in DB rollback/SyFlush, return code 016384
18:30:25
DIA
004
100
SE38
Q0
2
Stop Workproc 4, PID 8583
18:30:47
DIA
004
100
R4
7
Delete session 003 after error 023
The tables and ABAP program are in a BW system in a DB2 v9 database
Some idea?
Best RegardsHi Malte, I did not find dev_w4, but we found:
dev_rfc4 bwdadm 25.11.2008 18:30:41
stderr1 bwdadm 25.11.2008 18:30:25
The stderr1 file was created on the same time that "Stop Workproc 4" event, at 18:30:25
The stderr1 trace the next log:
(8558) New Child Process created.
(8558) Starting local Command:
Command: dw.sapBWD_DVEBMGS00
pf=/usr/sap/BWD/SYS/profile/BWD_DVEBMGS00_MXMLNBW01
[Thr 1] MtxInit: 30002 0 2
ICM up and operational (pid: 8577)
work process W20 died => ThIRollBack: db_rollback
work process W19 died => ThIRollBack: db_rollback
work process W1 died => ThIRollBack: db_rollback
work process W19 died => ThIRollBack: db_rollback
work process W22 died => ThIRollBack: db_rollback
work process W19 died => ThIRollBack: db_rollback
work process W19 died => ThIRollBack: db_rollback
work process W21 died => ThIRollBack: db_rollback
The issue is. Why the process is aborted?
Best Regards
Edited by: Carlos Orencio on Nov 26, 2008 5:52 PM -
How to cancel messages in SXMB_MONI with status "No receive found"
Dear All,
I need to cancel message with error status as mentioned in captioned subject.
Can you please guide me how to do it?
Regards,
Saras JainOne more thing to check.....confirm if there is any background job scheduled to cnacel the message once it goes into error....if it is cancelled in this manner...if so you wont be allowed to cancel the (already cancelled) message manually
Regards,
Abhishek. -
ABAP Program to set a set the QM Status of a set of REquests to RED
Hai friends,
I have an urgent requirement. I need to set the QM status of about 100 requests and delete them from 3 infoproviders. Can anyone help me out with an ABAP program to do it, if it is possible?
Regards,
Neha SolankiTry modifying entries for tables RSREQDONE, RSMONICTAB whereever necessary.
-
hi folks,
I have an ABAP program and it has been scheduled to run as a job. I need to find the info about it. Is it a weekly or monthly, what day of the week it is running? I do not know the job name just have the program name.
How can i do track the job details from the program name?
Thanks
Vinuhi,
use :
1)fm BP_FIND_JOBS_WITH_PROGRAM
and than
2) fm BI_GET_JOB_INFO
A.
Message was edited by:
Andreas Mann -
Urgent: Calling ABAP Program using JMS
Hi,
I have a scenario where legacy system pass some messages to ABAP Program and this program can handle one message at a time (written in that way).
Now the receiver communication channel is configured to access J2SE adapter. This J2SE adapter stores the message on R/3 system and triggers the ABAP program located in R/3 system.
Now when multiple messages are coming at a time in SAP-XI and processed successfully and handover to J2SE adapter. But J2SE adapter triggers the ABAP program for all messages. And here is the problem. ABAP program is not supporting multi - threading.
my idea is to use JMS adapter...can you guys suggest me how to achieve result and how to configure JMS or any other adapter to call ABAP Program so that only one message will pass to ABAP program at a time.
Regards,
Gourav KhareHi,
First find out where your ABAP program the data written.You need to write it into and spool then only you can see it.
Transaction SP01, you can use the FM 'GET_PRINT_PARAMETERS' in your abap program to write to spool.
Thanks,
Ravi -
ABAP program to neutralize 0Unit value and 0quantity value
Hi all,
I'm not expert in ABAP, and i would like implement a small abap program (routine)in my cube.
I would like neutralize the 0UNIT value and 0QUANTITY value only when 0VTYPE = 1 or 2 :
<b>in other words, if 0vtype = 1 or 4 then 0unit = space and 0quantity = 0
b]
Can you tell me please <b>how and where</b> write the ABAP program please ?
Message was edited by:
Pontoise Pontoise
Message was edited by:
Pontoise PontoiseHi,
I amnt able to understand your requirement. But the code for which you asked is simple.
If 0vtype = 1 or 0vtype = ' '.
0unit = space.
0quantity = 0.
endif.
Regards
Aneesh. -
How to create the condition record by ABAP program
Hi Friends,
I want to create/change the condition record of PR00 by ABAP program. It seems that there have no such BAPI/standard function can help on this. Can any one of you point out a way to me?? Thanks in addvance.
Joe GR.Joe,
Check with below FM..
BAPI_PRICES_CONDITIONS.
Check this link:
Re: Sample code for BAPI_PRICES_CONDITIONS
examples....
http://www.4ap.de/abap/bapi_prices_conditions.php
Two useful threads on Same topic
Re: Sample code for BAPI_PRICES_CONDITIONS
Re: Problem with BAPI_PRICES_CONDITIONS
BAPI_PRICES_CONDITIONS
Please check this sample code from other thread.
wtable1-table_no = '306'.
wtable1-applicatio = 'V'.
wtable1-cond_type = 'ZPR0'.
wtable1-operation = '009'.
wtable1-varkey = '13001001USD 000000000050068946'.
wtable1-valid_to = '99991231'.
wtable1-valid_from = '20051101'.
wtable1-cond_no = '$000000001'.
APPEND wtable1 TO table1.
wtable2-operation = '009'.
wtable2-cond_no = '$000000001'.
wtable2-created_by = sy-uname.
wtable2-creat_date = '20051022'.
wtable2-cond_usage = 'A'.
wtable2-table_no = '110'.
wtable2-applicatio = 'V'.
wtable2-cond_type = 'ZPR0'.
wtable2-varkey = '13001001USD 000000000050068946'.
wtable2-valid_from = '20051101'.
wtable2-valid_to = '99991231'.
APPEND wtable2 TO table2.
wtable3-operation = '009'.
wtable3-cond_no = '$000000001'.
wtable3-cond_count = '01'.
wtable3-applicatio = 'V'.
wtable3-cond_type = 'ZPR0'.
wtable3-scaletype = 'A'.
wtable3-scalebasin = 'C'.
wtable3-scale_qty = '1'.
wtable3-cond_p_unt = '1'.
wtable3-cond_unit = 'EA'.
wtable3-calctypcon = 'C'.
wtable3-cond_value = '454'.
wtable3-condcurr = 'USD'.
APPEND wtable3 TO table3.
CALL FUNCTION 'BAPI_PRICES_CONDITIONS'
EXPORTING
PI_initialmode = 'X'
PI_BLOCKNUMBER =
TABLES
ti_bapicondct = table1
ti_bapicondhd = table2
ti_bapicondit = table3
ti_bapicondqs = table4
ti_bapicondvs = table5
to_bapiret2 = table6
to_bapiknumhs = table7
to_mem_initial = table8
EXCEPTIONS
update_error = 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.
READ TABLE table6 WITH KEY type = 'E' TRANSPORTING NO FIELDS.
IF sy-subrc = 0.
loop at table6 into ret.
write: / ret-type, ret-message, ret-id, RET-LOG_NO, RET-LOG_MSG_NO,
RET-MESSAGE_V1, RET-MESSAGE_V2, RET-MESSAGE_V3, RET-MESSAGE_V4,
RET-PARAMETER,RET-ROW,RET-FIELD.
endloop.
ELSE.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
*EXPORTING
WAIT =
IMPORTING
return = ret
ENDIF.
Don't forget to reward if useful.... -
Err with scheduling an abap program using open dataset
issue: have an abap program which uses "open dataset ... for input ..." to read the file.
- with manual ly running it, receive the following message "dataset_not_open".
- with scheduling it, receive same message
attempting to run an abap program as part of a process chain (ie scheduling a background job) in BI.
the abap performs the following fxns:
1) read a file on the server
2) removes delimiter, renames it
3) rewrites the file onto the server
initially used ws_upload for reading and ws_download for writing the file.
- both fxns worked fine if it is run manually --> but failed as a background (part of process chain)
- note 7925 states can't use ws_upload, download for background jobs
-so switched to "open dataset"
Any suggestions as to why the "open dataset" does not work is greatly appreciated it.
B.A.Thank you for all responses. here is more info about the err message:
sy-subrc = 8
'invalid argument'
I looked up the invalid argument in note 99155 --> due to "The destination file is no longer available during repeated file access. " So, the following steps were taken:
- file was regenerated and
- file was placed on the server to be read
have the following code:
OPEN DATASET FILENAME FOR OUTPUT IN TEXT MODE encoding default
MESSAGE D_MSG_TEXT.
also have tried the following:
OPEN DATASET d1 for input in text mode encoding default.
open dataset d1 for output in text mode encoding NON-UNICODE..
open dataset d1 for output in text mode encoding utf-8.
none had worked. system --> status shows no unicode.
THanks again for any suggestions. -
Server name message when triggering process chain through ABAP PROGRAM
Hi all,
When I am trying to execute one process chain with variant as a APD ( In this APD data is getting loaded form one Query to Transactional ODS.) This process chainis being executing through one ABAP program using the following code
CALL FUNCTION 'RSPC_API_CHAIN_SCHEDULE'
EXPORTING
I_CHAIN = 'XYZ'. ( Dummy Process chain name)
While executing this program I am getting following message :
You can specify the name of the application server here
on which all jobs in the chain are scheduled
If you do not specify a name, the jobs from batch
management are divided between the available servers
How to avoid this message.
Can we write any code in the above program to assign any fixed server name so that it will not ask for any server name.
Your help is much appreciated.
Thanks,
Uday.Hi Shanthi,
How to write exception handling for this.
Quick reply is nedeed.
Thanks,
Uday. -
How to schedule a Process Chain using ABAP Program?
Hi All,
I want to schedule the activity of extracting data from the query to a flatfile.
Currently we are schedulling it using the transaction rscrm_bapi.
I need to know , how we can achieve the same using an abap program and not ( rscrm_bapi) in a process chain.
Any help would be appreciated.
Regards
PurvaYour problem will be solved if you use the Function Module "RSPC_API_CHAIN_GET_STATUS" instead of the function module "RSPC_API_CHAIN_GET_LOG".
The function module "RSPC_API_CHAIN_GET_STATUS" gives you the STatus of the process chain, when you pass the Chain Name and the Log ID.
If you get an output
G or F - Report that the Chain is Successfully Completed.
A - The chain is Currently running
R or X - Report that the chain has ended with Errors.
Sample code :
REPORT Z_BW_GET_STATUS_PROZESSKETTE.
TABLES rspclogchain.
DATA: gt_rspclogchain LIKE rspclogchain OCCURS 0,
wa_rspclogchain LIKE rspclogchain.
DATA: gt_log LIKE rspc_s_msg OCCURS 0,
wa_log LIKE rspc_s_msg,
gt_status like RSPC_STATE.
SELECT * FROM rspclogchain
INTO CORRESPONDING FIELDS OF TABLE gt_rspclogchain
WHERE datum = sy-datum
AND chain_id = 'BD_C02_1D'.
IF sy-subrc = 0.
SORT gt_rspclogchain BY datum DESCENDING
zeit DESCENDING.
READ TABLE gt_rspclogchain
INTO wa_rspclogchain INDEX 1.
CALL FUNCTION 'RSPC_API_CHAIN_GET_STATUS'
EXPORTING
i_chain = wa_rspclogchain-chain_id
i_logid = wa_rspclogchain-log_id
IMPORTING
E_STATUS = gt_status.
IF gt_status = 'G' or gt_status = 'F'.
WRITE :/ 'BD_C02_2D chain COMPLETED'.
ELSE.
WRITE :/ 'BD_CO2_2D chain is Running or Ended with Errors'.
ENDIF.
ELSE.
WRITE :/ 'No chain BD_C02_2D started for today ! or keine Kette BD_C02_2D gestartet !'.
ENDIF.
I have just provided a sample code, you might have to edit or add necessary messages to the program.
Regards,
Ramya -
Schedule Jobs with multiple steps via ABAP Program
Hi,
I need to schedule multiple programs via background jobs on a daily basis. Since all these jobs are to be run as a single job, the various programs have to be run as steps in a major job.
I am however not very clear on how this can be done via an ABAP program ( the idea of a program is that various parameters to be passed to each program in the step can be entered dynamically rather than via variants).
I am using the JOB_OPEN and JOB_CLOSE functions and submitting the programs with selection screen parameters dynamically passed to create a job. I need to do this for various programs as a job step (WITHOUT Variants being defined).
Can anyone suggest any ideas for this? I have tried out JOB_SUBMIT Function but am not very confident I know what exactly it is for as it asks for a variant.
Thanks very much,
PreetHi Preet,
just to be sure: you know, that variants can be dynamical, too?
It's quite usual to assign dynamical current date, but it's also possible to add / subtract value and even define own functionality.
Maybe it's easier to implement a dynamical selection and handle static jobs.
If you try to plan a job (online or with JOB_SUBMIT), you have to use variants - you can create (or change) them dynamical in beforehand. Only SE38, F8, F9 is creating a temporary variant, so that no saved variant is necessary.
But if you end up creating variants dynamical, you can change one existing variant, too. Then you can use a static job definition (with periodical starting rule).
So: have a look, if dynamic variants are enough, otherwise change variants per job.
Regards,
Christian -
How to create schedule job and event trigger in XI to start a ABAP program?
Dear All:
Here are what i need to do:
1.To run a ABAP program to start an XI scenario per hour.
2.To run a ABAP program to start an XI scenario per day at 6 PM.
3.To run a ABAP program used event trigger to make sure that XI scenario has finished the process and after that wait for 10 min later and run again.
only i know is used sm36 & sm37 to set up a schedule job.
but what i don't know is how to do it step by step.
especially point 3.
are there any step by step example can show me how?
it better be simple and details...
thanks you all
Regards
Jack LeeHi,
If you want to trigger the event manually from within SAP, use transaction
SM64
in SAP this is done by scheduling a job
once a new customer is entered
your scheduled report sends customer master data
you can schedule your report (TCODE - BD12 I think) to one day or every 5 minutes... it depend on your needs and the system performence
Regards,
Surya -
Reading the XML message from Xi stored in XML format from a abap program.
Hi Gurus,
My requirement here is to read the data that will be coming from Xi from my custom abap program and updating 2 data base tables. The method is after the data mapping is done a class is generated in abap proxy in which a method is available. Inside the method i am writing the code for getting the Xi data stored as a payload message which can be seen in the transaction SXMB_MONI. My code is given below.
***begin code***
method ZII_PAYROLL_HEADER_IN~PAYROLL_HEADER_IN.
**** INSERT IMPLEMENTATION HERE **** ***
data: ln type i.
DATA: i_items TYPE TABLE OF ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
*DATA: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_TAB5.
data: wa_items type ZPAYLOAD_WRAPPER_EMPLOYEE_REC3.
DATA:PERNR TYPE STRING.
*data: it_ZPAYLOAD_WRAPPER16 TYPE ZPAYLOAD_WRAPPER16.
I_ITEMS[] = INPUT-PAYLOAD_WRAPPER-BODY-XMLDOC-PAYROLL_PERIOD_OVERVIEW-EMPLOYEE_RECORD[].
*I_ITEMS = INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
describe table i_items[] lines ln.
endmethod.
**End code***
As per the logic the data stored in the XML message should be avaialble in INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord which i am assigning to a local internal table in the class.
But in my case there is no data coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord.
But i can see the data transffered from XI in the transaction SXMB_MONI->XML message->inbound message->payload.
Is there any way to read the data stored in the XML message in the transaction SXMB_MONI.
Also why the data is not coming in
INPUT-payloadWrapper-Body-XMLDOC-PayrollPeriodOverview-EmployeeRecord inside the class.
If there is any solution for this problem please post it.You can use function module SXMB_GET_MESSAGE_PAYLOAD.
Code snippet:
DATA: ls_mast TYPE sxmspmast,
ls_msgkey TYPE sxmsmkey,
lv_bin_xml TYPE xstring,
lv_str_xml TYPE string.
* select sxmspmast into ls_mast
ls_msgkey-msgid = ls_mast-msgguid.
ls_msgkey-pid = 'RECEIVER'.
CALL FUNCTION 'SXMB_GET_MESSAGE_PAYLOAD'
EXPORTING
im_msgkey = ls_msgkey
im_archive = ' '
im_version = ls_mast-vers
IMPORTING
ex_msg_bytes = lv_bin_xml
EXCEPTIONS
not_authorized = 1
no_message = 2
internal_error = 3
no_payload = 4
OTHERS = 5.
IF sy-subrc EQ 0.
lv_str_xml = cl_soap_moni_helper=>convert_xstring_to_string( xstring_in = lv_bin_xml ).
ENDIF. -
ABAP Program back ground scheduling issue.
Hi experts,
I am trying to execute a ABAP program in a process chain but the job log shows me the following message
"Object XXXXXXX of class RE and language PT not exist"
XXXXX is the ABAP program name.
Even i tryed to excute the ABAP program itself in backgroud , but i am getting the same problem.
What´s the reason and how to solve this issue.
Message no. SF616
Best Regards,
RameshHi all,
following the complete message i was getting.
Object ZSALES_BACKUP of class RE and language EN does not exist.
Message no. SF616
Diagnosis
The specified documentation element is not in the system.
Procedure
Check that your entry is written correctly.
Regards,
Ramesh.
Maybe you are looking for
-
Macbook Pro for major video editing
Hey guys. I'm hoping you can help me out. I'm looking to invest into a notebook because im having a baby and she will be taking my office space where I currently have my 2011 27in I5 imac set up. I do some pretty major video editing in Final cut pro
-
I've connected my device through a wifi network and i accidentally signed out my apple ID for imessage then when I signed back in i cant seem to get connected though my wifi connection is working just fine. can anybody help me?
-
How to get the entered value in a web template?
Hi experts, We have a BEX web template that executes a query with an input variable. Itu2019s 0BPARTNER. It runs a report filtered by business partner We want to execute a web service in the same web temple using the same entered value for business p
-
I have a basic page built on the standard twoColFixLtHdr template that comes with CS4. Have created a new div #welcome that should extend across the whole width of the mainContent div, and the math adds up and the view layout guides shows everything
-
Converting Master Text Templates from 1280 to 720
Is there a way to do this? I'm looking to convert the HD master Templates that I use to my 720 x 480 project. Probably something simple, I'm just missing it. Thanks!