on 07-05-2006 6:18 PM
hello all !
I`m Sorry by open a new Thread about this problem ...but is very urgent !
I have Two problems..
1 - I need to insert in SQLServer 4 tables CRHE, CRFT, CRFV, TLINES !
CHRE is only one data - Father Table ! its OK !
The tables CRFT, CRFV exists many VML segments, but insert only one line in database ..only the first XML elements is inserted ...How a can to make to insert all xml segments for these tables !
2 - I have problem is TDLINE Table --> i need to concatenate the items of TDLINE ...If you to analyze 3 first fields CRID, FTNO, FVNO are equal because of the key ok?
The Last field TDLINE was broken in segments of the XML and I need to concatenate this fields to insert an one only line of the database !
this is the XML come from R/3:
thank you very much for help !
Boni.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Moothy !
for example:
RFC Structure:
CRFT 1..1 (ocur)
item 0..unbounded
CRID 0..1
FTNO 0..1
FTTYP 0..1
COSTR 0..1
VORNR 0..1
FTRNR 0..1
My XML receiver structure is:
CRFT 1..1 (ocur)
action(Insert) optional
CRID 1..1
FTNO 1..1
FTTYP 1..1
COSTR 1..1
VORNR 1..1
FTRNR 1..1
The problem is here??? i need to change the Occurrences??
Thanks..
Boni.
Hi,
SO you will get multiple items from the RFC. And you need to post each items into the data base right ?
Is your Receiver Structure is only that much~ there is no somethig like this-i.e wrapper to this structure
Statement <b>(1..n)</b> change here.
-CRFT (1..1)
Also the thread mentioned has discussed same .just check this also..
Regards,
Moorthy
Hi !
Yes ..multiple items in RFC ...to insert all in DataBase !
My problem is that insert only the first item ...hoe i do to insert all???
I change the structure of XML Receiver Structure !
This is my complete XML Receiver Structure:
statement_TABELA2 1 (ocur)
CRFT O..unbounded
action(Insert) optional
access 0..unbounded
CRID 0..1
FTNO 0..1
FTTYP 0..1
COSTR 0..1
VORNR 0..1
FTRNR 0..1
This is Rigth ??? ...you can Show me how i can make this !!
Thank You...
Hi,
You can either change your Occurence of Statement into 0..n or Access occurence 0..n. Either of one will lead into multiple insert.
If you are changing the occrence of Statement then it should look like this
statement_TABELA2 <b>1 ..n</b>
....other elements as normal. don't change any occurence
2nd way is just change the occurence of access element as 1..n
Choice is yours..
regards,
Moorthy
Hi...
to the second problem...
I can explain the problem better to your analyze ???
look this: this is the last table that i need to insert in DataBase !
- Verificar se a área e os equipamentos encontram-se limpos e identificados. Utilizar EPIs conforme POP nº EU II GE 001.
...or I need to create a user defined function in JAVA to make this ???
Tahnks you Moorthy !!
Regards.
Boni.
DO you mean to say, All TDLINE should be concatenated and insert into one line of the database ? Or
All data ie. CRID of item1,CRID of Item2,FTNO of Item1,FTNO of Item2.......
Because you have e.g 4 items in your source structure. It will create 4 records in the Database. But do you require one record in the database ??? Is this is the requirement?
Regards,
moorthy
Hi...
Yes !! ...All TDLINE should be concatenated and insert into one line of the database !!! This is my problem !!
I have 4 items im structure ....but i need insert only one records in the database !
if you see the data of items CRID FTNO FVNO ...this is repeating in the others 3 items because these items are related with other tables with Foreign Key !
The RFC come from R/3 was broken in item TDLINE because the elements are very big... then I need to record only one line and concatenating all 4 items of TDLINE !
Thanks for your atention...
Moorthy...
I return to you the status of the multiple insert !!
With your help ...now its is running and insert multiple lines OK???
Thank You Very Much for your help man !!
Look this:
statement_TABELA2 1..unbounded
CRFT 1..1
action(Insert) optional
access 0..1 --> I change here to 0..unbounded and this OK
CRID 0..1
FTNO 0..1
FTTYP 0..1
COSTR 0..1
VORNR 0..1
FTRNR 0..1
the problem of the multipe insert is in item Acces
0..1 to 0..unbounded and this is ok ...it is running !
Now ..I go make the JAVA function to concatenate the filed TDLINE in Table TLINES.
Do you wanna that i close the Thread now or i can return before meke the JAVA function.
Best Regards...
Boni.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.