SAP BC mapping

Question: Hi I have an issue with mapping record list in BC. Any help or explanation would be grateful.

There are two tables with similar data structure


Table A

ITEM(record)
ORDER(record list)
ORDERLINE(string)
TEXTLINE(record list)
TEXTLINE_TXT(string)
Table B

Item(record)
Order(record list)
NewOrderline(string)
NewTextline(record list)
NewTextline_txt(string)

Table A has the following data assign.

ITEM
ORDER
ORDER(0)
ORDERLINE “PeterOrder”
TEXTLINE
TEXTLINE(0)
TEXTLINE_TXT “textline1”
ORDER(1)
ORDERLINE “DavidOrder”
TEXTLINE
TEXTLINE(0)
TEXTLINE_TXT “textline1”


In BC we map table A to table B by mapping

\ITEM\ORDER\ORDERLINE to \item\order\NewOrderline

\ITEM\ORDER\TEXTLINE\TEXTLINE_TXT to \item\order\NewTextline\NewTextline_txt


This will create table B with the following data

Item
Order
Order(0)
NewOrderline “PeterOrder”
NewTextline
NewTextline(0)
NewTextline_txt “textline1”
Order(1)
NewOderline “DavidOrder”
NewTextline
NewTextline(0)
Newtextline_txt “testline1”

All OK.

If you add an extra text line to “PeterOrder”

ITEM
ORDER
ORDER(0)
ORDERLINE “PeterOrder”
TEXTLINE
TEXTLINE(0)
TEXTLINE_TXT “textline1”
TEXTLINE(1)
TEXTLINE_TXT “textline2”
ORDER(1)
ORDERLINE “DavidOrder”
TEXTLINE
TEXTLINE(0)
TEXTLINE_TXT “textline1”


This will create table B with the following data

Item
Order
Order(0)
NewOrderline “PeterOrder”
Order(1)
NewOderline “DavidOrder”



No mapping for the newtextlines record list.

Thanks

Answer:
Took me some time to understand your problem to begin with.
Could you be more specific about which services you are using in your mapping? E.g., how are you appending lines of recordlist TEXTLINE to recordlist NewTextLine? If you are using service appendToRecordList as a flow service you might want to check if you are dropping too many items or you forgot to drop the header line.

If you are using service appendToRecordList as a transformer in a map try using it as a flow service, as I've seen different results depending on how it was used. Either way, check if your LOOPs are consistent.

If you are using a straight map, check if your "line" is blue as this indicates that the index somehow is lost. You might want to consider using appendToRecordList in this case.

You could also check by debugging if you are using a reference to the same object for both recordType, because if this has been done in some cases dropping object A could result in a drop of object B as well.

Let us know, good luck.
Copyright ?2007 - 2008 www.jt77.com