cancel
Showing results for 
Search instead for 
Did you mean: 

multiple vendor printing problem

Former Member
0 Kudos

hi am working on a smartform i had to display vendor address and bank details , some time coz of the selections multiple vendors will come what i had to do is , if multiple vendors comes my form has to show the details of the vendor in separate pages like in the first page 1st vendor when they click next, next vendor details if they go for print all the vendor details has to be printed,, i looped my form now am getting the details in seperate pages but .., its showing the first vendor , i had to press back button and again clik on the print screen then the second vendor is comming ....,,, what to do please give me a suggestion.

cheers

uday

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi

create a template in that window where u want to display the vendor details

i thnk ur problem can be solved.

regards

sachhi.

Former Member
0 Kudos

hi thanks a lot

Former Member
0 Kudos

Hi,

Do as follows.

->In driver program select all vendor details into one internal table and all bank details into another internal table.

-> Pass that two internal tables to the smartforms by definining them in the tables tab .

-> In the global definition tab define a variables like below.

G_cnt type sy-index.

g_tcnt type sy-tabix.

-> In the smartform in the initialization tab do as

g_tcnt = lines( vendor table ).

-> In the smartform window where you are displaying the vendor details create a program lines write the code as follows by passing the vendor table as input parameter and get the vendor wa in the out parameters.

g_cnt = g_cnt + 1.

read table vendor table index g_cnt.

-> Now in the window where you are displaying the bank details do as follows.

-> loop the bank table in the where condition put as lifnr = vendor wa- lifnr.

-> after the loop create the command node and select the go to next page check box and select the same page as next page .

Thanks,

NN.