How to get local print machine information? Pls check below program.
DATA: PRDEFAULT LIKE FRPRLIST-PRNAME , IS_FRONTEND LIKE RSPOTYPE-MODE . DATA: LIST LIKE FRPRLIST OCCURS 0 WITH HEADER LINE. CALL FUNCTION 'RSPO_FRONTEND_PRINTERS_FOR_DEV' EXPORTING DEVICE = 'LP01' IMPORTING PRDEFAULT = PRDEFAULT IS_FRONTEND = IS_FRONTEND * IS_MAIL = * NO_CHOICE = TABLES LIST = LIST[] EXCEPTIONS NO_LIST = 1 LIST_TRUNCATED = 2 NAME_NOT_FOUND = 3 OTHERS = 4 . WRITE: / 'DEFAULT PRINTER:' , PRDEFAULT. SKIP. WRITE: / 'Printer List:'. LOOP AT LIST. WRITE AT /4 LIST . ENDLOOP.
via http://blog.chinaunix.net/u1/40527/showart_1989847.html
Responses to “ABAP Tips: Get local printer information”