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: 

Submit a report program with same selection screen with some values exclude

Former Member
0 Kudos
233

Dear All,

I have to submit a stndard report program from a copied zprogram with same slection screen values ,

and in some slect-options some values will be excluded depending upon the zprogram.

How to make it.

I mean when i submit , same selction screen values should go along with , depending upon some condions i have to exclude some values .

for ex: selection screen from a to b

posting date should go same

but may be along with it i have to pass movem,ent type <> 202 to the submit screen ,.

how to do this?

1 ACCEPTED SOLUTION

bbalci
Contributor
0 Kudos
142

Hello,

Define a local range for the select-options will be different :

RANGES lr_move_type FOR <table>-<field>.

  • include mov type 202

lr_move_type-sign = 'I'.

lr_move_type-option = 'EQ'.

lr_move_type-low = '202'.

COLLECT lr_move_type.

  • exclude mov type 203

lr_move_type-sign = 'I'.

lr_move_type-option = 'NE'.

lr_move_type-low = '203'.

COLLECT lr_move_type.

and submit other program with this range :

SUBMIT <standard_prog>

WITH s_mov_type IN lr_mov_type "<-- your range

WITH s_orher IN s_other. "<-- other select-options going same

Edited by: Bulent Balci on Aug 21, 2010 11:20 AM

20 REPLIES 20

Former Member
0 Kudos
142

Dear All,

I have to submit a stndard report program from a copied zprogram with same slection screen values ,

and in some slect-options some values will be excluded depending upon the zprogram.

How to make it.

I mean when i submit , same selction screen values should go along with , depending upon some condions i have to exclude some values .

for ex: selection screen from a to b

posting date should go same

but may be along with it i have to 'exclude' (its exclude not pass) movem,ent type 202 to the submit screen ,.

how to do this?

bbalci
Contributor
0 Kudos
143

Hello,

Define a local range for the select-options will be different :

RANGES lr_move_type FOR <table>-<field>.

  • include mov type 202

lr_move_type-sign = 'I'.

lr_move_type-option = 'EQ'.

lr_move_type-low = '202'.

COLLECT lr_move_type.

  • exclude mov type 203

lr_move_type-sign = 'I'.

lr_move_type-option = 'NE'.

lr_move_type-low = '203'.

COLLECT lr_move_type.

and submit other program with this range :

SUBMIT <standard_prog>

WITH s_mov_type IN lr_mov_type "<-- your range

WITH s_orher IN s_other. "<-- other select-options going same

Edited by: Bulent Balci on Aug 21, 2010 11:20 AM

Former Member
0 Kudos
142

Hi,

What if i have to pass the movement type also 200 to 250 , with 202 and 203 exluded .

in that case how it will work?

I mean will selct -option as well as range can be given for a same field?

Secondly,

If i have the selction sreen same in both the screen , is it possible to pass the same values as it is with out writing one by one selct-option and parameter?

thanks

0 Kudos
142

Hi Rajendra

>What if i have to pass the movement type also 200 to 250 , with 202 and 203 exluded .

Use BT ( between ) operator for 200 to 250 :

lr_move_type-sign = 'I'.
lr_move_type-option = 'BT'.
lr_move_type-low = '200'.
lr_move_type-high = '250'.
COLLECT lr_move_type.

And use NE ( not equal ) operator to exclude 202 and 203 :


lr_move_type-sign = 'I'.
lr_move_type-option = 'NE'.
lr_move_type-low = '202'.
COLLECT lr_move_type.
lr_move_type-low = '203'.
COLLECT lr_move_type.

It works just this way.

> Secondly,

>

> If i have the selction sreen same in both the screen , is it possible to pass the same values as it is with out writing one by one selct-option and parameter?

No I don't think there is way to do it without writing one by one

but you may not specify for empty select-options.

Edited by: Bulent Balci on Aug 21, 2010 11:46 AM

Former Member
0 Kudos
142

ANY REPLY PLEASE?

0 Kudos
142

Hi Rajendra,

Could u receive my last reply? I hope it could solve the problem.

Former Member
0 Kudos
142

NOW IF I HAVE A SELCT OPTIONS WHERE I HAVE GIVEN FROM 6000 TO 7000

AND SAME FILED I EXCLUDED VALUES 6500 6600 6601 WITH THE HELP OF MULTIPLE SELECTION THEN HOW IT WILL WORK?

WILL IT WORK IN SELCTING 6000 TO 7000 EXCLDING 6500 6600 6601 ?

bUT ITS NOT WRKING LIKE THIS.

THAT IS WILL BOTH SELCT -OPTIONS AND MULTIPLE VALUE WILL WORK FOR A FIELD?

0 Kudos
142

Hi Rejandra,

Sorry for giving wrong information,

I tried on a small example :

You should use like this for excluding values :

lr_move_type-sign = 'E'. "<-- exclude

lr_move_type-option = 'EQ'. "<-- single value

lr_move_type-low = '6500'.

COLLECT lr_move_type.

Now both 6000 - 7000 and excluding 6500 will work.

Former Member
0 Kudos
142

i AM GETTING CONFUSED .

mY REQUIREMENT IS IN SELCTOPTION I SHOULD PASS THE VALUES AS IT IS

E,g: 200-500

BUT I MAY EXCLUDE 300,301 FROM IT FOR THAT WHAT ISHOULD DO ?

REGARDS

0 Kudos
142

Hi,

Just use this code for select option for movement type :

* Between 200 and 500
lr_move_type-sign = 'I'.
lr_move_type-option = 'BT'.
lr_move_type-low = '200'.
lr_move_type-high = '500'.
COLLECT lr_move_type.

* Excluding 300 and 301 :
lr_move_type-sign = 'E'.
lr_move_type-option = 'EQ'.
lr_move_type-low = '300'.
COLLECT lr_move_type.

lr_move_type-option = 'EQ'.
lr_move_type-low = '301'.
COLLECT lr_move_type.


SUBMIT <standard_prog>
WITH s_mov_type IN lr_mov_type "<-- your range
WITH s_other IN s_other. "<-- other select-options going same

Former Member
0 Kudos
142

Hi

Its not working .

tHINK U R NOT GETTING MY QUETSION

I WANT TO KEEP THE SELCT OPTIONS AS IT IS THE CALLING SELCTION OPTION VALUE

ALONG WITH THAT I HAVE TO EXCLUDE SOME VALUES IN TH E CALLED PROGRAM

AM I NEED TO WRITE TWO TIMES LIKE ONE FOR RANGE AND ONE FOR SELCT OPTION

AS

SUBMIT <standard_prog>

WITH s_mov_type IN lr_mov_type "<-- range

WITH s_mov_type IN s_mov_type "<-- sELCT OPTIONS

WITH s_other IN s_other.

REGARDS

0 Kudos
142

Hi,

Now I understand clearly,

Don't use range lr_mov_type here,

just add your exclude values into s_mov_type directly

and use this in submit command :

* Excluding 300 and 301 :
s_mov_type-sign = 'E'.
s_mov_type-option = 'EQ'.
s_mov_type-low = '300'.
COLLECT s_mov_type.
 
s_mov_type-option = 'EQ'.
s_mov_type-low = '301'.
COLLECT s_mov_type

SUBMIT <standard_prog>
WITH s_mov_type IN s_mov_type "<-- sELCT OPTIONS
WITH s_other IN s_other. .

This will exclude 300 and 301 movement types

from select-options user entered in your copied zprogram.

Than u are call original program excluding this values with submit.

Former Member
0 Kudos
142

ONE MORE THING.

IF SELCT OPTION PASSING FROM CALLING PROGRAM IS BLANK

AND I AM DOING WITH S_VENDOR = S_VENDOR.

AS SELECT OPTION IS BLANK ITS COMING BLANK ALSO TO THE CALLED PROGRAM , THAT MENSA ALL VELAUES ARE ALLOEWD(ALL VENDORS IN THIS CASE ), NOW I WANT TO EXCLUDE SOME VENDORS THAN HOW TO DO?

i MEAN SELCT OPTIONS WILL BE BLANK WITH TWO VENDORS EXCLUDED.

HOPE U GOT IT

REGARDS

Former Member
0 Kudos
142

AM I NEED TO CHECK IF SELCT OPTION IS INTIAL THEN PASS RANGE FOR EXCLUDING OR WHAT ?

Former Member
0 Kudos
142

HOW DO I CALL THE SUBMIT ALSO IN THJAT CASE ?

IF SOME ARE INITIAL SELCT OPTIONS FOR THAT AND SOME ARE NOT INTIAL

IF I USE RANGE AND SELCT OPTIONS THAN HOW IT WORKKS?

0 Kudos
142

Hi,

Say S_LIFNR is your select options for vendor,

you can understand if it is blank simply :


IF s_lifnr[] IS INITIAL.
" select option is blank
ELSE.
ENDIF.

And exclude the values with same way in my previous answers.

Than here is the code :


IF s_lifnr[] IS INITIAL.
" select option is blank
s_lifnr-sign = 'E'.
s_lifnr-option = 'EQ'.
s_lifnr-low = lv_vendor1.  "<--Vendor 1 to be excluded
COLLECT s_lifnr.

s_lifnr-low = lv_vendor2. "<--Vendor 2 to be excluded
COLLECT s_lifnr.

ELSE.
ENDIF.

SUBMIT <standard_prog>
WITH s_lifnr IN s_lifnr.

Former Member
0 Kudos
142

iF SELCT OPTION IS INITIAL THEN ITS NOT EXCLUDING WHY?

REGARDS

Former Member
0 Kudos
142

ACTUALLY I DONT WANT TO CHECK WETEHR IT IS INITIAL OR NOT.

IF IT IS INITIAL STILL SOME VALUE SHOULD EXCLUDE

IF IT IS NOT INITAL ALSO STILL SOME VALUE SHOULD EXCLUDE , ALONG WITH THE SELCT OPTION AS IT IS WETHETR IT IS BLANK OR HAVING A VALUE FROM TO.

REGRADS

Former Member
0 Kudos
142

HEY I AM SORRY ITS WORKING

I WAS PASSING WRONGLY.

THNAKS ALOT FOR UR PARALLELY HELP.

0 Kudos
142

Actually

you don't need to check whether it's blank or not

it means

user enters a value to exclude something

and than you are just adding some values to exclude in that select-option too.

You have a certain restriction and user can add some restrictions to it..

Just use this and than submit :

s_lifnr-sign = 'E'.
s_lifnr-option = 'EQ'.
s_lifnr-low = lv_vendor1.  "<--Vendor 1 to be excluded
COLLECT s_lifnr.
 
s_lifnr-low = lv_vendor2. "<--Vendor 2 to be excluded
COLLECT s_lifnr.