Problems in creating records in z table
Dear All
I have created a z table, initially i created some records in it, using SM30. But now i am not able to create any record. Kindly help me in this.
Regards
Deepti
what message your getting....
Please let me know . so that can suggest you the right appraoch..
one reason might be you have done the changes for the table...
so check the table is active in dictionory or not... if active
goto utilities -- > databaslity and activate and adjust database.
also regenerate the table maintaince generator...
Please let me know if you need further information
Regards
Satish Boguda
Similar Messages
-
Problem while createing record using plsqlEO
Hi,
I called API in insertRow() method of plsqlEO to create record and the primary key person_profile_id is the out parameter of this API and it'll generate by the API.
But while submitting the page its throwing an error message as
the attribute person_profile_id is required.
So I couldn't able to create record. What might be the reason behind this?
The insertRow method is given below,
protected void insertRow()
Diagnostic.println("Inside insertRow!!!!");
Object obj = null;
HzPartyV2Pub hzpartyv2pub = new HzPartyV2Pub();
oracle.apps.ar.hz.v2api.HzPartyV2Pub.PersonRec personrec = new oracle.apps.ar.hz.v2api.HzPartyV2Pub.PersonRec();
BigDecimal[] x_party_id = new BigDecimal[1];
String[] x_party_number = new String[1];
BigDecimal[] x_profile_id = new BigDecimal[1];
String[] x_return_status = new String[1];
BigDecimal[] x_msg_count = new BigDecimal[1];
String[] x_msg_data = new String[1];
Diagnostic.println("Before calling initializePersonRec");
initializePersonRec(personrec);
Diagnostic.println("After calling initializePersonRec");
try
OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getOADBTransaction();
OracleConnection oracleconnection = (OracleConnection)oadbtransactionimpl.getJdbcConnection();
Diagnostic.println("Before calling createPerson");
HzPartyV2Pub.createPerson(oracleconnection, "T", personrec, x_party_id, x_party_number,
x_profile_id, x_return_status, x_msg_count, x_msg_data);
Diagnostic.println("After API Call Return Status is:" + x_return_status);
catch(Exception exception)
Diagnostic.println("Inside Catch Exception: " + exception);
checkErrors();
How to solve this issue? please suggest.
Thanks & Regards,
SagarikaThe SQL statement generated by TopLink is as follows -
UPDATE PR_SUPP SET CNTC_PRSN_NAME = ''
, REMK = 'Remark 123 !', LAST_CHNG_DTTM = {ts '2002-11-29 10:59:56.0'} WHERE ((S
UPP_CODE = 'A0001') AND (LAST_CHNG_DTTM = {ts '2002-11-29 10:46:01.0'}))
The coloumn name in the generated statement conform to the coloumn names in the table. The exception is being thrown for all 'update' queries for all objects in the application. -
Problem with creating an dynamic internal table with only one field.
Hi,
i create an internal table like this:
FIELD-SYMBOLS: <GT_ITAB> TYPE TABLE,
<GS_ITAB>,
<FS>.
DATA: GT_DATA TYPE REF TO DATA.
DATA: GS_DATA TYPE REF TO DATA.
DATA: TABNAME LIKE DD03L-TABNAME.
DATA: FIELDNAME LIKE DD03L-FIELDNAME.
DATA: TBFDNAM TYPE TBFDNAM VALUE 'LFA1-NAME1'.
SPLIT TBFDNAM AT '-' INTO TABNAME FIELDNAME.
CREATE DATA GT_DATA TYPE TABLE OF (TABNAME).
ASSIGN GT_DATA->* TO <GT_ITAB>.
CREATE DATA GS_DATA LIKE LINE OF <GT_ITAB>.
ASSIGN GS_DATA->* TO <GS_ITAB>.
SELECT * FROM (TABNAME) INTO CORRESPONDING FIELDS OF TABLE <GT_ITAB>.
BREAK-POINT.
it works OK.
Now i want to create an internal table not like LFA1 but with LFA1-NAME1 Field TBFDNAM.
It's not only LFA1-NAME1 it shell be the value of TBFDNAM.
When i change
CREATE DATA GT_DATA TYPE TABLE OF (TABNAME).
to
CREATE DATA GT_DATA TYPE TABLE OF ( TBFDNAM).
i get an shortdump.
Any idea?
Regards, DieterHi Dieter,
Your approach is ok, but it will create dynamic table without a structure of NAME1. Only the line type will be suitable (but field name will not exists -> hence the error in the select statement).
In this case you need to create a dynamic table which structure consists of one field named NAME1.
This code is the appropriate one:
" your definitions
DATA: tabname LIKE dd03l-tabname.
DATA: fieldname LIKE dd03l-fieldname.
DATA: tbfdnam TYPE tbfdnam VALUE 'LFA1-NAME1'.
FIELD-SYMBOLS <gt_itab> TYPE table.
"new ones
DATA: it_fcat TYPE lvc_t_fcat WITH HEADER LINE.
DATA: gt_itab TYPE REF TO data.
" get table and fieldname
SPLIT tbfdnam AT '-' INTO tabname fieldname.
" create dynamic table with structure NAME1 (only one field)
it_fcat-fieldname = fieldname.
it_fcat-tabname = tabname.
APPEND it_fcat.
CALL METHOD cl_alv_table_create=>create_dynamic_table
EXPORTING
it_fieldcatalog = it_fcat[]
IMPORTING
ep_table = gt_itab
EXCEPTIONS
generate_subpool_dir_full = 1
OTHERS = 2.
CHECK sy-subrc = 0.
" dereference table
ASSIGN gt_itab->* TO <gt_itab>.
" insert data only to NAME1 field
SELECT * FROM (tabname) INTO CORRESPONDING FIELDS OF TABLE <gt_itab>.
I checked, this works fine:)
Regards
Marcin -
PL/SQL- Problem in creating a partitioned fact table using select as syntax
Hi All,
I am trying to create a clone(mdccma.fact_pax_bkng_t) of existing fact table (mdccma.fact_pax_bkng) using dynamic pl/sql. However, pl/sql anonymous block errors out with following error:
SQL> Connected.
SQL> SQL> DECLARE
ERROR at line 1:
ORA-00911: invalid character
ORA-06512: at "SYS.DBMS_SYS_SQL", line 1608
ORA-06512: at "SYS.DBMS_SQL", line 33
ORA-06512: at line 50
Here is pl/sql block:
-- CREATING FPB_T
DECLARE
v_owner VARCHAR2(32) := 'MDCCMA';
v_table_original VARCHAR2(32) := 'FACT_PAX_BKNG';
v_table VARCHAR2(32) := 'FACT_PAX_BKNG_T';
v_tblspc VARCHAR2(32) := v_owner||'_DATA';
CURSOR c_parts IS SELECT TABLESPACE_NAME, PARTITION_NAME,HIGH_VALUE, ROW_NUMBER() OVER (ORDER BY PARTITION_NAME) AS ROWNUMBER
FROM USER_TAB_PARTITIONS
WHERE TABLE_NAME = v_table_original
ORDER BY PARTITION_NAME;
v_cmd CLOB := EMPTY_CLOB();
v_cmd3 varchar2(300) := 'CREATE TABLE ' ||v_owner||'.'||v_table||' TABLESPACE '||v_tblspc
||' NOLOGGING PARTITION BY RANGE'||'(' ||'SNAPSHOT_DTM '||')' ||'(';
v_part VARCHAR2(32);
v_tblspc_name VARCHAR2(32);
v_row number;
v_value LONG;
v_tmp varchar2(20000);
v_cur INTEGER;
v_ret NUMBER;
v_sql DBMS_SQL.VARCHAR2S;
v_upperbound NUMBER;
BEGIN
v_cmd := v_cmd3;
OPEN c_parts;
FETCH c_parts INTO v_tblspc_name, v_part,v_value, v_row;
WHILE c_parts%FOUND
LOOP
IF (v_row = 1) THEN
v_tmp := ' PARTITION '||v_part||' VALUES LESS THAN ' ||'('|| v_value||')'||' NOLOGGING TABLESPACE '||v_tblspc_name;
ELSE
v_tmp := ', PARTITION '||v_part||' VALUES LESS THAN ' ||'('|| v_value||')'||' NOLOGGING TABLESPACE '||v_tblspc_name;
END IF;
v_cmd := v_cmd || v_tmp;
-- DBMS_OUTPUT.PUT_LINE(v_cmd);
FETCH c_parts INTO v_tblspc_name, v_part,v_value, v_row;
END LOOP;
-- DBMS_OUTPUT.PUT_LINE('Length:'||DBMS_LOB.GETLENGTH(v_cmd));
v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2'||';';
v_upperbound := CEIL(DBMS_LOB.GETLENGTH(v_cmd)/256);
FOR i IN 1..v_upperbound
LOOP
v_sql(i) := DBMS_LOB.SUBSTR(v_cmd
,256 -- amount
,((i-1)*256)+1 -- offset
END LOOP;
v_cur := DBMS_SQL.OPEN_CURSOR;
DBMS_SQL.PARSE(v_cur, v_sql, 1, v_upperbound, FALSE, DBMS_SQL.NATIVE);
v_ret := DBMS_SQL.EXECUTE(v_cur);
CLOSE c_parts;
DBMS_OUTPUT.PUT_LINE(v_cmd);
-- EXECUTE IMMEDIATE v_cmd ;
END;
The above pl/sql creates a DDL for partitioned fact table(new) based on an existing fact table and get executes through CLOB.
Please look into the issue and let me know any changes or modifications/suggestions that are required to fix the issue. Any help is appreciated.
Thank You,
SudheerThink this is your problem:
v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2'||';';Remove the SQL terminator ';' ... dynamic SQL doesn't require it, try this instead:
v_cmd := v_cmd||')'||' AS SELECT ' || '*'||' FROM ' || v_owner||'.'|| v_table_original ||' WHERE '||'1'||'='||'2';Thanks
Paul -
Problem when creating a transparent ddic table in a report
Hi!
I have a problem creating a transparent table dynamical in a report. I tried both function modules that I could find (DDIF_TABL_PUT and RPY_TABLE_INSERT) but I wasn't able to get a table created.
Now I'm trying it with RPY_TABLE_INSERT (seems easier) but I'm getting an error (i think IX008) after running the report that the name is not proper for a view... I don't even want to create an view... I want to create a transparent table.
Here is the coding passage:
lv_tabname = 'ZD000000_0000000'.
CLEAR: lt_tabl_fields.
lt_tabl_fields-tablname = lv_tabname.
lt_tabl_fields-fieldname = 'GUID'.
lt_tabl_fields-dtelname = 'ZMODULE_GUID'.
lt_tabl_fields-checktable = ''.
lt_tabl_fields-keyflag = 'X'.
lt_tabl_fields-position = 1.
lt_tabl_fields-reftable = ''.
lt_tabl_fields-reffield = ''.
lt_tabl_fields-inclname = ''.
lt_tabl_fields-notnull = 'X'.
APPEND lt_tabl_fields.
CLEAR: lt_tabl_fields.
lt_tabl_fields-tablname = lv_tabname.
lt_tabl_fields-fieldname = 'TIMESTAMP'.
lt_tabl_fields-dtelname = 'ZCREATION_TSTMP'.
lt_tabl_fields-checktable = ''.
lt_tabl_fields-keyflag = ''.
lt_tabl_fields-position = 2.
lt_tabl_fields-reftable = ''.
lt_tabl_fields-reffield = ''.
lt_tabl_fields-inclname = ''.
lt_tabl_fields-notnull = 'X'.
APPEND lt_tabl_fields.
j = 3.
*& Get structure of current module
CALL METHOD lr_analysis_module->get_field_list
IMPORTING
er_field_list = lr_field_list.
*& Get first field
i = 1.
CALL METHOD lr_field_list->get_field
EXPORTING
index = i
RECEIVING
field = lr_field.
WHILE lr_field IS NOT INITIAL.
CLEAR: lt_tabl_fields.
lt_tabl_fields-tablname = lv_tabname.
lt_tabl_fields-fieldname = lr_field->get_name( ). "fieldname in module
lt_tabl_fields-dtelname = lr_field->get_reference_type( ). "fieldtype for current field
IF lt_tabl_fields-dtelname IS INITIAL.
lt_tabl_fields-dtelname = lr_field->get_type( ).
ENDIF.
lt_tabl_fields-checktable = ''.
lt_tabl_fields-keyflag = ''.
lt_tabl_fields-position = j.
lt_tabl_fields-reftable = ''.
lt_tabl_fields-reffield = ''.
lt_tabl_fields-inclname = ''.
lt_tabl_fields-notnull = 'X'.
APPEND lt_tabl_fields.
j = j + 1.
i = i + 1.
CALL METHOD lr_field_list->get_field
EXPORTING
index = i
RECEIVING
field = lr_field.
ENDWHILE.
CLEAR: ls_tabl_inf.
ls_tabl_inf-tablname = lv_tabname.
ls_tabl_inf-language = sy-langu.
ls_tabl_inf-tablclass = 'TRANSP'.
ls_tabl_inf-sqltab = ''.
ls_tabl_inf-buffered = ''.
ls_tabl_inf-shorttext = lv_comment.
ls_tabl_inf-acttype = '00'.
ls_tabl_inf-inclexist = ''.
ls_tabl_inf-masterlang = sy-langu.
ls_tabl_inf-maintflag = 'X'.
ls_tabl_inf-deliverycl = 'A'.
ls_tabl_inf-mod_user = sy-uname.
ls_tabl_inf-mod_date = sy-datum.
ls_tabl_inf-mod_time = sy-uzeit.
CLEAR: ls_tabl_technics.
ls_tabl_technics-tablname = lv_tabname.
ls_tabl_technics-language = sy-langu.
ls_tabl_technics-tablcat = 4.
ls_tabl_technics-tablclass = 'APPL0'.
ls_tabl_technics-buffering = ''.
ls_tabl_technics-keyfieldno = ''.
ls_tabl_technics-logging = ''.
ls_tabl_technics-storetype = ''.
ls_tabl_technics-moduser = sy-uname.
ls_tabl_technics-moddate = sy-datum.
ls_tabl_technics-modtime = sy-uzeit.
ls_tabl_technics-transpflag = 'X'.
ls_tabl_technics-translate = ''.
CALL FUNCTION 'RPY_TABLE_INSERT'
EXPORTING
* LANGUAGE = SY-LANGU
table_name = lv_tabname
* WITH_DOCU = ' '
* DOCUTYPE = 'T'
* TRANSPORT_NUMBER = ' '
DEVELOPMENT_CLASS = 'ZD000000'
tabl_inf = ls_tabl_inf
tabl_technics = ls_tabl_technics
TABLES
tabl_fields = lt_tabl_fields
* DOCU_TABLE_USER =
* DOCU_TABLE_TECH =
* EXCEPTIONS
* CANCELLED = 1
* ALREADY_EXIST = 2
* PERMISSION_ERROR = 3
* NAME_NOT_ALLOWED = 4
* NAME_CONFLICT = 5
* DB_ACCESS_ERROR = 6
* OTHERS = 7
IF sy-subrc <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Any ideas?
Thanks and best regards.thanks for the quick response Volker.
When I use the DB_CREATE_TABLE fm I only can create fields with datatype declaration (ddfield-datatype), but I need a fm where I can also create a field with a data element, because I'm generating the fields dynamically in the report based on the datatype/data element for a field.
edit: I'll use the datatype/length/decimal of the corresponding data element. this should work...
Edited by: Toni Fabijancic on Feb 10, 2009 3:42 PM -
Creating records in DOKTL table
Hello Everyone,
I have to create new records for table DOKTL.
I have the required data to be entered, but i didnt see a table maintenance generator for this table.
I would like to know how should I go about to enter values in it?
Is there some Function Module etc. ?
Using an Insert statement would be the last thing in this case.
ThanksHi,
Please follow this steps
Please go to SE16N,
Give the table name
Press Enter
In the transaction code bar enter '&SAP_EDIT' and press enter.
SAP editing function is activated.
now click on execute.
The table will open in EDIT mode. But, please make sure that you are editing correctly the totals.
1. Use SE09 to
Either create a new workbench request
or goto the old request (Objects Tab)
2. Press Edit button
3. Enter the following in the row:
Prog Id = R3TR
Obj Type = TABU
Obj Name = MyTableName
Then Press ENTER
4. A Key Button will come on the Right column.
Press it. A New screen will come.
5. In table name enter : MyTableName
In Table Keys enter : KeyFields*
Save the request and transport.
Hope it helps.
Regards
Hiren K.Chitalia -
Bullet problem when creating text frames and tables in InDesign CS5
Every time I create a new text frame or table in InDesign CS5 and paste information there, the first row in the table or several lines of text come out with bullet points. I'm sure this is a setting or style at some point I created and now am unsure of how to delete. I would like the new text frames and tables to not include bullet points as a default when imported or pasted. Any thoughts? Thanks!
Defaults for text in the current document are made with no text selected. Turn off bullets and they should stay off (but check the styles, too, you might have accidentally set a bulleted style as the defualt and you should change the default style instead). If this is happening in all files, you need to do it with nothing open to reset the default for all new documents (existing files, unfortunately, need to be fixed one at a time).
-
Problem when creating list box in table control
Hi every body ,
I am placing a list box in table control , the list box is coming perfectly but
when I am scrolling or pressing enter the data in that field is clearing.
if I remove the list box , and i enter the data directly and scrolling or press enter
the data is not clearing.
But only for list box only it is be having like that
what is the problem?
the code is as follows
*{ INSERT DEVK935807 1
*& Module glaccuontlist INPUT
text
module glaccuontlist input.
type-pools vrm.
tables: zglaccount.
data:
name type vrm_id,
list type vrm_values,
value like line of list.
clear:value.
refresh: list.
name = 'ACGL_ITEM-HKONT'.
select * from zglaccount.
value-key = sy-dbcnt.
value-text = zglaccount-hkont.
append value to list.
clear value.
endselect.
call function 'VRM_SET_VALUES'
exporting
id = name
values = list
EXCEPTIONS
ID_ILLEGAL_NAME = 1
OTHERS = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
endmodule. " glaccuontlist INPUT
*} INSERT
thanks in advance.\
srinivas.Hi srinivasa,
try it.
select * from zglaccount.
<b>value-key = zglaccount-hkont.</b>
value-text = zglaccount-hkont.
append value to list.
clear value.
endselect.
Regards
Allan Cristian -
Problem while creating index for temporary table...
Hi,
i have created index for a temporary table and this script should used by multiusers.So when second user connecting to it is giving index i mean object already exists.
So what i need is when the second user connected the script should create one more index on temporary table.Will sql server provide any random way of creating indexes if the index exists already with that name??
Thank You,Nope..
SQL Server is cleaver enough to handel this situation.
When you create a index or constraint on the Temp Table, eventhough the index name is duplicate it will allow.
But it only possible on temp tables (prefixed with single #).
To Test this,
Open Two window,
Execute the below window on the opened 2 window..
create table #test
id int
Insert Into #test values(1);
Insert Into #test values(2);
Create clustered index testindex on #test(id)
Now you wont get any error on any of the window. Rite?
To fetch the created index details, execute the below code on any one of the window..
select * from sysindexes where name like '%test%'
Now you can see the 2 rows with same indexname but refereing with different table. Yes. all the temp tables (#) will be suffixed with unique number to avoid the object already found error while multiple users connects.
-
Problem while creating generic DataSource using table
Hello all,
I am creating a generic DataSource using table EKBE. It is giving error " invalid extract structure template EKBE ". The reason is " The system tried to generate an extract structure with the template structure EKBE. This operation failed, because the template structure quantity fields or currency fields, for example, field MENGE refer to a different table (EKPO)".
Could you suggest how to approach?
Thanks,
Zak.hi zahir,
In your case the reference table used for quantity is ekko and the field is meins.
and the reference table used for currency is ekpo and the field is waers.
So you are not taking data from a single table. so you better create a view give the table name ekbe and select the corresponding fields you want.
Add MEINS and WAERS and as well your required field in the view for example Zview and for Quantity field mention Zview as reference table and reference field as MEINS same for WAERS.
try this if it doent work, tell me what error you are facing.
with regards!
ramesh -
Unable to create records in database using PHP Data Service
Hello, I've been stuck on this for a few days and search up and down for this on the net, no response I've found has worked, so I come to you...
Here are the steps I've taken, I think it's pretty standard
1. I have a macbook pro running osx 10.7.3
2. I installed MAMP all default (I've acually reinstalled this because someone suggested this might fix it)
3. Thru phpMyAdmin I created a database called my_test
4. In that database I created a table, this is the export of that table: (I've also tried this with InnoDB which is the default)
CREATE TABLE `customer` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`email` varchar(150) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
5. I created a new Flx Project (Running Flash Builder 4.5.1 Premium)
Project Name: PHPTest
Application Type: Desktop (Although I've done the same thing with Web and got the same results)
>> Next
Application Server Type: PHP
Web Root: /Applications/MAMP/htdocs/
URL Root: http://localhost:8888/
Clicked 'Validate Configuration' and that worked
Output Folder: /Applications/MAMP/htdocs/PHPService (default by Flash Builder)
>> Finished
6. On the Data/Services tab on the bottom I click 'Connect to Data/Service...'
Select 'PHP'
>> Next
Select 'Click here to generate a sample'
Select 'Generate from database' radio button
Username: root
Password: root (default for MAMP)
Host name: localhost
Server port: 8889 (default for MAMP MySQL port, the HTTP port default is 8888 which in both cases seem to work but every video I've seen that uses MAMP on youtube uses 8889)
Database: my_test
Click 'Test Connection' (works)
Table: customer
Primary Key: id (this field is greyed out and Flash Builder selects 'id' which it figures out from the SQL table)
>> Click OK
7. Then if I don't have the Zend Framework folder in my /Applications/MAMP/htdocs/ folder it tells me its going to create that and I say alright. Then Flash Builder says stuff about how this is really only for testing and not production server ready and I say alright.
8. Then it takes me back to the Form from Step 6 when I get the chance to select 'Click here to generate a sample'
These fields are now filled with this data automaticly:
PHP Class: /Applications/MAMP/htdocs/PHPTest/services/CustomerService.php
Service name: CustomerService
Service package: services.customerservice
Data type package: valueObjects
>> Click Next (shows all the functions that will be now availible)
>> Click Finished (End of the forms and it opens Dreamweaver to the php file it created CustomerService.php which I have no need to edit so I close that down)
9. Back in Flash Builder I switch to design view and drag a datagrid onto the big white area in the middle, whatever that is called.
10. Then below in Data/Services tab on the bottom I click drag the function 'GetAllCustomer' on top of the datagrid.
I say yes to rebound and click ok and the view of the datagrid is updated with the colums from the 'customer' table in mySQL.
(Now let me say that when I hit save and compile this, if I actually had records in this table that I insert thru phpMyAdmin, this does show in the datagrid. So for the whole CRUD thing I am able to get the R which is Read)
11. Now going back to the design view in Flash Builder I will create a form to create records in the table... (I guess this isn't really a step)
12. In the Data/Service tab on the bottom I select 'createCustomer' function and then there is an icon called 'Generate Form' that looks like a white piece of paper with a gear on the bottom of it.
13. This opens up a new form and since I don't have a crazy bunch of fields in my table I just click Finished (If you click next you can specify which fields you want to exclude from the form but this time I don't need to)
14. This actually creates 2 forms if you look at the code, the second just shows the return type from when you click 'CreateCustomer' button on the first form. Because they overlap in design view I drag the form out of the way so you can see the input form, the return form, and the datagrid
15. Then I save and compile...
(Also if your actually reading this I didn't remove the id form field, I get the same result either way, but if you do remove the form field in the code/design you also have to update the button function to not deal with the id before it gets sent off to the php page since in this case the MySQL table is set to auto_increment the id, sorry this doesn't make much sence but this little area doesn't matter much either way)
16. Now fill in whatever data you want for name and email, try differnt numbers in the id field like 0, nothing, 1, 1000 and click 'CreateCustomer'
(For me nothing happens, no return is put in the return field, no error pops up and the datagrid is not updated with the new record, also going over to phpMyAdmin and checking out the table browse doesn't show any changes either, I know the button is calling the function because if I add a state change in that function it changes, it would seem that the line:
createCustomerResult.token = customerService.createCustomer(customer2); doesn't do anything)
So any idea what is wrong here, I'm convenced it's something stupid easy simple I just can't see it.In case you need more info, here is a code dump on a mxml project that has this problem:
<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:customerservice="services.customerservice.*"
xmlns:valueObjects="valueObjects.*"
currentState="State1">
<fx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
protected function dataGrid_creationCompleteHandler(event:FlexEvent):void
getAllCustomerResult.token = customerService.getAllCustomer();
protected function button_clickHandler(event:MouseEvent):void
var customer2:Customer = new Customer();
customer2.id = parseInt(idTextInput.text);
customer2.name = nameTextInput.text;
customer2.email = emailTextInput.text;
currentState = "Test";
createCustomerResult.token = customerService.createCustomer(customer2);
]]>
</fx:Script>
<s:states>
<s:State name="State1"/>
<s:State name="Test"/>
</s:states>
<fx:Declarations>
<s:CallResponder id="getAllCustomerResult"/>
<customerservice:CustomerService id="customerService"
fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
showBusyCursor="true"/>
<valueObjects:Customer id="customer"/>
<s:CallResponder id="createCustomerResult"/>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:DataGrid id="dataGrid" includeIn="State1" x="330" y="10" width="392"
creationComplete="dataGrid_creationCompleteHandler(event)" requestedRowCount="4">
<s:columns>
<s:ArrayList>
<s:GridColumn dataField="id" headerText="id"></s:GridColumn>
<s:GridColumn dataField="name" headerText="name"></s:GridColumn>
<s:GridColumn dataField="email" headerText="email"></s:GridColumn>
</s:ArrayList>
</s:columns>
<s:typicalItem>
<fx:Object id="id1" email="email1" name="name1"></fx:Object>
</s:typicalItem>
<s:AsyncListView list="{getAllCustomerResult.lastResult}"/>
</s:DataGrid>
<s:Form includeIn="State1" defaultButton="{button}">
<s:FormItem label="Id">
<s:TextInput id="idTextInput" text="{customer.id}"/>
</s:FormItem>
<s:FormItem label="Name">
<s:TextInput id="nameTextInput" text="{customer.name}"/>
</s:FormItem>
<s:FormItem label="Email">
<s:TextInput id="emailTextInput" text="{customer.email}"/>
</s:FormItem>
<s:Button id="button" label="CreateCustomer" click="button_clickHandler(event)"/>
</s:Form>
<s:Form includeIn="State1" x="0" y="204">
<s:FormItem label="CreateCustomer">
<s:TextInput id="createCustomerTextInput" text="{createCustomerResult.lastResult as int}"/>
</s:FormItem>
</s:Form>
</s:WindowedApplication> -
How to add record in Qualified table using MDM Java API
Hi experts,
I am trying to add a record into a Table.
but I am facing the problem in setFieldValue method.
//Getting Field-ID to pass in setFieldValue() method.
FieldId[] fields = new FieldId[6];
fields[0] = repSchema.getFieldId("GTINs", "Description");
fields[1] = repSchema.getFieldId("GTINs", "Unit_Descriptor");
fields[2] = repSchema.getFieldId("GTINs", "GTIN");
fields[3] = repSchema.getFieldId("GTINs", "Alternate_Item_Classifications");
fields[4] = repSchema.getFieldId("GTINs", "Country_Of_Origin");
fields[5] = repSchema.getFieldId("GTINs", "Bar_Coded");
Record rec = RecordFactory.createEmptyRecord(mainTableId);
rec.setFieldValue(fields, );
but I am not getting how to assign the value to these fields using MDMvalue Interface.
Can anyone provide me the code sample or Code flow so that I can do this.
Plz help me it'll be great help for me.
Thanks
Tarun
Edited by: Tarun Sharma on Feb 4, 2008 11:39 AM
==========================================================================================
Hi Gurus
I found the way to add the MDMValue in setFieldValue Method.
we can set like this:
setFieldValue(<fieldId object like fieldId[], <MdmValue like this> new StringValue("ABC"));
Now I am facing problem in adding value to lookup flat table.
According to the setFieldValue method we can assign the loookup like this:
setFieldValue(<fieldId[0]>, new LookpValue(<here we have to pass the recordID of lookup table>);
so I want to know how I can pass the recordId of lookup table here.
Please suggest.
Thanks
Tarun Sharma
Edited by: Tarun Sharma on Feb 4, 2008 3:15 PM
Edited by: Tarun Sharma on Feb 4, 2008 3:25 PM
Edited by: Tarun Sharma on Feb 8, 2008 6:58 PMHi Andrea,
I tried your suggestion but now i am getting Type Mismatch Error.
Please suggest me what I can do?
//TableId for Lookup[Flat].
TableId lookupTableId = repSchema.getTableId("Return_Goods_Policies");
FieldId[] ReturnGoodsPolicyTableIdFields = new FieldId[1];
ReturnGoodsPolicyTableIdFields[0] = repSchema.getFieldId("Return_Goods_Policies", "Name");
Record recLookup = RecordFactory.createEmptyRecord(lookupTableId);
try{
recLookup.setFieldValue(ReturnGoodsPolicyTableIdFields[0], new StringValue("New_Brand"));
}catch(Exception ex){
System.out.println(ex);
//Creating Record in Qualified Table - Request Details
CreateRecordCommand createLookupcommand = new CreateRecordCommand(simpleConnection);
createLookupcommand.setSession(session);
createLookupcommand.setRecord(recLookup);
createLookupcommand.execute();
//Getting the recordId of Lookup record.
RecordId lookupRecordId = createLookupcommand.getRecord().getId();
//Table Id for Qualified table.
TableId qualifiedTableId = repSchema.getTableId("Ext_Hardlines");
FieldId[] ExtHardlinesFields = new FieldId[3];
ExtHardlinesFields[0] = repSchema.getFieldId("Ext_Hardlines", "Name");//Text
ExtHardlinesFields[1] = repSchema.getFieldId("Ext_Hardlines", "Pieces_Per_Trade_item");//Integer
ExtHardlinesFields[2] = repSchema.getFieldId("Ext_Hardlines","Return_Goods_Policy");
Record recQualified = RecordFactory.createEmptyRecord(qualifiedTableId);
try{
recQualified.setFieldValue(ExtHardlinesFields[0], new StringValue("Qualified Value"));
recQualified.setFieldValue(ExtHardlinesFields[1], new StringValue("Qualified Description"));
recQualified.setFieldValue(ExtHardlinesFields[2], new LookupValue(lookupRecordId));
}catch(Exception ex){
System.out.println(ex);
//Creating Record in Qualified Table - Request Details
CreateRecordCommand createQualifiedCommand = new CreateRecordCommand(simpleConnection);
createQualifiedCommand.setSession(session);
createQualifiedCommand.setRecord(recQualified);
createQualifiedCommand.execute(); I am getting this Type match here, but i m not getting what mistake i did.
RecordId qualifiedRecordId = createQualifiedCommand.getRecord().getId();
//Adding to Main Table
TableId mainTableId = repSchema.getTableId("GTINs");
FieldId[] gtinsFields = new FieldId[1];
gtinsFields[0] = repSchema.getFieldId("GTINs","Ext_Hardlines");
Record recMain = RecordFactory.createEmptyRecord(mainTableId);
//Adding the new record to Qualifed Lookup value and setting the Yes Qualifiers
QualifiedLookupValue qualifiedLookupValue = new QualifiedLookupValue();
qualifiedLookupValue.createQualifiedLink(qualifiedRecordId);
try{
recMain.setFieldValue(gtinsFields[0], new QualifiedLookupValue(qualifiedLookupValue));
}catch(Exception ex){
System.out.println(ex);
CreateRecordCommand createCmd = new CreateRecordCommand(simpleConnection);
createCmd.setSession(session);
createCmd.setRecord(recMain);
createCmd.execute();
Could you help me out?
Thanks
Tarun -
How To Display Recently Created Records
Hi
I want to display the recently created records into a table in sapui5.
Is there any control to display the recently created records.
Please suggest me if any control is there.
Thanks
SathishSQL> WITH T AS (
2 SELECT 'SANKAR' NAME, 10 NO FROM DUAL
3 UNION ALL
4 SELECT 'BALAJI', 20 FROM DUAL
5 UNION ALL
6 SELECT 'SANKAR', 10 FROM DUAL
7 UNION ALL
8 SELECT 'MANI', 30 FROM DUAL
9 UNION ALL
10 SELECT 'BALAJI', 20 FROM DUAL
11 UNION ALL
12 SELECT 'MANI', 30 FROM DUAL
13 UNION ALL
14 SELECT 'BALA', 10 FROM DUAL
15 UNION ALL
16 SELECT 'KALA', 20 FROM DUAL)
17 SELECT NAME, NO
18 FROM (SELECT NAME,
19 NO,
20 SUM(RNO) OVER(PARTITION BY NAME,NO) SNO
21 FROM (SELECT T.*,
22 ROW_NUMBER() OVER(PARTITION BY NAME,NO ORDER BY 1) RNO
23 FROM T))
24 WHERE SNO > 1
25 /
NAME NO
BALAJI 20
BALAJI 20
MANI 30
MANI 30
SANKAR 10
SANKAR 10
6 rows selected.Thanks,
Karthick -
Creating records over mutliple pages
I am trying to create a database record over multiple pages - wizard style.
Firstly, I wondered what the usual way to do this would be? I currently create a new row and set it to current in the first step, and then use bound attributes on the intermediate steps. I then save this row on the last step. However, I'm concerned about how and when these rows get removed from memory if they are abandoned before the commit step.
Secondly, I have the situation where the third step creates records in another table, but the fourth step needs to use primary key details from the third step in order to make entries into the primary table. Think Orders/Rows. As I don't want to commit to either table until the final step of my wizard is reached, how do I get hold of these PKs?
(Apologies - I presume this has been asked before but I wasn't sure which terms to search for....)
TIA
BenBenjamin,
Pop on over to http://www.oracle.com/technology/documentation/jdev/B25947_01/index.html to get the BC version of SRDemo
Good luck,
John -
Problem in creating table maintenance generator for 61 fields in table
Hi Experts,
I am facing problem in creating a table maintenance genarator for a ZTABLE which has 61 fields
i am using below details whicle creating the TMG
in Maintenance screen
i am giving maintenance type as two step
Maint screen no overview screen 2
single screen 3
Dialog Data Transport details
Recording routine standard recording routine
but it is giving following error
screen SAPL<ZTABLE NAME> 0003 could not be generated
In DYNPFIELD_ATTR mandatory field LINE has no value
please let me know how to sort out these errors.
Is there any limit on the number of fields for which we can create table maintenance generetor.
Thanks a lot in advance
SudiptoHi Sudipto,
There is not limit to the number of fields of the Table which can be used in TMG for generation. But, from the usability point of view this will horrible.
I created a Z table and added 64 fields and was able to generate the TMG with the screens perfectly. So, I guess there should not be any problem.
Well, have a look at the Function Group. I guess the screen numbers are already used by some other screens. You can set the system to propose freely available screen numbers from the pool.
Also, check whether proper authorization is assigned or not.
And if nothing is working, you can degenerate all the generated screens and then can have a new regeneration of it.
Hope these tips will work.
Thanks,
Samantak
Maybe you are looking for
-
ipod touch 4g wont connect to itunes or come out of recovery mode, its just stuck on the connect to itunes screen and will not come out, i tried doing a restore but something happened and now it wont finish or do anything else please help and my itun
-
My mac desktop computer won't turn on how can I know what's wrong with it?
It won't make the start up noise at all. Also the screen won't light. All I hear is a click noise when I click the power button. I've tried connecting it to other power outlets yet it still won't work?
-
HT201436 how do I save/archive VM's when transffering to a new iphone?
I'm moving from a iphone 4s to a new 5 and I have important VM's that I want to make sure get transferred to the new iphone. How do I archive them? Thanks, Rach
-
IPhoto zeigt Bilder aus RAW Format (Nikon D5100) nur noch komplett schwarz an
Hallo, beim Importieren über SD-Karte ist mir iPhoto vermehrt abgestürzt. Der Fehler tritt nur in Verbindung mit dem RAW-Format (Nikon D5100) auf. JPEG funktioniert tadellos. Falls der Import doch erfolgreich war (Anzahl der Bilder stark reduziert) s
-
Ask the Experts Session on AJAX Support in the Java Platform -- June 19-23
Got a question about AJAX support in the Java Platform? Post it on the Ask the Experts page (http://java.sun.com/developer/community/askxprt/) during the week of June 19 and get answers from Sun experts Greg Murray, Mark Basler, and Carla Mott.