Application Development and Automation 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: 
Read only

current date as variant

sudhakar196
Participant
0 Likes
784

Hi

i am having

SELECT-OPTIONS: s_erdat FOR vbak-erdat.

i am getting s_erdat - low value from one table which is from program logic . high value = sy-datun -1.

when you run this program it is coming good.

now, the problem is, i want to crate a variant and run the background job. when ever i run the background job that variant should automatically take values mention from program logic

Message was edited by:

sudhakara reddy

6 REPLIES 6
Read only

Former Member
0 Likes
739

Hi,

In the At selection-screen event write the below code

loop at s_erdat.

s_erdat-high = sy-datum.

modify s_erdat index sy-tabix.

endloop.

Satya.

Read only

Former Member
0 Likes
739

hi,

select-options : v_date for sy-datum.

initialization.

  • get the date from some table and put in variable lv_lowdate.

v_date-low = lv_lowdate.

append v_date.

v_date-high = sy-datum.

append v_date.

rewards if useful,

regards,

nazeer

Read only

varma_narayana
Active Contributor
0 Likes
739

Hi Sudhakar..

This is the Logic.

SELECT-OPTIONS:s_erdat FOR vbak-erdat.

INITIALIZATION.

S_ERDAT-SIGN = 'I'.

S_ERDAT-OPTION = 'BT'.

SELECT SINGLE <DATEFIELD>

FROM <TABLE> INTO S_ERDAT-LOW.

WHERE <COND> .

S_ERDAT-HIGH = SY-DATUM.

APPEND S_ERDAT.

<b>Reward if Helpful.</b>

Read only

Former Member
0 Likes
739

variant values can be retrieved from the TVARVC table. you can set the variant properties to pick up a particular value from this table and then keep a row in this table for the specific value.

Read only

Former Member
0 Likes
739

hi,

selection-screen: begin of block blk1 with frame title text-001.

select-options : s_date for vbak-erdat default ' ' to sy-datum.

selection-screen : end of block blk1.

Reward with points if helpful.

Message was edited by:

Vinutha YV

Read only

Former Member
0 Likes
739

Hi,

Check the below code:

tables: bsad.

select-options:

sdate for bsad-bldat default sy-datum no-extension.

Initialization.

loop at sdate.

sdate-high = sy-datum.

modify sdate index sy-tabix.

endloop

Hope the Info will help you. Reward points if helpful.

With Regards

K K V