cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Script - Tables creation & displaying data in right place in table?

Former Member
0 Kudos

Hi Gurus,

I have been asked to create a Table in a already developed SAP Script and displaying the output/data in that table in proper place in a proper manner i.e. alignment.

ThanQ.

Sri.

Accepted Solutions (1)

Accepted Solutions (1)

messier31
Active Contributor
0 Kudos

Hi Srinivas,

In SAPScript tables are created using BOX, POSITION, SIZE keyword.

Refer sap help link below for their syntax and usage..

<b><a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/d1/802ec5454211d189710000e8322d00/frameset.htm">Boxes, Lines, Shading: BOX, POSITION, SIZE</a></b>

Just check this.. Hope this will help you..

Enjoy SAP.

Pankaj SIngh.

Answers (3)

Answers (3)

Former Member
0 Kudos

HFORMYH648_060104

OLANE

HEADFORM YH648_060104 SAP DEF EFlight Connection Details YH648_060104 00198SAPDEV17 640 20070207010615SAPDEV17 640 2007021012415513200038 E0 800

LINE/:FORM CPI 10; LPI 6; TAB-STOP 1 CM; START-PAGE FIRST; FORMAT LETTER PORTRAIT;

LINE/:FORM PARAGRAPH P1; RDI; RDIDEV;

LINE/:PARAGRAPH A1 LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12; NUMBER-INDENT 3 CM;

LINE/:PARAGRAPH P1 LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12;

LINE/:PARAGRAPH P2 ALIGN CENTER; LINE-SPACE 1 LN; FONT COURIER; FONT-SIZE 18;

LINE/:PARAGRAPH P2 BOLD ON;

LINE/:PARAGRAPH P3 ALIGN RIGHT; LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12;

LINE/:PARAGRAPH P4 LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12;

LINE/:PARAGRAPH P5 NEXT SAME-PAGE; LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12;

LINE/:PARAGRAPH P5 NUMBER-INDENT 3 CM; OUTLINE P5 1; ARABIC; NUMBER CHAINED '' '';

LINE/:PARAGRAPH P6 ALIGN CENTER; LINE-SPACE 1 LN; FONT COURIER; FONT-SIZE 16;

LINE/:PARAGRAPH P6 BOLD ON;

LINE/:PARAGRAPH P7 LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12;

LINE/:PARAGRAPH P8 LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12;

LINE/:PARAGRAPH P9 LINE-SPACE 1 LN; FONT TIMES; FONT-SIZE 12;

LINE/:PARAGRAPH A1 TAB 1 5 CM LEFT; TAB 2 7 CM LEFT; TAB 3 10 CM LEFT;

LINE/:PARAGRAPH A1 TAB 4 14 CM LEFT;

LINE/:PARAGRAPH P1 TAB 1 0.50 IN LEFT;

LINE/:PARAGRAPH P2 TAB 1 0.50 IN LEFT;

LINE/:PARAGRAPH P3 TAB 1 0.50 IN LEFT;

LINE/:PARAGRAPH P4 TAB 1 3 CM LEFT;

LINE/:PARAGRAPH P5 TAB 1 5 CM LEFT; TAB 2 7 CM LEFT; TAB 3 10 CM LEFT;

LINE/:PARAGRAPH P5 TAB 4 13 CM LEFT; TAB 5 14 CM LEFT;

LINE/:PARAGRAPH P6 TAB 1 0.50 IN LEFT;

LINE/:PARAGRAPH P7 TAB 1 0.25 IN LEFT; TAB 2 0.50 IN LEFT; TAB 3 1 IN LEFT;

LINE/:PARAGRAPH P7 TAB 4 3.95 IN LEFT;

LINE/:PARAGRAPH P8 TAB 1 0.75 IN LEFT; TAB 2 1 IN LEFT; TAB 3 1.75 IN LEFT;

LINE/:PARAGRAPH P9 TAB 1 0.50 IN LEFT;

LINE/:STRING C1 FONT TIMES; FONT-SIZE 12; MARK OFF;

LINE/:WINDOW MAIN

LINE/:WINDOW WINDOW1 TYPE VAR;

LINE/:WINDOW WINDOW2 TYPE VAR;

LINE/:PAGE FIRST NEXT FIRST;

LINE/:PAGE NEXT

LINE/:PAGE FIRST MAIN 0 5 MM 81 MM 201 MM 135 MM;

LINE/:PAGE FIRST WINDOW WINDOW1 7 MM 22 MM 198 MM 57 MM;

LINE/:PAGE FIRST WINDOW WINDOW2 7 MM 82 MM 196 MM 111 MM;

LINE/:PAGE NEXT WINDOW WINDOW2 7 MM 82 MM 196 MM 111 MM;

END

HEADFORM YH648_060104 SAP TXT EFlight Connection Details YH648_060104 00198SAPDEV17 640 20070207010615SAPDEV17 640 2007021012415513200101 E0 800

LINE/:FORM TEXT 'Flight Connection Details';

LINE/:PARAGRAPH A1 TEXT 'item data';

LINE/:PARAGRAPH P1 TEXT 'default format';

LINE/:PARAGRAPH P2 TEXT 'heading';

LINE/:PARAGRAPH P3 TEXT 'second line header';

LINE/:PARAGRAPH P4 TEXT 'item header';

LINE/:PARAGRAPH P5 TEXT 'item data';

LINE/:PARAGRAPH P6 TEXT 'heading footer';

LINE/:PARAGRAPH P7 TEXT 'second line footer';

LINE/:PARAGRAPH P8 TEXT 'third line footer';

LINE/:PARAGRAPH P9 TEXT 'var window';

LINE/:STRING C1 TEXT 'DEFAULT ONE';

LINE/:WINDOW MAIN TEXT 'Main Window';

LINE/:WINDOW WINDOW1 TEXT 'New Window';

LINE/:WINDOW WINDOW2 TEXT 'New Window';

LINE/:PAGE FIRST TEXT 'this is starting page';

LINE/:PAGE NEXT TEXT 'THIS IS LAST PAGE';

LINE/WWINDOW1

LINE/:IF &PAGE& <> 1.

LINEP2Flight connection details

LINE/:BOX XPOS '13'CM YPOS '1.5'CM WIDTH '4'CM HEIGHT '1'CM FRAME 10 TW

LINE/:ELSE

LINEP2Flight connection details

LINE/:BOX XPOS '13'CM YPOS '3.5'CM WIDTH '4'CM HEIGHT '1'CM FRAME 10 TW

LINE/:ENDIF.

LINEP3

LINEP3

LINE*

LINE/: IF &PAGE& = 1.

LINE/:BOX XPOS '2'CM YPOS '2'CM WIDTH '8'CM HEIGHT '3'CM FRAME 10 TW

LINEP9

LINEP9

LINEP9 Requested by: &SYST-UNAME&

LINE/

LINEP9 Date : &SYST-DATUM&

LINE/:ENDIF.

LINEP9 PAGE:

LINE= &PAGE&OF&SAPSCRIPT-FORMPAGES&

LINE/:IF &PAGE& = 1.

LINEP9 Time : &SYST-UZEIT&

LINE/:ENDIF.

LINE/WWINDOW2

LINE/EPROTECT1

LINE/:IF &NEXTPAGE& EQ 0

LINE/:NEW-PAGE

LINEP6Instructions to the viewer

LINEP7

LINE* Description of the flights.

LINE* <(>&<)>scarr-carrid<(>&<)><(>,,<)><(>,,<)><(>&<)>scarr-carrname&

LINE* The flight data we are printing could be erroneous.

LINE* Do not depend on the flight data we have printed

LINE* Flight schedule is tentative.

LINE* Long live ABAP.

LINE/:ENDIF.

LINE/WMAIN

LINE/*TOP

LINE/EBOXES

LINE/:IF &SUN& NE 1.

LINE/:BOX XPOS '3'CM YPOS '8'CM WIDTH '16'CM HEIGHT '14'CM FRAME 10 TW

LINE/:BOX XPOS '5' CM YPOS '8'CM WIDTH '0'CM HEIGHT '14'CM FRAME 10 TW

LINE/:BOX XPOS '7'CM YPOS '8'CM WIDTH '0'CM HEIGHT '14'CM FRAME 10 TW

LINE/:BOX XPOS '10'CM YPOS '8'CM WIDTH '0'CM HEIGHT '14'CM FRAME 10 TW

LINE/:BOX XPOS '14'CM YPOS '8'CM WIDTH '0'CM HEIGHT '14'CM FRAME 10 TW

LINE/:BOX XPOS '3' CM YPOS '7.5'CM WIDTH '16'CM HEIGHT '2'CM INTENSITY 20

LINEP4 S.No Carrier ID Connection ID

LINEP4 Flight

LINE date City from City to

LINE/:ENDIF.

LINE/EDATA

LINE/*&ATTRIBUTE& = &W_TEMP& MOD 25.

LINE/:ENPROTECT

LINE/:PROTECT

LINEP5,,&FS_sflight-carrid&,,&FS_sflight-connid&

LINE/EDATA1

LINEA1,,,,&FS_sfligHT-FLDATE&

LINE= ,,&FS_sflight-cityfrom&,,&FS_sflight-cityto&

LINE/*ENDTOP.

LINE/*FIRST2

LINE/ELAST

LINE/:NEWPAGE

LINE/:DEFINE &SUN& = 1.

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

LINEP3

END

ACTVSAP

E

hi srinivas this is script.

i appreciate your intrest.

Former Member
0 Kudos

ThanQ Sunil.

Former Member
0 Kudos

TABLES: SPFLI,SFLIGHT.

DATA: BEGIN OF FS_SFLIGHT,

CARRID TYPE SPFLI-CARRID,

CONNID TYPE SPFLI-CONNID,

FLDATE TYPE SFLIGHT-FLDATE,

CITYFROM TYPE SPFLI-CITYFROM,

CITYTO TYPE SPFLI-CITYTO,

END OF FS_SFLIGHT.

TABLES SCARR.

DATA T_SCARR LIKE STANDARD TABLE OF SCARR.

DATA: W_LINES TYPE I,

W_P TYPE I,

W_TEMP TYPE I .

DATA T_FLIGHT LIKE STANDARD TABLE OF FS_SFLIGHT.

SELECT SPFLI~CARRID

SPFLI~CONNID

SFLIGHT~FLDATE

SPFLI~CITYFROM

SPFLI~CITYTO

INTO CORRESPONDING FIELDS OF TABLE T_FLIGHT

FROM SPFLI AS SPFLI JOIN SFLIGHT AS SFLIGHT

ON SPFLICARRID = SFLIGHTCARRID AND

SPFLICONNID = SFLIGHTCONNID

.

CALL FUNCTION 'OPEN_FORM'

EXPORTING

  • APPLICATION = 'TX'

  • ARCHIVE_INDEX =

  • ARCHIVE_PARAMS =

  • DEVICE = 'PRINTER'

  • DIALOG = 'X'

FORM = 'YH648_060104'

  • 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.

DESCRIBE TABLE T_FLIGHT LINES W_LINES.

LOOP AT T_FLIGHT INTO FS_SFLIGHT.

ADD 1 TO W_TEMP.

  • IF W_LINES NE W_TEMP.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'BOXES'

  • FUNCTION = 'SET'

TYPE = 'TOP'

  • WINDOW = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

  • EXCEPTIONS

  • ELEMENT = 1

  • FUNCTION = 2

  • TYPE = 3

  • UNOPENED = 4

  • UNSTARTED = 5

  • WINDOW = 6

  • BAD_PAGEFORMAT_FOR_PRINT = 7

  • SPOOL_ERROR = 8

  • CODEPAGE = 9

  • OTHERS = 10

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

  • ELSE.

IF W_TEMP NE W_LINES.

AT NEW CONNID.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'DATA'

  • FUNCTION = 'SET'

TYPE = 'BODY'

  • WINDOW = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR = 8

CODEPAGE = 9

OTHERS = 10

.

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.

ENDAT.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'DATA1'

  • FUNCTION = 'SET'

TYPE = 'BODY'

  • WINDOW = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR = 8

CODEPAGE = 9

OTHERS = 10

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ELSE.

SELECT CARRID CARRNAME

FROM SCARR

INTO TABLE T_SCARR.

LOOP AT T_SCARR INTO SCARR.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'PROTECT1'

  • FUNCTION = 'SET'

  • TYPE = 'BODY'

WINDOW = 'WINDOW2'

  • IMPORTING

  • PENDING_LINES =

EXCEPTIONS

ELEMENT = 1

FUNCTION = 2

TYPE = 3

UNOPENED = 4

UNSTARTED = 5

WINDOW = 6

BAD_PAGEFORMAT_FOR_PRINT = 7

SPOOL_ERROR = 8

CODEPAGE = 9

OTHERS = 10

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

ENDLOOP.

ENDIF.

ENDLOOP.

  • IF W_LINES NE W_TEMP.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

ELEMENT = 'LAST'

  • FUNCTION = 'SET'

  • TYPE = 'TOP'

  • WINDOW = 'MAIN'

  • IMPORTING

  • PENDING_LINES =

  • EXCEPTIONS

  • ELEMENT = 1

  • FUNCTION = 2

  • TYPE = 3

  • UNOPENED = 4

  • UNSTARTED = 5

  • WINDOW = 6

  • BAD_PAGEFORMAT_FOR_PRINT = 7

  • SPOOL_ERROR = 8

  • CODEPAGE = 9

  • OTHERS = 10

.

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 'CLOSE_FORM'

  • IMPORTING

  • RESULT =

  • RDI_RESULT =

  • TABLES

  • OTFDATA =

EXCEPTIONS

UNOPENED = 1

BAD_PAGEFORMAT_FOR_PRINT = 2

SEND_ERROR = 3

SPOOL_ERROR = 4

CODEPAGE = 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.

Former Member
0 Kudos

ThanX to all,

Sunil, culd u tell me some thing about the Elements of BOXES, DATA, DATA1, PROTECT1; LAST etc. in ur mentioned prog. i.e. flights prog.

ThanQ in adv.

Sri.

Former Member
0 Kudos

hi,

there is a posibility to get the form also as word format.

those are the form text elements.

at present i am not able to get that function module i have a work any how with in day i also posted the form also .

thanks for rewarding points .

data ,data1,protect1,last are text elements.

Former Member
0 Kudos

Hi Sunil,

OK, I ll wait for that. Yes, I knew that they r text elements, but my question is that, Where v hv to declare them in script? How to use them?

ThanQ,

sRI:

Former Member
0 Kudos

Hi,

Kindly see the code below:

Report Program:

LOOP AT I_EKPO INTO WA_EKPO.

  CALL FUNCTION 'WRITE_FORM'
   EXPORTING
     ELEMENT                        = 'CADY21'
*   FUNCTION                       = 'SET'
     TYPE                           = 'BODY'
     WINDOW                         = 'MAIN'
* IMPORTING
*   PENDING_LINES                  =
   EXCEPTIONS
     ELEMENT                        = 1
     FUNCTION                       = 2
     TYPE                           = 3
     UNOPENED                       = 4
     UNSTARTED                      = 5
     WINDOW                         = 6
     BAD_PAGEFORMAT_FOR_PRINT       = 7
     SPOOL_ERROR                    = 8
     CODEPAGE                       = 9
     OTHERS                         = 10
            .
  IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
  ENDIF.

ENDLOOP.

Form (with table and data inside the table)

-> Go to the Main Window

-> Add Text Element (CADY21)

-> The text element must be created because the workarea will be passed in the said text element

/E CADY21

/* Create Box, 1st Column

/: BOX WIDTH '20' CM HEIGHT '10' CM FRAME 20 TW INTENSITY 10

/* 2nd Column

/: POSITION XORIGIN '+5' CM

/: BOX WIDTH '0' CM HEIGHT '10' CM FRAME 20 TW

/* 3rd Column

/: POSITION XORIGIN '+5' CM

/: BOX WIDTH '0' CM HEIGHT '10' CM FRAME 20 TW

/* 4th Column

/: POSITION XORIGIN '+5' CM

/: BOX WIDTH '0' CM HEIGHT '10' CM FRAME 20 TW

/: INCLUDE Z_FLIPHOP21 OBJECT TEXT ID ST

/:

/* Write the work ares

P1 &WA_EKPO-EBELN&,,&WA_EKPO-MENGE&,,&WA_EKPO-KUNNR&,,&WA_EKPO-MATNR

Hope this helps!

Message was edited by:

Ren

Former Member
0 Kudos

Also, if the info that I gave you is insufficient. I may be able to send to you my notes about SAPSCRIPT. Just send me your email add. Thanks.

Former Member
0 Kudos

Hi Ren,

ThanQ. So, Where the CADY1 elements components starts (/: BOX WIDTH '20' CM HEIGHT '10' CM FRAME 20 TW INTENSITY 10???) and where ends(&WA_EKPO-EBELN&,,&WA_EKPO-MENGE&,,&WA_EKPO-KUNNR&,,&WA_EKPO-MATNR????)y coz am asking is, its under LOOP i.e. box creation!!!

2) What is Z_PHLIPHOP21 (culd u mention some examples more like objects under INCLUDE clause?

ThanQ,

Sri.

Message was edited by:

Srinivas

Former Member
0 Kudos
/: INCLUDE Z_FLIPHOP21 OBJECT TEXT ID ST

You use that Include when you want to use the standard texts created in SO10.

You can create standard text using so10. You need to input Text name, Text ID, & Language to create a standard text. In the code above, <b> Z_FLIPHOP21</b> is the Text Name. The TEXT id is <b>ST</b>. With the code above, you will be able to write in the box what is written in the standard text.

Former Member
0 Kudos

<b>Creating a BOX</b>

How are the borders defined in the layout set?

Using the following new text commands:

1. /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]

2. /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]

3. /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]

1. /: BOX [XPOS] [YPOS] [WIDTH] [HEIGHT] [FRAME] [INTENSITY]

Effect

Draws a box at this position with the specified size.

Additional

XPOS, YPOS, WIDTH, HEIGHT and FRAME always require

specifs.

a measurement and a unit of measurement to be specified. The additional specification INTENSITY requires the specification of a percent number between 0 and 100.

XPOS, YPOS

Upper left corner of box, based on the values from the POSITION command.

Default: Values from POSITION command

The following internal calculation rule is used to determine the absolute output position of a box on the page:

X(abs) = XORIGIN + XPOS

Y(abs) = YORIGIN + YPOS

WIDTH

Width of box

Default: WIDTH value from SIZE command

HEIGHT

Height of box

Default: HEIGHT value from SIZE command

FRAME

Frame thickness

Default: 0 (no frame line)

INTENSITY

Density of the box contents in %

Default: 100 (solid black)

Measurements

Decimal measurements must be enclosed in inverted commas as literals (like ABAP number constants). The period should be used as the decimal point. Also see the following examples.

Unit

Valid units of measurement are TW (twip), PT (point), IN (inch), MM (millimeter), CM (centimeter), LN (line), CH (character). The following conversions apply:

1 TW = 1/20 PT

1 PT = 1/72 IN

1 IN = 2.54 CM

1 CM = 10 MM

1 CH = character height from layout set header (CPI)

1 LN = line height from layout set header (LPI)

Examples

/: BOX FRAME 10 TW

Draws a frame around the current window with a frame thickness of 10 TW (= 0.5 PT)

/: BOX INTENSITY 10

Shades the window background with a density (gray shade) of

10 %

/: BOX HEIGHT 0 TW FRAME 10 TW

Draws a horizontal line at the upper window border over the entire window width

/: BOX WIDTH 0 TW FRAME 10 TW

Draws a vertical line at the left window border over the entire window height

/: BOX WIDTH '17.5' CM HEIGHT '1' CM FRAME 10 TW INTENSITY 15

/: BOX WIDTH '17.5' CM HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '10.0' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

/: BOX XPOS '13.5' CM WIDTH 0 TW HEIGHT '13.5' CM FRAME 10 TW

Draws two rectangles and two lines to construct a three-column table with a highlighted heading line

2. /: POSITION [XORIGIN] [YORIGIN] [WINDOW] [PAGE]

Effect

Determines the origin of the coordinate system for the parameters XPOS and YPOS from the BOX command. When the window is output, the POSITION value is set to the upper left corner point of the window (default setting).

Additional

If a parameter value does not have a sign, its value is

specifs.

regarded as an absolute value, this means the values refer to the upper left corner point of the output page. If a parameter value does have a sign, the new value of this parameter is calculated relative to the old value. If a parameter is missing, the current value of this parameter is not changed.

XORIGIN, YORIGIN

Origin of the coordinate system

WINDOW

Sets the values for left and upper border to the values of the current window (default setting)

PAGE

Sets the values for left and upper border to the values of the current output page (XORIGIN = 0 cm, YORIGIN = 0 cm)

Examples

/: POSITION WINDOW

Sets the coordinate origin to the upper left window corner point

/: POSITION XORIGIN 2 CM YORIGIN '2.5 CM'

Sets the coordinate origin to 2 CM measured from the left page border and 2.5 CM measured from the upper page border

/: POSITION XORIGIN '-1.5' CM YORIGIN -1 CM

Moves the upper left coordinate origin 1.5 cm to the left and 1 cm up

3. /: SIZE [WIDTH] [HEIGHT] [WINDOW] [PAGE]

Effect

Determines the values for the parameters WIDTH and HEIGHT from the BOX command. When a window is output, the SIZE value is set to the corresponding values of this window (default setting).

Additional

If a parameter is missing in the command, the current value

specifs.

of this parameter is not changed. If a parameter value does not contain a sign, its value is regarded as an absolute value. If a parameter value does contain a sign, the new value of this parameter is calculated relative to the old value.

WIDTH, HEIGHT

Dimension of the rectangle or line

WINDOW

Sets the values for width and height to the corresponding values of the current window (default setting)

PAGE

Sets the values for width and height to the corresponding values of the current output page

Examples

/: SIZE WINDOW

Sets WIDTH and HEIGHT to the window dimensions

/: SIZE WIDTH '3.5' CM HEIGHT '7.6' CM

Sets WIDTH to 3.5 cm and HEIGHT to 7.6 cm

/: POSITION WINDOW

/: POSITION XORIGIN -20 TW YORIGIN -20 TW

/: SIZE WIDTH +40 TW HEIGHT +40 TW

/: BOX FRAME 10 TW

The current window is framed. The frame projects beyond the beginning of the window so that the first and last text characters are not overwritten.

Message was edited by:

Ren

Message was edited by:

Ren

Former Member
0 Kudos

ThanQ. Is it that, the command lines(below following lines) comes under CADY1, are assigned to CADY1 text element, until &WA_EKPO-EBELN&,,&WA_EKPO-MENGE&,,&WA_EKPO-KUNNR&,,&WA_EKPO-MATNR? In other words, When we used this CADY1 text element in WRITE_FORM functional module, Does the SAP Script displays all the data, which is mentioned under CADY1?

What is BODY? Is it Main window open space?

ThanQ,

Sri.

Former Member
0 Kudos

You are correct. When we used CADY1 text element in WRITE_FORM functional module, the SAP Script will display all the data, which is declared under CADY1.

Basically, the write_form is in the loop because we wanted to write the work area.

Former Member
0 Kudos

Oh, and the BODY is basically the "Window area in MAIN window".

Former Member
0 Kudos

ThanQ. But u kept the BOX creation statements under CADY1, and u used this CADY1 under loop! So, Does it not mean that the BOX is created every time for each iteration?

ThanQ,

Sri.

Former Member
0 Kudos

Hi Ren,(Sorry for repetetion)

OK, ThanQ. But, u kept the BOX creation statements under loop! Does it not mean that the BOX is created for each iteration?

ThanQ;

Sri.

Message was edited by:

Srinivas

Former Member
0 Kudos

I put the box in the same window just to show how to create the box. Nevertheless, you may also put it on another window. You may declare a "BOX" window that will display the a table or two anywhere in your form.

Former Member
0 Kudos

OK, Now, I got it.

ThanQ.

Former Member
0 Kudos

No Problem. Goodluck on what you're doing.

Former Member
0 Kudos

Hi Ren,

This is Subramanyam.

I have seen your replays.

Those are very Good & Nice.

I think those are help full for them who are in SAPSCRIPT work.

Keep It Up.

Thanks

amit_khare
Active Contributor
0 Kudos

Check this link -

Regards,

Amit

Reward all helpful replies.