Problem while Error Handling thru BAPI_PO_CREATE1
Hi,
currently im facing problem while generating error thru BAPI_PO_CREATE1
im calling bapi two times thru loop iteration,
as my data is faulty , so for 1st iteration im getting 3 error in it_return structure.
now in 2nd iteration im getting (3+3)
repeted error which is geenarated earlier(old 3 err) +(new 3 err).
im refreshing all internal table,work areas and variables, still im getting same problem,
please provide ur kind suggestion on this.
refresh : <all it>
clear : <all wa>
Loop at it into wa.
refresh : it_return.
CALL FUNCTION 'BAPI_PO_CREATE1'
Tables = IT_RETURN
endloop.
Regards
Vivek Khobragade
hi,
I found that Im getting duplicates error because of passing
BAPIMEPOITEM - PREQ_NO (Purchase Requisition Number)
BAPIMEPOITEM - PREQ_ITEM (Item Number of Purchase Requisition)
. if I dont pass these then I wont get duplicates error.
but as functional told its mandatory to update it?
please have eye on it?
regards
Vivek
Similar Messages
-
Send a email while error handler Oracle Service bus 11g
I need to be send an email while error handler in proxy service message flow.
Error Handler Node -> stage -> report action
before or after report action, I need be to send a email
Could you please help this issue? I appreciate your help.
Thanks,
sdevAdd Alert to your Error Handler and set Alert Destination with your email set in.
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/operations/monitoring.html#wp1108089
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/alertdestinations.html -
Problem while posting goods thru MB1C
Dear Friends,
Iam practising in IDES. While posting goods thru t.code MB1C, iam encountering 2 error messages.
1. Posting only possible in 4/2008 & 5/2008 periods only.
2. Posting period 005/2008 is not open.
I believe there are few MM settings to be done for this,.Kindly help in this reg.
Points assured
KrIshna CHi,
Use the T code: MMPV
give your company code and year
select open and close periods
execute
it will close for that month
keep repeating those steps until you reach your current period
this should solve your problem
Award points if you find this info useful
Regards
saprules. -
Hallo!
Please see the attached sample code. This code simply show a small WPF-Dialog.
Test 1 (showing the problem)
Simply run the program. You will see Powershell crashing "Powershell has stopped working".
The cause of this is the devision by 0 inside the Eventhandler.
We would normally expect, that the exception should be handled by the trap.
Test 2 (showing normal operation)
Simply remove the comment in line 28 ($i=1/0).
This activates an exception outside the Eventhandler. Now the Trap will be executed normally.
--> The exception can be handled by the Powershell Devloper.
Can anybody help? Why does the Error management via Trap not work inside Eventhandlers?
Thanks for some assistance and ideas!
Regards
Heike
cls
Set-StrictMode -Version 4.0
$ErrorActionPreference = "stop"
Add-Type -Assemblyname PresentationFramework
# -- Eventhandler - will be fired during form load -----------------------------------------------------
$FormLoaded = {
Write-Host "EventHandler is running..."
# Problem:
# All exceptions will crash Powershell.
# We would normally expect that the Global Trap will be executed!
# This problem occurs inside of Eventhandlers only!
# TEST 1 --> Create an Exception (Division by 0) --> Powershell crashes: "Powershell_ISE has stopped working"
$i=1/0
# -- End of Eventhandler----------------------------------------------------------------------------------
# -- Start of Demo-Programm ------------------------------------
Write-Host "Start Demo"
# -- TEST 2 ---
# Write-Host "Test 2: Testing Global Trap"
# Create an Exception (Division by 0) --> Powershell does not crash --> Global Trap will be executed --> OK
# $i=1/0
# XAML-Code for WPF-Dialog
[xml]$xaml = @"
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Test - " Height="370" Width="657" ResizeMode="NoResize" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" >
<Grid Margin="0,0,0,-4">
<Label Name="CustomerName" Content="Hello World" HorizontalAlignment="Left" Margin="10,2,0,0" VerticalAlignment="Top" Width="596"/>
</Grid>
</Window>
$Form1=[Windows.Markup.XamlReader]::Load((New-Object System.Xml.XmlNodeReader $xaml)) # Load form
Write-Host "Register Event"
$Form1.Add_Loaded($FormLoaded)
Write-Host "Starting ShowDialog"
$Form1.ShowDialog() > $null
Write-Host "End of program"
# Global Trap - all exceptions should be handled here
trap{
Write-host "Global Trap is running..."
Write-host "End of trap - program will be stopped"It works fine if you don't try to execute the code while loading and if you use a better exception handling method.
Add-Type -Assemblyname PresentationFramework
[xml]$xaml=@'
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Test - " Height="370" Width="657" ResizeMode="NoResize" WindowStyle="ThreeDBorderWindow" WindowStartupLocation="CenterScreen" ShowInTaskbar="False" >
<Grid Margin="0,0,0,-4">
<Label Name="CustomerName" Content="Hello World" HorizontalAlignment="Left" Margin="10,2,0,0" VerticalAlignment="Top" Width="596"/>
</Grid>
</Window>
$Form1=[Windows.Markup.XamlReader]::Load((New-Object System.Xml.XmlNodeReader $xaml)) # Load form
$Form1.Add_Loaded({
Write-Host "EventHandler is running..."
Try{
$i=1/0
Catch{
Write-Host "$_"
$Form1.ShowDialog()
¯\_(ツ)_/¯ -
Problem in error handling in SAX Parser
My application takes xml message as input.
If a error was found while validating, an <Errors> <Error></Error></Errors> element is included in the orginal message and send back to the user.
While validation xml message I found an interesting problem.
Created a false entry for the root element attribute.
Traced method invocation.
First the call back error method is invoked,then the start element(stored the attributes inside the starElement to a instance variable).When i tried to print the attribute .As the error method got invoked first
if showed "null".
But when i created the same case with the child elements attributes
even though invoking of the methods happens in the same sequence
attributes got assigned and can print the attibutes values.
xml is schema vaidated .Is there any restriction that root element should not contain attributes.Can any one explain how the call back methods are invoked .
Regards
Dheeraj
// import statements here
public class OperationHandler extends DefaultHandler {
private static Logger logger = Logger.getLogger(OperationHandler.class.getName());
private Attributes attributes;
private StringBuffer dataStore;
public OperationHandler() {
dataStore = new StringBuffer(100);
* Receive notification of the end of an document.
public void startDocument() {
logger.debug("OperationHandler: startDocument");
* Receive notification of the beginning of the element.
public void startElement(String uri, String lName,
String qName, Attributes attributes) {
logger.debug("OperationHandler: startElement" + lName);
dataStore.setLength(0);
* Receive notification of the end of an element.
public void endElement(String uri, String lName, String qName) {
logger.debug("OperationHandler: endElement");
// bussiness specific code
* Receive notification of the end of an document.
public void endDocument() {
logger.debug("OperationHandler: endDocument");
public void error(SAXParseException saxe) {
logger.debug("OperationHandler : error");
System.out.println("CurrentElement"+currentElement +" "+"Attributes" + attributes);
if(attributes != null) {
for(int i=0; i < attributes.getLength(); i++) {
System.out.println(saxe.getColumnNumber());
System.out.println(saxe.getLineNumber());
System.out.println(saxe.getMessage());
public void fatalError(SAXParseException saxe) throws SAXException {
logger.debug("Fatal error while parsing message");
logger.error("Error " + saxe.getMessage() );
public void warning(SAXParseException saxe) throws SAXException {
logger.warn("Warning " + saxe.getMessage() );
* Receive notification of character data inside an element.
public void characters(char[] charData,int start, int length) {
String strData = new String(charData, start, length);
if(strData != null) {
strData.trim();
dataStore.append(strData);
}Hi Muruganand,
Is the data load failing while loading data or while activating?
if the data load is failing at activation, thers is nothing you can do except editing the records in PSA and then update them.
As far as i have seen, the data load to DSO fails in Activation and not while loading. this is the reason why the records are not collected in error stack
unlike if it is a cube, the data load fails while loading collecting the recods in error stack.
hope this helps,
Thanks and Regards,
Srinath. -
An odd problem when error handling
hi experts
I encountered a very odd problem when trying to show up an error message... and hope someone can help me out.
I defined a standard action in the view, and wrote some lines of code to check the input data in the predefined methodWDDOBEFOREACTIONwhich will call a method from component controller, and that method will call message_mananger->report_t100_message to show up an E type message if any error happened. But the problem is the program does not stop there but go into the action handler(ONACTIONACT_XXX).
I think it should actually stop and show up the message rather than get into the action handler because of the action is standar...
can anyone help?
many tkxhi,
i went through your code.....the code is fine but as you told that it goes to the exception handler after coming to the message part ...this is because you are using
CALL METHOD LO_MESSAGE_MANAGER->REPORT_T100_MESSAGE
EXPORTING
MSGID =
MSGNO =
MSGTY =
P1 =
P2 =
P3 =
P4 =
MSG_USER_DATA =
IS_PERMANENT = ABAP_FALSE
SCOPE_PERMANENT_MSG = CO_MSG_SCOPE_CONTROLLER
VIEW =
SHOW_AS_POPUP =
CONTROLLER_PERMANENT_MSG =
MSG_INDEX =
CANCEL_NAVIGATION =
ENABLE_MESSAGE_NAVIGATION =
RECEIVING
MESSAGE_ID =
this function will simply report that message but will not hold the control to the same screen..
so use
CALL METHOD LO_MESSAGE_MANAGER->REPORT_FATAL_ERROR_MESSAGE......
and tell me whether it solved the problem or not....
@ sarbjeet i think that Raise_T100_error is an obselete function...rite?
thanks and regards,
sahai.s -
Problem while creating PO using BAPI_PO_CREATE1
HAI TO ALL
I AM TRYING TO CREATE PO USING BAPI
ORDER IS SUCCESFULLY GENERATED, BUT THE CONDITIONS WHATEVER I PASS IS ARE REPEATING ,
EVEN WE CONFIGURED DEFAULT VALUES MAINTAINED IN TRANSCTION 'OMFI" AND MAINTAINED Default Values for Purchasing FOR PARAMETER IN PARAMETER TAB IN USER PROFILE,
HELP ME...
REGARDS,
SNHi Sid.
I'm having this same problems on creating PO Service. Did you solve it? How did you do that?
I'm using a PR and the Category is 'Y', and I cant find where is the problem.
The tables that I'm passing to the BAPI_PO_CREATE1 are:
POITEM/ POITEMX
POACCOUNT/ POACCOUNTX
POSERVICES
POSRVACCESSVALUES
Please, if you have any idea, let me know!
Tks a lot!
Renata -
Net_PRICE problem while creating PO with BAPI_PO_CREATE1 ***ASAP
Dear All,
While creating PO with bapi BAPI_PO_CREATE1, The net price is not populating, though the logic is correct, as when i change the net price to some otrher value of in the bapi, while debugging, it is taking the Net price, but in general run, the price is over written by Gross price in PO, Please Help, Its Urgent.
Any Sample codes are welcomed, where Net_price is used.
Thanks in Advance..
Rewards Guaranteed.Dear All,
While creating PO with bapi BAPI_PO_CREATE1, The net price is not populating, though the logic is correct, as when i change the net price to some otrher value of in the bapi, while debugging, it is taking the Net price, but in general run, the price is over written by Gross price in PO, Please Help, Its Urgent.
Any Sample codes are welcomed, where Net_price is used.
Thanks in Advance..
Rewards Guaranteed. -
Problem while executing procedure thru Shell script (EXECUTE IMMEDIATE)
Hi All,
I have created a procedure where i am passing column name, tablename and business date. The procedure gets last 5 business date excluding Saturday and sunday based on business date.
i am using EXECUTE IMMEDIATE statement in the procedure, where i am replacing the column name, table name, and business date & then executing this statement.
stmt := 'select count(1) FROM '||tblname||' where trunc('||date_column||')= :1';
EXECUTE IMMEDIATE l_stmt into tbl_count using to_char(in_date, 'DD-MON-YYYY') ;
It will give me the count of all 5 days for a particular dates. When i run the procedure in SQL*Plus/TOAD, it gives me desired result. When i run this in UNIX shell script, it runs fine but at end gives following error:
SP-xxx: Bind varaible not declared.
Can someone tell me where might be the problem?Hello, if you could put a {noformat}{noformat} before and after your snippets of code please, it makes it much easier to decipher.
You have:EXECUTE IMMEDIATE l_stmt into tbl_count using to_char(in_date, 'DD-MON-YYYY') ;
Where it should be:EXECUTE IMMEDIATE l_stmt into tbl_count using TRUNC(in_date) ;
Additionally, you do not need the SQL script, you could simply have:sqlplus -S $ORA_UID/$ORA_PWD@$DSQuery <<EOF >>${TMP_DIR}/report.log 2>&1
whenever sqlerror exit failure
whenever oserror exit failure
set serveroutput on;
set pages 0;
set feed off;
exec return_date ('20090515','STIFAPACDTR','ASOFD','n');
print;
quit
EOF
if [[ $? -ne 0 ]]
then
echo "sqlplus did not run successfully,verify"
echo "For errors please check ${TMP_DIR}/report.log file\n Exiting..."
else
echo "$0 script executed successfully"
fi
exit $?
You don't need any of this:if /usr/xpg4/bin/grep -e 'ORA-' -e '^ERROR at' -e 'unknown command' ${TMP_DIR}/report.log
then
print "sqlplus did not run successfully,verify"
print "For errors please check ${TMP_DIR}/report.log file\n Exiting..."
exit 1
fi
if [http:// -s ${TMP_DIR}/report.log ]
then
print "`echo $0 script executed successfully"
grep -v '^$'${TMP_DIR}/report.log > ${TMP_DIR}/report.csv
else
print "${TMP_DIR}/report.log file not generated, verify, \n exiting"
exit 1
fi
outFLAG="n"
done
I'm not sure that that will fix your problem here, but can you try again with those changes. -
Problem while sending attachment thru 'SO_DOCUMENT_SEND_API1'
Hi Experts ,
I am trying to send two excel files thrugh the function module 'SO_DOCUMENT_SEND_API1' .
Attachments are reaching the destination email address successfully , But along with two attacments its sending one more .txt file also in which email body text is included .
Please help me to resolve the issue .
Thanks in advance .Hi Manu ,
Thanks for your reply .
I checked with setting and everything is as expected .
Attaching the code which I have used in my program for sending 2 excel , Please help .
gd_doc_data-doc_size = 1.
*Fill the document data for attachment 2
Populate the subject/generic message attributes
READ TABLE it_attach INDEX gd_cnt.
gd_doc_data-doc_size =
( gd_cnt - 1 ) * 255 + STRLEN( it_attach ).
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
CLEAR it_attachment.
REFRESH it_attachment.
it_attachment[] = it_attach[].
Describe the body of the message
CLEAR it_packing_list.
REFRESH it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
APPEND it_packing_list.
Create attachment notification
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
DESCRIBE TABLE it_attachment LINES it_packing_list-body_num.
it_packing_list-doc_type = 'XLS'.
it_packing_list-obj_descr = 'Successful Ser.no'.
it_packing_list-obj_name = 'Allot'.
it_packing_list-doc_size = it_packing_list-body_num * 255.
APPEND it_packing_list.
Fill the document data attachment 2
Populate the subject/generic message attributes
READ TABLE it_attach_1 INDEX gd_cnt.
gd_doc_data-doc_size =
( gd_cnt - 1 ) * 255 + STRLEN( it_attach_1 ).
gd_doc_data-obj_langu = sy-langu.
gd_doc_data-obj_name = 'SAPRPT'.
gd_doc_data-obj_descr = psubject.
gd_doc_data-sensitivty = 'F'.
CLEAR it_attachment.
REFRESH it_attachment.
it_attachment[] = it_attach_1[].
Describe the body of the message
CLEAR it_packing_list.
REFRESH it_packing_list.
it_packing_list-transf_bin = space.
it_packing_list-head_start = 1.
it_packing_list-head_num = 0.
it_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES it_packing_list-body_num.
it_packing_list-doc_type = 'RAW'.
APPEND it_packing_list.
Create attachment notification
it_packing_list-transf_bin = 'X'.
it_packing_list-head_start = 1.
it_packing_list-head_num = 1.
it_packing_list-body_start = 1.
DESCRIBE TABLE it_attachment LINES it_packing_list-body_num.
it_packing_list-doc_type = 'XLS'.
it_packing_list-obj_descr = 'Unsuccessful Ser.no'.
it_packing_list-obj_name = 'Allot1'.
it_packing_list-doc_size = it_packing_list-body_num * 255.
APPEND it_packing_list.
Call the FM to post the message to SAPMAIL
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = gd_doc_data
put_in_outbox = 'X'
sender_address = 'Traking System'
sender_address_type = 'INT'
commit_work = 'X'
IMPORTING
sent_to_all = gd_sent_all
TABLES
packing_list = it_packing_list
contents_bin = it_attachment
contents_txt = it_message
receivers = it_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8. -
As my title tells you, I have a problem regarding error
handling in webservices.
I've set up an application.cfc where I've implemented
generalised error handling.
Whenever a coldfusion error occurs, this is the place the
error would be caught and properly handled.
I.E.: Don't give the whole stacktrace and the raw coldfusion
error message.
The problem is that, in the case of a SOAP request, the whole
onError method seems to be discarded.
It won't invoke this method. I've tested this using a
<cflog in the onError method.
Sometimes even, when the schema is incorrect it generates an
AXIS exception.
But there's no real way in coldfusion to catch or even handle
this exception.
Does anyone else know about a way to do this in coldfusion?
How can I catch those exceptions on my server and properly
handle them before returning the SOAP fault envelope?We are implementing synchronus web services(proxy to web services) to sync master data with the external systems
In the above scenario it will be better to intimate the error details to the source system, i.e. option 2.....this will ensure that the source system application (developers/ monitors) are aware that something has gone wrong while processing data in the target.
Option 2. Send the the fault message(system error) to the source let the source system fail the message by not handling
the error, so that you get the alert with the stsndard alert configuration
Ultimately it is the business requirement which needs to be followed.....how does the business want to handle it....is the error required at the source
Regards,
Abhishek. -
Hi
I am having problems doing error handling for RGB values. I have a Java applet with 3 JTextFields whose values are parsed as int variables and stored as ints. If a value is entered that is not a value between 0 and 255 is entered, the appropriate field/s should be set to an empty string.
The problem I am having is that I am using try/catch block to try to parse as an int but then it breaks out of execution completely.
I hope this makes sense and that someone can help.
Thanks!this is because your code is probably inside one giant try catch block, what you need to do is have small ones in places where you do the parsing.
post code and i can show you how to modify it -
i am facing problems while openin an application in facebook and other places.when i go to the application,an error shows and firefox closes autmatically either i send error reports or dont.....plz help
Notes:
1) Please use the code tags when posting code or JNLP/HTML. It helps to retain indentation and avoids asterisks and plus sings being interpreted as formatting marks. To do that, select the code/JNLP etc. and click the CODE button seen on the Plain Text tab of the message posting form.
2) That launch file is invalid. You might check it (and the project in general) using JaNeLA.
3) The only place that SimpleSerial class could be, that the JRE would find, is in the root of aeon.jar. Is it actually there? -
Error while assigning Handling Unit to Delivery
Hi Friends,
I am facing the problem while assigning(manually) the HU to Delivey in VL02N.
Plant/St.Loc are not manged by WM.
It gives the following error:
HU XXXXXXX is in the warehouse. Assignment only possible through transf.order
Note:Warehouse Management is not active.
kindly guide me..
With Regards
Azeez.MohdHi,
Activate lean warehouse management,
Logistics execution>>>shipping>>>picking>>>lean warehouse.
kapil
Edited by: Kapildev Farakte on Nov 24, 2009 9:56 AM -
Hi Experts , I am currently facing problems while running restricted version copy in sap apo .. The log says 0 location products copied and that the process has timed out. the error message is " /SAPAPO/MVM_INT_SVC_CO_VER_LCW reported exception in task DP00014 " , then ending in time limit exceeded. could anyone explain why this happens. please note even if the log says 0 location products copied , in reality they have have been partially copied.
Regards
JerelHi, thank you for your replies, I found out few things about my servlet, and its portability
and i have few questions, although i marked this topic as answered i guess its ok to post
I am using javax.servlet.context.tempdir to store my files in that servletcontext temporary directory. But i dont know how to give hyperlink
of the modified files to the user for them to download the modified files.
What i am using to get the tempdir i will paste
File baseurl = (File)this.getServletContext().getAttribute("javax.servlet.context.tempdir");
System.out.println(baseurl);
baseurl = new File(baseurl.getAbsolutePath()+File.separator+"temp"+File.separator+"files");
baseurl.mkdirs();so i am storing my files in that temp/files folder and the servlet processes them and modifies them, then how to present them as
links to the user for download ?
and as the servlet is multithreaded by nature, if my servlet gets 2 different requests with same file names, i guess one of them will be overwritten
And i want to create unique directory for each request made to the servlet , so file names dont clash.
one another thing is that i want my servlet to be executed by my <form action> only, I dont want the user to simply type url and trigger the servlet
Reply A.S.A.P. please..
Thanks and regards,
Mihir Pandya
Maybe you are looking for
-
How can i replace some string in a JTextaArea/JTex at current time!
Hey guys, this problem is driving me crazy... i want to do a keyboard event.. like the emoticons in msn, so, i want that when i type /land ("latex comand"), a character appears replacing the command in the JTextArea. I did it, but when i type /happy,
-
Hi, Please help me in the following query. SELECT a.bcast_id , a.bcast_file_nm , a.clickthru_url_cd , a.list_id , a.prs_id , a.resp_cd , a.run_seq , COUNT(a.resp_cd) , c.src_grp_cd , b.site_cd FROM gca_cbx_response_test a , gca_program_run_hist b , c
-
Parent child hierarchy and measure using lookup
Hi, I'm using OBIEE 11.1.1.5 and I have an issue with a parent child hierarchy, which is setup like case 4 in this example . When I create a simple analysis using the hierarchy and a simple measure, it works fine. But when I try to use a calculated m
-
Missing contact number in callback set
Hi, I have UCCE 8.5 with CAD. When I want to schedule callback with the agent, after the client is talking, the Customer Number field has a value of -1. If I try to schedule the callback when the phone is still ringing , the Customer Number is popula
-
How to set the default behavior of slide effect?
Basically, I am using the spry widget that allow me to do the click and expand (like how sections get slide up and down) effect. (Sorry if I don't know the term, I am running a Chinese version... if it helps at all... it's "滑動" in chinese character)