2005 Sep 04 9:13 PM
hi folks,
Now I have added the group field to 'accitab' and as mentioned I have another itable (same as 'accitab') called 'final_accitab where I have the recrods for all the customers and their corresponding group types too.
something like this..
customernumber ........ sortgroup
1000001 1
1000001 1
1000001 1
1000012 1
1000012 1
1000112 1
.
.
.
.
10000002 2
10000002 2
10000002 2
.
.
.
.
10000003 3 and so on
Now I have to print the customers based on the sorting therefore I should be passing the records of all the customers that come under a common sort type into one spool request,( I think that way!!) and how to do that ?
ii)how to print separate statements for each customer
for the same sort within the same spool request.
Thanks in advance
Vinu
hi Max,
Read table customerperiod with key kunnr = final_accitab-zadvertiser.
zzadvertiser = final_accitab-zadvertiser.
icode2 = customerperiod-xausz.
if icode2 = '9'.
exit.
endif.
ZZADVERTISER = final_accitab-zadvertiser.
ZZBUSINESSPARTNER = final_accitab-zagency.
IF FINAL_ACCITAB-ZSORTGROUP <> SORT.
SSFCTRLOP_OPEN-NO_DIALOG = 'X'.
PERFORM CALL_SMARTFORM.
SORT = FINAL_ACCITAB-ZSORTGROUP.
IF NOT E_SSFCOMPOP IS INITIAL.
ENDIF.
IF FL_OPEN = 'X'.
CALL FUNCTION 'SSF_CLOSE'.
MJC20050910 begin
perform write_log.
MJC20050910 end
ENDIF.
E_SSFCOMPOP-TDDEST = 'Xerox1'.
Having an issue here, When I give the printer name as 'Default' it is generating spool requests while If I change the printer name as 'Xerox1' it is not generating any spool requests
E_SSFCOMPOP-TDNEWID = 'X'.
rest looks the same....
CALL FUNCTION 'SSF_OPEN'
EXPORTING
USER_SETTINGS = SPACE
OUTPUT_OPTIONS = E_SSFCOMPOP
CONTROL_PARAMETERS = SSFCTRLOP_OPEN
IMPORTING
JOB_OUTPUT_OPTIONS = SSFCRESOP
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
IF SY-SUBRC = 0.
FL_OPEN = 'X'.
Get print parameter choosen in the first print and
transfer them for next call of fm SSF_OPEN
MOVE-CORRESPONDING SSFCRESOP TO E_SSFCOMPOP.
ENDIF.
ENDIF.
Block open and close of smartform in FM
SSFCTRLOP-NO_OPEN = 'X'.
SSFCTRLOP-NO_CLOSE = 'X'.
*AT NEW Zadvertiser.
zzadvertiser = final_accitab-zadvertiser.
if zzadvertiser ne final_accitab-zadvertiser and zzadvertiser ne ' '.
PERFORM CALL_SMARTFORM.
ENDIF.
Can you tell me what's the problem is?
Thanks
Vinu
2005 Sep 13 8:35 PM
Printer names are case sensitive. Have you checked that?
Srinivas
Message was edited by: Srinivas Adavi
Also, I see that you marked this as answered, but I don't see any points given to Max, who has helped you a lot on this issue. Please reward him for his efforts.
2005 Sep 13 8:46 PM
2005 Sep 13 9:43 PM
Hi Vinu
I agree with Srinivas: check the name of device, are you sure it's Xerox1?
You can try to transfer the name of that printer by dialog (FM SSF_OPEN) and then check the name in debug.
Max
2005 Sep 13 10:00 PM
Hi Vinu,
I saw that you rewarded Max for his effort. I apologize for missing it.
Regards,
Srinivas
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |