Application Development 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: 

Get data from main window

ram_sahoo
Participant
0 Kudos

Hi Expert's,

I have a script issue while i will run that script i am not able to see the line item data in first page which logic written in main window but line data displaying in second page. But my require ment is by design space line item should show in first page remaining should show in second page or next page.but in main window some conditions is there like

if &page& EQ '1'.

/: NEW-PAGE

endif.

So if i will comment this line then i am able to see main window data in first page.but i cannot go to next page.Anybody can help me.

Thanks.

7 REPLIES 7

VenkatRamesh_V
Active Contributor
0 Kudos

Hi ram,

Hope it use full.

Follow syntax.

Create Element with following syntax in script.

/: NEW-PAGE



IN ABAP EDITOR.


call the element whenever you need a contents to be print in next page.



Regards,

Venkat


0 Kudos

Hi Venkat,

Already this /: NEW-PAGE syntax is used in main window the problem is i am not able to see the data from main window in first page but in next page everything is fine,My requirement is the mainwindow data should show in first page as possible space and remaining should show in next page.Can help me for this.

Thanks.

0 Kudos

Hi Ram ,

The number of the records that you can see in main window on a page depends on the main window size . Now , you want to utilize the maximum possible space . Lets us assume that 19 records can fit in you main window depending on you main window size .

Do one thing . Create a variable counter . Assign 1 to COUNTER  initally .

IF  &counter& mod 19 = '0' .

/: NEW-PAGE .

ENDIF .

&counter& = &counter& + 1 .

0 Kudos

Can you explain briefly where i have to put these variables and conditions.

Thanks.

0 Kudos

Hi Ram ,

Variable you will define in your driver program .

And conditions you will write in main window of your script . Through editor .

0 Kudos

Hi ram,

Hope it help full.

try,

Comment the new page syntax and check the output ?. if it is displayed

you should write the logic in abap editor.

Eg: itab contains 9 entries means, you add condition to display last 4 entries in next page.

if sy-tabix GT 5.

Call function write_form

Element       Pages.

in SAP Script.

/E Pages.

/: NEW-PAGE.



Regards,

Venkat.

ram_sahoo
Participant
0 Kudos

Hi,

I have requireemnt in sapscript is to get background grey colour in mainwindow data that discription sholud come dark grey by dynamically means that description can start on a page some time middle and top of page,If it is constant or it will start particular place then it is possibe but its start dynamically,Any one can help me for this requirement.

Thanks.