BDC not inserting data in mandatory fields of MM01
Suddenly My BDC for sales maintenance View is not working as it is not inserting data in Mandatory fields.?can any one tell me the reason
Hi Satyanarayan,
1. Check ur code in debug to see if your internal table contains value in mandatory fields
2. Try executing BDC program online to figure out the problem....
3. Check ur code to see whether u r assigning values to this fields...
Let me know if these things are ok in ur code...
Enjoy SAP.
Similar Messages
-
Hi,
i have date item ,Can i insert date from text field in dd/mm/yy format.
My Column for date is DATE type in table.
How can i ido this with Text field .
ThanksI think you want to have text field for user to input the date? (instead of date picker item type)
If you are using custom PL/SQL code, it is fine, because you just use to_date(:Px_DATE_ITEM, 'dd/mm/yyyy'); or whatever format you are expecting, in your insert statement.
If it is a DML process type, I don't think it's possible - apex probably converts the text from the data picker into a date datatype at run time, but not sure it'd do it when its just a text box.
Ta,
Trent
Edited by: trent on Jan 28, 2011 10:57 PM
I take that back. So long as you have specified the application date format in the globalization attributes, and the format in the text box is the same/valid (otherwise it must be in the format as specified in NLS_DATE_FORMAT), it will insert no trouble in a DML process. http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/bldr.htm#CHDBHCBB -
Not getting data for 1 field in ODS
Hi BW Experts,
I am loading the data from R/3 to BW.I have loaded the data through PSA.The data is available in New data field. After activating the ODS, for 1 field the data is not uploaded and in the report, the values are not displaying.
I have checked the Transformations also. it is mapped correctly.But still i am not getting data for that field.
Thanks,
Siva.Thanks for the Update
1. What is your Service Pack Level?
Service Pack is 0016
2. Are you able to see the data in PSA?
Yes I can see the data in PSA
3. After load, are you able to see the value in New table?
Yes i can able to see the data in New data table
4. Anywhere, are you doing the SORTING of Data Package?
No I have not sorted the data Package.I have not written any coding on this
I have not written any coding in transformation also.
Thanks,
Siva. -
Error by inserting data into a field of datatype LONG
Hi,
When inserting data into a field of datatype long in oracle8 database via SQL Plus or SQL worksheet there occurs the following error message: "field in data file exceeds the maximum length".
If I access to the database from a selve written program via odbc there is no problem when inserting the data by the same sql statement.
So what can I do?
Thanks in advance!
JuergenWhat does your SQL statement look like?
-
Not inserting date field-very urgent
thanks in advance any help appreciated
im getting all the datas in csv as an array and inserting using the insert method, the date(not datetime) field is not inserting (vb.net), and not showing any error
im getting the datas as array string wat iv to do while inserting ive used all the conversion techniques but still not insertingHi,
You must indicate the "specified" attribute in order to inset or update any field that is not string type.
For example, I guess that your program do something like:
obj.date=%%date expression%%
but you must do also:
obj.date_specified=true
That is for any field like number, date, boolean, etc...that is not a string.
Hope it helps.
Kim. -
Could not insert Data in to the table
hello friends
I have some pbm in inserting values in to sqlserver database table.I could not insert values to the
table having varchar datatype fields.partyType is a field name of varchar type.when i try to insert
"LCL" for that field it throws following exception.
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]The name 'LCL'
is not permitted in this context. Only constants, expressions, or variables allowed here. Column
names are not permitted.
sometime it throws
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Optional feature not
implemented
If i give only numeric values to those fields it accepts.ie table accepts only integer values for all the fields.I use prepared statement for inserting data.I am inserting data to 4 tables at a time.I use ODBC driver.can u tell me where would be the problem??</p>
with regards
deviHmmmm...
ssniazi does nothing but ask for contact information or recommend Oracle products.
Based on this I consider it likely that this person is some sort of sales representative either directly or indirectly associated with Oracle.
I personally wouldn't provide any contact information to this person. Nor would I accept any advice until this person starts to actually provide some solutions or at least correctly reveals any financial interests that they might have.
In addition I believe ssniazi is in violation of the conduct code of this website because ssniazi is requesting information which will be used by a business entity without telling the users that it will be used in that way. And I expect that Oracle itself would frown on such activities.
2.3 You agree that You will not use the Website to:...(g) collect or store personal data about other users unless specifically authorized by such users. -
Hi all ;
when tryiing to call a stored procedure from java session bean ,i am getting this error message:
[BEA][Oracle JDBC Driver][Oracle]ORA-20000: Records are not inserted into the stagging table
ORA-06512: at "APPS3_MTNAOL.MTN_INV_MANAGER", line 2529
ORA-06512: at line 1
but when i am calling the same stored procedure from sql developper for test ,with the same input data, it is working fine. what can be the issue?ORA-20000 is a user-defined Error in the database. Please check with whoever developed the code within your organization on what that means.
but when i am calling the same stored procedure from sql developper for test ,with the same input data, it is working fine. what can be the issue?Obviously, you are not able to recreate the error from 'sql developer'.
Edited by: RPuttagunta on Dec 7, 2010 3:06 PM -
Hi All,
I'm having a real problem with the below method titled Not Working:. This method will INSERT data into a MS Access data base all day long, but it will always insert it at the same record. It never actually creates a new record, inserts the data and then saves that record. However, the second code example that I have titled Working: will create a new record, insert the data and then save the record. What is wrong with the Not Working code? I can't figure it out.
Please help!
Thanks,
=================================================================
Not Working:
public void add(Account account)
throws DAOException, DAOAddException
if (account == null)
throw new DAOAddException("Invalid account on add.");
Connection dbConnection = MSAccessDAOFactory.getConnection();
Statement statement = null;
try
String strSql = "INSERT INTO Accounts (" +
"USERID, PASSWORD, ROLE )" +
"VALUES (" +
DBUtil.createSqlField(account.getUserID()) + ", " +
DBUtil.createSqlField(account.getPassword()) + ", " +
DBUtil.createSqlField(account.getRole()) + ")";
statement = dbConnection.createStatement();
int nResult = statement.executeUpdate(strSql);
if (nResult != 1)
throw new DAOAddException("Account insert failed.");
else
System.out.println("Account added:");
account.show();
catch (SQLException sqlEx)
throw new DAOException("Account insert failed: " + sqlEx);
finally
if (statement != null)
try { statement.close(); }
catch (SQLException sqlEx) {}
=================================================================
Working:
try
Connection con = DriverManager.getConnection(DB_URL);
System.out.println("got connection");
Statement s = con.createStatement();
String sql =
"INSERT INTO Accounts"
+ " (USERID, PASSWORD, ROLE)"
+ " VALUES"
+ " ('"
+ userID
+ "',"
+ " '"
+ password
+ "',"
+ " '"
+ role
+ "')";
System.out.println("\n" + sql);
int i = s.executeUpdate(sql);
System.out.println("\n" + "executed");
if (i == 1)
message = "Successfully added one user.";
sql = "SELECT * FROM Accounts";
ResultSet rs = s.executeQuery(sql);
System.out.println("\n" + sql);
while (rs.next()){
System.out.println("");
System.out.println("ID: " + rs.getString(1));
System.out.println("UserID: " + rs.getString(2));
System.out.println("Password: " + rs.getString(3));
System.out.println("Role: " + rs.getString(4));
rs.close();
s.close();
con.close();
catch (SQLException e)
message = "Error." + e.toString();
error = true;
catch (Exception e)
message = "Error." + e.toString();
error = true;
if (message != null)
}If one works and the other doesn't, then they must generate different SQL statements. My idea (blatantly obvious as it may sound) would be to actually look at those statements, rather than wasting time looking at the code that generates them.
-
SQLJ with EJB. Do not insert data in the database
Hi All!
I4m developing an application using SQLJ and EJB (session beans,
container managed transactions), and when I try to insert data
in the database it doesn't work. All goes well (apparently), but
the changes do not have effect in the DB.
I've tried to use bean managed transactions, but when I try to
insert data, I get the error: NOT IN A TRANSACTION. The code of
the client in the bean managed is the following:
public class MiEJBCLiente {
public static void main(String[] args) {
String namespaceURL
= "jdbc:oracle:thin:@rabinf56:1521:prinpal";
String ejbUrl
= "sess_iiop://rabinf56:2481:prinpal/test/Bean";
String username = "xxx";
String password = "xxx";
// Setup the environment
Hashtable environment = new Hashtable();
// Tell JNDI to speak sess_iiop
environment.put
(javax.naming.Context.URL_PKG_PREFIXES, "oracle.aurora.jndi");
// Tell sess_iiop who the user is
environment.put(Context.SECURITY_PRINCIPAL, username);
// Tell sess_iiop what the password is
environment.put(Context.SECURITY_CREDENTIALS, password);
// Tell sess_iiop to use credential authentication
environment.put(Context.SECURITY_AUTHENTICATION,
ServiceCtx.NON_SSL_LOGIN);
environment.put
(jdbc_accessURLContextFactory.CONNECTION_URL_PROP, namespaceURL);
UserTransaction ut = null;
// Lookup the URL
hello.MiBeanHome homeInterface = null;
try {
Context ic = new InitialContext(environment);
DriverManager.registerDriver (new
oracle.jdbc.driver.OracleDriver());
ut = (UserTransaction)ic.lookup
("jdbc_access://test/BeanTrans");
homeInterface = (hello.MiBeanHome) ic.lookup(ejbUrl);
catch (SQLException e) {
// That's it!
try {
System.out.println("Creating a new EJB instance");
hello.MiBean remoteInterface = homeInterface.create();
ut.begin ();
remoteInterface.inserta();
ut.commit();
catch (Exception e) {
System.out.println(e.getMessage());
e.printStackTrace();
I4m waiting for suggests.
Thanks in advance...Hi,
Are you sure it's a front-end bug? Try to double check your back-end code.
If you still believe the bug is in the front-end, try to debug the insertHandler function to see if you are attaching the UserVO properly into the UserEvent.
Best regards,
Pablo Souza -
Making Moving average price a mandatory field in MM01
Hello,
I've tried to make MBEW-VERPR a mandatory field in TC MM01, but with no success.
I tried using field selection (OMSR), screen variant (SHD0), making system message M3 131 an Error - nothing worked.
Please advice.
Thanks,
DiklaDear Lakshman,
You are right in what you are saying, and to explain the reason why I'm trying to make this field mandatory, I'll describe a scenario:
You have a Make To Order purchased material and you received an order for this material from one of your customers. You go out to purchase this material.
When you do GR for this PO, the PO price does not change the moving average price (MAP) of this material - it changes the sales order MAP of this material.
If, for some reason, the customer cancels his order at this point, you will do transfer posting to this material and change it from sales order stock to own stock.
We do this transfer posting with movement type 414 and that movement does not change the MAP of the material.
Now we have stock for this material, but with MAP zero.
If now we receive another customer order, we don't have to go out for purchase because we have this material in stock.
If we will use MvT 413 to allocate the stock to the sales order,
it will be allocated with price zero.
In this case, when we'll post the outbound delivery, no financial document will be created because the price of the material was zero.
I want to prevent this situation.
If the field is mandatory, even a price of 0.01 will be enough for the creation of financial document when I post a material document.
Dikla -
Mandatory Fields!(MM01)
Hi,
I dunt have a live system here...Can anyone send me the screen shots of the whole process of creation of a material? using MM01?
PLease its very very urgent..
I just want to know where these mandatory fields fall in which screens in the SD perspective.. in basic data1
sales org1 / sales org2/ sales/ general/ mrp1/ accounting 1
Material name
Gross weight
Net weight
Quantity
Division
Plant
MRP type
Availability check
Price
Material Description
Unit of measure
Valuation Class
Purchasing Group
Material Group
Profit center
Regards
AKsales org 1:base unit of measure,material group,tax classification type.
sales org. 2:material statistic group,account assignment group,item category group
sales general: base unit of measure,availability check,transportaion group,loading group
mrp1:base unit of measure,mrp type,mrp controller,lot size,minimum and maximum lot size
accounting1: base unit of measure,valuation category(in case of split valuation),valuation class,price control,base on price control either moving price/standard price
regards,
indranil -
Hello All,
I have completed the BDC on F-30 but new problem I am facing is that the data is not changing. Only first record is taken for all the uploads.
Kindly suggest where I am going wrong.
Following is my code.
Regards,
Dilip
LOOP AT IBSID.
clear tmp.
clear ibsid1.
refresh ibsid1.
********************To get index of BSID table
perform get_index.
clear tmp.
TMP = IBSID-DMBTR.
*To avoid automatic convetsion of date
clear : bLdat1, budat1.
concatenate iabsid-bLdat6(2) iabsid-bLdat4(2)
iabsid-bLdat(4)
into bLdat1
separated by w_separator.
concatenate iabsid-budat6(2) iabsid-budat4(2)
iabsid-budat(4)
into budat1
separated by w_separator.
perform bdc_header using 'SAPMF05A' '0122'.
perform fnamval using 'BDC_CURSOR'
'RF05A-NEWUM'.
perform fnamval using 'BDC_OKCODE'
'=SL'.."'/00'.
perform fnamval using 'BKPF-BLDAT'
bLdat1. "'08.10.2005'.
perform fnamval using 'BKPF-BLART'
ibsid-blart. "'PT'.
perform fnamval using 'BKPF-BUKRS'
ibsid-bukrs."'KBL'.
perform fnamval using 'BKPF-BUDAT'
'22.09.2005'.
perform fnamval using 'BKPF-MONAT'
'6'.
perform fnamval using 'BKPF-WAERS'
ibsid-WAERS."ibsid-waers."'INR'.
CLEAR NUMB.
perform fnamval using 'BKPF-XBLNR'
ibsid-belnr.".'5503000049'.
perform fnamval using 'BKPF-BKTXT'
ibsid-vtext."'10% ADVANCE RECEIPT'.
perform fnamval using 'FS006-DOCID'
perform fnamval using 'RF05A-NEWBS'
'09'.
perform fnamval using 'RF05A-NEWKO'
ibsid-kunnr. "'104410'.
perform fnamval using 'RF05A-NEWUM'
ibsid-umskz."'A'.
perform fnamval using 'RF05A-XPOS1(04)'
'X'.
perform bdc_header using 'SAPMF05A' '0304'.
perform fnamval using 'BDC_CURSOR'
'BSEG-ZUONR'.
perform fnamval using 'BDC_OKCODE'
'=PA'.
perform fnamval using 'BDC_CURSOR'
ibsid-BELNR. "'BSEG-ZUONR'.
perform fnamval using 'BSEG-WRBTR'
tmp ."'21417.04'.
clear tmp.
perform fnamval using 'BSEG-GSBER'
GSBER."'BA02'.
perform fnamval using 'BSEG-ZFBDT'
budat1 ."'22.09.2005'.
IF IBSID-PROJK <> SPACE.
perform fnamval using 'BSEG-PROJK'
ibsid-posid."IBSID-PROJK."'C2I-05-03-T-E-D'.
else.
perform fnamval using 'BSEG-VBEL2'
IBSID-VBEL2."'R21E5G0180'.
perform fnamval using 'BSEG-POSN2'
IBSID-POSN2."'10'.
endif.
*perform bdc_field using 'BSEG-ZUONR'
'5503000049'.
perform fnamval using 'BSEG-ZUONR'
IBSID-BELNR."'5503000049'.
*perform bdc_dynpro using 'SAPMF05A' '0710'.
perform bdc_header using 'SAPMF05A' '0710'.
*perform bdc_field using 'BDC_CURSOR'
'RF05A-AGKON'.
perform fnamval using "'BDC_CURSOR'
'RF05A-XPOS1(03)'"'RF05A-AGKON'.
'X'.
perform fnamval using "'BDC_CURSOR'
'RF05A-AGKON'
IBSID-KUNNR. "'102962'.
****Addition for screen to enter Document No.
*perform bdc_dynpro using 'SAPMF05A' '0731'.
perform bdc_header using 'SAPMF05A' '0731'.
perform fnamval using 'BDC_CURSOR'
'RF05A-SEL01(01)'.
perform fnamval using 'BDC_OKCODE'
'=PA'.
perform fnamval using 'RF05A-SEL01(01)'
IBSID-BELNR."'5502700004'.
*RF05A-AGKOA.
****End Addition
perform fnamval using 'BDC_OKCODE'
'=PA'.
*****Start of new code
perform bdc_header using 'SAPDF05X' '3100'.
perform fnamval using 'BDC_OKCODE'
'=OMX'.
perform fnamval using 'BDC_CURSOR'
'DF05B-PSSKT(01)'.
perform fnamval using 'RF05A-ABPOS'
'1'.
perform bdc_header using 'SAPDF05X' '3100'.
perform fnamval using 'BDC_OKCODE'
'=Z-'.
perform fnamval using 'BDC_CURSOR'
'DF05B-PSSKT(01)'.
perform fnamval using 'RF05A-ABPOS'
'1'.
perform bdc_header using 'SAPDF05X' '3100'.
perform fnamval using 'BDC_OKCODE'
'/00'.
perform fnamval using 'BDC_CURSOR'
'RF05A-ABPOS'.
perform fnamval using 'RF05A-ABPOS'
'2'.
perform bdc_header using 'SAPDF05X' '3100'.
perform fnamval using 'BDC_OKCODE'
'=Z+'.
perform fnamval using 'BDC_CURSOR'
'DF05B-PSSKT(01)'.
perform fnamval using 'RF05A-ABPOS'
index."'2'.
perform bdc_header using 'SAPDF05X' '3100'.
perform fnamval using 'BDC_OKCODE'
'=BU'.
perform fnamval using 'BDC_CURSOR'
'DF05B-PSSKT(01)'.
call transaction 'F-30' using ibdcdata
mode 'A'
update 'S'
messages into ibdcmsgcoll.
clear : tmp,ibsid,ibsid1.
ENDLOOP.
FORM get_index.
******temp data declaration
data : itab1 like ibsid occurs 10 with header line,
itab2 like ibsid occurs 10 with header line,
itab3 like ibsid occurs 10 with header line..
******end temp data declaration
itab1[] = ibsid[].
loop at itab1.
select bukrs belnr waers zterm kunnr bldat budat projk dmbtr xblnr
buzei zterm infae from bsid
into corresponding fields of table Itab2
for all entries in itab1
where belnr =
itab1-belnr and kunnr eq itab1-kunnr and zterm eq itab1-zterm.
clear index.
loop at itab2.
read table itab2 with key
belnr = itab1-belnr kunnr = itab1-kunnr zterm = itab1-zterm into
iabsid.
index = sy-tabix.
****just to test
break-point.
numb = iabsid-waers.
exit.
endloop.
exit.
endloop.
delete itab1 index sy-tabix.
delete ibsid index sy-tabix.
clear itab1.
ENDFORM. " get_indexDilip,
Not refreshing is the problem in this case. Here is where you shoud refresh your internal table.
call transaction 'F-30' using ibdcdata
mode 'A'
update 'S'
messages into ibdcmsgcoll.
clear : tmp,ibsid,ibsid1.
<b>refresh: ibdcdata.</b>
At this point your first transaction is complete, and you don't need that data anymore. You then start the next transaction's BDC data again.
Srinivas -
pl. suggest
Hai Aveek
try this example:
=====================================
REPORT zmaschl_create_data_dynamic .
TYPE-POOLS: slis.
DATA: it_fcat TYPE slis_t_fieldcat_alv,
is_fcat LIKE LINE OF it_fcat.
DATA: it_fieldcat TYPE lvc_t_fcat,
is_fieldcat LIKE LINE OF it_fieldcat.
DATA: new_table TYPE REF TO data.
DATA: new_line TYPE REF TO data.
FIELD-SYMBOLS: <l_table> TYPE ANY TABLE,
<l_line> TYPE ANY,
<l_field> TYPE ANY.
Build fieldcat
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_structure_name = 'SYST'
CHANGING
ct_fieldcat = it_fcat[].
LOOP AT it_fcat INTO is_fcat WHERE NOT reptext_ddic IS initial.
MOVE-CORRESPONDING is_fcat TO is_fieldcat.
is_fieldcat-fieldname = is_fcat-fieldname.
is_fieldcat-ref_field = is_fcat-fieldname.
is_fieldcat-ref_table = is_fcat-ref_tabname.
APPEND is_fieldcat TO it_fieldcat.
ENDLOOP.
Create a new Table
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fieldcat
IMPORTING
ep_table = new_table.
Create a new Line with the same structure of the table.
ASSIGN new_table->* TO <l_table>.
CREATE DATA new_line LIKE LINE OF <l_table>.
ASSIGN new_line->* TO <l_line>.
Test it...
DO 30 TIMES.
ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
<l_field> = sy-index.
INSERT <l_line> INTO TABLE <l_table>.
ENDDO.
LOOP AT <l_table> ASSIGNING <l_line>.
ASSIGN COMPONENT 'SUBRC' OF STRUCTURE <l_line> TO <l_field>.
WRITE <l_field>.
ENDLOOP.
Thanks & regards
Sreenivasulu P -
Can not Insert data to Microsoft Access successfully
I am using Microsoft Access database, and trying to insert some data into a table with a "while" loop, but every time, the last row can not be inserted although the return value of the "executeUpdate()" is 1, can anyone tell what's wrong with that? thank you very much
http://forums.java.sun.com/thread.jsp?forum=48&thread=147704
Sounds like it may be the same "glitch"
Jamie -
Can not insert data to MS Access
Hi All,
I have create a table by manual in Access , in which I defined souch fields:
SORTCODE(text type),FOODNAME(text type)..., and then I use follow statement to insert value :
private DefaultTableModel model = new DefaultTableModel();
Vector collectData = new Vector(50,20);
String sqlStatement = "INSERT ������(SORTCODE,FOODNAME,MEASUREUNIT,QUANTITY,UNITPRICE,BUYDATE,SUPPLIER,BUYER,HOTELNUM,HOTELNAME,REMARK) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
try
PreparedStatement insertData = dbConnection.prepareStatement(sqlStatement);
for(int i=0;i<rowsFlag;i++)
for(int j=1;j<cols;j++)
collectData.add(model.getValueAt(i,j));
insertData.setString(1,collectData.get(0).toString());
int update = insertData.executeUpdate(); //an Exception throwed
catch(Exception ex)
ex.printStackTrace();
when run the code , it always reports Access field not correct error , how to solve the problem ?Hi Liwei,
Apart from what marych said, according to the code you posted, you are only supplying one value to your "PreparedStatement", namely:
insertData.setString(1,collectData.get(0).toString());You need to supply eleven values (in total), since your "sqlStatement" contains eleven question-mark ("?") characters.
Also note that if one of the values you supply is null, then you need to use the "setNull()" method (of "PreparedStatement") and not the "setString()" method.
Hope this helps.
Good Luck,
Avi.
Maybe you are looking for
-
I am noticing a Bunch of Preloader Problems With Captivate 5
That are not being answered on the Adobe forums and they all seem to be some what related. I am have major preloader issues and wish this would be resolved. http://forums.adobe.com/message/3595269 http://forums.adobe.com/message/3209686 http://forums
-
How do I make a score counter in Flash CS5
Iam trying to make a flash counter for a shooting game where each time you shoot a enemy you get 10 points. Does anyone know the code for score counting. I have made a dynamic text box with the word "Score" in it. Thanks!
-
I have a 800 MHz G4 iBook with 640 MB of RAM running OS 10.3.9. It is a month or two shy of three years old. The computer (my first Mac) is still in great shape and works fine for nearly everything I do. However, when I do things like import a video
-
Intalling CUCM on UCS-C200M2-VCD
HI Everyone I have a new office that we just purchaed and they want to install an additional CM Subcriber onsite. I'm familiar with doing installs on the MCS series where you just pop in the DVD and your off and running but now t
-
Mail Application quits in MacBook Pro
Hello; Mail Application quits randomly in !0.4.7 for Intel. Before I had a PowerBook G4 with the same OS X and all works fine. Since change it to this new Mac Intel, there are some bad functionalities with Apple Software and others that run under Ros