How to Retrieve Spool ID
Scenario:
I'm calling
submit RPCEDT_LIST_TO_MEMORY to SAP-Spool
SPOOL PARAMETERS PARAMS
WITHOUT SPOOL DYNPRO and return.
for Submitting the Remuneration Statement to Spool.
Now how can i retrieve the ID of the spool created.
This SPOOL ID is required for FM CONVERT_ABAPSPOOLJOB_2_PDF, as an EXPORTING Parameter.
Hi,
Please check this sample code from other thread.
REPORT zger_test.
DATA: BEGIN OF gs_jobinfo,
jobcount TYPE btcjobcnt,
stepcount TYPE btcstepcnt,
progname TYPE btcprog,
variant TYPE btcvariant,
listident TYPE btclistid,
sdldate TYPE btcsdldate,
sdltime TYPE btcsdltime,
END OF gs_jobinfo.
DATA: gt_jobinfo LIKE TABLE OF gs_jobinfo,
gv_liste LIKE bapixmspoo,
gt_liste LIKE TABLE OF gv_liste,
gv_rqident LIKE tsp01-rqident.
PARAMETERS: p_btcjob TYPE btcjob OBLIGATORY.
SELECT-OPTIONS: s_date FOR sy-datum.
START-OF-SELECTION.
SELECT * FROM tbtcp INTO CORRESPONDING FIELDS OF TABLE gt_jobinfo
WHERE jobname = p_btcjob
AND sdldate IN s_date.
LOOP AT gt_jobinfo INTO gs_jobinfo.
ULINE.
WRITE: /1 'Output of Job:', p_btcjob,
'Jobnumber:' , gs_jobinfo-jobcount,
'Date / Time:' , gs_jobinfo-sdldate, gs_jobinfo-sdltime,
/1 'Step:' , gs_jobinfo-stepcount,
'Programm:' , gs_jobinfo-progname,
'Variant' , gs_jobinfo-variant.
SKIP.
IF NOT gs_jobinfo-listident IS INITIAL.
CLEAR gt_liste.
gv_rqident = gs_jobinfo-listident.
CALL FUNCTION 'RSPO_RETURN_ABAP_SPOOLJOB'
EXPORTING
rqident = gv_rqident
TABLES
buffer = gt_liste
EXCEPTIONS
no_such_job = 1
not_abap_list = 2
job_contains_no_data = 3
selection_empty = 4
no_permission = 5
can_not_access = 6
read_error = 7
OTHERS = 8.
SKIP.
IF sy-subrc = 0.
LOOP AT gt_liste INTO gv_liste.
WRITE /1 gv_liste.
ENDLOOP.
ELSE.
WRITE /1 'Error!'.
ENDIF.
ELSE.
WRITE 'No spool'.
ENDIF.
ULINE.
ENDLOOP.
Also you can check table TSP01 where you can retrieve the spool id.
Hope this will help.
Regards,
Ferry Lianto
Similar Messages
-
How to retrieve the value of last identity has been updated in a database?
how to retrieve the value of last identity has been updated in a database
Hi,
Oracle 10g, FGA - Fine grained auditing, supports DML statements (9i only select).
Set up FGA using the DBMS_FGA.ADD_POLICY procudure:
sql> BEGIN
DBMS_FGA.ADD_POLICY (
policy_name => 'AUD_EMPLOYEE_SAL',
object_schema => 'HR',
object_name => 'EMPLOYEE',
audit_column => SALARY',
audit_condition => '',
statement_type => 'UPDATE');
END;
NEXT:
sql> SELECT dbuid, lsqltesxt FROM sys.fga_logs$;
The database inserts the audit record into the FGA_LOG$ table using an autonomous transaction; even if you roll back the update statement, the update action will still be logged in this table. The fga_log$ tracks the session, machine id, timestamp, schema, scn, etc:
SQL> desc fga_log$
Name Null? Type
SESSIONID NOT NULL NUMBER
TIMESTAMP# DATE
DBUID VARCHAR2(30)
OSUID VARCHAR2(255)
OSHST VARCHAR2(128)
CLIENTID VARCHAR2(64)
EXTID VARCHAR2(4000)
OBJ$SCHEMA VARCHAR2(30)
OBJ$NAME VARCHAR2(128)
POLICYNAME VARCHAR2(30)
SCN NUMBER
SQLTEXT VARCHAR2(4000)
LSQLTEXT CLOB
SQLBIND VARCHAR2(4000)
COMMENT$TEXT VARCHAR2(4000)
PLHOL LONG
STMT_TYPE NUMBER
NTIMESTAMP# TIMESTAMP(6)
PROXY$SID NUMBER
USER$GUID VARCHAR2(32)
INSTANCE# NUMBER
PROCESS# VARCHAR2(16)
XID RAW(8)
AUDITID VARCHAR2(64)
STATEMENT NUMBER
ENTRYID NUMBER
DBID NUMBER
LSQLBIND CLOB
SQL> spool off -
My safari menu bar is missing. The menu bar for desktop, HD, and apps appears, but when I click on Safari, it disappears, so I can no longer see my buttons for History, etc. I think my husband (pc user) clicked it away when borrowing my computer. Any ideas how to retrieve it? Thanks.
I too was having the same problem However, I could access both the menu bar and the dock by hovering my mouse over them so it wasn't a huge problem but I prefered having it there anyway. I was not in full screen mode and I could still go into full screen mode if I wanted to. I found the easiest solution was to just quit safai and restart it, but it might not work for you considering you couldn't access you menu bar either way.
I found this article that allows you to hide/show the menu bar and the dock through TextEdit (didn't work for me) http://www.mactricksandtips.com/2009/07/hide-the-menubar-or-dock-in-specific-app s.html It is pretty old so it might not work for lion and a bit risky if you don't know what you're doing so I wouldn't really recommend doing it this way.
And KSheppard, I know it's not really any of my buisness, but the way to get answers to a question isn't by insulting others and being quick-tempered. Even if you feel like you were insulted first, don't try snapping at people who aren't obligated to help you. Honestly, it just makes everything easier if everybody is cooperative and polite. -
How to find Spool number for a 2 steps background job.
Hi All,
How to find spool number (and also the background job name ) for a 2 steps background job.
in the table TBTCO i can see step numbers but i dont get the spool number. Is there any link between TBTCO and TSP01.
Also after getting the spool number i need to drill down on ALV report. I hard coded the spool number and was able to drill down using BDC and call transaction but when i press back button it is not returning to the ALV report.
Thanks,
Shiva.Which one creates the spool? (first one I guess)
What kind of spool? (WRITE, sapscript, smartform, pdf...)
Do you use special statements like NEW-PAGE, or other things?
Are you sure that the spools are generated by these jobs? (did you compare the spool generation times and job run dates to be sure...) -
My all voice memos are deleted,how to retrieve them
my all voice memos are deleted after syncing it with itunes...how to retrieve them ??
Thanks Bro. I have backup. and I did the same thing twice but only 26 contacts appear on the device. Now again yesterday after your suggestion again I restored the device but the result was same. Then I thought a new thing. I restored the device one more time but after restoring I didn't configure the icloud account. Surprisingly all my old contacts are there in the device but those 26 contacts are not there. Now I will tell you how this must have happened? I had 3gs earlier. that was stolen 3 months ago. I put the device in lost mode. I purchased new iphone4. I restored with itune. All my data came back. After that I saved these 26 new contacts to my device which also saved in icloud but when I tried to backup on my pc it was not happening. the messege coming device disconnected. 2 days back my stolen device came online. Lost mode was activated by icloud. But what I think in between that time the other fellow must have deleted the phone contacts. And as per icloud also deleted the same. Only the 26 contacts which I saved in these 3 months remained in icloud. Now bro can u help me out? What I should do? I have 26 contacts in icloud and < 500 in my device. I don't understand when all other Co's mobile you can import contacts from any backup file iphone can not. This is the DRAWBACK OF IPHONE.
-
itunes asked me if iwanted to erase all my files on my iphone when i connected it to my second computer.
i clicked yes
and all of my very important voice memos were deleted
however none of my photos were deleted...... and they count as files don't they?
anyway i need help on how to retrieve deleted voice memos
PLEASE HELP!!!You should never try to sync your phone with more than one computer or you will lose your data. The pictures were not deleted because the sync process does not touch Camera Roll pictures (it only includes them during the backup step of the sync process).
If you had these voice memos on your phone when you last synced it to your first computer, and if you haven't synced to this computer since then, you could restore from the backup created during your last sync. This will replace the data on your phone with the data from this older backup so anything new will be lost. If you think that is the case, do not sync your phone again to the first computer prior to restoring from this backup or you will overwrite it and the backup will be lost. Instead, prior to connecting your phone to your first computer, open iTunes and disable automatic syncing by going to iTunes Preferences and on the Devices tab checking "Prevent...from syncing automatically". Then connect your phone and when it appears in iTunes on the left sidebar right-click on its name and select Restore From Backup and choose your last backup (containing your voice memos).
If you didn't have these voice memos on your phone when you last synced to your first computer, or if you have synced again to your first computer since losing your data, then your voice memos and other data are lost. -
How to retrieve sharepoint list data and show it on excel-addin using C#
Hi,
we have a sharepoint list where all students are present. we wanted to get the data from the list and show it via excel addin (VSTO) (something like save,retrieve buutons) . we have some more business logic which need to be performed before the data is retrieved
. once data is shown on excel , user modifies it and update/save the record back to sharepoint.
can you please give some samples and suggest any links to start with development.
Thanks
chaituHi chaituatp,
For this requirement, I would suggest you to get familiar with how to create VSTO applications, and how SharePoint object model works. Here are some sample code about this:
How to: Retrieve List Items using JavaScript:
http://msdn.microsoft.com/en-us/library/hh185007(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/office/ee534956(v=office.14).aspx
VSTO application show data in datagridview:
http://stackoverflow.com/questions/16926275/simple-example-of-vsto-excel-using-a-worksheet-as-a-datasource
Thanks,
Qiao
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Qiao Wei
TechNet Community Support -
How to retrieve 2 values from a table in a LOV
Hi
I'm pretty new to APEX. I try to retrieve two values from a table using a LOV. I have a table named DEBIT with then columns SITE, NAME and KEY
I want to display NAME to the user in a list. When the user select an item from the list, I want to retrieve the data of the SITE and KEY column of this item in order to launch an SQL command based on this two values.
How to retrieve thes two values whant the user chooses an item from the list ?
I apologize for my english, being french.
Regards.
ChristianChristian,
From what I understood about your requirement, you want a 'select list with submit' which displays "NAME" and based on the value selected, you want to get the corresponding values for "SITE" and "KEY" from the table.
<b>Step 1: Create a select list with submit, say P1_MYSELECT </b><br><br>
Use something like this in the dynamic list of values for the select list: <br>
SELECT NAME display_value, NAME return_value
FROM DEBIT<br><br>
<b>Step 2: Create a page process of type PL/SQL block. Also create 2 hidden items P1_KEY and P1_SITE. </b><br><br>
In the PL/sQL, write something like:
DECLARE
v_key DEBIT.KEY%TYPE;
v_site DEBIT.SITE%TYPE;
CURSOR v_cur_myvals IS
SELECT KEY, SITE
FROM DEBIT
WHERE NAME = :P1_MYSELECT;
BEGIN
OPEN v_cur_myvals;
LOOP
FETCH v_cur_myvals
INTO v_key,v_site;
EXIT WHEN v_cur_myvals%NOTFOUND;
:P1_KEY := v_key;
:P1_SITE := v_site;
END LOOP;
CLOSE v_cur_myvals;
END; <br><br>
Then you can use these values for whatever purpose you need to.
Hope this helps. -
How to retrieve the values from a table if they differ in Unit of Measure
How to retrieve the values from a table if they differ in Unit of Measure?
If no data is read
- Insure that you use internal code in SELECT statement, check via SE16 desactivating conversion exit on table T006A. ([ref|http://help.sap.com/saphelp_nw70/helpdata/en/2a/fa0122493111d182b70000e829fbfe/frameset.htm])
If no quanity in result internal table
- There is no adqntp field in the internal table, so no quantity is copied in itab ([ref|http://help.sap.com /abapdocu_70/en/ABAPINTO_CLAUSE.htm#&ABAP_ALTERNATIVE_1@1@]).
- - Remove the CORRESPONDING, so quantity will fill the first field adqntp1. ([ref|http://help.sap.com/abapdocu_70/en/ABENOPEN_SQL_WA.htm])
- - Then loop at the internal table and move the quantity when necessary to the 2 other fields.
* Fill the internal table
SELECT msehi adqntp
INTO TABLE internal table
FROM lipso2
WHERE vbeln = wrk_doc1
AND msehi IN ('KL','K15','MT').
* If required move the read quantity in the appropriate column.
LOOP AT internal_table ASSIGNING <fs>.
CASE <fs>-msehi.
WHEN 'K15'.
<fs>-adqnt2 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
WHEN 'MT'.
<fs>-adqnt3 = <fs>-adqnt1.
CLEAR <fs>-adqnt1.
ENDCASE.
ENDLOOP.
- You could also create another table with only fields msehi and adqntp and then collect ([ref|http://help.sap.com/abapdocu_70/en/ABAPCOLLECT.htm]) the data to another table.
Regards,
Raymond -
How to Retrieve the Selected Values from selectOrderShuttle using ADF 11g
Hi Every One,
Does anyone has idea how to retrieve the selected Items using shuttle and Order of the items using 'SelectOrderShuttle' component ?
Thanksshuttle's valuechangeevent would fire when you shuttle items back and forth.
public void selectOrderShuttle1_valueChangeListener(ValueChangeEvent valueChangeEvent) {
ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
if (list != null){
for (int i=0; i<list.size(); i++) {
int l = list.size()-1;
val = list.get(l).toString(); //returns , delimited string
if (val != null){
val = val.replaceAll("[\\[\\]]", "");
StringTokenizer st = new StringTokenizer (val, ",");
int nto = st.countTokens ();
for (int j = 0; j < nto; j++)
String token = st.nextToken ();
.......... -
How to retrieve multiple data from table and represent it in jsp page
Hi
The below JavaScript code is used to add row in the table when I want to add multiple row data into table for single entry no field.
<html> function addRow()
i++;
var newRow = document.all("tblGrid").insertRow();
var oCell = newRow.insertCell();
oCell.innerHTML = "<input name='srno"+i+"' type='text' id='srno"+i+"' size=10>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='itmcd"+i+"' type='text' id='itmcd"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='itmnm"+i+"' type='text' id='itmnm"+i+"' size='15'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='indentqty"+i+"' type='text' id='indentqty"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='uom"+i+"' type='text' id='uom"+i+"' size='10'><input type='hidden' name='mcode"+i+"'id='mcode"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='packqty"+i+"' type='text' id='packqty"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='packuom"+i+"' type='text' id='packuom"+i+"' size='10'><input type='hidden' name='pack"+i+"' id='pack"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='rate"+i+"' type='text' id='rate"+i+"' size='10'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='dor"+i+"' type='text' id='dor"+i+"' size='0' onClick='"+putdate(this.name)+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='bccode"+i+"' type='text' id='bccode"+i+"' size='10'></td><input type='hidden' name='bcc"+i+"' id='bcc"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='cccode"+i+"' type='text' id='cccode"+i+"' size='10'></td><input type='hidden' name='ccc"+i+"' id='ccc"+i+"'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input name='remark2"+i+"' type='text' id='remark2"+i+"' size='20'>";
oCell = newRow.insertCell();
oCell.innerHTML = "<input type='button' value='Delete' onclick='removeRow(this);' />";
// oCell = newRow.insertCell();
// oCell.innerHTML = "<input type='button' value='Clear' onclick='clearRow(this);' />";
}<html> Then this data are send to the next Servlet for adding into two table.
My header portion data are added into one table which added only one row in table. while footer section data are added into the no of rows in another table dependent on No. of
Rows added into jsp page.
Here is an code for that logic.
<html>
ArrayList<String> mucode = new ArrayList<String>();
ArrayList<Integer> serials = new ArrayList<Integer>();
ArrayList<Integer> apxrate = new ArrayList<Integer>();
ArrayList<Integer> srname = new ArrayList<Integer>();
ArrayList<String> itcode = new ArrayList<String>();
ArrayList<String> itname = new ArrayList<String>();
ArrayList<Integer> iqnty = new ArrayList<Integer>();
ArrayList<String> iuom = new ArrayList<String>();
ArrayList<Integer> pqnty = new ArrayList<Integer>();
ArrayList<String> puom1 = new ArrayList<String>();
ArrayList<Integer> arate = new ArrayList<Integer>();
ArrayList<String> rdate = new ArrayList<String>();
ArrayList<String> bcs = new ArrayList<String>();
ArrayList<String> ccs = new ArrayList<String>();
ArrayList<String> remarkss = new ArrayList<String>();
//ArrayList<Integer> qtyrecs = new ArrayList<Integer>();
//ArrayList<String> dors = new ArrayList<String>();
//ArrayList<String> remarks = new ArrayList<String>();
String entryn = request.getParameter("entryno");
String rows = request.getParameter("rows");
out.println(rows);
//String Entryno = request.getParameter("entryno");
// out.println(Entryno);
int entryno = 0,reqqty = 0,srno = 0,deprequest = 0,rowcount = 0;
if(!Entryno.equals("")){
entryno = Integer.valueOf(Entryno);
if(!rows.equals("")){
rowcount = Integer.valueOf(rows);
for(int i=1;i<=rowcount;i++){
if(request.getParameter("srno"+i)!=null){
serials.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
out.println(serials.size());
for(int i=1;i<=rowcount;i++){
if(request.getParameter("srno"+i)!=null){
srname.add(Integer.valueOf(request.getParameter("srno"+i).trim()));
out.println(srname.get(0));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("itmcd"+i)!=null){
itcode.add(request.getParameter("itmcd"+i).trim());
} //out.println(itcode.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("itmnm"+i)!=null){
itname.add(request.getParameter("itmnm"+i).trim());
}//out.println(itname.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("indentqty"+i)!=null){
iqnty.add(Integer.valueOf(request.getParameter("indentqty"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("uom"+i)!=null){
iuom.add(request.getParameter("uom"+i).trim());
}//out.println(iuom.get(i));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("mcode"+i)!=null){
mucode.add(request.getParameter("mcode"+i).trim());
for(int i=1;i<=rowcount;i++){
if(request.getParameter("packqty"+i).equals("")){
pqnty.add(0);
}else
pqnty.add(Integer.valueOf(request.getParameter("packqty"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("pack"+i)!=null){
puom1.add(request.getParameter("pack"+i).trim());
}else
puom1.add("");
for(int i=1;i<=rowcount;i++){
if(request.getParameter("rate"+i).equals("")){
arate.add(0);
}else
arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
/* for(int i=1;i<=rowcount;i++){
if(request.getParameter("rate"+i)!=null){
arate.add(Integer.valueOf(request.getParameter("rate"+i).trim()));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("dor"+i)!=null){
try{
rdate.add(dashdate.format(slashdate.parse(request.getParameter("dor"+i).trim())));
}catch(ParseException p){p.printStackTrace();}
}else
{ rdate.add("");}
for(int i=1;i<=rowcount;i++){
if(request.getParameter("bcc"+i)!=null){
bcs.add(request.getParameter("bcc"+i).trim());
}out.println(bcs.get(0));
for(int i=1;i<=rowcount;i++){
if(request.getParameter("ccc"+i)!=null){
ccs.add(request.getParameter("ccc"+i).trim());
}out.println(ccs.get(0));
for(int i=1;i<=rowcount;i++){
out.println("remark2");
if(request.getParameter("remark2"+i)!=null){
remarkss.add(request.getParameter("remark2"+i).trim());
}out.println(remarkss.get(0));
ArrayList<String> Idate = new ArrayList<String>();
for(int i=1;i<=rowcount;i++){
if(request.getParameter("dateindent"+i)!=null){
try{
Idate.add(dashdate.format(dashdate.parse(request.getParameter("dateindent"+i).trim())));
}catch(ParseException p){p.printStackTrace();}
String Rdate = dashdate.format(new java.util.Date());
String tdate = dashdate.format(new java.util.Date());
// String Indentdate = dashdate.format(new java.util.Date());
// String ApprovedT1 = dashdate.format(new java.util.Date());
// String ApprovedT2 = dashdate.format(new java.util.Date());
// String ApprovedT1=" ";
//String ApprovedT2="";*/
String ApprovedT1= dashdate.format(new java.util.Date());
out.println (ApprovedT1);
String ApprovedT2=dashdate.format(new java.util.Date());
out.println(ApprovedT2);
String Indentdate=(dashdate.format(slashdate.parse(request.getParameter("dateindent").trim())));
out.println(Indentdate);
String Cocode ="BML001";
out.println(Cocode);
String Deptcode = request.getParameter("dept1");
out.println(Deptcode);
String Empcode = request.getParameter("emp");
out.println(Empcode);
String Refno =request.getParameter("rtype");
out.println(Refno);
String Divcode = request.getParameter("todiv1");
out.println(Divcode);
String Usercode = "CIRIUS";
String Whcode = request.getParameter("stor");
out.println(Whcode);
// String Itemgroupcode = request.getParameter("");
String Itemgroupcode ="120000";
out.println(Itemgroupcode);
String Supplytypecode = request.getParameter("stype");
out.println(Supplytypecode);
String Delcode = request.getParameter("deliverycode");
out.println(Delcode);
String Itemclass="WS";
out.println(Itemclass);
// String Itemclass = request.getParameter("iclass");
// out.println(Itemclass);
String unitcode = request.getParameter("uni");
out.println(unitcode);
String Todivcode = request.getParameter("todiv1");
out.println(Todivcode);
String Appxrate = request.getParameter("rate");
out.println(Appxrate);
String Srno = request.getParameter("srno");
out.println(Srno);
/* String Indqty = request.getParameter("indentqty");
out.println(Indqty);*/
String Itemcode = request.getParameter("itmcd");
out.println(Itemcode);
String Othersp = request.getParameter("remark1");
out.println(Othersp);
String Reqdt = request.getParameter("dor");
out.println(Reqdt);
String Munitcode = request.getParameter("mcode");
out.println(Munitcode);
String Packqty = request.getParameter("packqty");
out.println(Packqty);
String Packuom = request.getParameter("pack");
out.println(Packuom);
String Remark2 = request.getParameter("remark2");
out.println(Remark2);
String BC = request.getParameter("bcc");
out.println(BC);
String CC = request.getParameter("ccc");
out.println(CC);
try{
st=connection.createStatement();
connection.setAutoCommit(false);
String sql="INSERT INTO PTXNINDHDR(COCODE,DEPTCODE,EMPCODE,APPROVEDT1,APPROVEDT2,INDDT,ENTRYNO,REFNO,REMARKS,DIVCODE,USERCODE,WHCODE,ITEMGROUPCODE,SUPTYPECODE,DELCODE,UNITCODE,TODIVCODE,ITEMCLASS)VALUES('"+Cocode+"','"+Deptcode+"','"+Empcode+"','"+ApprovedT1+"','"+ApprovedT2+"','"+Indentdate+"',"+Entryno+",'"+Refno+"','"+Othersp+"','"+Divcode+"','"+Usercode+"','"+Whcode+"','"+Itemgroupcode+"','"+Supplytypecode+"','"+Delcode+"','"+unitcode+"','"+Todivcode+"','"+Itemclass+"')";
out.println(sql);
st.addBatch(sql);
for(int i=0;i<serials.size();i++){
out.println("Inside the Statement");
String query3="test query for u";
out.println(query3);
String queryx="Insert into PTXNINDDTL(APXRATE,ENTRYNO,BRKNO,INDQTY,ITEMCODE,OTHERSPFCS,MUNITCODE,PACKQTY,PACKUOM,REMARKS,DIMSUBGRPCODE,DIMCODE,REQDT)VALUES("+arate.get(i)+","+entryno+","+srname.get(i)+","+iqnty.get(i)+","+itcode.get(i)+",'"+Othersp+"','"+mucode.get(i)+"',"+pqnty.get(i)+",'"+puom1.get(i)+"','"+remarkss.get(i)+"','"+bcs.get(i)+"','"+ccs.get(i)+"','"+rdate.get(i)+"')";
out.println(queryx);
st.addBatch(queryx);
int[] result=st.executeBatch();
connection.commit();
for(int k=0;k<result.length;k++)
out.println("rows updated by "+(k+1)+"insert sta:"+result[k]+"");
catch(BatchUpdateException bue)
out.println("error1;"+bue+"");
catch(SQLException sql)
out.println("error2;"+sql+"");
catch(Exception l)
out.println("error3;"+l+"");
</html>
Now I looking for to retrieve this footer section data available in multiple rows from footer table and present it in jsp page .
I am finding difficulties in how to show this multiple row data for dynamic no of rows .i.e. variable no. of rows.
I have able to show the data in Header portions of page in this ways
here i am adding the part of code which shows the data from header part of table i.e from Header table
<html>
<h2 align="center"><b>Indent Preparation</b></h2>
<div align="left">
<table width="849" border="0" cellspacing="3" cellpadding="3" align="center">
<tr>
<td ><div align="left"><b>Indent No.</b></div></td>
<td ><label>
<input name="indentno" type="text" id="indentno" size="15" value="" /><input type="hidden" name="no" id="no">
</label></td>
<td ><div align="center"><strong>Indent Date</strong></div></td>
<td ><label>
<div align="center">
<input name="dateindent" type="text" id="dateindent"value="<%=date1%>"/><input type="hidden" name="no" id="no">
</div>
</label></td>
<td> </td>
<td><div align="right"><strong>Entry No.</strong></div></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrcode.get(3)%>" size="10"></td>
<%}else{%>
<td><input type="text" name="entryno" id="entryno" value="<%=entryNo%>"/></td>
<%}%>
<div align="right"></div>
</tr>
<tr>
<td><b>Division</b></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrdetails.get(9)%>" size="20"</td>
<td><input type="hidden" name="div1" id="div1" value='<%=hdrcode.get(10)%>'></td>
<%}else{%>
<td><input type="text" name="div" id="div" /></td>
<td><input type="hidden" name="div1" id="div1" /> </td>
<%}%>
<td> </td>
<td> </td>
<td><div align="right"><strong>Unit</strong></div></td>
<%if(oper!=null && oper.equals("view") && hdrcode!=null && hdrdetails!=null){%>
<td><input type="text" value="<%=hdrdetails.get(14)%>" size="20"</td>
<td><input type="hidden" name="uni" id="uni" value='<%=hdrcode.get(12)%>'></td>
<%}else{%>
<td><input type="text" name="unit" id="unit" /></td>
<td><input type="hidden" name="uni" id="uni" /> </td>
<%}%>
</tr>
<tr>
</html>
Any suggestion on any above works is highly appreciated.
Thanks and regards
harshalToo much code. It's also not well intented nor formatted. I don't see a question either or it got lost in that heap of unformatted code.
I will only answer the question in the thread's subject:
How to retrieve multiple data from table and represent it in jsp pageTo retrieve, make use of HttpServletRequest#getParameterValues() and/or #getParameter().
To display, make use of JSTL's c:forEach. -
How to Retrieve a Crystal Report's Unmanaged Destination Filename
Hi all,
I have looked very closely at Robert Twigg's response to the post "[Destination Path and name of a scheduled Report|http://forums.sdn.sap.com/thread.jspa?messageID=9588160#9588160]" dated 9/1/10 and while it does retrieve the unmanaged destination path, the filename retrieved is the managed filename. How does one go about retrieving an instance's unmanaged filename?
When I look at a Crystal Report instance details, it definitely knows what the unmanaged filename that was populated, here is a sample instance detail:
External Destination: File copy the instance with the filename: "ALOG_Deferred_Clearing_RPT_2011-12-13-11-43-09.pdf" to the folder: "/apps/efs_bobj/IMPL/XX" .
As you can clearly see, the filename consists of report name, date, and time that was specified as "%SI_NAME%_%SI_STARTTIME%.%EXT%" in the destination filename.
Here's the snippet to retrieve the managed filename:
IInfoObject report = (IInfoObject) reports.get(0);
// Get the file name from the instance.
IFiles files = (IFiles) report.getFiles();
IFile file = (IFile) files.get(0);
Any insight on how to retrieve an instance's unmanaged filename would be highly appreciated.
Thanks in advance,
Hart Penn
Edited by: hartpenn on Dec 14, 2011 2:14 PM
Edited by: hartpenn on Dec 14, 2011 2:15 PM
Edited by: hartpenn on Dec 14, 2011 2:19 PMThank you for your response. I am querying for the report instances using the query below:
IInfoObjects iRptObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS " +
"Where SI_KIND='Pdf' AND " +
"SI_INSTANCE>0 ");
Collection<IInfoObject> iRptObjs = iRptObjects;
for (IInfoObject iRptObj : iRptObjs) {
ISchedulingInfo iSchedInfo = iRptObj.getSchedulingInfo();
IEvents triggerEvents = iSchedInfo.getDependants();
if (triggerEvents.size() > 0) {
for (int j=0; j < triggerEvents.size(); j++) {
IInfoObjects events = (IInfoObjects)infoStore.query("SELECT * FROM CI_SYSTEMOBJECTS " +
"Where SI_KIND='Event' AND " +
"SI_ID=" + (Integer) triggerEvents.get(j));
if (events.size() > 0) {
IEvent curEvent = (IEvent)events.get(0);
IDestinationPlugin destPlugin =
(IDestinationPlugin) infoStore.query("Select Top 1* from CI_SYSTEMOBJECTS " +
"Where SI_NAME = 'CrystalEnterprise.DiskUnmanaged'").get(0);
IDestinations dests = iSchedInfo.getDestinations();
Collection<IDestination> destObjs = dests;
if (dests.size() > 0) {
// we have a dest set up
for (IDestination destObj : destObjs) {
if (destObj.getName().compareTo("CrystalEnterprise.DiskUnmanaged") == 0) {
// Copy the destination properties to the destination plugin.
destObj.copyToPlugin(destPlugin);
// Get the scheduling options for the unmanaged disk.
IDiskUnmanagedOptions diskUnmanagedOptions =
(IDiskUnmanagedOptions) destPlugin.getScheduleOptions();
// Get the destination files
List destFiles = diskUnmanagedOptions.getDestinationFiles();
String pathName = (String)destFiles.get(0);
IFiles iFiles = (IFiles) iRptObj.getFiles();
IFile myFile = (IFile) iFiles.get(0);
logger.debug("Object: " + iRptObj.getTitle() +
", ID: " + iRptObj.getID() +
", Kind: " + iRptObj.getKind() +
", Trigger Event: " + curEvent.getEventName());
logger.debug("Dest: " + pathName);
logger.debug("Filename: " + myFile.getName());
while this is not efficient, it does retrieve the instances. However, the file name returned is not what was specified in the destination filename. Here is some info returned and displayed:
Object: ALOG_Deferred_Clearing_RPT, ID: 128776, Kind: Pdf, Trigger Event: EVT_121311_114308
Dest: /apps/efs_bobj/IMPL/XX/%SI_NAME%_%SI_STARTTIME%.%EXT%
FileName: ~ce46086dd492ac788.pdf
As you can see, the filename is clearly the managed filename.
Edited by: hartpenn on Dec 14, 2011 3:43 PM
Edited by: hartpenn on Dec 14, 2011 4:02 PM
Edited by: hartpenn on Dec 14, 2011 4:03 PM
Edited by: hartpenn on Dec 14, 2011 4:17 PM
Edited by: hartpenn on Dec 14, 2011 4:26 PM
Edited by: hartpenn on Dec 14, 2011 4:27 PM
Edited by: hartpenn on Dec 14, 2011 4:28 PM -
How To Retrieve an Object's Value Defined Using c:set ... Tag?
I have the value of a variable defined in JSP#1 (JSP#1 is not a form) using JSTL tag:
<c:set var="id" value="${articleForm.article}" scope="session"/>Now, I have an object 'id' in the session scope. The object 'id' and all the information, which are defined in JSP#1, are forwarded to JSP#2.
JSP#2 is a form. But, the 'id' is not used in JSP#2.
JSP#2 has a submit button and then, a servlet takes over the control after that button is clicked. All the text fields in JSP#2 together with the object 'id' are forwarded to this servlet.
I have two questions:
1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.
2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)
int articleID = Integer.parseInt( session.getAttribute( "id" ) ); or, it should be retrieved in another way?I'm not sure you understand the concept of a session object.
Java objects stay on the server. There is no transmission between the web browser and the client.
The scope just sets how long the server "remembers" that variable.
request scope - only lasts one request. Once a web page is returned to the client, the server forgets all request variables.
session scope - lasts for one user - across multiple requests/web pages.
1. I should put this object 'id' in a request scope or a session scope? Currently, it is in a session scope.From your description, you appear to have it right - your object should be in session scope.
2. How to retrieve the value of this object 'id' in this servlet? (I do not want to print the value out. I want to retrieve the value and store it in a database.)If articleForm.article is an String then that looks the right way to access it.
You might have to do it like this:
int articleID = Integer.parseInt( (String)session.getAttribute("id"));
The Integer.parseInt method takes a String as a parameter - while session.getAttribute() returns an Object.
This code will work if the object stored in the session is a String.
The object stored in the session is ${articleForm.article} What type does articletForm.getArticle() return? That is the type you need to cast it to when retrieving it from the session.
Cheers,
evnafets -
How to get spool along with e-mail or FAX
Hi,
I have a requirement where i have to produce a spool even i go for e-mail or FAX option when the script is triggered.
I am using a standard program where it is coded to have either of the option. i.e. either we have to go for a printer or e-mail or FAX.
Could any one suggest me how to get spool along with e-mail or FAX option.
Thanks in advance.Hi,
check this:-[http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm]
hope u'll get some idea.
Regards,
Sneha. -
How to Get Spool ID after PO release. (To send PDF for ext E-mail)
Hi Experts,
I am new to Email sending from SAP.
I am facing a big problem from many days. I am in a new support project.
I have a issue that when ever a PO is released from ME23N or ME28 it should send a mail to vendor.
This is working fine in Development including delivery report or failed report back to approver...
I dont know where is PRD and who is doing that,
But my support manager says that only some PO's are sent to vendors not all...
everytime they approve only some emails sent to vendors...!
But every PO is same and for same vendor's...
Even failure & delivery messages are missing for (sent failed email's)
But after all I observed only one thing that we have a select statement....
DATA: GS_RESULT TYPE ITCPP.
DATA : L_DATE(9).
DATA : BEGIN OF LT_TSP01 OCCURS 0,
RQIDENT LIKE TSP01-RQIDENT,
RQCRETIME LIKE TSP01-RQCRETIME,
DATE(8),
TIME(8) TYPE N,
END OF LT_TSP01.
SELECT RQIDENT RQCRETIME FROM TSP01 INTO CORRESPONDING FIELDS OF
TABLE LT_TSP01 WHERE RQCRETIME LIKE L_DATE
AND RQIDENT EQ GS_RESULT-TDSPOOLID.
IF SY-SUBRC = 0.
(All Email sending code)(including delivery & failure delivery)
Endif.
So I suspect it is not picking up the Spool request from this Table TSP01 or may be not updated to this table.
I have searched in SCN, I have seen may E-mail Codings
But every one says to get Spool- ID & Convert to PDF,,,
My Question is How to get Spool ID correctly and tell me how it is updated. when a PO released by ME23N or ME28.
please any one clear my doubt as I am completely helpless here.
Thanks in advance,
Dunlop.Hi,
Is it a SMart form.....
If it is a smartform, then Smartfom interface itself has a spool id parameter....
you can directly het that from this parameter...
CALL FUNCTION "FMa Name'
EXPORTING
control_parameters = wsl_control
output_options = wsl_outpt
user_settings = ''
wtg_itemdetails = tl_itemdet
wtg_vttp = l_vttp
IMPORTING
job_output_info = sl_spooldet
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc <> 0.
ENDIF.
The inporting parameter sl_spolldet will have the Spool id.
and you fetch by, using the below mentioned way..........
READ TABLE wsl_spooldet-spoolids INTO wsl_wa_spool INDEX 1.
IF sy-subrc = 0.
Convert it into PDF using 'CONVERT_OTFSPOOLJOB_2_PDF'
then attach it and send a mail.....with all properties set such as Delivery report....
endif.
If you have any issues, please let me know........
Thanks & Regards,
Vamsi
Maybe you are looking for
-
How to transfer CRM sales order to R/3,delivery to CRM
Hello All, I have a basic question,just want to make sure what I am doing right.We have a business scenario where Sales Order is created in CRM and it should be replicated to R/3 for delivery and delivery should be replicated back to CRM for Billi
-
A PC server is showing up in my Finder/Shared folder. I don't know how it got there and I can't delete/trash it. Can someone tell me how to eliminate it?
-
Can i know the releasing date of next update for n...
Current version 7.36
-
I am still getting a kernel panic when trying to startup using the OS X Server Install disk. I have an Intel iMac in Target Disk Mode and am using it as a DVD drive and, as with an external drive, it causes a kernel panic. Is my Xserve too old to acc
-
Speed of Imported AIFF Vocal Slow
I imported a vocal aiff that was recorded in Pro Tools, and when it showed up in garageband, it was slightly off (slow sounding). I imported it to Soundtrack just to see if the same thing would happen, and it didn't - it sounded just fine. Is there a