2008 Jul 29 1:32 PM
IF sy-subty O print.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
mode = 'BATCH'
no_dialog = 'X'
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
SUBMIT zhterot1 TO SAP-SPOOL
WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS pripar
ARCHIVE PARAMETERS arcpar
* SPOOL PARAMETERS %_print
* ARCHIVE PARAMETERS %_archive
WITH pchplvar = pchplvar
WITH pchotype = pchotype
WITH pchobjid IN pchobji3
WITH pchseark = pchseark
WITH pchobeg = pchobeg
* with PCHZTR_D = PCHZTR_D
* with PCHZTR_M = PCHZTR_M
* with PCHZTR_Y = PCHZTR_Y
* with PCHZTR_A = PCHZTR_A
* with PCHZTR_P = PCHZTR_P
* with PCHZTR_F = PCHZTR_F
WITH pchbegda = pchbegda
WITH pchendda = pchendda
WITH pchwegid = pchwegid
WITH kurs = kurs
WITH kurst = kurst
WITH kugrp = kugrp
WITH pchobji2 IN pchobji2
WITH expand = expand
WITH s_shwfld IN s_shwfld
AND RETURN
.
ELSE.
SUBMIT zhterot1 WITH pchplvar = pchplvar
WITH pchotype = pchotype
WITH pchobjid IN pchobji3
WITH pchseark = pchseark
WITH pchobeg = pchobeg
* with PCHZTR_D = PCHZTR_D
* with PCHZTR_M = PCHZTR_M
* with PCHZTR_Y = PCHZTR_Y
* with PCHZTR_A = PCHZTR_A
* with PCHZTR_P = PCHZTR_P
* with PCHZTR_F = PCHZTR_F
WITH pchbegda = pchbegda
WITH pchendda = pchendda
WITH pchwegid = pchwegid
WITH kurs = kurs
WITH kurst = kurst
WITH kugrp = kugrp
WITH pchobji2 IN pchobji2
WITH expand = expand
WITH s_shwfld IN s_shwfld
AND RETURN
.
ENDIF.
In the above code the Pirnt is having the Default '02'
Now when we place 0 comparision it is going to validate by converting into binary mode ...
So what is expecting is to
when the condition will come true?
what is the use of submit program name calling those spool ?
Could any one having any idea pls revert back asap!
Regards
Sas
2008 Jul 29 3:10 PM
Hi Friend,
The operator O is a byte logical opertaor, it checks after converting into bit.
In your case if SY-SUBTY field contains value 0 or 2 will be true.
After that it is taking the current client's printer setting and other parameters, which is used to pass in submit program.The submit program having some output which is generating the spool.
Hope it will help you.
Regards
Krishnendu
IF sy-subty O print.
CALL FUNCTION 'GET_PRINT_PARAMETERS'
EXPORTING
mode = 'BATCH'
no_dialog = 'X'
IMPORTING
out_archive_parameters = arcpar
out_parameters = pripar
EXCEPTIONS
archive_info_not_found = 1
invalid_print_params = 2
invalid_archive_params = 3
OTHERS = 4
.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
SUBMIT zhterot1 TO SAP-SPOOL
WITHOUT SPOOL DYNPRO
SPOOL PARAMETERS pripar
ARCHIVE PARAMETERS arcpar
* SPOOL PARAMETERS %_print
* ARCHIVE PARAMETERS %_archive
WITH pchplvar = pchplvar
WITH pchotype = pchotype
WITH pchobjid IN pchobji3
WITH pchseark = pchseark
WITH pchobeg = pchobeg
* with PCHZTR_D = PCHZTR_D
* with PCHZTR_M = PCHZTR_M
* with PCHZTR_Y = PCHZTR_Y
* with PCHZTR_A = PCHZTR_A
* with PCHZTR_P = PCHZTR_P
* with PCHZTR_F = PCHZTR_F
WITH pchbegda = pchbegda
WITH pchendda = pchendda
WITH pchwegid = pchwegid
WITH kurs = kurs
WITH kurst = kurst
WITH kugrp = kugrp
WITH pchobji2 IN pchobji2
WITH expand = expand
WITH s_shwfld IN s_shwfld
AND RETURN
.
ELSE.
SUBMIT zhterot1 WITH pchplvar = pchplvar
WITH pchotype = pchotype
WITH pchobjid IN pchobji3
WITH pchseark = pchseark
WITH pchobeg = pchobeg
* with PCHZTR_D = PCHZTR_D
* with PCHZTR_M = PCHZTR_M
* with PCHZTR_Y = PCHZTR_Y
* with PCHZTR_A = PCHZTR_A
* with PCHZTR_P = PCHZTR_P
* with PCHZTR_F = PCHZTR_F
WITH pchbegda = pchbegda
WITH pchendda = pchendda
WITH pchwegid = pchwegid
WITH kurs = kurs
WITH kurst = kurst
WITH kugrp = kugrp
WITH pchobji2 IN pchobji2
WITH expand = expand
WITH s_shwfld IN s_shwfld
AND RETURN
.
ENDIF.
In the above code the Pirnt is having the Default '02'
Now when we place 0 comparision it is going to validate by converting into binary mode ...
So what is expecting is to
when the condition will come true?
what is the use of submit program name calling those spool ?
Could any one having any idea pls revert back asap!
Regards
Sas
2008 Jul 29 3:09 PM
2008 Jul 29 3:10 PM
Hi Friend,
The operator O is a byte logical opertaor, it checks after converting into bit.
In your case if SY-SUBTY field contains value 0 or 2 will be true.
After that it is taking the current client's printer setting and other parameters, which is used to pass in submit program.The submit program having some output which is generating the spool.
Hope it will help you.
Regards
Krishnendu
2008 Jul 30 7:57 AM
Hi Krishna .
Thanks for replying.
But using O it is not converting into bit rather binary mode
the condition not only satisfying for only 0 or 2 but also for 16
some more numbers.
I want to know when it exactlly satisfies any one having the reason pls?
regards
Sas
2008 Jul 29 3:14 PM
hi this is for the spool request to convert into the pdf documents...this is a program using the PCH logical database..
pchplvar is plan version always 01 for current plan
pchotype object type may be O or P or S or C
pchobjid objid means it is may be like pernr
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |