We have a Natural subprogram whose PDA looks like this:
1 #MESSAGE-ID A 25
1 #X_ITEM_DATA (1:*)
2 #ITEM_CODE A 18
2 #DESCRIPTION A 150
2 #LONG_DESCRIPTION A 240
2 #PRIMARY_UOM A 2
2 #STATUS_CODE A 40
2 #ITEM_UDA_DATA_TABLE (1:*)
3 #ATTR_NAME A 150
3 #ATTR_DISP_VALUE A 250
2 #ITEM_REPLACE_DATA (1:*) /*PP#43598
3 #TYPE A 80 /*PP#43598
3 #FROM_ITEM A 40 /*PP#43598
3 #TO_ITEM A 40 /*PP#43598
1 #OUTPUT
2 #SUCCESS_STATUS A 1
2 #ERROR_DETAIL A 250
I suspect that the values for #ITEM_UDA_DATA_TABLE are provided for each occurrence of #X_ITEM_DATA, but it appears that this new #ITEM_REPLACE_VALUE is sometimes provided for each occurrence of #X_ITEM_DATA in the XML payload.
In one test case (XML sample attached), the first set of attributes for #X_ITEM_DATA did not send tags/data for #ITEM_REPLACE_VALUE, and the second set did. However, when Natural received the data, these #ITEM_REPLACE_VALUE values appeared in occurrence 1 which correlates to the 1st product, and so the Natural program not knowing differently handled them as such.
I would have expected these to appear in the Natural subprogram as such:
#TYPE(2,1) = ‘Substitute’
#FROM-ITEM(2,1) = ‘CLB201224’
#TO-ITEM(2,1) = ’ ’
#TYPE(2,2) = ‘Replacement’
#FROM-ITEM(2,2) = ’ ’
#TO-ITEM(2,2) = ‘BR1224N200R’
However, they appeared as occurrences (1,1) and (1,2).
Is there a way we can configure or organize the parameters such that if no #ITEM_REPLACE_DATA is ascribed to the first product but is ascribed to the second, that the 1st occurrence of #ITEM_REPLACE_DATA is blank and the 2nd occurrence retains the data in the intended occurrence?
Thanks,
Brian
XML.XML (7.62 KB)