Xslt code help needed
Dear SAP experts,
Would you be able to help me in configuring the right xslt code to accomodate the looping logic?
Source Document:
School (occur only once)
- Name (can occur multiple times)
- Nickname (occur only once)
- Desired name (occur only once)
Target Document:
School
- Name
- Nickname (the value for this should be obtained from 'Desired name field')
- Desired name
I have this code, but seems not working in looping logic. (to accomodate the multiple Names):
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
<BuyerPartNumber>
<PartNum>
<PartID>
<xsl:value-of select ="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/ManufacturerPartNumber/PartID"/>
</PartID>
</PartNum>
</BuyerPartNumber>
</xsl:template>
</xsl:stylesheet>
What happened is that the value was taken ONLY on the 1st line item. (1st Name occurence)
The succeeding Name field just copied the value of Nicknames from the 1st Name field.
Kindly advise how to handle the context (loop logic) in the xslt code.
Thanks!
Apologies, but, it seems i did not indicate the complete message structure for the document I am testing.
Order (root)
OrderHeader (1st parent segment)
OrderNumber (child fields - 1st)
Order.. (child fields - 2nd)
Order...(child fields - 2nd)
OrderDetail (1st parent segment)
<fields under this segment were already mentioned from previous threads>
OrderSummary (1st parent segment)
NumOfLines (child fields - 1st)
TotalAmount (child fields - 1st)
Under Order, there are also OrderHeader and OrderSummary parent segment, other than OrderDetail, in which we focus our code.
I've tried your code, but, the segments OrderHeader and OrderSummary and child fields under it were not appearing on my output.
But it seems, I've already generated the correct code.
Here it is,
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<xsl:template match="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
<xsl:for-each select=".">
<BuyerPartNumber>
<PartNum>
<PartID>
<xsl:value-of select="../ManufacturerPartNumber/PartID"/>
</PartID>
</PartNum>
</BuyerPartNumber>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
I believe, the code you've suggested last time will accomodate only OrderDetail parent segment. Is this correct?
Thanks!
Similar Messages
-
Survey creation abap code help needed
hello experts,
I need to create a survey in crm, by taking values from end-user from a webpage
A sample code help is needed.
Thanks in advanceTake a look at this SAP note - It does a pretty good job of detailing the steps for you. No coding necessary, it worked out of the box for us after patching this note.
https://service.sap.com/sap/support/notes/638320 -
Hi All,
My requirement is below :
In my DSO I have the data as below
doc number item con type Agreement
100 10 adc 1234
efg 5678
hij ' '
200 20 adc 1234
efg ' '
hij 5678
Now I have created a New Info object named flag. So now I am doing a self myself data mart where i need to write my routine to set data in the flag.
The data should be like
doc number item con type Agreement Flag
100 10 adc 1234 X
efg 5678 X
hij ' ' X
200 20 adc 1234 X
efg ' ' X
hij 5678 X
Note:- even if agreement is blank for hij we need to put X since agreement is available for the remaining two condition types.
Please can any one help with the code.and also please let meknow whether we shold write it in start routine or end routine
Thanks In advance
SreeHi Rookie ,
If i write the code below
DATA: ITAB TYPE TABLE OF tys_TG_1,
ITAB_WA TYPE tys_TG_1.
MOVE RESULT_PACKAGE[] TO ITAB[].
LOOP AT RESULT_PACKAGE ASSIGNING <RESULT_FIELDS>.
IF <RESULT_FIELDS>-AGREEMENT IS NOT INITIAL.
<RESULT_FIELDS>-FLAG = 'X'.
ELSE.
LOOP AT ITAB INTO ITAB_WA WHERE AGREEMENT IS NOT INITIAL AND
DOC_NO = <RESULT_FIELDS>-DOC_NO AND
ITM_NO = <RESULT_FIELDS>-DOC_NO.
<RESULT_FIELDS>-FLAG = 'X'.
EXIT.
ENDLOOP.
ENDIF.
ENDLOOP.
My requirement doesnt match
My requirement is below
doc number item con type Agreement
100 10 adc 1234
efg 5678
hij ' '
200 20 adc ' '
efg ' '
hij ' '
Expected result is
doc number item con type Agreement flag
100 10 adc 1234 x
efg 5678 x
hij ' ' x
200 20 adc ' ' ' '
efg ' ' ' '
hij ' ' ' '
regards
Sree -
Hi,
I am trying to display data on a webpage from an RSS feed using a XSLT Fragment.
I have managed to get it to work and display all the results, what I need to know is there any way I can limit the number of results shown on a page and add paging?
ThanksApologies, but, it seems i did not indicate the complete message structure for the document I am testing.
Order (root)
OrderHeader (1st parent segment)
OrderNumber (child fields - 1st)
Order.. (child fields - 2nd)
Order...(child fields - 2nd)
OrderDetail (1st parent segment)
<fields under this segment were already mentioned from previous threads>
OrderSummary (1st parent segment)
NumOfLines (child fields - 1st)
TotalAmount (child fields - 1st)
Under Order, there are also OrderHeader and OrderSummary parent segment, other than OrderDetail, in which we focus our code.
I've tried your code, but, the segments OrderHeader and OrderSummary and child fields under it were not appearing on my output.
But it seems, I've already generated the correct code.
Here it is,
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" media-type="xml" encoding="UTF-8" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
<xsl:template match="/Order/OrderDetail/ListOfItemDetail/ItemDetail/BaseItemDetail/ItemIdentifiers/PartNumbers/BuyerPartNumber">
<xsl:for-each select=".">
<BuyerPartNumber>
<PartNum>
<PartID>
<xsl:value-of select="../ManufacturerPartNumber/PartID"/>
</PartID>
</PartNum>
</BuyerPartNumber>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
I believe, the code you've suggested last time will accomodate only OrderDetail parent segment. Is this correct?
Thanks! -
// Code Help need .. in Reading CSV file and display the Output.
Hi All,
I am a new Bee in code and started learning code, I have stared with Console application and need your advice and suggestion.
I want to write a code which read the input from the CSV file and display the output in console application combination of first name and lastname append with the name of the collage in village
The example of CSV file is
Firstname,LastName
Happy,Coding
Learn,C#
I want to display the output as
HappyCodingXYZCollage
LearnC#XYXCollage
The below is the code I have tried so far.
// .Reading a CSV
var reader = new StreamReader(File.OpenRead(@"D:\Users\RajaVill\Desktop\C#\input.csv"));
List<string> listA = new List<string>();
while (!reader.EndOfStream)
var line = reader.ReadLine();
string[] values = line.Split(',');
listA.Add(values[0]);
listA.Add(values[1]);
listA.Add(values[2]);
// listB.Add(values[1]);
foreach (string str in listA)
//StreamWriter writer = new StreamWriter(File.OpenWrite(@"D:\\suman.txt"));
Console.WriteLine("the value is {0}", str);
Console.ReadLine();
Kindly advice and let me know, How to read the column header of the CSV file. so I can apply my logic the display combination of firstname,lastname and name of the collage
Best Regards,
Raja Village Sync
Beginer CoderVery simple example:
var column1 = new List<string>();
var column2 = new List<string>();
using (var rd = new StreamReader("filename.csv"))
while (!rd.EndOfStream)
var splits = rd.ReadLine().Split(';');
column1.Add(splits[0]);
column2.Add(splits[1]);
// print column1
Console.WriteLine("Column 1:");
foreach (var element in column1)
Console.WriteLine(element);
// print column2
Console.WriteLine("Column 2:");
foreach (var element in column2)
Console.WriteLine(element);
Mark as answer or vote as helpful if you find it useful | Ammar Zaied [MCP] -
I Have a little problem
i want to push a button in creator that execute the following SQL code
INSERT INTO NAMES2(NAME,ID)
SELECT NAME,ID
FROM NAMES
WHERE ID = '1' ;
this sql code take a row from a table to another table and so on i need that happen from a button in creator in other word how can i but this code in the java
i think it's simple but i didn't find it in any place i know
so can Any one Help Me:)because sql is more faster 1000 timeswho told u that ??? how u measuer this ?
u can use ordinary way in adding or deleting recordes in database using DataSource Connection booling
i think u can do this by the way of DataProvider ,, as the tutorials tell u that ,,, it is easy and straightforward
http://developers.sun.com/jscreator/learning/tutorials/2/inserts_updates_deletes.html
hope this will help u
good luck
Muhammed -
Hi,
I have a XSD file with multiple references in my external definition. I am trying to build a schema validation functionality for a xml based on the multiple XSD's.
Is it possible to do a schema validation using xslt mapping?
I am using Altova mapforce to generate XSLT mapping but somehow it is not working. It gives me an error "XML Not well Formed".
Please help!!Hi Jyanth
yes you can do this
i advice you to use XML Schema Tools like stylus studio or spy for editing, mapping, converting, validating, generating, binding and documenting any XML data model
few links for you how you can do in XML
validating XML using XSLT
http://www.ldodds.com/papers/schematron_xsltuk.html
http://www.w3.org/TR/xslt20/
http://www.stylusstudio.com/xsd_to_xsd.html
https://www.xsltstudio.com/xml_schema.html
regards
Sandeep
If helpful kindly reward points -
i need java code for writing following lines in a file
<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
Moreover i need code for reading word by word html file.
PLease reply as soon as possible.
iwapsmsfor the html-part there are several html-parser, that bould whole parsetrees, which you can traverse (walk) through as you whish. just check google for it (something like: java html parser).
if that xml you have there is in String-form, just use a Filewriter
BufferedWriter writer = new BufferedWriter (new FileWriter (new File ("FilePath/filename.xml")));
writer.write (xmlString);
writer.close();however, if you have to juggle xml tags, content and attributes a lot, i'd recomend jdom to construct the xml and saxParser to write it.
again jsut google for it. -
Hi,
In the ABAP inbound (server) proxy, I have written code like this.
DATA: lt_material TYPE TABLE OF zxdt_material,
ls_material TYPE zxdt_material,
ls_input type zxmt_cam.
ls_input = input.
lt_material = ls_input-mt_cam-material.
Here, material is a table type which should have 10 records of material. But it has only one records always eventhough I am passing 10 records in the input xml.
What could be the reason?
Any help is really appreciated since I am trying this for a long time now.
Thanks
RickyExample code...
here header has simple structure type (non repeating) so we directly assigning fields
INPUT-ACCOUNTLIST-ACCOUNTDETAILINFO has proxy table structure(repeating structure) ,.... so we have used internal table for that..
FUNCTION Z_00FI_ACCOUNTS_RECON_DAT.
""Local Interface:
*" IMPORTING
*" REFERENCE(INPUT) TYPE ZDT_ACCOUNT_RECON_INFO_TARGET4
TABLES:ZT00FI_ACCDATA, "Accounts Data
ZT00FI_ACCHEAD.
DATA:
LT_ACCOUNTLIST TYPE TABLE OF ZDT_ACCOUNT_RECON_INFO_TARGET3,
LT_ACCDATATAB TYPE TABLE OF ZT00FI_ACCDATA,
LT_ACCHEADERTAB TYPE TABLE OF ZT00FI_ACCHEAD,
LS_ACCOUNTLIST TYPE ZDT_ACCOUNT_RECON_INFO_TARGET3,
LS_ACCDATATAB TYPE ZT00FI_ACCDATA,
LS_ACCHEADERTAB TYPE ZT00FI_ACCHEAD,
LS_HEADER TYPE ZDT_ACCOUNT_RECON_INFO_TARGET.
SELECT SINGLE * FROM ZT00FI_ACCHEAD
WHERE BATCHID = INPUT-HEADER-BATCHID AND
SUBBATCHID = INPUT-HEADER-SUBBATCHID.
*IF SY-SUBRC NE 0.
MOVE:
INPUT-HEADER-SOURCEREF TO LS_ACCHEADERTAB-SOURCEREF,
INPUT-HEADER-BATCHID TO LS_ACCHEADERTAB-BATCHID,
INPUT-HEADER-SUBBATCHID TO LS_ACCHEADERTAB-SUBBATCHID,
INPUT-EXTRACTIONINFO-DATAVERSION TO LS_ACCHEADERTAB-DATAVERSION,
INPUT-EXTRACTIONINFO-SOURCESYSTEM TO LS_ACCHEADERTAB-SOURCESYSTEM,
INPUT-EXTRACTIONINFO-COUNTRYCODE TO LS_ACCHEADERTAB-COUNTRYCODE,
INPUT-EXTRACTIONINFO-NUMBEROFACCOUNTS TO LS_ACCHEADERTAB-NUMBEROFACCOUNTS,
INPUT-EXTRACTIONINFO-STARTTIMESTAMP TO LS_ACCHEADERTAB-STARTIMESTAMP,
INPUT-EXTRACTIONINFO-ENDTIMESTAMP TO LS_ACCHEADERTAB-ENDTIMESTAMP,
INPUT-EXTRACTIONINFO-DELTAINDICATOR TO LS_ACCHEADERTAB-DELTAINDICATOR,
INPUT-EXTRACTIONINFO-LASTBATCHINDICAT TO LS_ACCHEADERTAB-LASTBATCHINDICAT.
MOVE 'N' TO LS_ACCHEADERTAB-PROCESSINDICATOR.
APPEND LS_ACCHEADERTAB TO LT_ACCHEADERTAB.
INSERT ZT00FI_ACCHEAD FROM TABLE LT_ACCHEADERTAB.
MOVE INPUT-ACCOUNTLIST-ACCOUNTDETAILINFO TO LT_ACCOUNTLIST.
LOOP AT LT_ACCOUNTLIST INTO LS_ACCOUNTLIST.
MOVE:
INPUT-HEADER-BATCHID TO LS_ACCDATATAB-BATCH_ID,
INPUT-HEADER-SUBBATCHID TO LS_ACCDATATAB-SUBBATCH_ID.
MOVE-CORRESPONDING LS_ACCOUNTLIST TO LS_ACCDATATAB.
APPEND LS_ACCDATATAB TO LT_ACCDATATAB.
CLEAR:LS_ACCOUNTLIST,
LS_ACCDATATAB.
ENDLOOP.
INSERT ZT00FI_ACCDATA FROM TABLE LT_ACCDATATAB.
COMMIT WORK.
*ENDIF.
ENDFUNCTION. -
Java code help needed for If-elseif statement
HI All,
Apologies for posting such a trivial thing but I am a novice in Java.
All I need is to code an If elseIF statement.
I tried the code below
String w = "SAPA";
String x = "SAPB";
if (a==w) ;
{Channel channel = LookupService.getChannel("BS_PROD","CC_RFC_LOOKUP");}
else if (a==x)
{ Channel channel = LookupService.getChannel("BS_PROD","CC_RFC_LOOKUP_ECQ"); }
It came back with the error
Source code has syntax error: D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map695b77619ad011dd8d0b001a4b52813a/source/com/sap/xi/tf/_MM_TRANSMISSION_CHECK_TO_GENIUS_.java:324: 'else' without 'if' else if (a==x) ^ 1 error
Appreciate if you could let me know the correct code.
Many thanks
ShirinHI Aamir,
After I removed the semi-colon iIt came back with the following error
Source code has syntax error: D:/usr/sap/XRD/DVEBMGS02/j2ee/cluster/server0/./temp/classpath_resolver/Map1d9b43e09ad111dd84b7001a4b52813a/source/com/sap/xi/tf/_MM_TRANSMISSION_CHECK_TO_GENIUS_.java:328: cannot resolve symbol symbol : variable channel location: class com.sap.xi.tf._MM_TRANSMISSION_CHECK_TO_GENIUS_ accessor = LookupService.getRfcAccessor(channel); ^ 1 error
Just for reference my entire Jave UDF looks like this:
//write your code here
String w = "SAPA";
String x = "SAPB";
String content = "";
MappingTrace importanttrace;
importanttrace = container.getTrace() ;
//Filling the string with our RFC-XML (With Values)
String m = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><ns0:ZIFMS_GET_NEXT_NUMBER xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\"><I_NR_RANGE_NR>01</I_NR_RANGE_NR><I_OBJECT>ZIFMS_INT</I_OBJECT></ns0:ZIFMS_GET_NEXT_NUMBER>";
RfcAccessor accessor = null;
ByteArrayOutputStream out = null;
try
//1. Determine a channel (Business System, Communication channel)
if (a==w)
{Channel channel = LookupService.getChannel("BS_PROD","CC_RFC_LOOKUP");}
else if (a==x)
{ Channel channel = LookupService.getChannel("BS_PROD","CC_RFC_LOOKUP_ECQ"); }
//2. Get a RFC accesor for a channel.
accessor = LookupService.getRfcAccessor(channel);
//3. Create a xml input stream representing the FM request message.
InputStream inputstream = new ByteArrayInputStream(m.getBytes());
//4. Create xml Payload
XmlPayload payload = LookupService.getXmlPayload(inputstream);
//5. Execute Lookup
Payload result = accessor.call(payload);
InputStream in = result.getContent();
//This are the extra step which i dont know what it mean
//out = new ByteArrayOutputStream(1024);
//byte[] buffer = new byte1024;
//for (int read = in.read(buffer); read > 0; read = in.read(buffer))
//out.write(buffer,0,read);
//content = out.toString();
try {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Document document = builder.parse(in);
NodeList list = document.getElementsByTagName( "E_NUMBER" );
Node node = list.item(0);
if (node != null)
node = node.getFirstChild();
if (node != null)
content = node.getNodeValue();
} catch (Exception e) {
importanttrace.addWarning("Error while closing accesor" + e.getMessage());
catch (LookupException e)
importanttrace.addWarning("Error While lookup" + e.getMessage());
//This exception is not to be catch at this step as there is no try step before this
//catch (IOException e)
//importanttrace.addWarning("Error" + e.getMessage());
finally
if(out!=null)
try{
out.close();
} catch (IOException e) {
importanttrace.addWarning("Error while closing system" + e.getMessage());
//7. close the accessor in order to free resources
if (accessor!=null) {
try{
accessor.close();
} catch (Exception e) {
importanttrace.addWarning("Error while closing accesor" + e.getMessage());
return content; -
MSI p55 - gd80 motherboard code help needed
Hi all, today i moved house and my PC has went awol on me. Basically the monitor, mouse and keyboard will not turn on.. I thought maybe something got moved about in the case, so I basically took everything out and I mean everything and put them back in securely.
After trying several things including resetting the cmos and taking the bios battery out, I still cant figure out what is wrong.
I did notice that when I put my ram in the two blue slots the motherboard wont get past the FF code on the LED display. However when they are in the two black slots the motherboard generally gets to 2E. I understand that it stands for "Initializes all output devices". But I don't know how to rectify this problem.
Oh and I forgot to add, the DVD drive is now not working for some reason and my win7 disk in it.
Any help would be greatly appreciated. Thank you,
IainQuote from: Henry on 27-August-10, 04:47:15
"Installed Memory 4.00GB (1.99 GB usuable)
Yes you should RMA the card since it works OK with a different one.
For the memory, re-seat the sticks again and I would also suggest re-seat CPU and check for bent/damaged pins in the CPU socket. If all of the pads on CPU don't make full contact with the pins it could cause memory problems. This has happened to others and usually re-seating CPU fixes it.
Thanks Henry. I tried reseating the RAM and CPU but no luck. There is a tiny spot on the CPU.. I dont know if that could be a problem or not? -
Hi,
Iam trying to calculate the no of days between 2 dates entered by user against system date and factory calendar. Here is the code I have written. Currently the code is written to compute the difference of days based on today's date. So if user enters 'from date' as 1st march and 'to date' as 16th march, then I will compute no of days based on system date. But instead of taking today's date the requirement is to consider the end date for the difference. So the difference between 1st and 16th march excluding weekends will be 11 days etc. How do I pass the end date of bill date in the following code for p_date2. Any ideas?
FORM USER_0SD_C03 USING I_S_RKB1D TYPE RSR_S_RKB1D
CHANGING C_S_DATA TYPE ANY.
DATA: l_zcount1 TYPE int4.
FIELD-SYMBOLS <L_0BILL_DATE>.
FIELD-SYMBOLS <L_0COMP_CODE>.
FIELD-SYMBOLS <L_ZCOUNT1>.
ASSIGN COMPONENT G_POS_0SD_C03_0BILL_DATE
OF STRUCTURE C_S_DATA TO <L_0BILL_DATE>.
ASSIGN COMPONENT G_POS_0SD_C03_0COMP_CODE
OF STRUCTURE C_S_DATA TO <L_0COMP_CODE>.
ASSIGN COMPONENT G_POS_0SD_C03_ZCOUNT1
OF STRUCTURE C_S_DATA TO <L_ZCOUNT1>.
IF <L_0COMP_CODE> = 'AB99'.
CALL FUNCTION 'ZCALC_WDAYS_BETWEEN_DATES'
EXPORTING
P_DATE1 = <L_0BILL_DATE>
P_DATE2 = SY-DATUMP_CAL_ID = 'Z1'
IMPORTING
P_DAYS = l_zcount1.
<L_ZCOUNT1> = l_zcount1.
ENDIF.
ENDFORM. "USER_ZSFIGC02
Edited by: Sujatha Raghunathan on Mar 19, 2009 5:48 PMHi,
check this thread: Re: Working days of month with factory calendar and FM 'DATE_CONVERT_TO_FACTORYDATE'. You can use it twice like described in thread. End date will be your booking date...
I solved a similar scenarion with this coding...
Regards
Andreas -
hi all,
I'm very new to java programming, but have taken on the task of writing an FTP server (incomplete code below). My problem is that which ever FTP Client I use, the server blocks when reading an incoming stream. I've tried different combinations of coding to read the incoming stream, but get a block each time. Can someone pleeeeeeeeeeeease tell me where I'm going wrong?
import java.io.*;
import java.net.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class MyFTPServer extends JFrame
private JTextField enterField;
private JTextArea displayArea;
private ObjectOutputStream output;
private ObjectInputStream input;
private ServerSocket server;
private Socket connection;
private int counter = 1;
private static String r;
private static String dir;
private static String host;
private static String str;
private static int ip;
protected BufferedReader in;
public MyFTPServer() {
super("Server");
Container container = getContentPane();
enterField = new JTextField();
enterField.setEnabled(false);
enterField.addActionListener(
new ActionListener() {
public void actionPerformed(ActionEvent event) {
sendData(event.getActionCommand());
container.add(enterField, BorderLayout.NORTH);
displayArea = new JTextArea();
container.add(new JScrollPane(displayArea), BorderLayout.CENTER);
setSize(300, 150);
setVisible(true);
public void runServer() {
try {
server = new ServerSocket(21);
String a1, a2, di, str1, user = "", host, dir;
int lng, lng1, lng2, i, ip1, ip2, ip = 1, h1;
dir = r;
while (true) {
waitForConnection();
getStreams();
backupFile();
closeConnection();
storeFile();
++counter;
} catch (EOFException eofException) {
System.out.println("Client Terminated Connection");
} catch (IOException ioException) {
ioException.printStackTrace();
private void waitForConnection() throws IOException {
try {
displayArea.setText("Waiting for Connection\n");
connection = server.accept();
displayArea.append("Connection " + counter + " received from: " +
connection.getInetAddress().getHostName());
} catch (IOException ioException) {}}
private void getStreams() throws IOException {
try {
System.out.println("test");
input = new ObjectInputStream(connection.getInputStream());
} catch (IOException ioException) {
displayArea.append("\n error in streams");
//doesnt seem to reach this bit
private void backupFile() throws IOException {
try {
System.out.println ("test backup");
str = ( String ) input.readObject();
System.out.println (str);
} catch (ClassNotFoundException classNotFoundException) {
displayArea.append("\n Unknown object type received");
}This server will only handle one client at a time.
It breaks all the rules about single-threaded access to Swing components.
And if the protocol is FTP you have no business using ObjectInputStream.
I'd have a good look at the Swing and Networking tutorials and the FTP RFC before you go any further. -
Need an Custom XSLT code... where i need to compare 2 attribute fields( Name and Start Date) fromInputMessagePart_0 with the 2 fields ( Name and Start Date) from InputMessagePart_1 and need to map the repetitive attribute field ( phoneno) from InputMessagePart_1
to attribute field( PhoneNo of Destination schema.
this will look like this
Source Schema
Destination Schema
InputMessagePart_0 Item
Record
- Name
-Name
- StartDate
- StartDate
- Addres
- PhoneNo
InputMessagePart_1
-Name
-StartDate
-PhoneNo
Final output should look like by
Details
Name
StartDate
PhoneNo
Details
Name
StartDate
PhoneNo
Details
Name
StartDate
PhoneNo
Details
Name
StartDate
PhoneNo
Need urgent assistance
Thank you in advance
BizTalkLearnercould you also post your sample input instance and expected output instance
Please mark the post as answer if this answers your question. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply. -
Help needed in writting Customer exit - ABAP Code
Hi Friends,
I have a scenario in one of the query and need to write a customer exit for the same. Here is the scenario:
I am using one input variable XXX to get input from user which feeds value to one of the charateristic lets say "CHAR1" in query. I have one more characteristic "CHAR2" which has to get the value from the same variable XXX. This is not allowed in BI7.0 as the variable is Hierarchy Node type. It gives error that "Variable XXX is used for two different characteristics."
So i need to create one more vaiable YYY which will get the value from XXX and then YYY will feed value to CHAR2. I would appreciate if some one could tell me step by step how to write customer exit and give me the piece of ABAP code i need to write in my case.
Your help will be appreciated in terms of points.
Thanks,
manmitHi Arun,
1. What should CHAR2 take - Hierarchy node variable or something else ?
--> CHAR2 is a simple charateristic
2. In your scenario - why have CHAR1 and CHAR2 ? why not have the user enter values against CHAR2 ??
--> We dont want user to enter two input as the input values for both Chars are same.
3. Did you try using a replacement path variable with the CHAR2 variable taking values from Variable on CHAR1 ?
--> In BI7.0 replacement path variable only take values from Query results. So not able to do the same.
Thanks
Maybe you are looking for
-
Moving Images and Catalog Questions...
Since I first started using Lighroom, I have kept all images in one catalog on my laptop hard drive. It was time to change that and move all images to my NAS, further backing up a copy of all to another external drive, and keeping some copies of imag
-
Multiple materialized views against same mv logs
Hi, I am currently moving an apex installation that uses materialized views for data source from one machine to another (both 11.1.0.6, diff nls_character sets WE8MSWIN1252 to AL32UTF8, so dpexp/dpimp is not working due to bug). I am looking at exp/i
-
How concatenate date and array to write in excel?
Hello I have a problem to concatenate a date array and numeric array. can you help me? I want save Measurement of a sensor with save time in an excel (row 1 column1 save date and row 1 coulmn : save sensor data). but I cant save these two value seper
-
Convert string to fomated date
I have a string type "dd/mm/yyyy", how can i convert it to "MMMddyyyy hh::mm:ss AM/PM" date format ??
-
I have a copy of CS4 Extended MAC with a valid serial number. I don't seem to be able to find a download for this version. I see the update but I am installing it on my new computer and don't have my disc. Where can I download it?