I have implemented the BADI definition CUSTOMER_ADD_DATA_BI for populating the custom segment Z1KNA1M(contains the additional address fields) of the idoctype Debmas06 in the method FILL_ALE_SEGMENTS_OWN_DATA.
It was working fine till I introduced other filter based on the country of the customer in the segment E1KNA1M - Land1 (US, MX, CA) in the distribution model.
Now it's working fine for the customers with the above countries, but for the other countries where in it shloudn't generate a communication idoc it's giving an error saying 'Internal error: Program read table idoc_structure, command data_select_for_block, argument Z1KNA1M'. when running BD21 or BD12.
Would appreciate for your responses.