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

urgent help in script

Former Member
0 Likes
829

Hi all,

I have a script with 2 pages first and next

i have two main windows 00 and 01 per page.

I have records like

type mat matdes

a 1 abc

b 2 abcd

a 3 abcde

b 4 bggu

I want to display in my script as

type mat matdes --inside a box

a 1 abc

a 3 abcde

type mat matdes --inside a box.

b 2 abcd

b 4 bggu

my requirement is

1)i want a box for type mat matdes headings

2) i wnat to display everything in 1 window i.e main 00 or main 01,

i.e i dont type mat matdes in mianwindow 00

and

b 2 abcd

b 4 bggu

in mainwindow 01.

or

i dont type mat matdes in mianwindow 01 of page first

and

b 2 abcd

b 4 bggu

in mainwindow 00 of page next.

mY CODE IS LIKE

/E ITEM

/: PROTECT

/: IF &TYPE1& NE ' '.

P TYPE Material Description

/: ENDIF.

Q &TYPE1& &MATNR& &MAKTX&

/: ENDPROTECT

tHIS IS MY DRIVER PROGRAM.

LOOP AT ITAB.

CLEAR TYPE.

AT NEW TYPE.

TYPE1 = ITAB-TYPE.

ENDAT.

WRITE_FORM

ITEM

END LOOP.

WHAT I SEE IN MY OUTPUT IS,

1)i DON'T HOW TO WRITE THE CODE FOR BOX, BECAUSE THE YPOS IS DETERMINED BASED ON THE NO OF RECORD FOR EACH TYPE,

2)i GET THE PROTECT END PROTECT WORKING FOR MAIN WINDOW 00 TO MAIN WINDOW 01 IN FIRST PAGE,

BUT IT DOESN'T WORK FOR MAIN WINDOW 01 OF FIRST PAGE TO MAIN WINDOW OF WINDOW 00 OF NEXT PAGE AND

ALSO IT DOESN'T WORK FROM MAIN WINDOW 00 TO MAIN WINDOW 01 OF NEXT PAGE.

the number of items for type may vary some times type a has 4 and some times 5 .

so it varies.

Any help regarding would be greatly appreciated and its bit urgent.

Thanks in advance.

6 REPLIES 6
Read only

Former Member
0 Likes
796

Hi,

use box command as below

/: BOX YPOS '1.0' CM WIDTH '128.0' CH HEIGHT '4.0' CM FRAME 10 TW

Regards

amole

Read only

Former Member
0 Likes
796

write the box in using top and endtop

i think u no the box statement to write

box xpos ypos width intensity

like

Read only

0 Likes
796

Hi all,

Please read carefully,

i know how to write box,

I need box in mainwindow multiple times.

type mat mat des this box

record1

record2.

type mat matdes des again this in box.

record3

record4

record5.

LET ME KNOW IF IAM NOT CLEAR.

I DON'T KNOW THE Y POS OF THE BOX BECAUSE OF VARIABLE NO OF RECORDS.

IS THERE A WAY TO KNOW THE YPOS DURING RUNTIME.

THANKS

Read only

0 Likes
796

Hi any idea on this

Thanks

Read only

Former Member
0 Likes
796

Hi,

Your main window will be in LOOP in the Driver program. Internal table will be passed to the Mainwindow so that the fields will be displayed, here in the Script, write a perform statment,(program name Should be Driver program) and write the form in the friver program and get the No of records in the Internal table, so you will know how many records will be inserted in the main window, so pass that variable to the Y position Dynamically ....

hope you Know how you to write the External perform and how to pass the Varaible in the Scripts

Regards

Sudheer

Read only

Former Member
0 Likes
796

Hello,

According to what I understood.

In script first display the data first and then print the box.

Data should have text element and box should have a text element.

In print program the data text element write_form should be executed first and then the box write_form.

Make ur self clear and let me know.

Regards