Dear Nadia,
I tried your method. It worked. Thank you very much!
Copy the whole function group MEDRUCK to custom one, e.g. ZMEDRUCK, and also function module ME_READ_PO_FOR_PRINTING to ZME_READ_PO_FOR_PRINTING, comment out the following lines.
* IF CX_DRUVO NE AEND AND EKPO-LOEKZ NE SPACE.
* DELETE DOC-XEKPO.
* CONTINUE.
* ENDIF.
Then all the purchase order items, including the ones marked as "deleted", will be fetched by the function module.
CALL FUNCTION 'ZME_READ_PO_FOR_PRINTING'
EXPORTING
IX_NAST = NAST
IX_SCREEN = ENT_SCREEN
IMPORTING
EX_RETCO = ENT_RETCO
EX_NAST = NAST
DOC = DOC
CHANGING
CX_DRUVO = DRUVO
CX_FROM_MEMORY = FROM_MEMORY.
Best regards,
Wenjing