Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

File storage on the Application Server

Former Member
0 Kudos
307

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

1 ACCEPTED SOLUTION

nabheetscn
Active Contributor
0 Kudos
162

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

10 REPLIES 10

Former Member
0 Kudos
162

how are you saving the file to app server?

Former Member
0 Kudos
162

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.

0 Kudos
162

and where are u calling the code from?

Former Member
0 Kudos
162

this is being called in the Print Driver program for the defined O/P type.

0 Kudos
162

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..

nabheetscn
Active Contributor
0 Kudos
163

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

Former Member
0 Kudos
162

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.

0 Kudos
162

You need to create a VOFM routine to restrict your output type from triggering.

Nabheet

0 Kudos
162

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.

Former Member
0 Kudos
162

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