on 01-27-2016 6:54 PM
Hi, I am working on an interface from idoc (ORDERS.ORDERS05) to jdbc . I am then inserting the data into three tables:
header table
line item table
service item table
My data looks like this:
header
line item 1
service 1 for line item 1
service 2 for line item 1
service 3 for line item 1
line item 2
service 1 for line item 2
service 2 for line item 2
I mapped the idoc to a structure like this:
header
item
service item
This structure matches the idoc by putting the services item as a children to the item.
When I did this, I was only getting the two line items and the first set of children:
line item 1
line item 2
service 1 for line item 1
service 2 for line item 1
service 3 for line item 1
I then changed my message structure to this:
header
item
service
This structure (although it seems wrong to me since service is a child to item) gave me everything:
line item 1
line item 1
service 1 for line item 1
service 2 for line item 1
service 3 for line item 1
service 1 for line item 2
service 2 for line item 2
The only problem I had with this is that I was referencing the line item number in the service item structure and it was always giving me 00010. I have resolved this by adding the line item to the service item structure in an extension (since I was already using it). I had also tried to use CopyValue and it did not work. I am trying to understand why this was happening?
Thanks,
Katie
There is fixed document format ( target stricture) that you need follow for JDBC receiver scenarios.
Please refer to the below documentation.
As they are three different tables, you need to duplicate the Statement tag for each table.
We can't have the structures of our choice for JDBC scenarios.
>> i have resolved this by adding the line item to the service item structure in an extension (since I was already using it).
Yes. If you need "line item number" in both the tables then this field has to be added under the respective statement tags.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for your answer, yes I have three different insert statements and I had a line item number at both the item and service item level where I needed them on the jdbc side. The problem that was when I mapped them from the item level from the idoc (e1edp01), they did not put the correct line number in at the service item level.
Thanks. I am creating the three inserts as:
header (E1EDK01)
line item (E1EDP01)
service items (E1EDC01)
In my insert for the service item table, I am using the line item as part of the index so I am trying to add that. This is what my insert statements looked like before I added an enhancement at the service item (E1EDC01) to poplulate a custom field "line_number" with the posex from E1EDP01. As I said, I have everything working now but don't understand why I could not reference the parent field (E1EDP01 - posex) at the child level.
Thanks.
Thanks Ryan, this is where I was trying to reference the parent line item in the first screen shot. In order to get it to work I added the line item to my enhacements at the service item level since I could not seem to get it properly from the item item level.
It was:
line item
line item no
service
service line no
reference to line item no
I have since changed it to add the line item at the service item level in backend code.
So it is:
line item
line item no
service
service line no
line item no
My question is why it did not work to reference it through the mapping at the item level?
Thanks.
Hi Katie,
I don't see anything that would distinguish service 1 from service 2 - what piece(s) of data here are used to differentiate one service from another? Maybe you can attach the two source and target xml files to make it easier to understand the structure and arrangement of the data?
Regards,
Ryan Crosby
Hi Katie,
Nevermind, I'm assuming that was the failed output. This appears to be a job for UseOneAsMany - see my screenshot below of the field mapping for LINE_NBR:
The top POSEX is from the E1EDP01 context, the middle POSEX is from the E1EDC01 with the context set to E1EDP01 and the last is the POSEX from the E1EDC01 context. That will allow the system to replicate the line numbers in the way you are expecting for your target XML.
Regards,
Ryan Crosby
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.