Question:
Dear ALE gurus,
When I received an inbound Idoc type ORDERS05, an error message "VTWEG, VKORG and SPART can't be determined.
Actually, there is a segment in ORDERS05 namely E1EDK14 with qualifier "006", "007' and "008"
which can bring the above mention values in the Idoc. Does anyone know how can I set up the Idoc in order to include the qualifiers mention above in the Idoc?
Or, Is there any exit I can use to handle this and how I can use it?
I'm using LSMW and I'm not sure how to map these fields.
Answer:
You could try to fill in this info in table EDSDC.
Otherwise, we use exit ZXVEDU09 in EXIT_SAPLVEDA_007 as follows:
* Set xvbak-auart (Sales document type) to 'ZED1'
move 'ZED1' to xvbak-auart.
* Populate sales organisation, distribution channel and division. It is
* assumed there is only one combination of these per customer.
xvbak = dxvbak.
if xvbak-vkorg is initial or xvbak-vtweg is initial or
xvbak-spart is initial.
select vkorg vtweg spart from knvv up to 1 rows
into (xvbak-vkorg, xvbak-vtweg, xvbak-spart)
where kunnr = xvbak-kunnr
and loevm = ' '.
endselect.
endif.
* Move common structure to changing parameter.
dxvbak = xvbak.