2023 Feb 22 8:49 AM
Hi, I'm trying to debug a purchase order in me23n. When the user tries to print preview it, it should display the delivery date. However, it is not being displayed as the RM06P is empty.
Scenario 1 - There is delivery date in purchase order in ME23N. The delivery date is being displayed in Print Preview using the field RM06P-LFDAT. RM06P-LFDAT has a value when the program is executed in the debugger.
Scenario 2 - There is a delivery date in purchase order in ME23n. However, the delivery date was not displayed in Print Preview as the RMP06P-LFDAT is empty. RM06P-LFDAT doesnt have a value when the program is executed in the debugger.
2023 Feb 22 9:33 AM
Hello walkerist
RMP06P-LFDAT is populated from the first schedule line of a purchase order item. SAP standard print programs use the PERIOD_AND_DATE_CONVERT_OUTPUT function, e.g.:
CALL FUNCTION 'PERIOD_AND_DATE_CONVERT_OUTPUT'
EXPORTING
internal_date = eket-eindt
internal_period = eket-lpein
language = ekko-spras
country = lfa1-land1
IMPORTING
external_date = rm06p-lfdat
external_period = pekpo-lpein
external_printtext = rm06p-pritx.
Best regards
Dominik Tylczynski