‎2014 May 08 9:39 AM
Hi All
I have internal table with two fields
vbeln
fkdat
i have pass that internal table to smartform.
and loop in the table, it is printing all the invoices in one page.......
in smartform i need to print single vbeln and single fkdat per page.
how can i do it ?
********************
Page1
********************
vbeln1
kadat1
*******************
page2
******************
vbeln 2
fkdat 2
.......
rgds
pramod
‎2014 May 08 9:52 AM
inside loop add command(inside end of loop) node and in general attribute select go to new page.
‎2014 May 08 9:46 AM
Hi,
Please try your vbeln specific internal table in your driver program.
use your Smartform FM in inside internal table then this will be printing one by one based on VBELN.
try your driver code like below
'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = w_form
IMPORTING
fm_name = w_fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
others = 3.
if sy-subrc <> 0.
message id sy-msgid type sy-msgty number sy-msgno
with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
endif.
l_output_options-tddest = itcpo-tddest.
if itcpo-tdcopies gt 0.
l_output_options-tdcopies = itcpo-tdcopies.
else.
l_output_options-tdcopies = 1.
endif.
l_output_options-tdimmed = 'X'.
l_control_parameters-langu = nast-spras.
clear: lwa_kunnr.
loop at ltb_kunnr into lwa_kunnr.
call function w_fm_name
exporting
CONTROL_PARAMETERS = l_control_parameters
OUTPUT_OPTIONS = l_output_options
USER_SETTINGS = ' '
wa_kunnr = lwa_kunnr-kunnr
vttkvb = vttkvb
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc <> 0.
l_subrc = sy-subrc.
MESSAGE e000(pais) with 'SmartForm failed; RC=' l_subrc.
endif.
endloop.
Regards,
Prasenjit
‎2014 May 08 9:50 AM
Hi Prasanjith
in my internal table also vbeln specified. what are the conditions i have to put in smartforms.
rgds
pramod
‎2014 May 08 9:53 AM
Hi ,
just pass only one vbeln in inside your smartform then it will be printing like that,
I was one Kunnr at a time in my driver program that time I can print more than one kunnr in seprate page.
you can try to same logic.
Regards,
Prasenjit
‎2014 May 08 9:59 AM
thats true. but i need to pass all the other data to smartform at one time.
but i need to print base by VBELN....
‎2014 May 08 10:13 AM
Hi Pramod,
In driver program you can add VBELN value also and that VBELN value you can validate in inside smartform for all data.
like if you need to print VBELN related value then you can pick only for that VBELN related value in your driver program or in inside your smart form.
Regards,
Prasenjit
‎2014 May 08 10:44 AM
Hi Parsanjith
im new for ABAP, Can u tell me hw can i validate it.
pramod
‎2014 May 08 11:07 AM
Hi ,
In inside layout if you use table then please add where condition otherwise you can filter all VBELN respective data in Gloabl definiton (Initialization) area and add your code in inside initialization.
or
you can pass all filter data from your driver program based on your VBELN field.
Regards,
Prasenjit
‎2014 May 08 9:52 AM
inside loop add command(inside end of loop) node and in general attribute select go to new page.
‎2014 May 08 10:39 AM
‎2014 May 08 10:46 AM
‎2014 May 08 10:56 AM
‎2014 May 08 10:59 AM
use Table Line or Loop in your smartform, after printing values of vbeln/fkdat in your form using TEXT_CONTROL insert NEW_PAGE command.
Thanks,
Ritesh
‎2014 May 08 11:15 AM
hi
new print 11 pages, only header .
not printing the values in main
‎2014 May 08 11:23 AM
hi
thank you very much.
i have done it. but problem is i have 10 order number, it it printing 11 pages.
last page print only header. hw can i fix it...
‎2014 May 08 11:25 AM
Hi,
It means your ITAB is not transferring values to your WORKAREA.
Might be you are not printing data using WORKAREA.
Try to use ITAB loop INTO WA and print values using WORKAREA
Regards,
Ritesh
‎2014 May 08 11:29 AM
Okay..!
Assign total no of records to a global variable using DESCRIBE TABLE and simultaneously count records in loop.
After that check condition in NEW_PAGE
globalvariable NE reccount.
-- Ritesh
‎2014 May 08 11:56 AM
‎2014 May 08 11:56 AM
Hi
Thank u very much.. i have done it,
i marked as correct answer....
rgds
pramod
‎2014 May 08 9:55 AM