on 12-27-2012 11:14 AM
Hi Experts,
I am displaying the invoice data in ALV report with checkbox selection.. i put two user defined buttons like print and print preview. when user select some invoices by checking check box & clicks on print preview button, selected invoice details should be displayed in smart form. it displays fine but my problem is
smart form will call for every 'invoice no.' in loop and print it invoice wise, means when user clicks on print preview by selecting multiple checkboxes , I need all pages(invoice wise like page1,2,3..) in one print preview. I done but for every invoice,i have to press the BACK button. But I need all pages in one preview.
Please go through the following code once.............
WHEN 'PRINT_PRIV'.
loop at t_final into w_final where Check = ' X'.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
FORMNAME = 'ZFORM_6'
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
*
*'/1BCDWB/SF00000609'
CALL FUNCTION FM_NAME
EXPORTING
CONTROL_PARAMETERS = WA_CONTROL
OUTPUT_OPTIONS = WA_OPTOPTIONS
TABLES
T_INVOICE = T_INVOICE
T_ADDRESS = T_ADDRESS
T_JCUST = T_JCUST
T_REM_DT = T_REM_DT
T_ITEM_DATA = T_ITEM_DATA
T_TAX = T_TAX
T_ZTAX = T_ZTAX
T_N_BUYER = T_N_BUYER
T_MAIN = T_MAIN
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5
.
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
endloop.
Can any one please suggest me how to get all the selected invoices by single print preveiw, without going back every time.
Thanks in Advance.
Regards.
Kranthi.
Hi,
The parameters CONTROL_PARAMETERS-NO_OPEN, CONTROL_PARAMETERS-NO_CLOSE
can be used during the call to the smartforms function module for this.
So that the OTF data contain all forms as one document, you can set CONTROL_PARAMETERS-NO_OPEN = ' ' and CONTROL_PARAMETERS-NO_CLOSE = 'X' for the first call to FM_NAME and CONTROL_PARAMETERS-NO_OPEN = 'X' and CONTROL_PARAMETERS-NO_CLOSE = ' ' for the subsequent calls.
Then the OTF data should be combined.
regards,
Aidan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.