cancel
Showing results for 
Search instead for 
Did you mean: 

REGARDING NEW PAGE

Former Member
0 Kudos

HI,

i developed a form for mm module,now my reqwuirement is

In form acoording to reservation number(resb-rsnum) the item data(matnr) will be picked.there is no problem for one reservation number but for more than one they wanted a new page for individual reservation numbers(select-options).

in the form i take the event command but its not working please help me.

thanks& regards,

Accepted Solutions (0)

Answers (9)

Answers (9)

Former Member
0 Kudos

Create New text element

/E: TEXT_ELEMENT

/: NEW-PAGE page_name

you have to call this text element in WRITE_FORM in driver program

Former Member
0 Kudos
Former Member
0 Kudos

Hi,

In your driver program, where you are calling the window element corresonding to the Main window of your form you must have called it inside the loop on your internal table. So the at new will be working inside that loop.

example:

loop at tb_material.

  • Write MATERIAL DETAILS AS MAIN contents

call function 'WRITE_FORM'

exporting

element = 'MAIN'

  • 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

  • OTHERS = 9

.

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,

niharika

Former Member
0 Kudos

Hi Ali,

You can write the above code in your main window after you are displaying the table fields.

For example: I ll pick up the code from my main window:

  • MATERIAL QUANTITY PRICE

/

  • &TB_MATERIAL-MATNR&-&TB_MATERIAL-ARKTX&&TB_MATERIAL-FKIMG&

= &TB_MATERIAL-VRKME&&TB_MATERIAL-NETWR&&TB_MATERIAL-WAERK&

/: AT NEW TB_MATERIAL-MATNR.

/: New-Page

/: ENDAT.

I have written the above code with respect to printing "New material on New Page."

Let me know if it worked for you.

Warm regards,

Niharika.

Former Member
0 Kudos

YA.I UNDERSTOOD BRO

am askin where i should write it,the at new control break statement should write only in the loop so how can we write in the form whre we take the loop according to predefined.

waiting for ur reply

Former Member
0 Kudos

Hi Ali,

After the table for items, create a program lines node....

here:

on change of resnum "here resnum is the field

id = 1.

endon.

now create a command node, and then in the conditions tab,give id = 1 and then in the go to new page,give the next page.

VIshwa.

Former Member
0 Kudos

Hi Ali,

You can use the following code

/: At new <itab-field>

/: NEW-PAGE

/: ENDAT.

This command should work for you. Do let me know if it does.

Warm regards,

Niharika.

Former Member
0 Kudos

hi,

the code where should i write it.

regards,

Former Member
0 Kudos

Hi,

plz check this link

http://saptechnical.com/Tutorials/Smartforms/SFMain.htm

Regards,

Madhu

Former Member
0 Kudos

Hi ali,

For individual reservations should on new-page.Create the program lines based on condition of the reservations call a new-page.

Regards,

Sravanthi

Former Member
0 Kudos

THANKS FOR UR REPLY

CAN U GIVE ONE EXAMPLE

REGARDS

Former Member
0 Kudos

Hi,

At the end of MAIN window, Use "Command Line" Node , and Enable the "Go to NEW PAGE" option with the corresponding PAGE.

Regards

GP

Former Member
0 Kudos

use command node at the end of main area in table of main window