‎2014 Sep 04 6:48 PM
Hello,
I am trying to run a program twice a month, on the 1st and on the 15th.
I am setting up two separate variants.
The first variant needs to collect information from the 16th of the previous month up until the time runs at 23:59
The second variant needs to collect data from the 1st to 23:59 on the 15th of the current month.
I tried looking for a parameter that allows these conditions, but it seems to only be linked to working days.
‎2014 Sep 04 9:54 PM
Hi Brett.
Did you use select options?
Could you show the code?
‎2014 Sep 05 2:30 AM
‎2014 Sep 09 7:56 PM
I have tried the options in dynamic date calculation. I just do not know how to select the correct option to pull from the 15th of the previous month.
I only see an option to pull from the nth "working" day of the previous month. The amount of working days will be different in every month.
‎2014 Sep 09 8:26 PM
Hi
you can use tcode STVARV to Create a dynamic variant for it in the Selection Options tab.
or something like given below code . schedule program for 1st of every month . it will update tvarvc table .
REPORT zupdate_tvarv.
TABLES : tvarvc.
DATA : it_tvarvc TYPE STANDARD TABLE OF tvarvc WITH HEADER LINE ,
wa_tvarvc TYPE tvarv .
DATA: end_date TYPE /sapapo/cdps_date_to,
start_date TYPE /sapapo/cdps_date_to,
start_date1 TYPE /sapapo/cdps_date_to,
t_date TYPE /sapapo/cdps_eval_date_from ,
end_month TYPE sy-datum,
month TYPE i .
SELECTION-SCREEN BEGIN OF BLOCK b1.
PARAMETERS : p_datum TYPE sy-datum DEFAULT sy-datum.
SELECTION-SCREEN END OF BLOCK b1.
PERFORM curr_month_start.
MODIFY tvarvc FROM TABLE it_tvarvc.
COMMIT WORK .
*&---------------------------------------------------------------------*
*& Form CURR_MONTH_START
*&---------------------------------------------------------------------*
* text
*----------------------------------------------------------------------*
FORM curr_month_start.
CONCATENATE p_datum+4(2) p_datum(4) INTO t_date .
PERFORM get_period USING t_date CHANGING end_date start_date .
it_tvarvc-name = 'CURR_MONTH_START' .
it_tvarvc-type = 'P'.
it_tvarvc-low = start_date .
APPEND it_tvarvc ." to it_TVARVc.
CLEAR : t_date ,end_date, start_date ,it_tvarvc.
ENDFORM.
‎2014 Sep 10 9:44 PM