09-16-2008 12:58 PM
hi all,
im new to abap .
im developing a report which shows some records,
so now i want to add a button aat toolbar and after clicking that button the report should display sap script for that report and again should go back from that script page....
i need to do this as early as possible so..PLZ
thanx in advance...
09-16-2008 1:02 PM
well this sounds quite easy, tho it isnt too easy.
at first: for displaying something in SAP-SCRIPT you need a form first. useSE71 to create.
then you need a driver program. Ok thats your normal program, but for displaying your output in sap script you need a second logic branch in your program, triggering all the write_form methods.
to get that button in your screen you need to modify the PF status of that screen.
09-16-2008 1:02 PM
well this sounds quite easy, tho it isnt too easy.
at first: for displaying something in SAP-SCRIPT you need a form first. useSE71 to create.
then you need a driver program. Ok thats your normal program, but for displaying your output in sap script you need a second logic branch in your program, triggering all the write_form methods.
to get that button in your screen you need to modify the PF status of that screen.
09-16-2008 1:06 PM
Hi nilesh,
chk with this link
u will get entire knowledge on it.
http://help.sap.com/saphelp_nw70/helpdata/en/9f/dba81635c111d1829f0000e829fbfe/content.htm
thanks
nagendra.
09-16-2008 1:12 PM
1. You need to creat a button in the GUI Status.
2. SET PF-STATUS in your program
3. In the USER-COMMAND, you need to call the SAP Script using open_form and write_form functiona modules.
09-16-2008 1:20 PM
i have created a disply button but now i need to give the click event fot that so that it will go to sap script output page (i.e. deatail o/p) & im writing the code for script too. thats ok. but plz tell me in details to write code to disply sap script page and to go back again to output page .. like below..
1. normal (classical ) reports output page
2. click on disp button.
3 script displayed.
4 go back like normally we go by pressing F3.
thankxx for earlier reply...
Edited by: NILESH SHELKE on Sep 16, 2008 2:21 PM
Edited by: NILESH SHELKE on Sep 16, 2008 2:22 PM
09-16-2008 1:25 PM
Hi,
You can call your form as given below inside the PF-STATUS.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX =
ARCHIVE_PARAMS =
DEVICE = 'PRINTER'
DIALOG = 'X'
FORM = 'ZSCRIPTFORM' (SAP SCRIPT form name)
LANGUAGE = SY-LANGU
OPTIONS =
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJECT =
RAW_DATA_INTERFACE = '*'
SPONUMIV =
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
INVALID_FAX_NUMBER = 8
MORE_PARAMS_NEEDED_IN_BATCH = 9
SPOOL_ERROR = 10
CODEPAGE = 11
OTHERS = 12
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
Regards,
P.S.Chitra
09-16-2008 1:20 PM
hi,
Use "SET PF STATUS" .
Consider the eg given below:-
&----
*& Form SUB_PFSTATUS
&----
text
----
--> p1 text
<-- p2 text
----
FORM SUB_PFSTATUS USING EXTAB TYPE SLIS_T_EXTAB.
SET PF-STATUS xxx.
ENDFORM. " SUB_PFSTATUS
*----
Inside the form endform , you need to call your script form.
Regards,
P.S.Chitra
09-16-2008 1:37 PM
can u plz clearify the set pf-status code..in more details plzzzzzz.....& can we go back by F3 as we go normally from script to o/p screen ?
thanku...
Edited by: NILESH SHELKE on Sep 16, 2008 2:37 PM
Edited by: NILESH SHELKE on Sep 16, 2008 2:39 PM
09-16-2008 1:43 PM
Hi Nilesh,
Yes you can go back by pressing F3 button. Just mention the function code as BACK in pf-status.
Regards,
Swapna.
09-19-2008 8:22 AM
Hi,
Please check the below example. Hope this might help you.
&----
*& Form SUB_USERCMD
&----
text
----
--> p1 text
<-- p2 text
----
FORM SUB_USERCMD USING P_UCOMM LIKE SY-UCOMM
RS_SELFIELD TYPE SLIS_SELFIELD.
IF SY-SUBRC = 0.
CASE P_UCOMM.
WHEN 'BACK'.
CALL SCREEN 0.
ENDCASE.
ENDIF.
ENDFORM. " SUB_USERCMD
----
Regards,
P.S.Chitra
10-23-2008 5:41 AM