Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how t ocreate script from scrach?

Former Member
0 Likes
773

hi,

how t ocreate script from scrach? any one exlpain detail.

tnks

raja

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
731

Hi ,

go to

1) se71

2) give your form name ,if the form does not exist a message will pop up .press enter .

3) In the administrative data just enter the description .

4) go to basic settings

5) select the page format and orientation

6) Go to the initial screen select pages

7) press create give the page number as page 1 and press enter ,all the fields will get enabled .

😎 give the next page as page 1 and give the description of it.

9) Go to the initial screen and select header and press change .

10) Select basic settings and enter the first page .

11) Select paragraph formats on the application tool bar .

12) Enter the paragraph name . this is the default paragraph settings and then press enter all the fields will get enabled .

13) Give the description of the paragraph .

14) In the application tool bar you will have windows ,press it .There will always be a default window called main window .This is the main window for all the pages you create .

15) To create window go to EDIT -> CREATE ELEMENT -> Give the window name and description and press enter .Give the paragraph format .

16) Select page window from the application tool bar .Select the page to which you want to add the window to .

17) go to EDIT -> CREATE ELEMENTS -> Select the required window you want to be visible in this page and press enter . Give the window width and height .

18) go to SETTINGS -> FORM PAINTER -> SAP SCRIPT TAB -> TICK GRAPHICAL FORM PAINTER and press enter .You can see the page with window. You can move it or even modify its dimension .Activate it

19) To close it go to SETTINGS -> FORM PAINTER -> SAP SCRIPT TAB -> TICK GRAPHICAL FORM PAINTER .

20) To write the code press F9 .

Hi ,

go to

1) se71

2) give your form name ,if the form does not exist a message will pop up .press enter .

3) In the administrative data just enter the description .

4) go to basic settings

5) select the page format and orientation

6) Go to the initial screen select pages

7) press create give the page number as page 1 and press enter ,all the fields will get enabled .

😎 give the next page as page 1 and give the description of it.

9) Go to the initial screen and select header and press change .

10) Select basic settings and enter the first page .

11) Select paragraph formats on the application tool bar .

12) Enter the paragraph name . this is the default paragraph settings and then press enter all the fields will get enabled .

13) Give the description of the paragraph .

14) In the application tool bar you will have windows ,press it .There will always be a default window called main window .This is the main window for all the pages you create .

15) To create window go to EDIT -> CREATE ELEMENT -> Give the window name and description and press enter .Give the paragraph format .

16) Select page window from the application tool bar .Select the page to which you want to add the window to .

17) go to EDIT -> CREATE ELEMENTS -> Select the required window you want to be visible in this page and press enter . Give the window width and height .

18) go to SETTINGS -> FORM PAINTER -> SAP SCRIPT TAB -> TICK GRAPHICAL FORM PAINTER and press enter .You can see the page with window. You can move it or even modify its dimension .Activate it

19) To close it go to SETTINGS -> FORM PAINTER -> SAP SCRIPT TAB -> TICK GRAPHICAL FORM PAINTER .

20) To write the code press F9 .

5 REPLIES 5
Read only

Former Member
0 Likes
731

Hi Raja,

1. Take transaction SE71. Give a name starting with Y or Z.

2. Create a window

3. Create a praragraph

3. Create page windows

4. Attach window to page window

5. Write the code in the window text element

6. Activate form

Create a print program. Use the function modules OPEN_FORM, WRITE_FROM and CLOSE_FORM to call the SAPScript created.

Please look at the following site for more info.

http://www.thespot4sap.com/Articles/SAPscript_Introduction.asp

http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVSCRPROG/BCSRVSCRPROG.pdf

Regards,

Kumar

Read only

Former Member
0 Likes
732

Hi ,

go to

1) se71

2) give your form name ,if the form does not exist a message will pop up .press enter .

3) In the administrative data just enter the description .

4) go to basic settings

5) select the page format and orientation

6) Go to the initial screen select pages

7) press create give the page number as page 1 and press enter ,all the fields will get enabled .

😎 give the next page as page 1 and give the description of it.

9) Go to the initial screen and select header and press change .

10) Select basic settings and enter the first page .

11) Select paragraph formats on the application tool bar .

12) Enter the paragraph name . this is the default paragraph settings and then press enter all the fields will get enabled .

13) Give the description of the paragraph .

14) In the application tool bar you will have windows ,press it .There will always be a default window called main window .This is the main window for all the pages you create .

15) To create window go to EDIT -> CREATE ELEMENT -> Give the window name and description and press enter .Give the paragraph format .

16) Select page window from the application tool bar .Select the page to which you want to add the window to .

17) go to EDIT -> CREATE ELEMENTS -> Select the required window you want to be visible in this page and press enter . Give the window width and height .

18) go to SETTINGS -> FORM PAINTER -> SAP SCRIPT TAB -> TICK GRAPHICAL FORM PAINTER and press enter .You can see the page with window. You can move it or even modify its dimension .Activate it

19) To close it go to SETTINGS -> FORM PAINTER -> SAP SCRIPT TAB -> TICK GRAPHICAL FORM PAINTER .

20) To write the code press F9 .

Read only

Former Member
0 Likes
731

SAP SCRIPTS FLOW:

Se71>>>> give the desc for the script.

The push buttons available in application tool bar are pages, windows, pagewindows, paragraph formats and character formats. In those pages and paragraph are mandatory.

After entering the description in the admn data. Click paragraph format push button. Set the paragraph as ‘p1’ and press enter. Then enter the description for the paragraph.

Then go to pages pushbutton. Enter the page1 as page then press enter. Then enter the description. If pages are further needed goto ‘edit create element. Enter the page name and desc. Set the next page of the first page as page 2. next page for the page2 is page1.

Click on ‘wondows’ pushbutton in application tool bar. goto ‘edit create element. Enter the window name and desc. Enter as many windows as needed.

Click on a particular window and go to text elements button in appl tool bar. Enter the display text. Variables passed from the editor should be included in between & &.

To add logos

Use ‘Rstxldmc’ report for ‘.tiff’ format logos. And use se78 tcode to upload ‘.bmp’ images.

SAVE AND ACTIVATE THE SCRIPT.

EDITOR CODE.

&----


*& Report Z_SCRIPT_1 *

*& *

&----


*& *

*& *

&----


REPORT Z_SCRIPT_1 .

TABLES: EKKO.

SELECTION-SCREEN: BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.

PARAMETERS: S_EBELN LIKE EKKO-EBELN.

SELECTION-SCREEN END OF BLOCK B1.

DATA: BEGIN OF IT_EKKO OCCURS 1,

EBELN LIKE EKKO-EBELN,

BUKRS LIKE EKKO-BUKRS,

BSTYP LIKE EKKO-BSTYP,

END OF IT_EKKO.

DATA: BEGIN OF IT_EKPO OCCURS 1,

EBELN LIKE EKPO-EBELN,

LOEKZ LIKE EKPO-LOEKZ,

STATU LIKE EKPO-STATU,

AEDAT LIKE EKPO-AEDAT,

END OF IT_EKPO.

SELECT EBELN BUKRS BSTYP FROM EKKO INTO TABLE IT_EKKO WHERE EBELN = S_EBELN.

IF IT_EKKO[] IS NOT INITIAL.

SELECT EBELN LOEKZ STATU AEDAT FROM EKPO INTO TABLE IT_EKPO FOR ALL ENTRIES IN IT_EKKO WHERE EBELN = IT_EKKO-EBELN.

ENDIF.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

  • APPLICATION = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

  • DEVICE = 'PRINTER'

  • DIALOG = 'X'

FORM = 'Z_FORM1'

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.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

  • ELEMENT = ' '

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'HEADER'.

EXPORTING

  • ELEMENT = ' '

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'LOGO'.

LOOP AT IT_EKKO .

CALL FUNCTION 'WRITE_FORM'

EXPORTING

  • ELEMENT = ' '

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'PO'.

ENDLOOP.

LOOP AT IT_EKPO.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

  • ELEMENT = ' '

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'MAIN'.

ENDLOOP.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

  • ELEMENT = ' '

FUNCTION = 'SET'

TYPE = 'BODY'

WINDOW = 'FOOTER'.

CALL FUNCTION 'CLOSE_FORM'.

CHEERS.

Read only

Former Member
0 Likes
731

hi Reddy,

Check

http://www.sap-img.com/sapscripts.htm

Regards,

Santosh