Help in debugging BADI_FDCB_SUBBAS03 (transaction FB60)
Hi Gurus,
I need some
help in debugging BADI_FDCB_SUBBAS03.
Screen Enhancement 3 on FDCB Basic Data Screen (010, 510)
I have created a new BADI "YTESTBADI" in transaction SE19
using the Definition "BADI_FDCB_SUBBAS03"
The below 2 methods are available.
PUT_DATA_TO_SCREEN_OBJECT
GET_DATA_FROM_SCREEN_OBJECT
I have been trying to debug
using statement "BREAK-POINT" , but was not successful.
<b>Am I using the correct procedure for
enhancing FB60 "Enter Incoming Invoices" transaction?
Can someone help me out?</b>
Thanks,
Aby Jacob
Hi All,
I am trying out the below suggestion from a previous posting.
<u>Can I have any userexit to populate date for FB60 & FB65 ?</u>
<b>
OBBH is customizing transaction, after running it u should see a view with company code:
- do a doubleclick on your company code;
- go to ITEM LINE level
- Choose the substitution of your company (if there are more subst than one)
- Create a new step
- In the Prerequisite u insert a filter on SYST-TCODE
- In the Substitution check if your field can be replaced, if it can't, create a routine to replace it.</b>
I am also closing this thread.
Thanks to all who have read/responded
Aby Jacob
Similar Messages
-
What transactions are helpful in debugging performance of a program
What transactions help in debugging performance related issues of a custom program?
Hi.... Gopal...,
First rectify the errors and warning in ur program with...
> SLIN -> Extended program Check
> SCID -> Code Inspecter
Then Analyze the performance level of ur program with...
> SE30 -> Runtime analysis
There you can study the actions of ur statements with Tracing the statements with...
> ST05 -> SQL Trace
Then do the modifications according to the issues...,
Thank you,
Naveen.I -
BADi called from transaction FB60
Hi all
I am looking for a BADi called from transaction FB60 in ECC 6.0. This is needed due to the fact we will develope a solution where we transfer the cost from an invoice booked to an intern order and transfer the cost and currency to CRM 7.0. Please if there is anybody who know a Badi that is triggered when the transaction FB60 is Saved, it will be very help full to us.
Best Regards
CamillaHi,
Re: Need user exit or BADI for FB60
Best regards, Christian -
FI vendor invoice PARKING for transaction FB60
hi all
I have a requirement of parking FI invoice for transaction FB60 and after searching this
forum I have noticed following points.
1) For parking FI invoice in FB60 there is no BAPI available.
2) BAPI_INCOMINGINVOICE_PARK and MRM_INVOICE_PARK are for parking MM invoice with ref. to PO
Or without PO for transaction MIRO and MIR7, so it can not be used for parking FI invoice in
FB60.
3) We can post the FI invoice in FB60 using BAPI_ACC_DOCUMENT_POST but cant park the document.
3) Direct input program RFBIBL00 can also be used for posing FI invoice in FB60 but not for parking invoice.
4) The only way to park the FI invoice in FB60 is to write BDC program for FB60.
These are my observations i might be wrong at some place. We are on SAP ECC 6.0 and it will be very helpful if I can get solution from u gurus about some BAPI or FM which can Park FI invoice (not MM invoice) in FB60.Hi,
I wamt to use BAPI_INCOMINGINVOICE_PARK or MRM_INVOICE_PARK to parking MM invoice with ref. to PO
for transaction MIR7. Kindly provide me a sample code for how to use this function modules.
because editior is one of the i/p for this function module. in MIR7 they user MRM_INVOICE_PARK function module, but how to use this function module alone.. -
IDOC/ BAPI for transaction FB60
Hi Experts,
Can anybody tell me IDOC/ BAPI for transaction FB60 for document type (KR = Original Invoice).
ThanksHi Venkata,
Please refer below code, this works similar to FB60.
REPORT z_bapi_test.
*REPORT acc_bapi_test_document .
SELECTION-SCREEN BEGIN OF BLOCK bl01 .
PARAMETERS:
check_l RADIOBUTTON GROUP rb1,
check_a DEFAULT 'X' RADIOBUTTON GROUP rb1,
post RADIOBUTTON GROUP rb1.
SELECTION-SCREEN ULINE.
PARAMETERS:
rev_c RADIOBUTTON GROUP rb1,
rev_p RADIOBUTTON GROUP rb1.
SELECTION-SCREEN ULINE.
PARAMETERS:
ref_key LIKE bapiache01-obj_key DEFAULT 'TEST000001BAPICALL',
dest LIKE bdi_logsys-logsys DEFAULT ' '.
SELECTION-SCREEN END OF BLOCK bl01 .
DATA:
gd_documentheader LIKE bapiache09,
gd_customercpd LIKE bapiacpa09,
gd_fica_hd LIKE bapiaccahd,
it_accountreceivable LIKE TABLE OF bapiacar09 WITH HEADER LINE,
it_accountgl LIKE TABLE OF bapiacgl09 WITH HEADER LINE,
it_accounttax LIKE TABLE OF bapiactx09 WITH HEADER LINE,
it_criteria LIKE TABLE OF bapiackec9 WITH HEADER LINE,
it_valuefield LIKE TABLE OF bapiackev9 WITH HEADER LINE,
it_currencyamount LIKE TABLE OF bapiaccr09 WITH HEADER LINE,
it_return LIKE TABLE OF bapiret2 WITH HEADER LINE,
it_receivers LIKE TABLE OF bdi_logsys WITH HEADER LINE,
it_fica_it LIKE TABLE OF bapiaccait WITH HEADER LINE,
it_accountpayable LIKE TABLE OF bapiacap09 WITH HEADER LINE,
it_paymentcard LIKE TABLE OF bapiacpc09 WITH HEADER LINE,
it_ext LIKE TABLE OF bapiacextc WITH HEADER LINE.
it_re LIKE TABLE OF bapiacre09 WITH HEADER LINE,
it_ext2 LIKE TABLE OF bapiparex WITH HEADER LINE.
PERFORM fill_internal_tables.
IF check_l = 'X'.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
DESTINATION dest
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of check lines:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
IF check_a = 'X'.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_CHECK'
DESTINATION dest
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of check all:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
IF post = 'X'.
DATA: l_type LIKE gd_documentheader-obj_type,
l_key LIKE gd_documentheader-obj_key,
l_sys LIKE gd_documentheader-obj_sys.
IF dest = space OR
dest = gd_documentheader-obj_sys.
post synchron
CALL FUNCTION 'BAPI_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
IMPORTING
obj_type = l_type
obj_key = l_key
obj_sys = l_sys
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
return = it_return
paymentcard = it_paymentcard
contractitem = it_fica_it.
extension2 = it_ext2
realestate = it_re.
WRITE: / 'Result of post:'. "#EC NOTEXT
PERFORM show_messages.
ELSE.
create Idoc
it_receivers-logsys = dest.
APPEND it_receivers.
CALL FUNCTION 'ALE_ACC_DOCUMENT_POST'
EXPORTING
documentheader = gd_documentheader
customercpd = gd_customercpd
contractheader = gd_fica_hd
TABLES
accountgl = it_accountgl
accountreceivable = it_accountreceivable
accountpayable = it_accountpayable
accounttax = it_accounttax
currencyamount = it_currencyamount
criteria = it_criteria
valuefield = it_valuefield
extension1 = it_ext
paymentcard = it_paymentcard
contractitem = it_fica_it
extension2 = it_ext2
realestate = it_re
receivers = it_receivers
COMMUNICATION_DOCUMENTS* APPLICATION_OBJECTS EXCEPTIONS
error_creating_idocs = 1
OTHERS = 2 .
IF sy-subrc = 0.
WRITE: / 'IDoc created'. "#EC NOTEXT
ELSE.
WRITE: sy-msgid.
ENDIF.
ENDIF.
ENDIF.
IF rev_p = 'X' OR rev_c = 'X'.
DATA: rev LIKE bapiacrev,
rev_key LIKE ref_key.
rev_key = ref_key.
rev_key(1) = 'R'.
rev-obj_type = gd_documentheader-obj_type.
rev-obj_key = rev_key.
rev-obj_sys = gd_documentheader-obj_sys.
rev-obj_key_r = ref_key.
IF rev_c IS INITIAL.
IF dest = space OR
dest = gd_documentheader-obj_sys.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = rev
bus_act = gd_documentheader-bus_act
TABLES
return = it_return.
ELSE.
it_receivers-logsys = dest.
APPEND it_receivers.
CALL FUNCTION 'ALE_ACC_DOCUMENT_REV_POST'
EXPORTING
reversal = rev
busact = gd_documentheader-bus_act
OBJ_TYPE = 'BUS6035'
SERIAL_ID = '0'
TABLES
receivers = it_receivers
COMMUNICATION_DOCUMENTS* APPLICATION_OBJECTS EXCEPTIONS
error_creating_idocs = 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.
ELSE.
WRITE: / 'IDoc created'. "#EC NOTEXT
ENDIF.
ENDIF.
ELSE.
CALL FUNCTION 'BAPI_ACC_DOCUMENT_REV_CHECK'
EXPORTING
reversal = rev
bus_act = gd_documentheader-bus_act
TABLES
return = it_return.
ENDIF.
WRITE: / 'Result of Reversal Posting:'. "#EC NOTEXT
PERFORM show_messages.
ENDIF.
COMMIT WORK.
Kindly close if it helps you.
Regards
Abhii... -
Business object for AP invoice transaction FB60
hi all,
Which business Object is triggered when we AP invoice is created
transaction FB60
thanks in advance
Naval BhattDear Naval Bhatt,
The business objects:
'BUS1055' - Accounts payable ledger
The business object Accounts payable ledger is ledger that is defined for the representation of accounting transactions with creditors.
It records values at company code level.
'BUS3008' - Accounts payable account
The business object Accounts payable document is an accounting document that contains records on value movements in a company code that are relevant to accounts payable accounting.
Reward points if this is helpful. Close the thread if your query is resolved.
Regards,
Naveen. -
Hey I am debugging a transaction PFCG (To create roles).
In this when I set a breakpoint for a FM 'PRGN_RFC_CREATE_ACTIVITY_GROUP' used in this transaction , it is set successfully.
But when i press 'F8', it does not stop there , needed some help on this.Excatly as Dev said. If you still want to ensure that break point is set correctly, do like this:
- before running PFCG switch the debugger on by typein /h in command field
- run the program, it will stop on the first line as debugger is activated
- press F9 and set break point, go to tab Function and paste PRGN_RFC_CREATE_ACTIVITY_GROUP there.
The breakpoint will be set in any calls of this FM, so when it is reached debugger will stop, otherwise it means it never goes to this point.
Regards
Marcin -
Need some help in debugging this exported script
Below is DDL generated by visio forward engineering tool . The example below consists of 2 test tables with one foreign key.
Forward engineering generated DDL script
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table1]') AND type in (N'U'))
DROP TABLE [dbo].[Table1]
GO
CREATE TABLE [dbo].[Table1] (
[test] CHAR(10) NOT NULL
, [test2] CHAR(10) NULL
GO
ALTER TABLE [dbo].[Table1] ADD CONSTRAINT [Table1_PK] PRIMARY KEY CLUSTERED (
[test]
GO
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Table2]') AND type in (N'U'))
DROP TABLE [dbo].[Table2]
GO
CREATE TABLE [dbo].[Table2] (
[test2] CHAR(10) NOT NULL
GO
ALTER TABLE [dbo].[Table2] ADD CONSTRAINT [Table2_PK] PRIMARY KEY CLUSTERED (
[test2]
GO
GO
ALTER TABLE [dbo].[Table1] WITH CHECK ADD CONSTRAINT [Table2_Table1_FK1] FOREIGN KEY (
[test2]
REFERENCES [dbo].[Table2] (
[test2]
GO
GO
When i converted this DDL script using scratch editor the migration tool gave some errors can anyone help me to resolve below
DECLARE
v_temp NUMBER(1, 0) := 0;
BEGIN
BEGIN
SELECT 1 INTO v_temp
FROM DUAL
WHERE EXISTS ( SELECT *
FROM objects
WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table1]')*/
AND TYPE IN ( N'U' )
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
IF v_temp = 1 THEN
TRUNCATE TABLE Table1;
END IF;
END;
CREATE TABLE Table1
test CHAR(10) NOT NULL,
test2 CHAR(10)
ALTER TABLE Table1
ADD
CONSTRAINT Table1_PK PRIMARY KEY( test );
--SQLDEV:Following Line Not Recognized
DECLARE
v_temp NUMBER(1, 0) := 0;
BEGIN
BEGIN
SELECT 1 INTO v_temp
FROM DUAL
WHERE EXISTS ( SELECT *
FROM objects
WHERE OBJECT_ID_ = NULL/*TODO:OBJECT_ID(N'[OPS].[Table2]')*/
AND TYPE IN ( N'U' )
EXCEPTION
WHEN OTHERS THEN
NULL;
END;
IF v_temp = 1 THEN
TRUNCATE TABLE Table2;
END IF;
END;
CREATE TABLE Table2
test2 CHAR(10) NOT NULL
ALTER TABLE Table2
ADD
CONSTRAINT Table2_PK PRIMARY KEY( test2 );
--SQLDEV:Following Line Not Recognized
ALTER TABLE Table1
ADD
CONSTRAINT Table2_Table1_FK1 FOREIGN KEY( test2 ) REFERENCES Table2 (test2)
--SQLDEV:Following Line Not Recognized
;Pl do not post duplicates - Need some help in debugging this script
-
Making "Payment Method Supplement" a required field in transaction FB60
Hello,
I need to make "Payment Method Supplement" a required field in transaction FB60. Is there a way to do this in configuration or do you need to set up a validation rule?
Thank you,
PeteHi,use Field status group in Master Data of Account
-
Hi Experts,
I am working in IS-U project in module and I have to debug the transaction FPVA, but I am trying to find out one FM during debugging but I am not getting it, is there any method to debug this transaction.Yes, here it goes:
1. set a breakpoint in your function module
2. go to transaction FPVA and enter DBUG in the OK-code field
3. it will stop at some macro. You can press F8 in the debugger. All steps from now on will be executed in the foreground so it will stop at your breakpoint set in 1)
Edited by: Janos Haupert on Jan 15, 2010 2:20 PM -
Hello again,
I have an ALV report , I have to call transaction FB60 by double click.
This transaction has no parameter ID.
I tried with with Submit ' but got dump since the program is type M.
How can I call FB60?
Regards
YifatRecord BDC for FB60 using SHDB TCODE..Code for BDC of FB60 for one record of ALV..
Cheers -
Picking problem.Can anyone help me debug my code?
Can someone help me debug my code?
I try to pick a ColorCube,
but when I pick a ColorCube in my scene,
I get the following error message:
Exception occurred during Behavior execution:
javax.media.j3d.CapabilityNotSetException: GeometryArray: no capability to get v
ertex count
at javax.media.j3d.GeometryArray.getVertexCount(GeometryArray.java:581)
at com.sun.j3d.utils.picking.PickResult.intersect(PickResult.java:654)
at com.sun.j3d.utils.picking.PickResult.generateIntersections(PickResult
.java:635)
at com.sun.j3d.utils.picking.PickResult.numIntersections(PickResult.java
:422)
at com.sun.j3d.utils.picking.PickTool.pickGeomAllSortedIntersect(PickToo
l.java:854)
at com.sun.j3d.utils.picking.PickTool.pickGeomClosestIntersect(PickTool.
java:915)
at com.sun.j3d.utils.picking.PickTool.pickClosest(PickTool.java:566)
at SimpleBehaviorApp$SimpleBehavior.processStimulus(SimpleBehaviorApp.ja
va:119)
at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
at javax.media.j3d.J3dThread.run(J3dThread.java:250)
when i try to run the following code:
import java.applet.Applet;
import java.awt.BorderLayout;
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import com.sun.j3d.utils.applet.MainFrame;
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.picking.*;
import com.sun.j3d.utils.universe.SimpleUniverse;
import javax.media.j3d.*;
import javax.vecmath.*;
import javax.swing.JOptionPane;
import java.awt.event.*;
import java.util.Enumeration;
// SimpleBehaviorApp renders a single ColorCube
// that rotates when any key is pressed.
public class SimpleBehaviorApp extends Applet
BranchGroup objRoot;
Canvas3D canvas3D;
public SimpleBehaviorApp()
setLayout(new BorderLayout());
GraphicsConfiguration config =
SimpleUniverse.getPreferredConfiguration();
canvas3D = new Canvas3D(config);
add("Center", canvas3D);
BranchGroup scene = createSceneGraph();
// SimpleUniverse is a Convenience Utility class
SimpleUniverse simpleU = new SimpleUniverse(canvas3D);
simpleU.getViewingPlatform().setNominalViewingTransform();
simpleU.addBranchGraph(scene);
} // end of SimpleBehaviorApp (constructor)
public BranchGroup createSceneGraph()
// Create the root of the branch graph
objRoot = new BranchGroup();
objRoot.setCapability(BranchGroup.ALLOW_PICKABLE_READ);
objRoot.setCapability(BranchGroup.ALLOW_PICKABLE_WRITE);
objRoot.setCapability(BranchGroup.ENABLE_PICK_REPORTING);
objRoot.setCapability(BranchGroup.ALLOW_AUTO_COMPUTE_BOUNDS_READ);
objRoot.setCapability(BranchGroup.ALLOW_AUTO_COMPUTE_BOUNDS_WRITE);
ColorCube ca=new ColorCube(0.4);
ca.setCapability(ColorCube.ALLOW_PICKABLE_READ);
ca.setCapability(ColorCube.ALLOW_PICKABLE_WRITE);
ca.setCapability(ColorCube.ALLOW_GEOMETRY_READ);
ca.setCapability(ColorCube.ALLOW_GEOMETRY_WRITE);
ca.setCapability(ColorCube.ENABLE_PICK_REPORTING);
ca.setCapability(ColorCube.ALLOW_BOUNDS_READ);
ca.setCapability(ColorCube.ALLOW_AUTO_COMPUTE_BOUNDS_READ);
ca.setPickable(true);
objRoot.addChild(ca);
SimpleBehavior myRotationBehavior = new SimpleBehavior(objRoot,canvas3D);
myRotationBehavior.setSchedulingBounds(new BoundingSphere());
objRoot.addChild(myRotationBehavior);
// Let Java 3D perform optimizations on this scene graph.
objRoot.compile();
return objRoot;
} // end of CreateSceneGraph method of SimpleBehaviorApp
//�������OSimpleBehavior�����@���������������u��
public class SimpleBehavior extends Behavior
private TransformGroup targetTG;
private Transform3D rotation = new Transform3D();
private WakeupCondition wCond;
private PickCanvas pickCanvas;
// create SimpleBehavior
public SimpleBehavior(BranchGroup targetBG,Canvas3D canvas3D)
wCond=new WakeupOnAWTEvent(MouseEvent.MOUSE_PRESSED);
pickCanvas=new PickCanvas(canvas3D,targetBG);
pickCanvas.setTolerance(5.0f);
pickCanvas.setMode(PickCanvas.GEOMETRY_INTERSECT_INFO);
public void initialize()
// set initial wakeup condition
this.setSchedulingBounds(new BoundingSphere(new Point3d(),300));
this.wakeupOn(wCond);
public void processStimulus(Enumeration criteria)
PickResult pickResult;
MouseEvent event=(MouseEvent)((WakeupOnAWTEvent) criteria.nextElement()).getAWTEvent()[0];
pickCanvas.setShapeLocation(event);
Point3d eyePos=pickCanvas.getStartPosition();
if(pickCanvas.pickClosest()!=null)
pickResult=pickCanvas.pickClosest();
Node node=pickResult.getObject();
PickTool.setCapabilities(node,PickTool.INTERSECT_FULL);
else
JOptionPane.showMessageDialog(null,"pickCanvas.pickClosest()������");
this.wakeupOn(wCond);
} // end of class SimpleBehavior
public static void main(String[] args)
Frame frame = new MainFrame(new SimpleBehaviorApp(), 256, 256);
} // end of main (method of SimpleBehaviorApp)
} // end of class SimpleBehaviorAppHi Tinyuh,
ColorCube?? I learnt thru mistakes. YEPThe following code creates a pickable colorcube.. it works for me!
public BranchGroup addObject(Vector3d vector)
BranchGroup branch = new BranchGroup();
branch.setCapability(BranchGroup.ENABLE_PICK_REPORTING);
branch.setCapability(BranchGroup.ALLOW_DETACH);
TransformGroup trans = new TransformGroup();
trans.setBounds(new BoundingSphere());
Transform3D t3d = new Transform3D();
t3d.setTranslation(vector);
trans.setTransform(t3d);
branch.addChild(trans);
ColorCube cube = new ColorCube(0.5d);
cube.setCollidable(true);
cube.setCapability(Shape3D.ALLOW_GEOMETRY_READ);
cube.setCapability(Shape3D.ALLOW_GEOMETRY_WRITE);
cube.setCapability(Shape3D.ALLOW_COLLIDABLE_READ);
cube.setPickable(true);
trans.addChild(cube);
return branch; -
hi
can anyone help me debug my code? no compilation errors or exceptions thrown. but it's not working like i want it to
createAccount() calls insertAccount() which calls getNextID() which calls selectNextID()
this should create a new account, with an account id selected from the db and incremented +1. so if i create 100 accounts, it should number accounts 1-100, the lastkey table in the db should have a value 100 for account_lastkey when i'm done.
what happens is that 100 accounts are created, all with account number 0. somehow my getNextID() and selectNextID() methods are not working. please help
* createAccount is used by administrator to add a new Account
* in the system.
* @param newAccount AccountEntryStruct containing data for new account
* @return int the new unique Account ID
* @exception com.kafein.idl.exceptions.DataValidationException
public int createAccount(AccountEntryStruct newAccount) throws
DataValidationException {
validateData (newAccount); // throws DataValidationException;
int accountID = 0;
// Create new Account.
Account anAccount = new Account(accountID,
newAccount.userName,
newAccount.userEmail,
newAccount.creditCardType,
newAccount.creditCardNumber,
newAccount.creditCardExpirationDate.year,
newAccount.creditCardExpirationDate.month,
newAccount.userPassword,
newAccount.initialBalance);
// Insert here / call method insertAccount() pass it in an account object
// or call manager object - accountmanager.put()
// Insert Account into Database
try {
insertAccount(anAccount);
catch(Exception e) {
e.printStackTrace();
accounts.put(accountID,anAccount);
return accountID;
* getNextID is used to generate a unique ID.
* @return int an Account ID
protected synchronized int getNextID() {
int nextAccountID=0;
try {
nextAccountID = selectNextID();
catch(Exception e) {
e.printStackTrace();
return nextAccountID;
* jdbc related methods
private int selectNextID() throws Exception {
int account_lastkey;
try {
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery(
"Select ACCOUNT_LASTKEY from LASTKEY");
System.out.println("Account Lastkey");
//while (rs != null && rs.next()) {
rs.next();
account_lastkey = rs.getInt(1);
System.out.println(account_lastkey);
connection.commit();
statement.close();
//return account_lastkey;
return account_lastkey;
} catch(Exception e) {
System.err.println("System Exception in selectNextID");
System.err.println(e);
throw e;
* insertAccount is used to insert a new Account in the Database
* @param int AccountID
* @return AccountStruct containing data for the existing Account
private void insertAccount(Account anAccount) throws Exception {
AccountStruct anAccountStruct = anAccount.getAccountStruct();
String acct_username = anAccountStruct.userName;
String acct_useremail = anAccountStruct.userEmail;
String acct_cc_type = anAccountStruct.creditCardType;
String acct_cc_number = anAccountStruct.creditCardNumber;
int acct_cc_expyr = anAccountStruct.creditCardExpirationDate.year;
int acct_cc_expmo = anAccountStruct.creditCardExpirationDate.month;
String acct_userpassword = anAccountStruct.userPassword;
float acct_userbalance = anAccountStruct.accountBalance;
int acct_id = getNextID();
try {
System.out.println("Inserting data...");
connection.setAutoCommit(false);
// Calculate Start time
Log.debug("Starting data insertion ( 1" +
" row) into ACCOUNT table..");
long startTime = System.currentTimeMillis();
preparedStatement = connection.prepareStatement(
"INSERT INTO ACCOUNT (ACCT_ID, ACCT_USERNAME, ACCT_USEREMAIL, ACCT_CC_TYPE, ACCT_CC_NUMBER, " +
"ACCT_CC_EXPYR, ACCT_CC_EXPMO, ACCT_USERPASSWORD, ACCT_USERBALANCE) VALUES ( ?, ?, ?, ?, ?, ? , ?, ?, ?)");
//acct_id = 1000;
preparedStatement.setInt(1, acct_id);
preparedStatement.setString(2, acct_username);
preparedStatement.setString(3, acct_useremail);
preparedStatement.setString(4, acct_cc_type);
preparedStatement.setString(5, acct_cc_number);
preparedStatement.setInt(6, acct_cc_expyr);
preparedStatement.setInt(7, acct_cc_expmo);
preparedStatement.setString(8, acct_userpassword);
preparedStatement.setFloat(9, acct_userbalance);
preparedStatement.executeUpdate();
connection.commit();
preparedStatement = connection.prepareStatement(
"UPDATE LASTKEY SET ACCOUNT_LASTKEY = ?");
preparedStatement.setInt(1, acct_id);
preparedStatement.executeUpdate();
connection.commit();
System.out.println("1 account created.");
preparedStatement.close();
long stopTime = System.currentTimeMillis();
Log.debug("Account table load complete.");
Log.debug("Load time = " +
((stopTime - startTime)/(1000f)) + " seconds");
Log.debug("Data insertion complete");
} catch(Exception e) {
System.err.println("System Exception in loadData");
System.err.println(e);
throw e;
thank you for responding!
well, i tried changine the line in createAccount() from int accountID=0; to intaccountID=1111;
this does not create 100 accounts with id 1111 - it still creates 100 accounts with id 0, so that's why, even though this method definitely needs work, i don't think that this is the line that's causing identical id's of 0 to be generated. -
Hi,
i need your help in debugging the vf03 tcode. the senariou is as follows.
in vf03 when i enter the billing document no. and press enter and then when i click on parter push button on the application toolbar and then click on ship-to-party item then under the field tax juridiction cde which is refering to txjcd field of vbadr table im getting the value as TAXUSX instead of a 10 digit value which is present in txjcd field of kna1 table for that particular customer.
and this is happening only for few invoice no's not for all.
i think that some where the data is getting changed or not properly communicated for some invoice numbers.
i need help for where to start tracing and how to debug this error out and the flow logic of debugging.
waiting for ur reply
regards,
maqsoodHi kahan,
frist you have check with your function consultant is there are mataing the TAX for that countary .
and come to debug.
easyt way is take that screen field name(patha pres F1 and technical attributes ) and program name screen name .
then seach that field in that program screen put break-point at that level and run tranction.
stil you facing any problem send more details i will try to help you.
Do Reward points..if found helpful
thaks,
saleem -
Hi All,
I need bapi which can create document for transaction FB60 and later we can do the commit explicitly. we need to upload
*HEADER *
BESG-LIFNR, BKPF-BLDAT, BKPF-BUDAT, INVFO-WRBTR,
BKPF-BUKRS, BKPF-WAERS, BKPF-XBLNR, BSEG-MWSKZ,
BKPF-BKTXT, INVFO-ZFBDT, INVFO-ZTERM
LINE ITEM
BSEG-HKONT, BSEG-SGTXT, BSEG-WRBTR, BSEG-MWSKZ, BSEG-TXJCD, BSEG-KOSTL, BSEG-KSTRG,
BSEG-MATNR, BSEG-MENGE, BSEG-MEINS
i know one bapi BAPI_ACC_INVOICE_RECEIPT_POST but i am not able to pass the value of vendor as a header data on this bapi. please suggest.
Thanks,
MadhuI have one BAPI API_ACC_INVOICE_RECEIPT_POST, i think i hcan use this BAPI for my requirement but while posting the data i am getting errors :
1. Required field AMT_BASE was not transferred in parameter CURRENCYAMOUNT
2. Required field ACCT_KEY was not transferred in parameter ACCOUNTTAX
In the excel sheet these two fields data is not given, then how can i pass the values in these two fileds.
Please reply,
Thanks
Maybe you are looking for
-
Why won't this MERGE statement work?
I am testing out a MERGE statement, which contains a subquery that will return no rows...on this condition, it should insert a record; however I get 0 records merged. Why is this? Ultimately, the hard-coded values will actually be passed in as parame
-
I have responded to a request to install upgrade 9.5.3 to Acrobat Pro. After three days I still see "Removing applications." How can I stop this? Thanks
-
What is the format of audio recorded by Microphone project
Following are the code I found : protected function recBtn_clickHandler(event:MouseEvent):void rec=new ByteArray(); mic = Microphone.getMicrophone(); mic.rate=44; mic.addEventListener
-
I can't find Journey's new song After All These Years on Itunes . . . Help.
-
Oracle licensing on Financials
Hi All Can u all let me know how the oracle charges lecensing charges for its products specially (Financials) Do they charge for the number of oracle users created in the application? I found a document in the internet which says that the METRIC is A