cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC insert fails when no child records-No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)

katie_doody2
Participant
0 Kudos

Hi, I am working on a jdbc insert for a parent table (po header) and two children tables (po line item and po service items) using idoc orders.orders05. I had some problems because for e1edc01 there is a header record that I needed to remove. I accomplished this with the below:

My mapping works when there are service items and removes the empty e1edc01. My problem is when the po is a service limit and there are no service items. The service item insert fails. How can I stop this insert when there are no service items?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

you can use createif + boolean to create the segment DT_CAZ_PO_SVC_ITEM_DTL only PO service exists.

katie_doody2
Participant
0 Kudos

Thanks, I have tried several combinations but with no luck. How can I do that when I also need to remove the E1EDC01 segment when posex is equal to 0000000000?

Former Member
0 Kudos

Try Include AND operation> check for POSEX condtion and PO Service - > create IF node function

katie_doody2
Participant
0 Kudos

I am trying the above and I am getting a mapping error. What am I missing?

Thanks.

Former Member
0 Kudos

Remove the if else condition and the logic should be done in the target filed DT or insert.

logic should be as follows..

POSEX --> EQUALS --->

CONST(0000..)   --->                                              

                                             AND -- > CREATE IF-->INSERT

EDC01 ---- EQUAL -> NOT --->

CONST ()                       

katie_doody2
Participant
0 Kudos

Thanks, I guess i am struggling because at the child level I need to remove all the segments for E1EDC01 with posex = '0000000000'. This may leave me with zero to many E1EDC01 segments. After the removal, I need to check at the parent level if any E1EDC01 exist? I am not sure when these various things trigger in pi and how I can check just once at the parent level if any E1EDC01 exist?

My insert works fine as long as there are service items:

If I have only a limit line item and no services then I am not able to suppress the insert. I would like to suppress it by checking to see if there are any valid E1EDC01 segments.

Any suggestions would be appreciated.

former_member186851
Active Contributor
0 Kudos

Hello Katie,

Make the E1EDCO1 context to root

Then try

E1EDCO1--->Exists----->IF

                                           ------------------------------------------->Output node.

      Insert query------------>Then

former_member182412
Active Contributor
0 Kudos

Hi Katie,

Use below mapping for nodes DT_CAZ_PO_SVC_ITEM_DTL, insert and access.

Testing with service items.

Testing with no service items. There is no DT_CAZ_PO_SVC_ITEM_DTL created because there is no service items, it only created the line items.

Regards,

Praveen.

katie_doody2
Participant
0 Kudos

I tried your suggestion but the insert is not suppressed?

katie_doody2
Participant
0 Kudos

Thanks for everyones help.

Answers (0)