BC4J;DataTags;Multiple Records
Hi All!
Can anyone suggest me how can I insert multiple records to a database if i am using a insert form with input data tags.
Can i have a workaround to the problem of having a default empty row to create a insert JSP page using datatags.
null
The input datatags are designed to edit an existing row. You can use standard html to present your html form and use the Row\setAttribute datatags to execute the insert.
Similar Messages
-
Edit multiple records with BC4J and Struts-JSP
Hi everybody,
I'm building BC4J components using entities and views and JSP business components. How can I edit and update multiple records at a time with Struts-Jsp ? Have someone already an example (with JSP and ActionForm code) ?
thank youHi,
Nobody have an example ? Is it so difficult ?
Thanks -
Edit and update multiple records in JSP buisness components
Hi everybody,
I'm building BC4J components using entities and views and JSP buisness components.
how can I edit and update multiple records
at a time in the jsp file
Note using the databean
"oracle.jbo.html.databeans.EditCurrentRecord"
one can view one record at a time
thank youdo you have a sample code? thanks
Hi
There are several options. One of them could be
1) use <input name=rc[j] value="..."> instead of
display a raw text
2) parse parameters in doPost method of your servlet
to update appropriate values.
3) Make a empty row enable inserts
Regards
Jan -
Combining multiple records into a single record (View)
Okay so here is my scenerio:
There is a table I have made that details SQL jobs and the various details about them. What i wan't to do is make a view with specific logic implemented. Fields that will be taken across to this view will be: LastRunDate, LastRunTime and Step_Status.
JobName will also be used to define the logic but will not be a column in itself.
What i wan't is an additional column using this logic, called 'DataSet'. For each Dataset there are multiple jobs that are unique to it, so there are multiple records being brought over from the table to view for one particular dataset. For example,
for 'ExampleDataSet' there are three jobs, i wan't it so these jobs are combined and named as 'ExampleDataSet' under a calculated column called 'Dataset'. For the following fields i would like it so that LastRunDate and LastRunTime are the time in whichever
job was last to be intitiated is the date and time set. For Step_Status, there are three possible results, 'Running', 'Failed' or 'Succeeded'. If any of the three jobs are 'Running', then 'Running'. If neither are running yet one has failed then 'Failed'.
Only when all three have succeeded should it then be set to 'Succeeded'.
I hope i have made that clear enough, please feel free to ask any questions if not. I am relatively new to SQL but i thought to at least try least try (I knew it wouldn't work) and it didn't work. But it may give you a better idea of
what i wan't:
CREATE VIEW [dbo].[vw_DataAvailabilityAnalysts] AS
SELECT CASE
WHEN JobName in ('Job1','Job2','Job3') and step_status='Running' THEN 'Running'
WHEN JobName in ('Job1','Job2','Job3') and step_status='Failed' THEN 'Failed'
WHEN JobName in ('Job1','Job2','Job3) and step_status='Succeeded' THEN 'Succeeded'
END as StatusCheck,
CASE WHEN JobName in ('Job1','Job2','Job3') THEN 'ExampleDataSet'
END as DATASET,
LastRunDate,
lastruntime,
step_status,
FROM [CDS_Common].[dbo].[DataAvailability]
Many Thanks,
Plain_Clueless
Plain_CluelessOkay so here is what my table looks like (Simplified). There are four columns and the data within is extracted via a Stored Procedure.
JobName
LastRunDate
LastRunTime
Step_Status
Job1
11/06/2014
09:30:00
Succeeded
Job1
10/06/2014
09:37:20
Succeeded
Job2
11/06/2014
04:05:00
Succeeded
Job1
09/06/2014
02:17:41
Succeeded
As you can see there are 3 jobs which are all 'Job1'. This jobs are obviously different within the table however this represents that they are jobs which all update the same DataSet within our local warehouse. Whereas Job2 updates a different dataset alltogether.
I wan't to create a view which will alagmate the jobs that are of the same DataSet, which will disclude the column JobName but would create a whole new column that looks like this:
DataSet
LastRunDate
LastRunTime
Step_Status
DataSet2
11/06/2014
04:05:00
Succeeded
DataSet1
11/06/2014
09:30:00
Succeeded
Bascically what this shows you is all the Job 1's combined so they are one record, Amaglamated. The last time any of these jobs were run is the LastRunDate & LastRunTime, which was the first record in the first table provided. Again for Step_Status,
there are three possible results, 'Running', 'Failed' or 'Succeeded'. If any of the three jobs are 'Running', then 'Running' (Absolute). If none of the three jobs are running yet one has failed then 'Failed'. If one has failed yet another is also running then
'Running'.Only when all three have succeeded should it then be set to 'Succeeded'. (This last bit isn't as important).
Hope this clears it up a bit,
Plain_Clueless
Plain_Clueless -
Add Multiple records to G/L account group.
Dear ABAP Experts,
i have requirement that is using BDC recording file the Functional People wants to add records to the G/L Account group. The FI consultant gave the recording file, based on the recording file i developed a BDC program. This BDC program will work for single record. After creating single record system will ask for transport request .
REPORT ZDP_ACC_GRP.
TYPES: BEGIN OF TY_TAB,
KTOPL TYPE KTOPL,
KTOKS TYPE KTOKS,
TXT30 TYPE TXT30,
VONNR TYPE VONNR,
BISNR TYPE BISNR,
TRKORR TYPE TRKORR,
END OF TY_TAB.
data: lt_tab type table of ty_tab,
wa_tab type ty_tab.
data: begin of record,
* data element: KTOPL
KTOPL_01_001(004),
* data element: KTOKS
KTOKS_01_002(004),
* data element: TXT30_077T
TXT30_01_003(030),
* data element: VONNR_077S
VONNR_01_004(010),
* data element: BISNR_077S
BISNR_01_005(010),
* data element: TRKORR
TRKORR_006(020),
end of record.
* Batchinputdata of single transaction
DATA: BDCDATA type table of BDCDATA WITH HEADER LINE.
* messages of call transaction
DATA: MESSTAB type table of BDCMSGCOLL WITH HEADER LINE.
* error session opened (' ' or 'X')
DATA: E_GROUP_OPENED.
* message texts
TABLES: T100.
data:lv_file type string.
parameters: p_fname type IBIPPARMS-PATH.
at selection-screen on value-request for p_fname.
CALL FUNCTION 'F4_FILENAME'
EXPORTING
PROGRAM_NAME = SYST-CPROG
DYNPRO_NUMBER = SYST-DYNNR
FIELD_NAME = 'P_FNAME'
IMPORTING
FILE_NAME = p_fname .
start-of-selection.
lv_file = p_fname.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = LV_FILE
* FILETYPE = 'ASC'
HAS_FIELD_SEPARATOR = 'X'
TABLES
DATA_TAB = LT_TAB
EXCEPTIONS
FILE_OPEN_ERROR = 1
FILE_READ_ERROR = 2
NO_BATCH = 3
GUI_REFUSE_FILETRANSFER = 4
INVALID_TYPE = 5
NO_AUTHORITY = 6
UNKNOWN_ERROR = 7
BAD_DATA_FORMAT = 8
HEADER_NOT_ALLOWED = 9
SEPARATOR_NOT_ALLOWED = 10
HEADER_TOO_LONG = 11
UNKNOWN_DP_ERROR = 12
ACCESS_DENIED = 13
DP_OUT_OF_MEMORY = 14
DISK_FULL = 15
DP_TIMEOUT = 16
OTHERS = 17 .
LOop at lt_tab into wa_tab.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-TXT30(01)'.
perform bdc_field using 'BDC_OKCODE'
'=NEWL'.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-BISNR(01)'.
perform bdc_field using 'BDC_OKCODE'
'=SAVE'.
perform bdc_field using 'V_T077S-KTOPL(01)'
WA_TAB-KTOPL."record-KTOPL_01_001.
perform bdc_field using 'V_T077S-KTOKS(01)'
WA_TAB-KTOKS."record-KTOKS_01_002.
perform bdc_field using 'V_T077S-TXT30(01)'
WA_TAB-TXT30."record-TXT30_01_003.
perform bdc_field using 'V_T077S-VONNR(01)'
WA_TAB-VONNR."record-VONNR_01_004.
perform bdc_field using 'V_T077S-BISNR(01)'
WA_TAB-BISNR."record-BISNR_01_005.
perform bdc_dynpro using 'SAPLSTRD' '0300'.
perform bdc_field using 'BDC_CURSOR'
'KO008-TRKORR'.
perform bdc_field using 'BDC_OKCODE'
'=LOCK'.
perform bdc_field using 'KO008-TRKORR'
WA_TAB-TRKORR."record-TRKORR_006.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-KTOPL(02)'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_dynpro using 'SAPL0F09' '0020'.
perform bdc_field using 'BDC_CURSOR'
'V_T077S-KTOPL(02)'.
perform bdc_field using 'BDC_OKCODE'
'=BACK'.
perform bdc_transaction using 'OBD4'.
ENDLOOP.
FORM BDC_TRANSACTION USING TCODE.
DATA: L_MSTRING(480).
DATA: L_SUBRC LIKE SY-SUBRC.
* batch input session
* call transaction using
REFRESH MESSTAB.
CALL TRANSACTION 'OBD4' USING BDCDATA
MODE 'A'" CTUMODE
UPDATE 'S'"CUPDATE
MESSAGES INTO MESSTAB.
L_SUBRC = SY-SUBRC.
LOOP AT MESSTAB.
SELECT SINGLE * FROM T100 WHERE SPRSL = MESSTAB-MSGSPRA
AND ARBGB = MESSTAB-MSGID
AND MSGNR = MESSTAB-MSGNR.
IF SY-SUBRC = 0.
L_MSTRING = T100-TEXT.
IF L_MSTRING CS '&1'.
REPLACE '&1' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&2' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&3' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&4' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ELSE.
REPLACE '&' WITH MESSTAB-MSGV1 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV2 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV3 INTO L_MSTRING.
REPLACE '&' WITH MESSTAB-MSGV4 INTO L_MSTRING.
ENDIF.
CONDENSE L_MSTRING.
WRITE: / MESSTAB-MSGTYP, L_MSTRING(250).
ELSE.
WRITE: / MESSTAB.
ENDIF.
ENDLOOP.
REFRESH BDCDATA.
ENDFORM.
FORM BDC_DYNPRO USING PROGRAM DYNPRO.
CLEAR BDCDATA.
BDCDATA-PROGRAM = PROGRAM.
BDCDATA-DYNPRO = DYNPRO.
BDCDATA-DYNBEGIN = 'X'.
APPEND BDCDATA.
ENDFORM.
FORM BDC_FIELD USING FNAM FVAL.
CLEAR BDCDATA.
BDCDATA-FNAM = FNAM.
BDCDATA-FVAL = FVAL.
APPEND BDCDATA.
ENDFORM.
But the FI consultant wants to add multiple records to 'G/L account group'.After adding records before saving the system need to ask transport request at the last.
How can I write code ...??
Please help me.Hi Srikanth,
Thanks for reply,
You are right we need to load hierarchy for G/L then we can see all the G/L's for all G/L groups.
I have one more question when I check in RSA3 for the G/L account numbers, I could not find them.
I am using the datasource fi_gl_4 and in rsa3 I can see 1000 records data and when I put filter on G/L account and search for the G/L number I needed I cant see it, but it is there in the functional transaction(f.01)?
How to check for the required G/L's in rsa3 ?
Thx -
How to store multiple records for one master reocrd using sequnce
dear,
my question is in one form i have master block f and detail block.
my question is i created one sequence and assign to master table. but i dont know how to assign that sequence to multiple record in detail table for that particular master record. i got lots of answer previously but i m not getting exactly.pls tell me full procedure otherwise gv me one demo application
NOTe: the sequnce is created after master record commiting to database.
PLS pls help me
Thanks
dambyi did not get answer pls help me.
-
How to concatenate multiple records into one
Hi everybody:
I want to know if exist some way to concat multiple records into one without using cursors. For example, I have a table named "Authors" like this:
Lan|Author
English|Ernest Hemingway
Spanish|Octavio Paz
Spanish|Mario Vargas Llosa
English|Sinclair Lewis
Spanish|Gabriel García Márquez
And I want to get this:
Author
Octavio Paz, Mario Vargas Llosa, Gabriel García Márquez
I have worked with SQL Server and I can do something like this:
CREATE FUNCTION dbo.MyConcat (@lan varchar(10))
RETURNS varchar(5000) AS
BEGIN
declare @retvalue varchar(5000)
set @retvalue=''
select @retvalue = @retvalue + Author +',' from Authors where lan = @lan
return substring(@retvalue,1,len(@retvalue)-1)
END
ie, do not use cursors to concatenate records. However, with ORACLE, I have to do someting like this.
FUNCTION MyConcat(P_Lan IN VARCHAR2) RETURN VARCHAR2 IS
v_ret VARCHAR2(4000);
v_element VARCHAR2(4000);
v_cursor sys_refcursor;
BEGIN
OPEN v_cursor FOR SELECT Author FROM Authors where Lan = P_Lan
LOOP
FETCH v_cursor INTO v_elemento;
EXIT WHEN v_cursor%NOTFOUND;
IF v_ret IS NULL THEN
v_ret := v_element;
ELSE
v_ret := v_ret || ', ' || v_element;
END IF;
END LOOP;
RETURN v_ret;
END;
Exist some other way to do this?
Best Regards
JackTks both for answer... I forgot to mention that I am using Oracle 10g. I read about LISTAGG() but this function is available for Oracle 11g release 2.
I wil read about the other techniques than Hoek mention
Best Regards.
Jack -
How to handle multiple records in BPMN process
Hi All,
We are using Oracle BPM 11g.In my requirement,I am using the database adapter to get the data from table and I need to validate the each record and update the status of that record from the BPM Process.But I dont know how to handle if multiple records come at a time.Can anybody please helpout from this problem.
Thanks in advanced.
Narasimha Rao.Can you have a look at this post: http://redstack.wordpress.com/2010/09/30/iteratingtraversing-arrays-in-bpm/
It's solving a different problem, but the key is that it's using a multi-instance subprocess to iterate over an array of "things" that need to be acted in. In your case it's the set of results from the db query rather than the set of tests in the example. But the principle is the same. You'd take collection of rows from the DB and process them in a multi-instance subprocess. The text that begins with the following would be good place to start:
"Now let’s implement the body of our process. We will use the Subprocess object to handle the traversal of the array of tests. Drag a Subprocess from the component palette on the right into the process and drop it on the line between the Start and End nodes."
In the loop characteristics you'd define whether you want to execute serially or in parallel. -
How to select multiple records in the ALV POP UP by using oops
Hi All,
We have a requirement of ALV POP UP by using the OOPS. How to select the multiple records in the POP UP and After selecting that i want do Inteactive ALV means again one more POP UP in ALV.
Thanks for help....
Regards,
BharaniHello Bharani
Displaying an ALV list in a popup is by no means different from a list displayed on a main screen. The only thing you need to consider is that you set the right screen level when creating the parent container for the ALV.
For more details refer to thread in CL_GUI_SPLITTER_CONTAINER ALV list is not show in called screen
" step 1:
CREATE OBJECT gr_spliter
EXPORTING
parent = cl_gui_container=>screen0 " For first popup use: =>screen1
rows = 1
columns = 2.
Regards
Uwe -
How to get Multiple records from functions
Hi Everyone
Im new to this stuff. Im trying through JCO. As far as the single recordsets like data of customer or article are concerned i get it through an array.
But i wanted to retrieve
1- Whole tables like (all articles)
2- Selected articles. or Customer order details (articles in PO)
That means multiple records in one go.
Later on ill display it in JTables.
Like for the past three days i was googling around. Thought like this ones not for my stomach. Came across this Forum. Thought its worth posting a request.
Here is the code
public String[] KSearch(String Knr) throws Exception{
String[] Result=new String[11];
IFunctionTemplate ftemplate= Con.repository.getFunctionTemplate("SucheKUNDE");
if (ftemplate == null)
throw new Exception("Funktionstemplate nicht gefunden");
JCO.Function function = ftemplate.getFunction();
JCO.ParameterList input = function.getImportParameterList();
input.setValue(Knr,"FieldName");
JCO.Client client = JCO.getClient(Con.conPoolId);
client.execute(function);
JCO.ParameterList output = function.getExportParameterList();
Result[0]=output.getString("NAME");
Result[1]=output.getString("VORNAME");
Result[2]=output.getString("GDATE");
Result[3]=output.getString("TELEFON");
Result[4]=output.getString("MAIL");
Result[5]=output.getString("STRASSE");
Result[6]=output.getString("PLZ");
Result[7]=output.getString("ORT");
Result[8]=output.getString("KONTO");
Result[9]=output.getString("INSTITUT");
Result[10]=output.getString("BLZ");
JCO.releaseClient(client);
return Result;
now instead of a single record what if im expecting a number of records, like what if i need customer over 25. Which means more than one. I have to get in tabular format so that i can display it in JTables.
Hope it a bit illustrative.
Regards
Edited by: Aaron Maleck on Jan 5, 2008 7:35 AMpublic String[] KSearch(String Knr) throws Exception{
String[] Result=new String11;
IFunctionTemplate ftemplate= Con.repository.getFunctionTemplate("SucheKUNDE");
if (ftemplate == null)
throw new Exception("Funktionstemplate nicht gefunden");
JCO.Function function = ftemplate.getFunction();
JCO.ParameterList input = function.getImportParameterList();
input.setValue(Knr,"FieldName");
JCO.Client client = JCO.getClient(Con.conPoolId);
client.execute(function);
// Maybe here you should use a JCO.Table Class to get the //ExportParameters such as
JCO.Table output = function.getTableParameterList().getTable( "tabelname" );
// so you can use setRow() Function to get the information of the //relevant record. such as the 3. Costum
output.setRow(3);// Record Number
Result[0]=output.getString("NAME");
Result[1]=output.getString("VORNAME");
Result[2]=output.getString("GDATE");
Result[3]=output.getString("TELEFON");
Result[4]=output.getString("MAIL");
Result[5]=output.getString("STRASSE");
Result[6]=output.getString("PLZ");
Result[7]=output.getString("ORT");
Result[8]=output.getString("KONTO");
Result[9]=output.getString("INSTITUT");
Result10=output.getString("BLZ");
JCO.releaseClient(client);
return Result;
Iam not sure that works. But you can try it. and reply me to tell if it really works as i think.
Hope helps.
Amao -
How to get multiple records using fn-bea:execute-sql()
Hi,
I created Proxy service(ALSB3.0) to get records from DB table. I have used Xquery function(fn-bea:execute-sql()). Using simple SQL query I got single record, but my table having multiple records. Please suggest how to get multiple records using fn-bea:execute-sql() and how to assign them in ALSB variable.
Regards,
Nagaraju
Edited by: user10373980 on Sep 29, 2008 6:11 AMHi,
Am facing the same issue stated above that I couldnt get all the records in the table that am querying in the Proxyservice.
For example:
fn-bea:execute-sql('EsbDataSource', 'student', 'select Name from StudentList' ) is the query that am using to fetch the records from the table called StudentList which contains more than one records like
Id Name
01 XXX
02 YYY
03 ZZZ
I tried to assign the result of the above query in a variable and while trying to log the variable, I can see the below
<student>
<Name>XXX</Name>
</student>
I want to have all the records from my table in xml format but it's not coming up. I get the value only from the first row of my table.
Please suggest.
regards,
Venkat -
Line separator to get multiple records in one variable
Hi Experts,
I have a requirement where i need to get data in the below form , in exactly one variable.
Invoice No. Inv. Date Voucher Gross Amount TDS Amount Discount Paid Amount
986013092,17 04/08/2010 00091217 32415.00 .00 .00 32415.00
Bharti Infot 27/07/2010 00091230 19600.00 .00 .00 19600.00
9860442689 04/08/2010 001247 47374.00 .00 .00 47374.00
2031565000,2031565000Total Amount 99389.00 .00 .00 99389.00
As of now, I have written the following,
loop at lt_merge into ls_merge.
lv_skfbt = ls_MERGE-SKFBT.
lv_budat = Ls_MERGE-budat.
lv_wskto = Ls_MERGE-wskto.
lv_wrbtr = Ls_MERGE-wrbtr.
lv_WT_QBSHB = ls_merge-WT_QBSHB.
concatenate invoice_id
ls_merge-BELNR
lv_BUDAT
ls_merge-XBLNR
lv_skfbt
lv_wt_qbshb
lv_WSKTO
lv_wrbtr
into invoice_id separated by space.
endloop.
which gives me one row of the table where, invoice_id stores my entire one record as a string. My question is how do I proceed with separating the lines if I have multiple records?
Thanks in advance..
Regards,
TrishnaHI
choose some character that will be not use in your data for example '|' vertical separator. You will get string:
invoice_id = line1 | line2 | line3 |.....
loop at lt_merge into ls_merge.
lv_skfbt = ls_MERGE-SKFBT.
lv_budat = Ls_MERGE-budat.
lv_wskto = Ls_MERGE-wskto.
lv_wrbtr = Ls_MERGE-wrbtr.
lv_WT_QBSHB = ls_merge-WT_QBSHB.
concatenate invoice_id
ls_merge-BELNR
lv_BUDAT
ls_merge-XBLNR
lv_skfbt
lv_wt_qbshb
lv_WSKTO
lv_wrbtr
into invoice_id separated by space.
new code
concatenate invoice_id '|' into invoice_id
endloop. -
Import multiple records into a PDF document?
I'm not sure I'm using the correct terms, but let me spell out my problem.
I have a PDF document with several text forms named with the same names as columns in an Excel spreadsheet saved into txt format.
The forms are duplicated onto several pages so if there are five records in the spreadsheet, there are five pages in the PDF.
I am able to open the PDF and choose Import Form Data and point to the Excel txt file.
But in the Import Data from Delimited Text File dialog box, I am only able to choose one record at a time.
I was hoping to be able to import multiple records onto multiple pages. This way I could do a bulk printing of the spreadsheet data into the PDF. But doing one record at a time is cumbersome and won't work as we expand the project.
Any clues as to how to do this better?John,
I don't have the actual client's data as that is proprietary.
I do have two silly little test files that I put together, but I think you've answered my question.
I've already told the client to use Word (gasp) and Excel with a mail merge and then export to PDF or print directly.
Ironically this could have also been done with InDesign.
But as much as I had to recommend Word, it was nice that the client started out by wanting PDF. -
Retrive Multiple Records Into A database Block
hi, all
i would like to know if there is any document or references wich illustrait the way of retriving Multi records from a procedure built on database side into a database block using form 6i ??
My Problem is : i create a procedure in the database which retrive a multiple records and the variable from procedure (out) are the same value from Form side (in). but it always fetch the whole records at the same record position in the block as the cursor raised on . i found a way explian how to mintain a set or record using a record type and create a table of that record type , but still don't' know how deal calling the procedure from the form side .
Any advice of this issue will be greatfull and if sample of code provided will be better
Thanks in Advance
Regards
OmarYou can try something like this:
PROCEDURE POPULATE_BLOCK IS
cursor c1 is
SELECT <your column names>
FROM <your table name>
where <your where condition>
BEGIN
open c1;
go_block('<your block name');
first_record;
loop
fetch c1 into
:<your block name>.<your column name 1>,
:<your block name>.<your column name 2>,
etc,etc
exit when c1%NOTFOUND;
next_record;
end loop;
close c1;
first_record;
END;
so your code might actually look something like this:
PROCEDURE POPULATE_BLOCK IS
cursor c1 is
SELECT distinct
a.pog_dept
,a.pog_number
,a.pog_level
,a.pog_id
,a.start_date
,a.transmit_date
,a.deactivate_date
,b.pog_description
FROM pog_stores_msi a, pog_master_msi b
where a.pog_dept = :b_main.bi_dept
and a.pog_number = :b_main.bi_pog_number
and a.pog_level = :b_main.bi_pog_level
AND A.POG_ID = :B_MAIN.I_POG_ID
and a.pog_dept = b.pog_dept
and a.pog_number = b.pog_number
and a.pog_id = b.pog_id;
BEGIN
open c1;
go_block('b_main');
first_record;
loop
fetch c1 into
:b_main.bi_dept
,:b_main.bi_pog_number
,:b_main.bi_pog_level
,:b_main.i_pog_id
,:b_main.i_start_date
,:b_main.i_transmit_date
,:b_main.i_deactivate_date
,:b_main.i_pog_desc;
exit when c1%NOTFOUND;
next_record;
end loop;
close c1;
END;
Hope this helps,
NumbNutz -
Inserting multiple records into a database from a table
I have a dynamic table with rows upto 10. i am trying to insert all the records in these rows into a database ( msaccess)
table name: Table1 ( in my form )
Database table : movies_comments ( as posted in stefan's forums ).
table columns: username, movieid, comments
i am using the following code.
Database.ExecSQL() function is as posted in stefcamerons forums.
var tlength = xfa.resolveNode("form1.#subform[0].Table1.Row1[*]").length;
xfa.host.messageBox("tlength is :" +tlength);
for ( var i = 1; i <= tlength; i++)
var username = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].user_name").rawValue;
var movieID = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].movie_id").rawValue;
var commentS = xfa.resolveNode("form1.#subform[0].Table1.Row1["+i+"].comment_").rawValue;
Database.ExecSQL("INSERT INTO movie_comments (username, movieId, comment) VALUES ('username','movieID', 'commentS');");
i am trying to insert multiple records using the code above. But i am getting error
GeneralError: Operation failed.
XFAObject.resolveNode:1:XFA:form1[0]:#subform[0]:Button1[0]:click
SOM expression returned list when single result was expected
suggest me an alternate way to insert multiple records from a table into a database.
thank Qfigured it out. I changed the ...OR (alternative names = colname) in the recordset to ...OR (alternative names LIKE %colname%). Works like a charm now- the result of a good night's sleep.
Maybe you are looking for
-
Incoming and outgoing server port
The advanced tab of account information shows me a port and SSL checkbox, which I believe is the incoming port. Does anyone know where to find the settings for the outgoing port please?
-
Hi friends, Reagarding BIA indexing, is it possible to Indexing using "RFC ID in background". If possible kindly let me know how sould we do that. Thanks Balaji.
-
Downloading photos from e-mails
When I try to download photos from e-mails, the e-mails in question seem to disappear when I hit the photo icon, although the photo(s) appear to be downloading. Does anyone know if this means that I am losing the respective mails altogether &/or do t
-
Is there a replacement for Lazarus (form recovery extension for Safari)?
I used to use Lazarus to save form content (e.g., when a poorly designed site's page validation flushes all the content after finding something to nitpick). After upgrading to Mavericks a few weeks ago, I noticed that Lazarus was no longer working.
-
how do I accept the end user agreement?