How to Pass Multiple data records into SDATA for a segment
Hi Friends,
I need to Pass data records to Function Module
MASTER_IDOC_DISTRIBUTE for Creating Outbound IDOCs
I am Collecting all the Data Records and Passing into the Structure EDIDC.
Here my problem is
For one Route there are Multiple Customer records.
so my First Parent Segment is ZROUTE
i am passing the Datarecord for this Segment.
and for the Customer Segment , I have 5 Customers,
so i am passing the 5 Data records to SDATA .
Loop at gt_route into gw_route.
Pass the Route data into the Data record SDATA
gw_idocdata-sdata = gw_route_header.
gw_idocdata-segnam = lc_route_header.
gw_idocdata-hlevel = lc_4.
APPEND gw_idocdata TO gt_idocdata.
CLEAR : gw_route_header, gw_idocdata.
Loop at gt_customer into gw_customer
where anlage = gw_route-anlage.
Pass the Customer data into the Data record SDATA
gw_idocdata-sdata = gw_customer.
gw_idocdata-segnam = lc_customer.
gw_idocdata-hlevel = lc_5.
APPEND gw_idocdata TO gt_idocdata.
CLEAR : gw_customer, gw_idocdata.
ENDLOOP
ENDLOOP.
So this customer segment is comming 5 times in my IDOC
Can any one suggest me whether i am going in correct way or not.
I am Getting the IDOC status 26.
Error during syntax check of IDoc (outbound)
I think it is because the IDOC is not yet SET RELEASE.
But i am having the Dought in Passing the data to SDATA fied
of the EDIDC Structure.
Can any one Suggest me.
Thanks in Advance,
Ganesh
Hi,
First of all EDIDC is the control record, EDID4 is the data record. When collecting customer record into idoc_data you need to insert customer's parent segment number.
Eg.
route1, segnum 1.
child 1, segnum 2 and parent segnum = 1
child 2, segnum 3 and parent segnum = 1
child 3, segnum 4 and parent segnum = 1
route 2, segnum 5
child 1, segnum 6 and parent segnum = 5
child 2, segnum 7 and parent segnum = 5
child 3, segnum 8 and parent segnum = 5
Cheers.
...Reward if useful.
Similar Messages
-
How to import multiple xml records into PDF form
Our organization needs to print and distribute serveral hundred PDF forms to our members. We want to populate the names and some other basic info at the top of each form so the member can fill in the rest and sign and return it. I have the one page form set up with the fields and it's connected to an xml schema data source. When I import the xml file it reads the first record and that's it - how do I get it to read all of the xml records into a copy of the form for each record in the xml data source file so we can print and discribute the forms? We are using Acrobat 9 Pro on a Windows 7 32 bit machine.
ThanksIs this a form created with Acrobat or LiveCycle?
Acrobat would need uniquely named fields for each individual's page or pages if they are all in one file.
If you are processing one PDF file per individual, I would look at splitting the XML or FDF file into a record for each individual and them populating each individual's PDF form.
You could even use a tab delimited file and a template to populate the PDF template and then spawn a new page from the template.
With LiveCycle I would look at using a database for the variable data. -
How to pass multiple dates through open document syntax
Hi Team,
I am need to pass more than one date from the summary report to detail report. What is the open document syntax to achieve this requirement. Thanks in advance
praHi Pra,
I believe you would need to use the lsM[NAME] syntax.
lsM[NAME] is used to specify multiple values for prompts, separated by a comma.
For instance:
http://<servername>:<port>/OpenDocument/opendoc/<platformSpecific>?iDocID=Aa6GrrM79cRAmaOSMGoadKI&sID
Type=CUID&sRefresh=Y&lsMparamStringDR=[c],[d]&lsMparamNumberDR=[3],[4]&lsMparamDateDR=[Date(2003,6,3)],[Date(2003,6,4)]&lsMparamDateTimeDR=[DateTime(2003,6,1,3,1,1)],[DateTime(2003,6,1,4,1,1)]
Crystal reports
If the target is a Crystal report, each value must be enclosed in square brackets.
Web Intelligence documents
The character ? is a reserved prompt value for Web Intelligence documents in an openDocument URL. Setting the prompt value to lsM[NAME]=? in the URL forces the "Prompts" dialog box to appear for that particular prompt.
I hope this is a very helpful answer to you.
Kind regards,
John -
How to pass multiple records to target side using xquery
Hi Everybody,
I am using xquery transformation.
Input: Source payload contains 5 variables.
Target payload contains 5 variables.
I have input with payload with multiple instance like:
<Input>
<payload1>
<a>1<a>
<b>2<b>
<c>3<c>
<d>4<d>
<e>5<e>
</payload1>
<payload1>
<a>6<a>
<b>7<b>
<c>8<c>
<d>9<d>
<e>10<e>
</payload1>
</Input>
So my requirement is to pass above records into target side,
So I am using xquery Transformation.
I have written code as follows.
(:: pragma bea:global-element-parameter parameter="$tHRecAdv1" element="ns0:THRecAdv" location="../XMLSchemas/THRecAdv.xsd" ::)
(:: pragma bea:global-element-return element="ns1:ShipmentReceiptEBO" location="../../AIAReferenceModelProject/EnterpriseObjectLibrary/Core/EBO/ShipmentReceipt/V1/ShipmentReceiptEBO.xsd" ::)
declare namespace ns2 = "http://xmlns.oracle.com/EnterpriseObjects/Core/Custom/EBO/ShipmentReceipt/V1";
declare namespace ns1 = "http://xmlns.oracle.com/EnterpriseObjects/Core/EBO/ShipmentReceipt/V1";
declare namespace ns4 = "http://xmlns.oracle.com/EnterpriseObjects/Core/Common/V2";
declare namespace ns3 = "http://xmlns.oracle.com/EnterpriseObjects/Core/Custom/Common/V2";
declare namespace ns0 = "http://diversey.com/THRecAdv";
declare namespace xf = "http://tempuri.org/ShipmentReceiptServicesProject/XMLTransformations/THRecAdvFile_ShipmentReceiptEBO_JDE_XQuery/";
declare function xf:THRecAdvFile_ShipmentReceiptEBO_JDE_XQuery($tHRecAdv1 as element(ns0:THRecAdv))
as element(ns1:ShipmentReceiptEBO) {
for $THRecAdvFields in $tHRecAdv1/ns0:THRecAdvFields
return
<ns1:ShipmentReceiptEBO>
<ns4:Identification>
<ns4:BusinessComponentID>{ data($THRecAdvFields/ns0:JD_WHSE_Code) }</ns4:BusinessComponentID>
<ns4:ID schemeID = "{ (data($THRecAdvFields/ns0:JD_PO_Number)) }"
schemeVersionID = "{ data($THRecAdvFields/ns0:JD_PO_Type) }">{ data($THRecAdvFields/ns0:WMS_InternalPONumber) }</ns4:ID>
<ns4:ApplicationObjectKey>
<ns4:ID>{ data($THRecAdvFields/ns0:JD_BranchPlant) }</ns4:ID>
</ns4:ApplicationObjectKey>
<ns4:Revision>
<ns4:Reason>{ data($THRecAdvFields/ns0:ReturnReceiptReasonCode) }</ns4:Reason>
</ns4:Revision>
</ns4:Identification>
<ns1:ExpectedReceiptDate>{ data($THRecAdvFields/ns0:WMS_ReceiptDate) }</ns1:ExpectedReceiptDate>
<ns4:InvoiceReference>
<ns4:InvoiceIdentification>
<ns4:ID>{ data($THRecAdvFields/ns0:JDE_SupplierInvoiceNumber) }</ns4:ID>
</ns4:InvoiceIdentification>
</ns4:InvoiceReference>
<ns1:ShipmentReceiptLine actionCode = "{ data($THRecAdvFields/ns0:ActionFlag) }">
<ns4:Identification>
<ns4:ID schemeID = "{ data($THRecAdvFields/ns0:JD_PO_LineNumber) }"
schemeVersionID = "{ data($THRecAdvFields/ns0:ExternPONumber) }">{ data($THRecAdvFields/ns0:WMS_ReceiptNumber) }</ns4:ID>
<ns4:ContextID>{ data($THRecAdvFields/ns0:WMSReceivingClerk) }</ns4:ContextID>
<ns4:ApplicationObjectKey>
<ns4:ID schemeID = "{ data($THRecAdvFields/ns0:BatchNumber) }"
schemeVersionID = "{ data($THRecAdvFields/ns0:BatchLineNumber) }">{ data($THRecAdvFields/ns0:JD_LocationCode) }</ns4:ID>
</ns4:ApplicationObjectKey>
<ns4:AlternateObjectKey>
<ns4:ID>{ data($THRecAdvFields/ns0:SupplierCode) }</ns4:ID>
<ns4:ContextID>{ data($THRecAdvFields/ns0:LineNumber_Or_SequenceNumber) }</ns4:ContextID>
</ns4:AlternateObjectKey>
<ns4:Revision>
<ns4:Label>{ data($THRecAdvFields/ns0:Records) }</ns4:Label>
</ns4:Revision>
</ns4:Identification>
<ns1:ReceivedQuantity unitCode = "{ data($THRecAdvFields/ns0:ReceiptUOM) }">{ data($THRecAdvFields/ns0:UnitReceipt) }</ns1:ReceivedQuantity>
<ns1:SourceDocumentTypeCode>{ data($THRecAdvFields/ns0:SKU_Code) }</ns1:SourceDocumentTypeCode>
<ns1:DestinationTypeCode>{ data($THRecAdvFields/ns0:DestinationProcessFlag) }</ns1:DestinationTypeCode>
<ns1:Comment>{ data($THRecAdvFields/ns0:Remarks) }</ns1:Comment>
<ns4:Status>
<ns4:Code>{ data($THRecAdvFields/ns0:ProcessSourceFlag) }</ns4:Code>
<ns4:EffectiveDateTime>{ data($THRecAdvFields/ns0:ADDDATE) }</ns4:EffectiveDateTime>
</ns4:Status>
<ns1:ShipmentReceiptTransaction>
<ns1:ShipmentReceiptTransactionLot>
<ns1:ShipmentReceiptItemLotReference>
<ns1:ExpirationDate>{ data($THRecAdvFields/ns0:ExpiryDate) }</ns1:ExpirationDate>
<ns1:CreationDateTime>{ data($THRecAdvFields/ns0:ProductionDate) }</ns1:CreationDateTime>
</ns1:ShipmentReceiptItemLotReference>
</ns1:ShipmentReceiptTransactionLot>
</ns1:ShipmentReceiptTransaction>
</ns1:ShipmentReceiptLine>
</ns1:ShipmentReceiptEBO>
declare variable $tHRecAdv1 as element(ns0:THRecAdv) external;
xf:THRecAdvFile_ShipmentReceiptEBO_JDE_XQuery($tHRecAdv1)
But while importing this code to OSB,and tested it ,
With 1 payload it successfully shows the data in Target side,
But while testing with multiple line items,i am getting an error as follows.
*Error executing the XQuery transformation: line 14, column 17: {err}FORG0005: expected exactly one item, got 2+ items*
So please provide me the steps how to pass multiple records to target side using xquery.
Regards,
Jyoti NayakHi Jyoti Nayak,
You have to do something like the example bellow, you can not just repeat the inner element, you will need an outer "container" tag. So you will have to change the target element of your xq transformation.
declare function xf:setToList($set1 as element(ns0:set))
as element(ns0:list) {
<ns0:list>
for $pair in $set1/ns0:pair
return
<ns0:entry>
<ns0:key>{ data($pair/ns0:key) }</ns0:key>
<ns0:value>{ data($pair/ns0:value) }</ns0:value>
</ns0:entry>
</ns0:list>
Cheers,
Vlad
Give points - it is good etiquette to reward an answerer points (5 - helpful; 10 - correct) for their post if they answer your question. If you think this is helpful, please consider giving points -
How to Pass multiple parameter into single store procedure
How to Pass multiple parameter into single store procedure
like a one to many relationship.
it is possible then reply me immediatlyyou mean like this .....
CREATE OR REPLACE procedure display_me(in_param in varchar2,in_default in varchar2 := 'Default') is
BEGIN
DBMS_OUTPUT.put_line ('Values is .....'||in_param || '....'||in_default);
END display_me;
CREATE OR REPLACE procedure display_me_2 as
cnt integer :=0;
BEGIN
For c1_rec In (SELECT empno,deptno FROM test_emp) Loop
display_me(in_param => c1_rec.empno);
cnt := cnt+1;
end loop;
DBMS_OUTPUT.put_line('Total record count is ....'||cnt);
END display_me_2;
SQL > exec display_me_2
Values is .....9999....Default
Values is .....4567....Default
Values is .....2345....Default
Values is .....7369....Default
Values is .....7499....Default
Values is .....7521....Default
Values is .....7566....Default
Values is .....7654....Default
Values is .....7698....Default
Values is .....7782....Default
Values is .....7788....Default
Values is .....7839....Default
Values is .....7844....Default
Values is .....7876....Default
Values is .....7900....Default
Values is .....7902....Default
Values is .....7934....Default
Values is .....1234....Default
Total record count is ....18 -
How to retrive one table records into another table by multiple records
how to retrive table X records into another table Y by multiple records (means at once i want display 10 records) in form 6i .
when i am written cursor it is ftching only one record.But i want to display all records at once.
Declare
Cursor cur_name is
select PROTOCOL_NO,DOCNUM,SUBSETSN,REPEATSN,AESEQ,AETERM from coding_ae WHERE PROTOCOL_NO='KP229';
Begin
open cur_name;
loop
fetch cur_name into :PROTOCOL_NO,:DOCNUM,:SUBSETSN,:REPEATSN,:AESEQ,:AETERM;
exit when cur_name%notfound;
next_record;
end loop;
close cur_name;
End;Hi,
Make sure the cursor is in the detailed block. For that use 8GO_BLOCK* built-in. So the code will be
Declare
Cursor cur_name is
select PROTOCOL_NO,DOCNUM,SUBSETSN,REPEATSN,AESEQ,AETERM from coding_ae;
Begin
GO_BLOCK('<detailed_block_name>');
open cur_name;
loop
fetch cur_name into :PROTOCOL_NO,:DOCNUM,:SUBSETSN,:REPEATSN,:AESEQ,:AETERM;
exit when cur_name%notfound;
next_record;
end loop;
close cur_name;
End;Regards,
Manu.
If my response or the response of another was helpful or Correct, please mark it accordingly -
How to pass table data into below code for alv
hi
i want to pass table data into alvgrid
i dont know how to pass table data.
here instead of passing ABC into internal table
i want to pass table data .
please help me
ialv-test1 = 'ABC'.
form get_data.
ialv-test1 = 'ABC'.
ialv-test2 = 'DEF'.
append ialv.
ialv-test1 = 'GHI'.
ialv-test2 = 'JKL'.
append ialv.
ialv-test1 = '123'.
ialv-test2 = '456'.
append ialv.
endform
thanks in advanced.Have a look at below links. It gives you sample code of alv grid.
http://sap.niraj.tripod.com/id64.html
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
Have a look at below links for SAP Help.
http://help.sap.com/saphelp_nw04/helpdata/en/8d/e994374c9cd355e10000009b38f8cf/content.htm
http://help.sap.com/saphelp_erp2004/helpdata/en/12/904f42d5f811d2b469006094192fe3/content.htm
Best Regards,
Vibha
*Please mark all the helpful answers -
Loading multiple physical records into a logical record
Hello,
I'm not sure if this is the right place to post this thread.
I have to import data from a fixed length positioned text file into a oracle table using sql loader.
My sample input file (which has 3 columns) looks like:
Col1 Col2 Col3
1 A abcdefgh
1 A ijklmnop
1 A pqrstuv
1 B abcdefgh
1 B ijklmn
2 A abcdefgh
3 C hello
3 C world
The above text file should be loaded into the table as:
Col1 Col2 Col3
1 A abcdefghijklmnpqrstuv
1 B abcdefghijklmn
2 A abcdefgh
3 C helloworld
My question: Is there a way tht i can use the logic of loading multiple physical records into a logical record in my oracle tables. Please suggest.
Thanks in advance.Hi,
user1049091 wrote:
Kulash,
Thanks for your reply.
The order of the concatenated strings is important as the whole text is split into several physical records in the flat file and has to be combined into 1 record in Oracle table.
My scenario is we get these fixed length input files from mainframes on a daily basis and this data needs to be loaded into a oracle table for reporting purpose. It needs to be automated.
Am still confused whether to use external table or a staging table using sql loader. Please advise with more clarity as am a beginner in sql loader. Thanks.I still think an external table would be better.
You can create the external table like this:
CREATE TABLE fubar_external
( col1 NUMBER (2)
, col2 VARCHAR2 (2)
, col3 VARCHAR2 (50)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY XYZ_DIR
ACCESS PARAMETERS (
RECORDS DELIMITED BY NEWLINE
FIELDS ( col1 POSITION (1:2)
, col2 POSITION (3:4)
, col3 POSITION (5:54)
LOCATION ('fubar.txt')
);where XYZ_DIR is the Oracle Directory on the database server's file system, and fubar.txt is the name of the file on that directory. Every day, when you get new data, just overwrite fubar.txt. Whenever you query the table, Oracle will read the file that's currently on that directory. You don't have to drop and re-create the table every day.
Note that the way you specify the columns is similar to how you do it in SQL*Loader, but the SEQUENCE generator doesn't work in external files; use ROWNUM instead.
Do you need to populate a table with the concatenated col3's, or do you just need to display them in a query?
Either way, you can reference the external table the same way you would reference a regular, internal table. -
How to pass in a parameter into a report viewer on a jsp - and hidden
Hi, I've built a php application and am using the java environment to enable the crystal report/viewer. The developer was looking how to pass in a parameter into a report viewer on a jsp. Ultimately the end product we need is to get an HTML report viewer loading a report file with hidden parameters so to not expose other customer data (it's a shared database for multiple customers) preferably loaded from php using maybe the php java bridge. Would anyone happen to have any sample code or any guidance?
<%@ page contentType="text/html; charset=UTF-8"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/crystal-tags-reportviewer.tld" prefix="crviewer"%>
<%
// just a test to grab rpt name from GET
String rptFile = "report_files/" + request.getParameter("rpt");
%>
<crviewer:viewer reportSourceType="reportingComponent" viewerName=""
isOwnPage="true">
<crviewer:report reportName="<%= rptFile %>" />
</crviewer:viewer>
Many thanks in advance!
MarkI am not aware of any html tags you can pass to the viewer for parameter values. Normally, you would load the report in code and then use the SDK with the report object to pass parameter values.
-
Data Extraction from Multiple data sources into a single Infoprovider
Hi Experts,
Can anyone send me links or examples on how to extract data from multiple data sources into 1 Cube/DSO.
Can anyone send me example scenarios for extracting data from 2 data sources into a single Cube/DSO.
Thanks
KumarHi Ashok,
Check the following link from SAP help. Ths is probably what you are looking for.
[ Multiple data sources into single infoprovider|http://help.sap.com/saphelp_nw70/helpdata/en/e3/e60138fede083de10000009b38f8cf/frameset.htm]
Data from multiple data sources which are logically related and technicall have the same key can be combined into single record.
For example, if you have Sales order item and sales order item status .
These both have the same key - sales order and item and are logically related.
The Sales order item - provides information on Sales order item - material , price, quantity, plant etc.
The item status - povides information on delivery status, billing status, rejection status....
These are two different data sources 2LIS_!1_VAITM ad 2LIS_11_VASTI.
In case you have few master data attributes coming from different systems ie tow data sources in different systems say completely defines your master data. Then you could use a DSO or infoobject to combine the records.
If you want to see aggregated data you use a cube.
ie say you want to analyzae the customer revenue on a particular material and a particular project.
The project details would come from Project syatem and Sales details fom sales flow.
The data is then combined in the DSO with key cutomer and sales area say.
Then it is aggregated at cube level...by not using sales order in the cube model...so all sales order of the same customer would add while loading the cube.. to give direct customer spend values for your sales area at aggregated level.
Hope this helps,
Best regards,
Sunmit. -
How to pass multiple values from workbook to planning function ?
Hi,
I have created Planning function in Modeler and it has one parameter(Variable represents = Multiple single values).
When executing the planning function by create planning seq. in the web template : I see value of variable store data like ...
A.) input one value -> V1
B.) input three values -> V1;V2;V3
This function execute completely in web.
However, I want to use the planning function in workbook(Excel).
The value of variable can't input V1;V2;V3... I don't know how to pass multiple values from workbook to parameter(Multiple single values type) in planning function ?
thank you.Hi,
Please see the attached how to document (page no 16).
<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f0881371-78a1-2910-f0b8-af3e184929be">how to</a>
Hope this was helpful
thanks -
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 copy the table1selected records into table 2 in webdynpro java.
Hi
how to copy the table1selected records into table 2 in webdynpro java.
venkat
Edited by: venkatpvr on Sep 23, 2011 11:53 AMHi Venkat,
You have 2 Value Nodes one for Table1 and second for Table2.
Table1 node having one more Value Attribute i.e check Box data type is Boolean. Now you are requirement are select records from Table1 Node and click on One Method that records will moves to Second Table2 Node.
Create One Method for getting the Records from 1-Table to 2-Table
CopytoTable2 ()
In this method you have to write code like this
If (wdContext.nodeTable1.Checkbox(true))
If(1. Check the Table1 Value Node Size()>0)
Get the Table1 records and set to table2 Value node.
Else
Please select check box// Error message
Hope this helps!!
Regards
Vijay K -
How to extract 250,000 Records into excel
Hi Friends In sql server My table has 250,000 records . How can I import these records into excel?
If not which file type I can use for it. Thanks for advance friendsThere are many solutions. I say two solution here:
using "extract" by right click on database in ssms like bellow screens shots
using "get external data" from data tab in excel
more info: http://office.microsoft.com/en-001/excel-help/connect-to-import-sql-server-data-HA010217956.aspx
sqldevelop.wordpress.com -
How to UPDATE MASTER DATA RECORD PA0377 using FM HR_INFOTYPE_OPERATION
How to UPDATE MASTER DATA RECORD IN INFOTYPE 0377 DIRECTLY using function module HR_INFOTYPE_OPERATION ? When i use operation = 'MOD' im getting an ERROR as NO DATA STORED FOR 0377 IN SELECTION PERIOD.
Can anyone please help me how to use HR_INFOTYPE_OPERATION to UPDATE MASTER DATA RECORD.
Thanks,
Karthi.Hi,
please check this code
it is very useful
infotypes: 0105.
parameters: p_pernr type p0105-pernr,
p_subty type p0105-subty,
p_begda type p0105-begda,
p_endda type p0105-endda,
p_opera type pspar-actio,
p_usrid type p0105-usrid,
p_commt as checkbox. "Useful only when NO_COMMIT is 'X'
data: w_return type bapireturn1, "Error handling data
w_key type bapipakey, "If record has been created or changed the created/ changed
"record's key (PSKEY) will be populated
v_message type string. "For printing returned messages
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = p_pernr
importing
return = w_return.
if w_return is initial. "Employee is not locked
p0105-pernr = p_pernr.
p0105-subty =
p0105-usrty = p_subty.
p0105-begda = p_begda.
p0105-endda = p_endda.
p0105-usrid = p_usrid.
*Calls Internally HR_MAINTAIN_MASTERDATA
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0105'
number = p_pernr
subtype = p_subty
validityend = p_endda
validitybegin = p_begda
record = p0105
operation = p_opera
dialog_mode = '0'
nocommit = 'X'
importing
return = w_return
key = w_key.
endif.
if w_return is not initial.
message id w_return-id type w_return-type number w_return-number
with w_return-message_v1 w_return-message_v2 w_return-message_v3
w_return-message_v4 into v_message.
case w_return-type.
when 'A' or 'E'.
format color col_negative. write:/ v_message.
when others.
format color col_heading. write:/ v_message.
endcase.
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = p_pernr.
else.
format color col_positive. write:/ 'Record Updated Successfully.'.
if w_key is not initial.
write:/ 'Key contains',
/ 'Personnel Number:', w_key-employeeno,
/ 'Subtype (absence type):', w_key-subtype,
/ 'Start date of Absence:', w_key-validbegin,
/ 'End date of Absence:', w_key-validend.
endif.
commit work.
endif.
Thanks and regards
durga.K
Maybe you are looking for
-
Lookupd bug still an issue???
Hi there! Is it true that the old problem of the crashing lookup demon is still not patched?? At the first glance I only found discussions about this issue nearly a year ago. I'm experiencing some of the problems - network connection going down (but
-
Where is save as draft in toolbar for mail
I know you can use save from the File pull down but it is so much easier to have it on the toolbar -where did it go? thanks for any help Theprin
-
My G41 has developed a LCD display problem. There are two very fine lines that runs from top to bottom of the display approx. 1 cm from the left edge of the display. Running display diagnostic provides no help. Could this be a driver problem? Thi
-
I've been trying out this feature as it was shown in adfdeveloperguide. that is, on page 3-26/27 StoredFunctionCall functionCall = new StoredFunctionCall(); functionCall.setProcedureName("READ_EMPLOYEE"); functionCall.addNamedArgument("EMP_ID"); func
-
Cannot install Canon printer drivers after upgrade to Mountain Lion
Have got a MG3150 printer from Canon. which is in the supported list. I tried to add the new printer and get the message "can't install the software for the Canon MG3100 series becuase it is not currently available from the Software Update Server. It