cancel
Showing results for 
Search instead for 
Did you mean: 

How to display the data in tabular format in SAp scripts

Former Member
0 Kudos

Hi All,

i need to display the record in tabular format, but i am not able to do this

here i am trying to print the windows.

Now i want increase the value of Y by 1 , plz tell me how can i do this?

/: DEFINE &Y& = '+2.25'

/: POSITION WINDOW

/: POSITION XORIGIN '0' CH YORIGIN '0.25' LN

/: SIZE WIDTH '10' CH HEIGHT 2 LN

/: BOX FRAME 10 TW

/: POSITION WINDOW

/: POSITION XORIGIN '10' CH YORIGIN '0.25' LN

/: SIZE WIDTH '10' CH HEIGHT 2 LN

/: BOX FRAME 10 TW

/: POSITION WINDOW

/: POSITION XORIGIN '20' CH YORIGIN '0.25' LN

/: SIZE WIDTH '10' CH HEIGHT 2 LN

/: BOX FRAME 10 TW

/: POSITION WINDOW

/: POSITION XORIGIN '30' CH YORIGIN '0.25' LN

/: SIZE WIDTH '15' CH HEIGHT 2 LN

/: BOX FRAME 10 TW

/: POSITION WINDOW

/: POSITION XORIGIN '45' CH YORIGIN '0.25' LN

/: SIZE WIDTH '7' CH HEIGHT 2 LN

/: BOX FRAME 10 TW

/: POSITION WINDOW

/: POSITION XORIGIN '52' CH YORIGIN '0.25' LN

/: SIZE WIDTH '7' CH HEIGHT 2 LN

/: BOX FRAME 10 TW

/: POSITION WINDOW

/: POSITION XORIGIN '59' CH YORIGIN '0.25' LN

/: SIZE WIDTH '17' CH HEIGHT 2 LN

/: BOX FRAME 10 TW

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

ADDRESS Formatting of addresses

BOTTOM, ENDBOTTOM Define footer text in a window

BOX, POSITION, SIZE boxes, lines and shading

CASE, ENDCASE Case distinction

DEFINE Value assignment to text symbols

HEX, ENDHEX Hexadecimal values

IF, ENDIF Conditional text output

INCLUDE Include other texts

NEW-PAGE Explicit forms feed

NEW-WINDOW Next window MAIN

PRINT-CONTROL Insert print control character

PROTECT, ENDPROTECT Protect from page break

RESET Initialize outline paragraphs

SET COUNTRY Country-specific formatting

SET DATE MASK Formatting of date fields

SET SIGN Position of +/- sign

SET TIME MASK Formatting of time fields

STYLE Change style

SUMMING Summing variables

TOP Set header text in window MAIN

check this link

[Removed by the moderator.]

hope this helps,

do reward if it helps,

Answers (2)

Answers (2)

former_member196280
Active Contributor
0 Kudos

It is easier to achieve this then woring out in your scenario.

Try to follow this steps, I guess you will be successful.

1) create a new window similar to main window in dimension,size ,height etc,

2) Palce this new window above the main window

3) Define all your boxs statements in this new window, it will give a feeling of table format... Ex, lines will be coming from this window and text will be coming from main window.

Reward points if useful.

Regards,

Sairam

Former Member
0 Kudos

Hi,

Follow this way ..

Write the perfrom to get the Y value. here increment the Y valuu every time.

Just take element for all these box, then in that element first write the perfrom to get the Y value,

the code in the script would be

/: PERFORM value in program ZTEST
                    Using Y_vaue
                   Changing Y_value.


/: DEFINE &Y& = '+2.25'
/: POSITION WINDOW
/: POSITION XORIGIN '+0' CH YORIGIN Y LN
/: SIZE WIDTH '10' CH HEIGHT 2 LN
/: BOX FRAME 10 TW
/: POSITION WINDOW
/: POSITION XORIGIN '+10' CH YORIGIN Y LN
/: SIZE WIDTH '10' CH HEIGHT 2 LN
/: BOX FRAME 10 TW
/: POSITION WINDOW
/: POSITION XORIGIN '+20' CH YORIGIN Y LN
/: SIZE WIDTH '10' CH HEIGHT 2 LN
/: BOX FRAME 10 TW
/: POSITION WINDOW
/: POSITION XORIGIN '+30' CH YORIGIN Y LN
/: SIZE WIDTH '15' CH HEIGHT 2 LN
/: BOX FRAME 10 TW
/: POSITION WINDOW
/: POSITION XORIGIN '+45' CH YORIGIN Y LN
/: SIZE WIDTH '7' CH HEIGHT 2 LN
/: BOX FRAME 10 TW
/: POSITION WINDOW
/: POSITION XORIGIN '+52' CH YORIGIN Y LN
/: SIZE WIDTH '7' CH HEIGHT 2 LN
/: BOX FRAME 10 TW
/: POSITION WINDOW
/: POSITION XORIGIN '+59' CH YORIGIN Y LN
/: SIZE WIDTH '17' CH HEIGHT 2 LN
/: BOX FRAME 10 TW

Based on the number of records you need to call this element and every call you need increase the Y value to 1.

Regards

Sudheer

Former Member
0 Kudos

Hi Sudheer,

But i am not under standing which is that 'ZTEST' prog.....is it print prog?

I am using SAP standard program as a print program.