19 / 40
Date Values To Segment E1EDKO3 How I can do this?
Without knowing what type of document you are sending (E1EDK03 occurs in lot of DOC file types), it is hard to say exactly what user exit to use. You should look in the function module that creates and sends the IDOC file to find a user exit that will do the job.
Outbound purchase order documents use function module IDOC_OUTPUT_ORDERS. You would probably use customer function EXIT_SAPLEINM_002. You should create a project
for enhancement MM06E001 in CMOD and then code the user exit.
Your code might look something like this:
(declare w_eledkO3, w_first and w_somedate in the function
group top include)
CASE int_edidd-segnam.
WHEN ‘E1EDKO1’.
w_first = ‘X’. “flag first segment
WHEN ‘E1EDKA1’.
* insert E1EDKO3 segment before the first E1EDKA1 segment.
if w_first = ‘X’.
w_first = “.
clear w_E 1EDKO3.
W_E1EDKO3-IDDAT = “022â€.
W_E1EDKO3-DATUM = w_sornedate.
MOVE W_E 1EDKO3 TO int_edidd-sdata.
MOVE ‘E1EDKO3’ to int_edidd-segnam.
APPEND int_edidd.
ENDCASE.
Asked In ::
Priyanka
23 Feb, 2019 5:07 AM
Outbound purchase order documents use function module IDOC_OUTPUT_ORDERS. You would probably use customer function EXIT_SAPLEINM_002. You should create a project
for enhancement MM06E001 in CMOD and then code the user exit.
Your code might look something like this:
(declare w_eledkO3, w_first and w_somedate in the function
group top include)
CASE int_edidd-segnam.
WHEN ‘E1EDKO1’.
w_first = ‘X’. “flag first segment
WHEN ‘E1EDKA1’.
* insert E1EDKO3 segment before the first E1EDKA1 segment.
if w_first = ‘X’.
w_first = “.
clear w_E 1EDKO3.
W_E1EDKO3-IDDAT = “022â€.
W_E1EDKO3-DATUM = w_sornedate.
MOVE W_E 1EDKO3 TO int_edidd-sdata.
MOVE ‘E1EDKO3’ to int_edidd-segnam.
APPEND int_edidd.
ENDCASE.