cancel
Showing results for 
Search instead for 
Did you mean: 

Drawing box in main window of sapscript form

Former Member
0 Kudos

Hi all,

I am developing a script for vendor balance confirmation report, in which I have to provide check boxes to allow the user to select an option.

My problem is if I use the BOX statement to draw the box the alignment keeps changing when the size of vendor address changes.

i.e the boxes moves up and down

I have another reference script in which they used the following statement to draw the box <527>.

Please suggest a way to use statement like this <527>

Thanks,

Rajan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Solved on my own

Former Member
0 Kudos

Hi Rajan,

Regards,

Sravanthi

former_member196280
Active Contributor
0 Kudos

Try it as shown below for drawing dynamic boxes.

Here the code works this way the YORIGIN is incremented by 0.6CM each time it is in the loop thus drawing tables dynamically.

/E TAB

/: POSITION XORIGIN '0.9' CM YORIGIN '+0.6' CM

/: SIZE WIDTH '3.0' CM HEIGHT '0.6' CM

/: BOX FRAME 10 TW.

/: POSITION XORIGIN '3.9' CM

/: SIZE WIDTH '7.3' CM HEIGHT '0.6' CM

/: BOX FRAME 10 TW.

/: POSITION XORIGIN '11.2' CM

/: SIZE WIDTH '2.8' CM HEIGHT '0.6' CM

/: BOX FRAME 10 TW.

/: POSITION XORIGIN '14' CM

/: SIZE WIDTH '2.6' CM HEIGHT '0.6' CM

/: BOX FRAME 10 TW.

/: POSITION XORIGIN '16.6' CM

/: SIZE WIDTH '3.2' CM HEIGHT '0.6' CM

/: BOX FRAME 10 TW

P4 &X_VBAP-KWMENG(C)&,,&X_VBAP- ARKTX&,,&V_TOTALa&,,&V_TOTALb&,,&V_TOTALc&

the driver program's piece of code.

LOOP AT it_vbap INTO x_vbap.

CALL FUNCTION 'WRITE_FORM'

EXPORTING

element = 'TAB'

window = 'MAIN'

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.

Regards,

SaiRam