Error adding new records in an user table
Hi
I'm trying to add a new record in an user table, and after calling the add method I get the next error message:
"Generating this document requieres numbering to be determined for the document".
I've defined my user table as Master Data, and the source code is as follows:
dim m_UserTable as SAPbobsCOM.UserTable
m_UserTable = SboCompany.UserTables.Item(UserTable)
m_usertable.Code = NewValue
m_usertable.UserFields.Fields.Item("U_FIELD1").Value = NewValue
if m_userTable.add() <> 0 then
SboCompany.GetLastError(lngError, strerror)
SboApplication.MessageBox(strerror)
end if
Thanks and Best Regards
Dani
Hi Dani,
when you create a user Table as "Master Data", this table becomes a part of a UDO (User Data Object) that you have to create too.
In the version 2004A, you don't have the possibility to enter information in these kind of table using the DI. You can only do it thru the application.
You can look at a post called "Access to UDO via DI" posted 16th December 2004
Sebastien
Similar Messages
-
Adding new record in user table via DI API
Dear all,
I created in SAP B1 two user tables (Master data and master data rows)
I need to add a new header record in my master data user table by DI code.
This is my source code...
Dim sboDestTable As SAPbobsCOM.UserTable = oCompany.UserTables.Item("MY_HEAD_TABLE")
sboDestTable.Code = newCode
sboDestTable.ArchiveDate = Now
sboDestTable.UserFields.Fields.Item("u_userfield1").Value = "new value 1"
Dim ErrCode As Integer = sboDestTable.Add()
but I have an exception error message on the Add() command: "SAP B1 Cannot add rows to a MasterData type UserTable"
Can someone help me, please?
How can I add a new record in a user master data table?
Best regards
EmanueleHi,
Try this :
SAPbobsCOM.GeneralService oGeneralService;
SAPbobsCOM.GeneralData oGeneralData;
SAPbobsCOM.GeneralData oChild;
SAPbobsCOM.GeneralDataCollection oChildren;
SAPbobsCOM.GeneralDataParams oGeneralParams;
oCompService = SBO_Company.GetCompanyService();
SBO_Company.StartTransaction();
oGeneralService = oCompService.GetGeneralService("UDOCODE");
oGeneralData = (SAPbobsCOM.GeneralData)oGeneralService.GetDataInterface(GeneralServiceDataInterfaces.gsGeneralData);
//Setting Data to Master Data Table Fields
oGeneralData.SetProperty("Code", CodeHeader);
oGeneralData.SetProperty("U_ProjectC", ProjectCodeHeader);
oGeneralData.SetProperty("U_ProjectN", ProjectNameHeader);
oGeneralData.SetProperty("U_StartDate", StartDateHeader);
oGeneralData.SetProperty("U_EndDate", EndDateHeader);
//Setting Data to Child Table Fields
oChildren = oGeneralData.Child("DETAILTABLENAMEWITHOUT@");
oChild = oChildren.Add();
oChild.SetProperty("U_Code", ActivityCodeRow);
oChild.SetProperty("U_Name", NameRow);
oChild.SetProperty("U_DESC", DescriptionRow);
oChild.SetProperty("U_Building", NumberOfBuildings);
oChild.SetProperty("U_STDT1", StartDateRow);
oChild.SetProperty("U_ENDT1", EndDateRow);
oChild.SetProperty("U_ESTMTDY1", DaysFinal);
//Attempt to Add the Record
oGeneralService.Add(oGeneralData);
if (SBO_Company.InTransaction)
{ SBO_Company.EndTransaction(SAPbobsCOM.BoWfTransOpt.wf_Commit);
Hope it helps.
Thanks & Regards
Ankit Chauhan -
How to create a batch by adding a record to any Z Table
Hi Experts,
I am doing online billing info system. I need to quey the NAST table for unprocessed entries. One of the requirement is to create a batch What is meant by creating a batch by adding a record to a Z Table?
If anyone is aware, please tell me how to do it.
Thanks
DanI think this is a question you should ask the person that gave you the specs.
Rob -
How to get number of records in all user tables in one select
Please advise how to retrieve the number of records in all user tables in one select. I would likt to extract the data to excel file.
Many thanks,
AndrewYou could always analyze the tables:
declare
begin
for X in (select owner, table_name from all_tables
minus
select owner, table_name from all_external_tables) LOOP
dbms_stats.Gather_Table_Stats(X.Owner, X.Table_Name) ;
end loop;
end;
/Then: Select Owner, Table_Name, Num_Rows from All_Tables ; -
Error adding new users from local server
Hello, BPC Gurus,
We use BPC 7.0 MS SP4, MS SQL 2008 (Server name - BPCP01)
In Administration Console we're trying to add user from local server (server with SQL Database), and warning window is appeared with message "The Server Is Not Operational [BPBCP01]"
I checked Logging folder and found message:
==============[System Error Tracing]==============
[System Name] : OSoftAdminSecurity
[Job Name] : frmManageUser::GetAllObjectsFromDomainServer
[DateTime] : 2010-12-06 16:58:43
[Exception]
DetailMsg : {System.Exception: The server is not operational [BPCP01]
at Microsoft.VisualBasic.CompilerServices.LateBinding.LateGet(Object o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack)
at OSoft.Consumers.Admin.Security50.ManageDataSet.GetAllObjectsFromDomainServer(String pDomainName, String pLDAPFullPath, Int32 pDomainObjectType, String pObjectValue, String pDomainType)
at OSoft.Consumers.Admin.Security50.frmManageUser.GetAllObjectsFromDomainServer(String pDomainName, FILTER_TYPE pOptionType, String pOptionValue, String pDomainType)}
===========[System Error Tracing End ]===========
Any ideas?The installation was done with a local user or with a domain user?
You know that BPC server can not be in the same time also domain controler.
Are you using Windows authentication or CMS authentication.
If you are using CMS authentication then again you can not add local users.
If you are using Windows authentication then you have to go into server Manager
Options - Define System User Groups
Domain Type - Local Windows
System User Group Name - Local Users.
If you are using Windows 2008 make sure you addrole to have compatibility with IIS 6.because using this module bpc is adding new users.
Regards
Sorin Radulescu -
How to creat a new record in the Db table
Dear all,
I am trying to update a DB table and i want to create new records in this table every time the user changes something on the screen,
I want to append the DB table and not update it how should i go about this???
Regards,
Vijay.
PS:Hi
User INSERT statement for the same...
Please read the help...
Cheers,
Hakim -
BC4J tag - add new record only in child table using join query
Hi,
I have developed the struts base jsp for BC4J component application using jdeveloper wizard.
i have first developed the BC4J component. using emp table and dept table,
also developed the association between emp and dept , and create view object using created association.
when i haae developed the the struts base jsp for BC4J applicaion using alerady created view object. it creates automatically DataEditComponent.jsp and DataTableComponent.jsp and etc...
and when i want to add new row or record it automatically add the entry in both table ,
in above scenario i have used dept as master and emp as child table.
what is the solution , if i want to add row or record in only emp table.
please help meHi Reetesh,
I have written following code into the ADD ROW button
System.out.println("Coming in Click Event");
OAApplicationModuleImpl am = (OAApplicationModuleImpl) pageContext.getApplicationModule(webBean);
OAWebBean innerTablebean = (OAWebBean)webBean.findChildRecursive("region12");
OATableBean innerTable = (OATableBean)webBean.findChildRecursive("innerTablebean");
OAInnerDataObjectEnumerator enum = new OAInnerDataObjectEnumerator(pageContext,innerTablebean);
while(enum.hasMoreElements())
RowSet innerRowSet = (RowSet) enum.nextElement();
Row []rowsInRange = innerRowSet.getAllRowsInRange();
OARow newRow = (OARow) innerRowSet.createRow();
OADBTransaction dbt = am.getOADBTransaction();
Number b = dbt.getSequenceValue("PK_XX_BATCH_PROGRAM_PARAMETERS");
newRow.setAttribute("ProgramId", b);
newRow.setAttribute("ProgramParmId",b);
newRow.setAttribute("ParameterName",new String(""));
newRow.setAttribute("ParameterDataType",new String(""));
newRow.setAttribute("ParameterInOutType",new String(""));
innerRowSet.insertRow(newRow);
Now the problem occurs only when there are more than one rows in parent table... As many rows are there in parent table that many times the rows are being added.
With Regards,
Sandip -
DRM Error - Adding new member (3317)
I received the following error (#3317) when I tried to add a new member - can anyone please advise on how to fix this problem?
*\\Record #89 - Error adding member ABC12345 (3317)*
*\\Record #89 - Aggregate storage outlines only allow any shared member once in a stored hierarchy, including prototype.*
*ABC123456789 ABC12345 SAMPLE NAME S +*
Thanks!The answer lies within the error message itself,
Please check below thread,
Essbase Studio???
and also
http://docs.oracle.com/cd/E12032_01/doc/epm.921/html_errmsgs/aso.htm
-Murali -
How can I add a new record in an Access table.
How can I add a new record in access with LabView, using activex, without using the database connectivity tools.
Message Edited by Noawena on 05-16-2008 09:25 AMMuch easier with a toolkit but you could use ADO objects,
get connection, make a SQL object "INSERT record INTO table where ...."
Execute the parameterized query
Free up record sets data
close connection when done.
This is a very simplified version
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA -
Master detail refresh when adding new record
Guys,
Can't believe I need to ask this question ....but here we go
when adding new master record --> I want to refresh the detail record..... in my case old detail records stays as it is until i click the save button
for detail panelformlayout-->partial trigger--> i set the ids of master panelformlayout and newMasterrecord button..... but still it doesn't refresh the child record when new master record is being created.....
any thought will be greatly appreciatedIn application module it works fine......
Even on the page when i click next/previous button on masters it refreshes details information.
but when i click the button "create" it doesn't refreshes details...... (but when i save the information, i certainly see the updated details)
seems like there is some settings or binding i need to check but can't able to find one.....
any help is greatly appreciated -
Any BAPI/Function Module for adding new record with dates in PA0027
Hi all,
I am tryig to find is there any BAPI/Function module for updating new record with Start Date and End date for specified Personal Number in PA0027 Table.
In PA0027 table i will be passing start date and end date for selected personal number, it needs to add new record with this details in the table checking the condition that this start date and end dates should not be between any of of start date and end dates for the specified personal number.
thanks for ur time.
MuraliHi Raj/Suresh thanks for ur answers.
but i am having a problem,i gave this values.
INFTY -
0027
NUMBER -
00000010
SUBTYPE -
010
OBJECTID
LOCKINDICATOR
VALIDITYEND -
03/12/2006
VALIDITYBEGIN -
03/01/2006
RECORDNUMBER -
000
RECORD -
P0027
OPERATION -
CHK
TCLAS -
A
DIALOG_MODE -
0
NOCOMMIT -
Y
VIEW_IDENTIFIER
SECONDARY_RECORD
i am getting short dump saying that
The source field is too short.
The current program, "SAPLHRMM", tried to assign a field to a field symbo
However, the field is shorter than the type of the field symbol, which
is not allowed.
The statement in question is in the form ASSIGN f TO <fs> CASTING or
ASSIGN f TO <fs> with a field symbol that was created using the
STRUCTURE addition.
I tried operation - Chage,Create (same thing for all inputs)
is this correct funtion moduel for my requirment?
what ever i am passing the start and end dates this should check in the table records with this personal number and if this start date and end dates are not between of any start and end dates then it should add new record with this dates.
Thanks for ur time.
Murali. -
Insert a new record in the database table in between the records.
i va a database table which ve 100 records. but i want to insert my new record as 50th record. how i want to proceed?
thanks ,
velu.V,
This is an odd request. Why?
Ignoring that, you can ATTEMPT to insert into the 50th position IF:
1) The DB table has just had the primary key index re-built/re-shuffled to GUARANTEE that it IS in primary key order
2) And the primary key of the new record is built so that it follows the 49th record
Regardless, once this table has activity against it, its sort order can/will get out of promary key order (with adds/changes/deletes).
But when you select data from it, you can use ORDER BY or an ABAP SORT to organzie the date as needed.
Again... not sure WHY you need a record in a particular physical position... who cares... it is a relational DB. -
Creates new record in the Qualifier Table while importing.
Hi Guys,
When sending new bank details to MDM, then MDM creates a new record in the Bank Detail qualified lookup table. This is OK. But when sending exactly same bank details again to MDM, then MDM creates again a new record in the Bank Detail qualified lookup table. I would expect that it
first performs the Automap and only if it cannot find a value, it will add a new record!
Can you guys help me out from this?
Best Regards
Devaraj PKHi Devaraj,
Please check these configuration options of Import Manager
1. Default Qualified Update - The default setting for whether incoming source subrecords either are appended to, completely replace,or update the set of existing qualified links of a qualified lookup field when updating existing records.
2. Default Matching Qualifiers - The default setting for which qualifiers to use as matching qualifiers when matching existing qualified links when updating existing records.
Any operation on the qualified tables will depend on the above two options.
Reward if found useful
Regards,
Jitesh Talreja -
HELP NEEDED: Use a new record for a customized table as a workflow trigger
Hi SAP Workflow Gurus,
Good day!
One of our requirements is to have the creation of a new record in a custom database table trigger a workflow. I read and followed the steps as indicated in this link
http://www.****************/Tutorials/Workflow/Table/events.htm
As a summary, here is what I did:
1. Created a subroutine for the custom table ZPA2003 for the create event
2. Defined this event as a trigger for the custom workflow WS90000019
3. Maintained and activated the event linkage via SWETYPV
Basically I tried following the instructions indicated on the link
Note that the entries for the custom table are created via a function module.
Now during testing of the workflow, the system was able to complete the notification message. However, when I triggered the event via creation of the entry in the custom db table nothing happened
1. Is there a way to debug/find out whether the link between the subroutine in the table and event itself are connected?
2. I also tried running the event trace to check the activities executed but found nothing.
Can you guys help me check on what I may have missed out?
Regards,Hi All,
Basically these are the requirements for the work schedule substitution:
1. Employee enters the request via ESS (custom portal transaction)
2. Upon saving of the entry (request) in a custom table, this should trigger the workflow at the backend
3. The Manager should then receive a work item in his Universal Worklist at the MSS side of the portal
4. Upon clicking on the work item, a new screen will pop up showing the work schedule substitution details as well as an interface which will allow him to enter his/her usage decision
5. Depending on the decision, the workflow must execute the necessary notifications as well as changes in the custom and PA2003 tables
Now, we have accomplished step 1 and I am currently in the process for step 2. Now I have some queries:
1. For the Manager to view and approve the substitution details, I used two methods for each process (view and approve) since our ABAPer mentioned that this cannot be done in 1 function module. Is there a way to simplify this step or is it really valid that they need to be executed in 2 different methods?
2. As per our ABAPer, function Modules only import and export variables; they do not have the facility of say having tags on the details being displayed. Hence, if the details are 10001 (Employee Number), 10/20/2011 (Start Date), 10/25/2011 (End Date) the output would be 10001, 10/20/2011, 10/25/2011. Is there a way within the function module (or dynpro interface) to show it like this: Employee Number: 10001
Start Date: 10/20/2011
End Date: 10/25/2011
3. Speaking of dynpro applications, do I need to still develop one to allow the Manager to view and approve/reject the request via the MSS portal upon accessing the work item via the UWL? How would the work item go about calling the dynpro application? or is this even possible?
It would have been easier if the facility would not pass through workflows since it will be just direct web dynpro/ABAP calls. Having to include it as a work item in the UWL puts a certain twist to it
Your inputs are well-appreciated.
Regards, -
Adding new records from time dependent master data
Hi,
i need to keep track of asset movements between costcenters. currently we using costcenter hierarchy, which is not time dependent. But i can see asset movement from one cost center to another in asset master data. if i access costcenter from asset master data report is giving wrong values, because its reading last value of the costcenter. i am using 0FIAA_C11 AND 0FIAA_C12, I need to populate extra record for that asset when it moves one cost center to another cost center, if it moved in 2nd period of current fiscal year, i need to populate two records for that specific fiscal year.
any suggestion or solution.
regards
rajaIf you make cost center a time dependent attribute of 0ASSET you will be able to track the changes undergone by an asset. Anytime a costcenter changes for the asset there will be a new record that will be created and the old one will be delimited.
Maybe you are looking for
-
Attachment not seen in PO created from SRM SC
Hi, We try to send attachments from SRM shopping cart to Back end R/3. This attachment has to be captured in PO item. But it does not appear there. We have made all relevant configurations. When i search for the attachment in CV02N i can find the doc
-
Every few days, my iPad stops working properly with Messages and Safari.
I am using a 32 GB iPad mini 2 on iOS 8.1.2. Several times recently, without any warning, I have lost the use of Messages and Safari has been having troubles with certificates. I try to send an iMessage and I get the "Message Send Failure" error afte
-
InDesign CS5.5 crashes with OS X Lion 10.7.4
Hi, I got the Adobe Creative Suite 5.5 Master Collection around March and had been using it without any major issues for a while on my old Macbook. Since that computer only had two gigs of ram, and was getting old, I got a the new 15" Macbook Pro wit
-
Why is my profile stuck at 80%?
why is it that my profile completion stock on 80% thanks.. Post transferred to create its own new thread (topic); subject/title edited accordingly.
-
I want to send multiple emails to single supplier based on the Legal Entity of the invoice paid. eg. If a supplier has two invoices in a payment, both are paid by different legal entities of invoices payable .. then I want to send to different emails