‎2009 Aug 24 2:37 AM
I write a program as follow, but it doesn' t work .
The error is " Dynpro does not exit ! "
Do you know how to modify it?
many thanks!!!
REPORT ZCJ052.
data: container type ref to cl_gui_custom_container,
pdf type ref to cl_gui_pdfviewer.
*ATA: ITAB TYPE TABLE OF ZSHAIL_T1 WITH HEADER LINE.
*ELECT * FROM ZSHAIL_T1 INTO TABLE ITAB.
call screen 100.
module STATUS_0100 output.
SET PF-STATUS 'xxxxxxxx'.
SET TITLEBAR 'xxx'.
if container is initial.
CREATE OBJECT container
EXPORTING
PARENT =
container_name = 'PDF'
STYLE =
LIFETIME = lifetime_default
REPID =
DYNNR =
NO_AUTODEF_PROGID_DYNNR =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
LIFETIME_DYNPRO_DYNPRO_LINK = 5
others = 6
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CREATE OBJECT pdf
EXPORTING
parent = container
LIFETIME =
SHELLSTYLE =
AUTOALIGN =
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
CREATE_ERROR = 3
LIFETIME_ERROR = 4
others = 5
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD pdf->open_document
EXPORTING
url = 'file://D:\SP\shail''s files\my docs\ab4query.pdf'
EXCEPTIONS
CNTL_ERROR = 1
CNTL_SYSTEM_ERROR = 2
others = 3
.
IF sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
endif.
endmodule. " STATUS_0100 OUTPUT
module USER_COMMAND_0100 input.
case sy-ucomm.
when 'EXIT'.
leave program.
endcase.
endmodule. " USER_COMMAND_0100 INPUT
‎2009 Aug 24 3:06 AM
check if screen 100 exists or not.if not create and activate it..
‎2009 Aug 24 3:15 AM
hi abapuser
Because its my first time to do it, could you please tell me more about it?
eg. how to create a dynpro creen?
many thanks!!!
‎2009 Aug 24 3:21 AM
on statement ,call screen 100.double click on '100'.System message stating that screen doesnt exist will popup.. click on it to crate screen.screen painter would open.activate the screen.
I suggest that you first go through basics of dialog programing and then proceed with your development..