Problem in saving the ½, ¼, ¾ values in database using xml
Hi
I am developing a java swing based application. In which I send data in xml format and save it on a online webstore through API calls.
When I send the data in following format 3½, 3¼, 3¾. It saves only 3 not the whole value means It is ignoring the values ½, ¼, ¾.
Here is my xml code which I am sending on network.
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<product>
<product-type>Shirts</product-type>
<title>testStyle</title>
<variants type="array">
<variant>
<fullfilment-service>manual</fullfilment-service>
<inventory-management>shopify</inventory-management>
<inventory-policy>deny</inventory-policy>
<option1>Black</option1>
<option2>3¼</option2>
<option3 nil="true"></option3>
<price>40.0</price>
<requires-shipping>true</requires-shipping>
<sku>1307681713338</sku>
<taxable>true</taxable>
</variant>
<variant>
<fullfilment-service>manual</fullfilment-service>
<inventory-management>shopify</inventory-management>
<inventory-policy>deny</inventory-policy>
<option1>Black</option1>
<option2>3½</option2>
<option3 nil="true"></option3>
<price>40.0</price>
<requires-shipping>true</requires-shipping>
<sku>1307681714634</sku>
<taxable>true</taxable>
</variant>
</variants>
</product>In option2 tag I am passing ½, ¼, ¾.
Please give me some solutions .
Thanks
Edited by: Sonal on 28-Jun-2011 22:28
hi
Thanks for your reply.
I am using JAXB Parser for parsing. Here is my code.
// Prepare for XML marshalling
JAXBContext jaxbContext = JAXBContext.newInstance(ProductVariant.class);
Marshaller marshaller = jaxbContext.createMarshaller();
marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
StringWriter stringWriter = new StringWriter();
// Marshall product variant to XML
marshaller.marshal(objProductVariant, stringWriter);
// Prepare request content
String entityString = stringWriter.toString();
StringEntity entity = new StringEntity(entityString);
entity.setContentType("application/xml");
httpPost.setEntity(entity);
// Execute API call
HttpResponse response = httpClient.execute(httpPost);ProductVariant is a class name and objProductVariant is a name of object.
When I check the entityString value, 3½ is present there but after saving it, when I check in database it store 3 only.
Similar Messages
-
Problem While saving the Invoice
Dear Experts,
I am facing the Problem while Saving the Invoice, In invoice, We assigne the Output as RD00 and Medium as 6 (EDI).
When we are saving the Invoice, it getting as ' Updated Terminated'. When i found where the Error is coming in SM13, it showing in as Function Module "RV_MESSAGE_UPDATE' & Error Details is 'EAN11 not found for Material'.
But in Invoice whatever we enter the Material number, we maintain the EAN11 code. This EAN11 code is seen in MARM & VBRP Table. Unable to find the what the exact error is.
please help me to sort this issue, Its business complicated.
Thanks in Advance,
SriniHi Asik,
Thanks for your valuable Message.... I run as you suggested, but the dispatch time i kept as 1 or 2. because the program RSNAST00 is picking the values only for 1 or 2. so i run manually,, as of now the issue is, in the invoice number, for one material number, the Billed quantity is zero, so the UOM is getting as initial. From those vaues we are picking the EAN11 from maram table.
So, i modify that and run the EDI manually. As of now its working...
Thanks for your reply,,,
Regards,
Srini -
Check the values while saving the values in SM30
Hi all,
I have created a Table maintennace for a ztable in SM30.
I want to check the values while saving the values in the SM30.
Can aynbody please give any idea how can i acieve this.
Thanks,
TaranginiHi Tarangini,
Go to the Table Maintenence Generator screen in Change mode. from this Screen go to the
Enviorment->Modifications->Events.
New screen will open and click on the New Entries button.
then from the F4 Help of the first column, select ur appropriate Event and in the second column give the name of the Subroutine.
and from the Third column u can do the coding for the subroutine as shown below.
FORM BEFORE_DATA_SAVE.
IF SY-UNAME EQ 'USER1' OR SY-UNAME EQ 'USER2'.
ELSE.
message 'No Authorization for Change...' type 'E'.
ENDIF.
ENDFORM.
Regards
Jagesh -
How to connect mysql database using xml
welcome to all,
here my doubt is how to connect mysql database using xml file, how to integrate xml file and jsp file and how to access data from dabase using jsp file. can any one help me
regardsShort answer: you wouldn't do any of those things. The first two are meaningless and the third is a bad practice. I have no idea what those ideas were supposed to achieve so I have no idea what tutorials I should suggest to you.
-
Problems while saving the tax values in a Draft Document to AP Invoice
Hi All
I have an interface .net where I use a DIAPI to enter values in B1 2007 B (8.60.039) PL 15.
I have the following cases:
First case
- I create a document type oPurchaseInvoices, where I set the tax values for IRPF, INSS, ISSQN (Brazil).
When i execute the code that inserts this A/P Invoice in SAP, it works perfectly, including by setting the values of the taxes correctly.
Second case
- I create a document type oDrafts, and say that this draft is the type oPurchaseInvoices.
After that I follow the same steps to launch a note entry, laying the tax values(IRPF, INSS, ISSQN) and everything else.
When i execute the code that inserts this values in the draft, the tax values are not entered and that everything else works perfectly.
You can tell me whether the taxes really are not inserted when I issue a draft or I'm leaving to score some parameter.
I am in the look of your response
Regards
Luis FelipeHi Gordon.
You can see below the part of the code to add the Draft Document.
oAPInvoice = oCompany.SapCommand.GetBusinessObject(BoObjectTypes.oDrafts)
oAPInvoice.DocObjectCode = BoObjectTypes.oPurchaseInvoices
With oAPInvoice
.Lines.TaxLiable = BoYesNoEnum.tYES
.Lines.ItemCode = Itemcode
.Lines.Quantity = Quantity
.Lines.UnitPrice = Unitprice
.Lines.TaxCode = Taxcode
.Lines.WTLiable = BoYesNoEnum.tNO
.Lines.Usage = "Consumo"
If oDTO.IRRF > 0 Or oDTO.INSS > 0 Or oDTO.ISSQN > 0 Then
If oDTO.WtLiable = "Y" Then .Lines.WTLiable = BoYesNoEnum.tYES
Add tax values
For i As Int16 = 1 To 3
vlrImposto = 0
addTax = False
If IRRF > 0 And Not addIR Then
codImposto = CodeIRRF (tax code)
vlrImposto = IRRF (tax value)
addIR = True
addTax = True
ElseIf INSS > 0 And Not addINSS Then
codImposto = "F501" (tax code)
vlrImposto = INSS (tax value)
addINSS = True
addTax = True
ElseIf ISSQN > 0 And Not addISSQN Then
codImposto = CodeISSQN (tax code)
vlrImposto = ISSQN (tax value)
addISSQN = True
addTax = True
End If
If addTax Then
(If include more one tax then add line)
If i > 1 And vlrImposto > 0 Then .Lines.WithholdingTaxLines.Add()
.Lines.WithholdingTaxLines.WTCode = codImposto (tax code)
.Lines.WithholdingTaxLines.TaxableAmount = Unitprice (base value calculation)
.Lines.WithholdingTaxLines.WTAmount = vlrImposto (tax value)
End If
Next
End If
.CardCode = Cardcode
.CardName = Cardname
.HandWritten = BoYesNoEnum.tNO
.DocDueDate = DueDate
.DocDate = DocDate
.TaxDate = TaxDate
.SequenceCode = -2 '-1=Manual -2=External
.SeriesString = "RCB"
.SequenceModel = 37
lRetCode = .Add()
End With
Regards
Luis Felipe -
Have a error in getting the values from database randomly
Hi to all
I am new member to this community and new to java programming, i am the one of them who got benefited through this site , with that hope i am asking u to clear my doubt.
Actually i want to get the data from database randomly, i dont have problem either in database connection and generating random number,its working fine. but when i have to get the data from database with generated random no using absolute function , i am getting an exception
eg : rs.absolute(2);
i could not move to the second row of my result set.
not only absolute function whatever the function i am using except next method, getting exception.
my code :
package practical;
import java.util.*;
import java.sql.*;
public class gen {
Connection con;
Statement s;
ResultSet rs;
public void get(int t)
try
rs.absolute(t);
String question=rs.getString("question");
System.out.println("Random question : "+question);
catch(Exception e)
System.out.println("get error");
public void ran()
Random r=new Random();
for(int i=0;i<10;i++)
int j=r.nextInt(10);
System.out.println("random value : "+j);
if(j!=0)
try
get(j);
catch(Exception e)
System.out.println("ran error");
public void connect()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select question from qa");
ran();
con.close();
catch(Exception e)
System.out.println("error");
public static void main(String... strins)
new gen().connect();
}but i acheived through the code which is pasted below but i have to close the database connection for every iteration.
package practical;
import java.util.*;
import java.sql.*;
public class gen {
Connection con;
Statement s;
ResultSet rs;
public void get(int t)
int c=0;
while(c!=t)
try
rs.next();
c++;
catch(Exception e)
System.out.println("next error");
if(c==t)
{ try
String question=rs.getString("question");
System.out.println("Random question : "+question);
catch(Exception e)
System.out.println("iteration error");
public void ran()
Random r=new Random();
int j=r.nextInt(10);
System.out.println("random value : "+j);
if(j!=0)
try
get(j);
catch(Exception e)
System.out.println("ran error");
public void connect()
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select question from qa");
ran();
con.close();
catch(Exception e)
System.out.println("error");
public static void main(String... strins)
for(int i=0;i<10;i++)
new gen().connect();
} -
How to save the value from JTextFormattedField using TAB key in lostFocus
Can you, please help me with this problem:
I want to have saved new value in JTextFormattedField after I use TAB kye.
I tried with focusLost, then setting setFocusTraversalKeys etc.
It looks simple, but !?
ThanksI also tried the JFormattedTextField for the IPAddress Object which I created but it would't work that well I have a bad experience with these TextFields it showed me the formate 0.0.0.0 but when I entered the text in it, it jumps of after tow digits in each column
-
Problem finding data in an Oracle Database using CMP beans
I am having a problem retrieving data from an Oracle database that has a date as
part of the key. This data was loaded into my database via a batch process writing
in java using java.sql.Date to store the date information. When calling the findByPrimaryKey
method of a CMP Entity Bean I continued to get the FinderException. I know this
data is in my database because I can view the data via SQLPlus and Microsoft Access.
Has anyone ever experience problems with CMP beans accessing data from an Oracle
database that had a date as part if the key or with accessing data in the database
that insert via another method outside of your CMP bean. I desperately need some
answers.Hi Dave,
You should probably post this type of question in the CMP or JDBC section
for best results. Chances are that the date is suffering from a rounding
problem (it could be a date/time in the database with a different time zone)
or is not the date that you think it is (wrong century or millenium). I've
seen both. You need to write a quick piece of code that loads in those
values as both Java timestamps and dates and makes sure that they are what
you think they are.
Peace,
Cameron Purdy
Tangosol Inc.
Tangosol Coherence: Clustered Coherent Cache for J2EE
Information at http://www.tangosol.com/
"Dave White" <[email protected]> wrote in message
news:3c1a4ac3$[email protected]..
>
I am having a problem retrieving data from an Oracle database that has adate as
part of the key. This data was loaded into my database via a batchprocess writing
in java using java.sql.Date to store the date information. When callingthe findByPrimaryKey
method of a CMP Entity Bean I continued to get the FinderException. Iknow this
data is in my database because I can view the data via SQLPlus andMicrosoft Access.
Has anyone ever experience problems with CMP beans accessing data from anOracle
database that had a date as part if the key or with accessing data in thedatabase
that insert via another method outside of your CMP bean. I desperatelyneed some
answers. -
Having problem to get the value from radio button
i am doing my double module project for my degree course and i am also a newbie in JSP. Hope there is someone can help me to solve this problem. Now, i set the value of a radio button to "don't smoke", "smoke lightly", and "smoke heavily". Then i use request.getParameter ("smoking behavior") to get the value selected by the user, but the result is only "don't" or "smoke", which the character after spacing will be not be retrieved. I dun know how to solve it, so can any expert here help me to solve this problem? Thanks for helping.
Why do you have to use whitespace. If your radio button group is name smokingBehavior - no whitespace, wouldn't it just make sence to have values of don't, lightly and heavily. This would solve the problem easily. If your teacher is being a pain in the a&!, and requires you to use whitespace for your naming variables I guess you could insert %20 between the two words and unescape the value on the server side. This seems like a lot of unnecessary work and a silly solution - good luck!
-
How to change value in database using oracle form
- i have a table called mobilephone with quantity column
- i already created a list of quantity inside my form with elements 1-5
- what i want is when i press a button inside my form it will automatically deduct the value i chose from list to the database
- for example if my quantity inside the table is 10, when i chose 2 in the list it will become 8 in the tableHi,
I agree with Roel, but it might not be enough for you. This depends on the usage, and more specifically the number of concurrent users that might do the same kind of transactions.
If user1 has selected 5 phones, and at the same time user2 has selected 6 phones, then only at the moment they hit the "Apply Changes" or "Create" button, will they know whether they the number of phones they require are actually available.
If this scenario is highly unlikely to occur, I would go with the trigger as Roel indicated. If it is likely to occur, you might want to consider using Javascript to immediately check the availability through a database function call. This will require some database changes, that I could elaborate on. But I will wait until you indicate that this is indeed what you need.
Good Luck!
Remco -
Script- problem in printing the values in from internal table
Hi all,
I have a requiremnt that i for a particular document no there are number of invoices are there. i.e for a single document no there are 20 invoices in that. i shoudl display the invoice number , invoice date, invoice amount , number of days of intrest , start date of interest, end date of interest and intrest amount.
The problem is i should take the invoice number, invoice date, number of days from TABLE <b>BSEG</b> and inovice amount and start date, end date from table<b> INTITIT</b>. for a particular document number there are diffent invoce numbers in both the table.
i can display everthing but the prob is with invoice amount. it is repating only one values is displying in the ouput. The invoice number in INTITIT Is not changing. I have to write the syntax for that .Please help me The value in Bseg is chaing as per given syntax shown below.
data: begin of hbseg occurs 10.
include structure hsortp.
include structure bseg.
data: end of hbseg.
data: begin of hsortp,
sortp1 like sortp1,
sortp2 like sortp2,
sortp3 like sortp3,
sortp4 like sortp4,
sortp5 like sortp5,
EKVBD LIKE KNB1-EKVBD,
end of hsortp.
loop at hbseg.
WHERE BUKRS = SAVE_BUKRS.
save_bukrs = hbseg-bukrs.
if ( hbseg-kunnr = save_kunnr
and not save_kunnr is initial )
or ( hbseg-lifnr = save_lifnr
and not save_lifnr is initial ).
clear bseg.
move-corresponding hbseg to bseg.
*bseg = bseg.
if bkpf-waers ne *bkpf-waers.
perform curr_document_convert_bseg
using
bkpf-budat
*bkpf-waers
*bkpf-hwaer
bkpf-waers
changing
bseg.
if not bseg-pycur is initial.
alw_waers = bseg-pycur.
perform currency_get_subsequent
using
save_repid
bkpf-budat
bkpf-bukrs
changing
alw_waers.
if alw_waers ne bseg-pycur.
bseg-pycur = alw_waers.
perform convert_foreign_to_foreign_cur
using
bkpf-budat
*bkpf-waers
*bkpf-hwaer
bseg-pycur
changing
bseg-pyamt.
endif.
endif.
endif.
perform fill_waehrungsfelder_bseg.
perform fill_waehrungsfelder_bseg_2.
if bseg-sgtxt(1) ne '*'.
bseg-sgtxt = space.
else.
bseg-sgtxt = bseg-sgtxt+1.
endif.
clear save_bschl.
clear save_umskz.
clear tbslt.
save_bschl = bseg-bschl.
save_umskz = bseg-umskz.
perform read_tbslt.
ADDING VARIBLE V_GSALDF BY SUNIL 5.11.07******
v_gsaldf = rf140-gsaldf + rf140-wrshb.
rf140-gsaldf = v_gsaldf.
clear v_gsaldf.
SUNIL *********************
*rf140-gsaldf = *rf140-gsaldf + *rf140-wrshb.
if xmultk is initial
and xactiv is initial
and linecnt = '1'
and not xumsst is initial
and not save_xumstn is initial.
if bkpf-bstat = 'V'.
perform read_vbset.
else.
perform read_bset.
endif.
describe table hbset lines linecnt.
if linecnt = '1'.
loop at hbset.
move-corresponding hbset to bset.
*bset = bset.
if bkpf-waers ne *bkpf-waers.
perform curr_document_convert_bset
using
bkpf-budat
*bkpf-waers
*bkpf-hwaer
bkpf-waers
changing
bset.
endif.
clear rf140-msatz.
clear rf140-vtext.
save_ktosl = bset-ktosl.
perform read_t687t.
rf140-msatz = bset-kbetr / 10.
*rf140-msatz = rf140-msatz.
rf140-vtext = save_vtext.
*rf140-vtext = rf140-vtext.
if bset-shkzg = 'H'.
rf140-mwshb = bset-fwste.
*rf140-mwshb = *bset-fwste.
rf140-mdshb = bset-hwste.
*rf140-mdshb = *bset-hwste.
else.
rf140-mwshb = 0 - bset-fwste.
*rf140-mwshb = 0 - *bset-fwste.
rf140-mdshb = 0 - bset-hwste.
*rf140-mdshb = 0 - *bset-hwste.
endif.
exit.
endloop.
rf140-wrshb = rf140-wrshb - rf140-mwshb.
*rf140-wrshb = *rf140-wrshb - *rf140-mwshb.
rf140-dmshb = rf140-dmshb - rf140-mdshb.
*rf140-dmshb = *rf140-dmshb - *rf140-mdshb.
endif.
endif.
*****************Begin of Change by Karthikeyan J********************
i_count = i_count + 1.
clear rf140-element.
clear: it_bseg, i_wrbtr,i_totday,i_tempday,i_day,i_bday.
comparing with fields belnr AND SELECT * FROM INTITIT added by sunil 3.11.07*********
select single * from bseg into
corresponding fields of it_bseg where belnr = bseg-rebzg anD GJAHR = BSEG-GJAHR.
select single * from intitit into corresponding fields of it_intitit where gjahr = bseg-gjahr and belnr_to = bseg-belnr and buzei = '2' OR BELNR = INTITIT-BELNR .
added by Jayshree on 09/01/2007
MOVE ' ' TO it_kna1-name1.
SELECT SINGLE name1
INTO CORRESPONDING FIELDS OF it_kna1
FROM ( vbpa AS a INNER JOIN kna1 AS b ON akunnr = bkunnr )
WHERE a~vbeln = it_bseg-vbeln
AND a~parvw = 'zd'.
SELECT SINGLE fkdat
INTO CORRESPONDING FIELDS OF it_kna1
FROM vbrk
WHERE vbrk~vbeln = it_bseg-vbeln.
added by Jayshree on 01/02/2007
CONCATENATE it_kna1-fkdat6(2) it_kna1-fkdat4(2) it_kna1-fkdat+2(2)
INTO vfkdat SEPARATED BY '.'.
CONCATENATE it_bseg-augdt6(2) it_bseg-augdt4(2) it_bseg-augdt+2(2)
INTO vaugdt SEPARATED BY '.'.
i_wrbtr = i_wrbtr + it_bseg-wrbtr.
added as on 29.06.2007 by jayshree again transport on 21.07.2007
tot_wrbtr = tot_wrbtr + i_wrbtr.
i_totday = it_bseg-zbd1t + it_bseg-zbd2t + it_bseg-zbd3t.
CALL FUNCTION 'fima_date_create'
EXPORTING
i_date = it_bseg-zfbdt
I_FLG_END_OF_MONTH = ' '
I_YEARS = 0
I_MONTHS = 0
i_days = i_totday
I_CALENDAR_DAYS = 0
I_SET_LAST_DAY_OF_MONTH = ' '
IMPORTING
e_date = i_bday
E_FLG_END_OF_MONTH =
E_DAYS_OF_I_DATE =
added by JAYSHREE 01.02.2007
CONCATENATE i_bday6(2) i_bday4(2) i_bday+2(2)
INTO vbday SEPARATED BY '.'.
i_day = it_bseg-augdt - i_bday.
CALL FUNCTION 'HR_HK_DIFF_BT_2_DATES'
EXPORTING
date1 = it_bseg-zfbdt
date2 = it_bseg-augdt
OUTPUT_FORMAT = '01'
IMPORTING
YEARS =
MONTHS =
DAYS = i_day
EXCEPTIONS
INVALID_DATES_SPECIFIED = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
*added by sunil 5.11.07 ***********
*read table it_intitit with key BELNR_TO = BSEG-BELNR .
*LOOP AT IT_INTITIT.
rf140-element = '521'.
CALL FUNCTION 'write_form'
EXPORTING
window = 'main'
element = '521'
EXCEPTIONS
window = 1
element = 2.
IF sy-subrc = 1.
window = 'main'.
PERFORM message_window.
ENDIF.
IF sy-subrc = 2.
window = 'main'.
ereignis = '521'.
PERFORM message_element.
ENDIF.
IF save_xumstn IS INITIAL.
*-------Umsatzsteuer -
IF xactiv IS INITIAL.
save_waers = rf140-waers.
PERFORM tax_data.
CLEAR taxlines.
DESCRIBE TABLE atax LINES taxlines.
IF NOT taxlines IS INITIAL.
LOOP AT atax.
CLEAR ereignis.
CLEAR rf140-msatz.
CLEAR rf140-vtext.
rf140-msatz = atax-msatz.
*rf140-msatz = atax-msatz.
rf140-vtext = atax-vtext.
*rf140-vtext = atax-vtext.
*******begin of change by karthikeyan on 10.03.06*********************
IF sy-tabix = '1'.
ereignis = '522'.
v_stax = rf140-msatz * rf140-gsaldf / 100.
ELSE.
ereignis = '523'.
v_ecs = rf140-msatz * v_stax / 100.
v_total = rf140-gsaldf + v_stax + v_ecs.
ENDIF.
CALL FUNCTION 'hr_in_chg_inr_wrds'
EXPORTING
amt_in_num = v_total
IMPORTING
amt_in_words = v_spell
EXCEPTIONS
DATA_TYPE_MISMATCH = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
***************************end of change******************************
CLEAR rf140-element.
rf140-element = ereignis.
IF NOT ereignis IS INITIAL.
CALL FUNCTION 'write_form'
EXPORTING
window = 'main'
element = ereignis
EXCEPTIONS
window = 1
element = 2.
IF sy-subrc = 1.
window = 'main'.
PERFORM message_window.
ENDIF.
IF sy-subrc = 2.
window = 'main'.
PERFORM message_element.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
'521' is the element name in the main window where i should display the values. before select qurey the values are coming in the bseg but not in table INTITIT. Belnr is the document no with ref to that
there are number of invoices nos. so in both the tables it is selecting single value and displaying but in bseg the invoice number is getting refreshed and new number is coming in that place i.e in field bseg-rebzg but in INTITIT in belnr only it is taking single value it is not getting refreshed.
move-corresponding hbseg to bseg.
*bseg = bseg.
if bkpf-waers ne *bkpf-waers.
this is the syntax whr the values in bseg are getting refresh and new invoice number is selecting.
How to write the syntax for INTITIT? As per invoice number it is giving new values.
The invoice number in Bseg is different campare to in table INTITIT. in output is shoud show the fields as follows
it_besg-rebzg(invoice number of besg) it_besg-zuonr(invoice date) INTITIT-INT_BASAMT(base amount) i_day (no of days ) INTITIT-INT_BEGIN (INTREST START DATE) INTITIT-INT_end(INTREST END DATE) rf140-wrshb(INTREST AMOUNT).
THE VALUE OF IT_BESG-REBZG IS CHANGING BUT THE VALUE IN INTITIT-BELNR ( INVOICE NUMBER) IS NOT CHANGING THAT IS WHY IT IS SHOWING
ONLY SINGLE RECORD.
for both the table documet no is same. in besg-belnr is the document no. in intitit-BELNR_TO is the document no.
here in bseg-rebzg is chaning but in INTITIT-BELNR IS not changing.
If i take loop at INTITIT. ALL the values are repating so i am unable to take loop. so i want to write
a syntax such that intitit-belnr should be refreshed and also for every loop it shoud take new invoice no.
Please help me out it is very urgent.
<b>USEFUL ANSWERS WILL BE REWARDED.</b>
regards,
Sunil kumar.assumption: some mistake in ur posting that, How belnr and date r same for both header records, so i guess, either one is different.
try with AT NEW - ENDAT.
AT NEW belnr.
here use looping, READing of ur itabs.---> so, u need to build couple of itabs to move forth and back.
ENDAT.
pls. note that, when u use this AT NEW all the CHAR fileds of itab wuld show as STARS **.....so, this is the necessity behind building new itabs.
thanq
Edited by: SAP ABAPer on Dec 30, 2008 6:24 PM -
Problem in printing the data from database when i print inside servlet
hi to all!
the objective of the code below is getting the data from database table and has to send that data to the web browser using out.println .note: out - PrintWriter object
In a getQuestion method, i am getting the data from database table and store it in String q and when i print the q within this method it is getting printed, but i got the null value when i printed the String q inside service method doPost. why..? its puzzling me.
package servlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class test extends HttpServlet {
Connection con;
ResultSet rs;
Statement s;
StringBuffer q;
StringBuffer o1;
StringBuffer o2;
StringBuffer o3;
public void getQuestion() throws Exception
if(rs.next())
q=new StringBuffer(rs.getString("question"));
o1=new StringBuffer(rs.getString("option1"));
o2=new StringBuffer(rs.getString("option2"));
o3=new StringBuffer(rs.getString("option3"));
System.out.println(q);
System.out.println(o1);
System.out.println(o2);
System.out.println(o3);
public void connect(){
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select * from qa order by newid()");
getQuestion();
catch(Exception e)
System.out.println("erroe");
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws IOException,ServletException
response.setContentType("text/html");
new test().connect();
PrintWriter out=response.getWriter();
request.setAttribute("question", q);
request.setAttribute("option1", o1);
request.setAttribute("option2", o2);
request.setAttribute("option3", o3);
//RequestDispatcher rd=getServletContext().getRequestDispatcher("/show.jsp");
//rd.forward(request, response);
out.println("<html>");
out.println("<head>");
out.println("<title>" + "shock!!!" + "</title>");
out.println("</head>");
out.println("<body>");
out.println("<h2>"+"Read twice before u answer"+"<h2>");
out.println("<p></p>");
//why the value of q is not getting printed, instead i get null
out.println("<h2>"+ q +"<h2>");
out.println("how is it");
out.println("</body>");
out.println("</html>");
Edited by: Mahesh_yeswecan on Nov 29, 2008 10:42 AMAs u said , i have done a silly mistake earlier. though i have corrected the code still i am getting the same null value
package servlet;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.sql.*;
public class test extends HttpServlet {
Connection con;
ResultSet rs;
Statement s;
StringBuffer q;
StringBuffer o1;
StringBuffer o2;
StringBuffer o3;
public void getQuestion() throws Exception
if(rs.next())
q=new StringBuffer(rs.getString("question"));
o1=new StringBuffer(rs.getString("option1"));
o2=new StringBuffer(rs.getString("option2"));
o3=new StringBuffer(rs.getString("option3"));
System.out.println(q);
System.out.println(o1);
System.out.println(o2);
System.out.println(o3);
public void connect(){
try
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ds","sa","server");
s=con.createStatement();
rs=s.executeQuery("select * from qa order by newid()");
getQuestion();
catch(Exception e)
System.out.println("erroe");
public void doPost(HttpServletRequest request,HttpServletResponse response)
throws IOException,ServletException
response.setContentType("text/html");
connect();
PrintWriter out=response.getWriter();
request.setAttribute("question", q);
request.setAttribute("option1", o1);
request.setAttribute("option2", o2);
request.setAttribute("option3", o3);
//RequestDispatcher rd=getServletContext().getRequestDispatcher("/show.jsp");
//rd.forward(request, response);
out.println("<html>");
out.println("<head>");
out.println("<title>" + "shock!!!" + "</title>");
out.println("</head>");
out.println("<body>");
out.println("<h2>"+"Read twice before u answer"+"<h2>");
out.println("<p></p>");
//why the value of q is not getting printed, instead i get null
out.println("<h2>"+ q +"<h2>");
out.println("how is it");
out.println("</body>");
out.println("</html>");
} -
How to justify the values in table using report generation tool kit
Hi
How can we align the values in excel table using report generation toolkit.
like left,right,center.
Regards,
hari
Attachments:
Report_excel.vi 34 KB
New Bitmap Image.JPG 134 KBHi,
A trigger is designed to be a part of a transaction, not it's end.
It is like following these steps (not really accurate, but should give an idea):
1. programA issues INSERT statement on tableA
2. 'control' goes over to the database
3. constraint checks happen
4. the associated triggers on tableA do their work (e.g. fetching a sequence value for a primary key)
5. 'control' goes back to programA
6. programA decides if a commit (no error occurred) or a rollback (error case) has to be issued.
Did this help? Probably not, I'm not happy with what I wrote, but anyway... :) -
A problem about saving the picture control'image in a child VI.
i want to use 'export image' method to get a picture control'image,so ,i have a child VI to use method 'export image',and a main VI to using the child VI,but when i run the main VI,there is no image is saved on the disk ,but if i open the child VI'frontpanel,then,i run the main VI,the image is saved on the disk,i want to know the reason why i can not get the image,when i run the main vi without the child 'frontpanel or blockdiagram is opened.
Solved!
Go to Solution.
Attachments:
child.vi 11 KB
main.vi 7 KBThe behavior that Simon describes is not a hard and fast rule, and the Export Image method used to be a bit of an exception. It would supposedly update the controls of unopened FPs that used the method. Reality never quite matched what was described in the documentation if I recall.
If you pore over the detailed help you discover that this method works fine in SubVIs with some controls and not others. Look at the characteristic 'Loads the Front Panel Into Memory', for a Picture control it is 'No', for a Waveform Graph, for instance, it is 'Yes'. Caveat: Relying on this level of detail to be correct in the LV help is a bit risky. Best to try it yourself. Not loading the FP is a good hint that the method is not going to behave in a SubVI.
As to the problem at hand, a Picture Indicator is an odd choice to me to use this method. You have VIs in the Picture palette to convert pictures to image data and then export the image data to a PNG or JPG or BMP file directly. Anything you would draw and then export could be exported directly without drawing. -
How to find the hardware information of the Installed HANA Database using studio tool ??
Hi SAP HANA Experts,
How can we find the Hardware Information of the HANA Database using the Studio tool.
I mean, i want to find out the Hardware Information like CPU Model Number, RAM Size & HDD. { HANA Database is already installed as a standalone system } using the Studio tool.
Can any one of you please provide me the different possibilities to get the Hardware information.....Hello,
Try running the below SQL script in your HANA database. The output should have the info you havd been looking for.
SELECT
[NAME]
- HANA_Hosts_Overview
[DESCRIPTION]
- Host information
[DETAILS AND RESTRICTIONS]
[VALID FOR]
- Revisions: all
- Statistics server type: all
[SQL COMMAND VERSION]
- 2014/05/30: 1.0 (initial version)
[INVOLVED TABLES]
- M_HOST_INFORMATION
[INPUT PARAMETERS]
- HOST
Host name
'saphana01' --> Specific host saphana01
'saphana%' --> All hosts starting with saphana
'%' --> All hosts
[OUTPUT PARAMETERS]
- HOST: Host name
- BUILT_BY: Manufacturer name
- CPU_DETAILS: CPU details (cores, threads, speed)
- PHYS_MEM_GB: Physical memory size (GB)
- SWAP_GB: Swap size (GB)
- OP_SYS: Operating system type and version
- HARDWARE_MODEL: Hardware model
- CPU_MODEL: CPU model
[EXAMPLE OUTPUT]
|HOST |MANUFACTURER|ACTIVE|CPU_DETAILS |PHYS_MEM_GB|SWAP_GB|SEC_STORE|OPERATING_SYSTEM |HARDWARE_MODEL |
|saphana20|IBM |yes |80 (160) * 2395MHz| 4039.88| 32.00|available|SUSE Linux Enterprise Server 11.2|System x3950 X5 -[7143HDG]-|
|saphana21|IBM |yes |80 (160) * 2395MHz| 4039.88| 32.00|available|SUSE Linux Enterprise Server 11.2|System x3950 X5 -[7143HDG]-|
H.HOST,
MAX(CASE WHEN KEY = 'hw_manufacturer' THEN VALUE END) BUILT_BY,
MAX(CASE WHEN KEY = 'cpu_summary' THEN VALUE END) CPU_DETAILS,
LPAD(MAX(CASE WHEN KEY = 'mem_phys' THEN TO_DECIMAL(TO_NUMBER(VALUE) / 1024 / 1024 / 1024, 10, 2) END), 11) PHYS_MEM_GB,
LPAD(MAX(CASE WHEN KEY = 'mem_swap' THEN TO_DECIMAL(TO_NUMBER(VALUE) / 1024 / 1024 / 1024, 10, 2) END), 7) SWAP_GB,
REPLACE(MAX(CASE WHEN KEY = 'os_name' THEN VALUE END), 'SUSE Linux Enterprise Server', 'SLES') OP_SYS,
REPLACE(MAX(CASE WHEN KEY = 'cpu_model' THEN VALUE END), '(R)', '') CPU_MODEL,
MAX(CASE WHEN KEY = 'hw_model' THEN VALUE END) HARDWARE_MODEL
FROM
( SELECT /* Modification section */
'%' HOST
FROM
DUMMY
) BI,
M_HOST_INFORMATION H
WHERE
H.HOST LIKE BI.HOST
GROUP BY
H.HOST
ORDER BY
H.HOST
Rgds,
Mat.
Maybe you are looking for
-
How to clone a 2-node ASM RAC db to a 3-node ASM RAC db by RMAN?
We need to clone a 2-node ASM RAC db to a 3-node ASM RAC db by RMAN. I would think this will be about the same as a regular single db procedure by RMAN mostly. However, in 3 node RAC, there will be additional instance thread in redo (thread 1,2, and
-
Tutorial and SDRDemo ..Build Rich Client Forms in JDeveloper .
I am doing the self learn tutorial in Jdeveloper ADF Business Components 10.1.3.34.12 CVS Version (External) (CVSNT) 2.5.03 (Scorpio) Build 2260 (client/server) Java Platform 1.5.0_05 Oracle IDE 10.1.3.34.12 Struts Modeler Version
-
why would i get the following error if when i run my java code... 0Ajava.sql.SQLException%3A+ORA-00936%3A+missing+expression%0A&
-
Hi. I would have thought my hosting provider could have helped me with this, but they could not. I have three different sites that i manage that are hosted at Interland. On one of these sites, when i upload a php file, and then try to bring this page
-
CS3/CS4 Creative Suites Web Premium installation conflicts
Scenario: I installed Creative Suite CS4 Web Premium using Windows XP Pro with SP3 and all the required computer specifications while I still had Creative Suite CS3 Web Premium on the computer. All went well for a while and then Flash CS3 started act