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

regarding using ranges for parameters

Former Member
0 Likes
796

Hi all,

I have a requirement where i have to get the below using ranges.

Can anyone help me what shuld be done.

• For existing program Z_AVAILABILITY, create parameter selection to run by travel dates. Must have ability to run nightly (travel date range: tomorrow’s date to 60 days later) and weekly (travel date range: 61days after of tomorrow to 6 month after of today’s date).

eventual i have to use this in select statement.

Frnds plzz help me its urgent.

regards,

satish

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
754

Did you check solution which I've sent you yesterday? OR your requirment is something else????

6 REPLIES 6
Read only

Former Member
0 Likes
755

Did you check solution which I've sent you yesterday? OR your requirment is something else????

Read only

0 Likes
754

Hi perez,

I have checked ur solution but my requirement is like i have to use ranges which i have tried the same way as u suggested and got it.

now i m in confusion that how shuld use these ranges in parameters.

and eventually use these in the select statement where condition.

what i have done i m putting through.

<code>

ranges : date1 for sy-datum,

date2 for sy-datum.

date1-sign = 'I'.

date1-option = 'BT'.

date1-low = sy-datum + 1. "tommorrows date

date1-high = sy-datum + 60. "60 days later.

APPEND date1.

date2-sign = 'I'.

date2-option = 'BT'.

date2-low = date1-low + 61. "61days after of tomorrow

CALL FUNCTION 'MONTH_PLUS_DETERMINE'

EXPORTING

months = '6'

olddate = date2-low

IMPORTING

NEWDATE = date2-high.

APPEND date2.

so any help frnd.

regards,

satish

Read only

Former Member
0 Likes
754

Hi,,

first declare ranges like this

ranges:

r_tdlnr for lfa1-lifnr, " Forwarding agent number

r_scacd for lfa1-scacd. " Standard carrier access code.

after that assisgn values into it like this

move: 'I' to r_tdlnr-sign,

'EQ' to r_tdlnr-option,

t_lfa1-lifnr to r_tdlnr-low.

and finally write select statement like this..

select vttk~tknum " Shipment number

vttk~tpbez " Transport description

vttk~tdlnr " Forwarding agent number

vttp~tpnum " Shipment line item

vttp~vbeln " Delivery number

  • vttp~zseq_num " Delivery stage sequence number

into table t_vttk_vttp

from vttk inner join vttp

on vttptknum eq vttktknum

for all entries in t_lips_vbak " for all deliveries

where vttk~tdlnr in r_tdlnr " with valid forwarding agents

plzz reward if it is usefull to u...

Read only

Former Member
0 Likes
754

Any help frnds.

regards,

satish

Read only

0 Likes
754

hi,

field-symbols : <fs> type any,

<type_val> type sy-datum.

assign gv_field to <fs>.

assign (<fs>) to <type_val>.

declare a field symbol like this and populate the ranges value into parameter and the while defaulting the value ,

use the value <type_val>.

Regards,

Sumanjeet.

Read only

Former Member
0 Likes
754

Thnks.....