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

Using Select-options with function module

manoj_goyal2
Participant
0 Likes
797

Hi Guys,

I have to use select-option with function module

Sample Code:

Select-options: s_pernr for pa0001-pernr

Call function u2018ZABDCu2019

EXPORTING

PARM1 = u2018ABCDu2019

TABLES

T_USER = ITAB.

There are 2 fields in internal table ITAB:

PERNR

LEVEL

From ITAB I only want to work with records with PERNR in select-option parameter S_PERNR.

Thanks,

mini

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
745

Hello,

Do this:


DELETE itab WHERE pernr NOT IN s_pernr.

Regards.

7 REPLIES 7
Read only

Former Member
0 Likes
745

Hi,

can you please elaborate your requirement. Are you importing that table or exporting to the function module?

You want to build the function module or The function module is already existing?

Please put ur requirement in detail.

Regards

Sandeep Reddy

Read only

0 Likes
745

Hi Sandeep,

I am importing the table ITAB and function module is already created in the system. I am just using this FM.

Thanks,

Read only

Former Member
0 Likes
745

Hi

use select pernr level into itab

from perner

where pernr between s_pernr-low s_pernr-high

regards

Vamshi

Read only

Former Member
0 Likes
746

Hello,

Do this:


DELETE itab WHERE pernr NOT IN s_pernr.

Regards.

Read only

Former Member
0 Likes
745

HI we didn't able to get your requirement. Wrote clearly

Read only

former_member787646
Contributor
0 Likes
745

Hi,

Try this.

LOOP AT ITAB WHERE PERNR >= s_pernr-LOW AND PERNR <= s_pernr-HIGH.

  • STATEMENT GOES HERE

ENDLOOP.

Hope it helps you.

Murthy

Read only

Former Member
0 Likes
745

Hi,

If you want to remove all PERNR from ITAB which are not in S_PERNR , then

DELETE ITAB WHERE PERNR NOT IN S_PERNR.

If you want to do some operation in a loop.

LOOP ATV ITAB WHERE PERNR IN S_PERNR.

ENDLOOP.

Reward if helpful.