‎2007 Apr 10 11:00 AM
Hi,
Im filtering all the 1099-reportable vendors and based on those vendors i want to update the taxcode and base. for this im using the standard program RFWT0020.
Here im passing the vendor from my program. i.e like
LOOP AT itab2." INTO itab2_temp.
seltab_wa-low = itab2-lifnr.
seltab_wa-sign = 'I'.
seltab_wa-option = 'EQ'.
append seltab_wa to seltab.
SUBMIT RFWT0020 with selection-table seltab with
i_lifnr = itab2-lifnr
with r1 = ' '
with r2 = 'X'
with c1 = ' ' and return.
break-point.
endloop.
here i have one problem.i.e RFWT0020 is having selection screen. i.e default it invoice doc radio button is selected.
my requirement is first run on invoice docs then after run with payment docs. how can we do that using submit.
is it first submit with default i.e invoice then came return after that we run payments docs seperatly?
i want to run this program in background i.e sm36 for period of 3 months.
is it possible to do that different radio buttons in background job.
Please send ur valuble reply,
Thanks,
Srinivas.
‎2007 Apr 10 11:08 AM
Hey,
Why do u want to use both the options for each record?
This will affect the performance of the report. Try and find a the FM used in the std program and use it instead.
But if u are still particular about submitting this to the std report, then change ur code as below.
LOOP AT itab2." INTO itab2_temp.
seltab_wa-low = itab2-lifnr.
seltab_wa-sign = 'I'.
seltab_wa-option = 'EQ'.
append seltab_wa to seltab.
SUBMIT RFWT0020 with selection-table seltab with
i_lifnr = itab2-lifnr
with r_inv = ' '
with r_pay = 'X'
with c1 = ' ' and return.
****do the requierd steps
SUBMIT RFWT0020 with selection-table seltab with
i_lifnr = itab2-lifnr
with r_inv = 'X '
with r_pay = ' '
with c1 = ' ' and return.
break-point.
endloop.Reward points if useful...
Cheers,
Sam
Message was edited by:
Samuel Zakster
‎2007 Apr 10 11:16 AM
Hai,
Write SUBMIT two times once invoice radio = 'X' and next paymnt docs = 'X' and appending passing it through submit in a single loop.
It should solve your problem.Better not to write break-point at the end of the loop as it is running in the back ground..
Reward points if it helps you.
Regds,
Rama chary.Pammi
‎2007 Apr 10 11:20 AM
Hi
As samuel mentioned you have to use submit program twice once for invoice and other for payment depending upon the radio button selected.
But calling the program for each loop will affect the performance tremendously.
Instead of that you create a range and submit the program only once for all the records and then second submit for payment only once for all records.
And dont use breakpoint.
Hope it heps.
Thanks,
Ponraj.s.