cancel
Showing results for 
Search instead for 
Did you mean: 

Each Purchase Requisition should be displayed in different page

former_member230486
Contributor
0 Kudos

Hi Experts,

The requirement is in the header section Purchase Requisition number, Plant one secondary window and Vendor Address is in another secondary window.

The item details Purchase requisition Item no, Quantity, G/L account, and price. I fetched the details from EBAN and EBKN and I have taken one internal table for header section and one internal table for item section in the print program. So I need to display each purchase requisition in different page.

Accepted Solutions (0)

Answers (1)

Answers (1)

jogeswararao_kavala
Active Contributor
0 Kudos

See the output in the picture below:

Here a new page starts with a new value starts for the sorted field of internal table.

And this value alongwith its other related values are printed as a common line above the rows belong to this value. (Shown in the red box).

In your case the PR is this sorted field and which forms the header.

If this is your requirement follow these steps.

Driver program:

Count the internal table lines into a variable c.

Export this variable to the smartform:

as

S_C = C

Smartform

Import C by adding a line 

S_C   TYPE   I

in the interface import tab.

Follow the steps of the screen-shots here (sequence numbered)

I hope you understood that the 'v_qmnum' here is your PR number. and the internal table must be coming from the Driver program by sorted on this.

Declare a variable::

COUNT    TYPE    I

in the Global Definitions.

Now create a 'program line' to the 'Main Window' and do as the picture below.

In the picture below, you have added a 'Command line' to the 'Event on Sort Begin'.

And do as in the picture.

In the picture below shown is the place for Heading of your 'PR' and other details

If this works you can apply the same for your secondary windows etc. Please remember, for requirements like these in smartforms, we need to do experimentation on ourselves to achieve the desired results.

Jogeswara Rao K

former_member230486
Contributor
0 Kudos

Hi Jogeswar,

Thanks for the reply. It does not work for the secondary windows. If I put the conditions as you suggested the first header is displayed, but the first record of item data is not displayed.It is displaying in the next page.

jogeswararao_kavala
Active Contributor
0 Kudos

Please verify the formula given in the command line conditions tab.

Also see whether you are missing the settings in the following screen-shot.

(Perhaps I've missed this in my post earlier)

Jogeswara Rao K

Message was edited by: Jogeswara Rao Kavala

former_member230486
Contributor
0 Kudos

I have already given the page in the general attributes even though it is displayed the first item record as empty and it displayed in the second page.

former_member230486
Contributor
0 Kudos

The navigation tree which I have taken is shown below,

jogeswararao_kavala
Active Contributor
0 Kudos

This is a working model with me.

I feel it is time for trials & experimentation, with these inputs. I'm sure you'd arrive at the solution.

Jogeswara Rao K