2012 Jan 09 9:05 AM
Dear all,
I am trying to transfer the a file to the application server . I have noticed a peculiar behavior ,
when i try to send the Invoice to the application server using the Normal route VF03 and print it , it goes thru fine but when i try to do the same using VF02 , i can see that the each invoice is doubled( stores 2 times).
Can't figure out why?
with rgds
Ranjith Singh
2012 Jan 09 10:55 AM
Check if on change you are also triggering the output and via config of condition records also the output is getting triggered...
Secondly after output has been triggered in vf02 check in Message log do you see one output type or two output types getting triggered.
Nabheet
2012 Jan 09 9:14 AM
2012 Jan 09 9:34 AM
Using the below code
CONCATENATE '/abc/test/' NAST-PARNR '_'
xxxxxx '_' SY-DATUM '_' SY-UZEIT '.pdf'
INTO LV_FILE1.
Convert to xstring
LOOP AT OUT_TAB INTO LS_PDF.
ASSIGN LS_PDF TO <X> CASTING TYPE X.
CONCATENATE LV_PDF <X> INTO LV_PDF IN BYTE MODE.
ENDLOOP.
TRANSLATE LV_FILE1 TO LOWER CASE.
OPEN DATASET LV_FILE1 FOR OUTPUT IN BINARY MODE.
LV_PDF = LV_PDF+0(BYTECOUNT).
TRANSFER LV_PDF TO LV_FILE1.
CLOSE DATASET LV_FILE1.
2012 Jan 09 9:59 AM
2012 Jan 09 10:07 AM
this is being called in the Print Driver program for the defined O/P type.
2012 Jan 09 10:29 AM
in VF02 you are creating a new output message or just clicking issue output to?
see, in VF02 if you are saving the billing document, its possible that the output is repeating. you need to restrict the output not triggering in that case... so 1 for new output message and another is your issue output to functionality
or in VF02, just use issue output to. that would do..
2012 Jan 09 10:55 AM
Check if on change you are also triggering the output and via config of condition records also the output is getting triggered...
Secondly after output has been triggered in vf02 check in Message log do you see one output type or two output types getting triggered.
Nabheet
2012 Jan 10 5:19 AM
Hi Soumyaprakash,
What u said is true , o/p is repeating.
But the user is not ready send the file via VF03 print o/p.
2012 Jan 10 5:21 AM
You need to create a VOFM routine to restrict your output type from triggering.
Nabheet
2012 Jan 10 5:44 AM
so what is the user doing? changing the billing document and saving .. right? this case why does he have to print again? the output by itself will take care of the print.. if your scenario is not this(explain a bit about what he is going exactly), then
for VF02 you need to restrict the output if the billing document is not changed. you need to create a VOFM routine and attach it to the output in nace. inside this routine you need to compare the runtime values with database values. if these are same then keep sy-subrc =4. the output will be ignored in this case.
2012 Jan 10 6:18 AM
Dear both,
thanx for the support. I have found out the problem. The problem was with the Include "RVADOPFO" every time when user send the file to the application server , the spool generated was being over written. So a statement was to be inserted where in the spool generated never appends to the original one.
MOVE : 'X' TO LVS_ITCPO-TDNEWID has to inserted before the 'OPEN_FORM' CALL FUNCTION.
with rgds
Ranjith Singh