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

IS REQUESTED statement

Former Member
0 Likes
8,668

Hi experts,

I would like to know, how is "IS REQUESTED" statement working

The ABAP documentation says:

"The logical expression checks whether an output parameter para of a procedure is requested. The expression is true if at the call an actual parameter was assigned to the formal parameter.

This logical expression is possible only in function modules and methods. "

Is it mean, that If I look at on the function call, then it is determined or not as an export, import parameter?? Maybe I'm wrong, so that's why I'm asking.

5 REPLIES 5
Read only

Former Member
0 Likes
3,904

in the function modules you have import/export/tables etc to be passed or to fetched.

the parameter here has two options : option or not . (u can find that as a check bod in the import/export... tabs in FMs)

if its a optional export parameter,then it may be asked while calling the SF or might not be.

so when a option parameter value is needed that mean FM call has passed some field to it to get the data, then this IS REQUESTED option comes to action. hope you get my point,.

lets say FM XYZ has following things in definition.

import (this u pass from program)
abcd type c optional
defg type  c 

export(this you request from program)
lmn type string 
opqr type string optional.

and your program FM call is:

call function 'XYZ'
exporting
*abcd =     --> no need to pass as its optional
defg = '123' 
importing
lmn = lv_lmn
opqr = lv_pqr ---> this is optional . u may or may not pass.

so from in the FM source code this can be written.

if opqr IS REQUESTED.
    opqr = 'hi there'.
endif.

and you get the value in lv_pqr.

hope you understand my point,

thank you

Somu

Read only

0 Likes
3,904

and one more thing is IS REQUESTED is now obsolete and IS SUPPLIED is now used in place of IS REQUESTED

Read only

0 Likes
3,904

I work in 6.0.

In my case I have this fm: FKK_LINE_ITEMS_WITH_SELECTIONS ( it called in fm: FKK_SAMPLE_0785)

*--


get items according to selection criteria--


CALL FUNCTION 'FKK_LINE_ITEMS_WITH_SELECTIONS'

EXPORTING

i_fkkeposc = i_fkkeposc

i_call_transaction = 'X'

TABLES

t_selhead = t_selhead

t_postab = t_postab_local

EXCEPTIONS

no_items_found = 1

OTHERS = 2.

In FM: FKK_LINE_ITEMS_WITH_SELECTIONS I have a check.

IF T_KPLTAB IS REQUESTED.

GLOBALDATA-KPLTAB = 'X'.

ENDIF.

T_KPLTAB is optional parameter.

I have a check for field T_KPLTAB. If I'm right, it should not set the GLOBALDATA-KPLTAB to 'X'?

In 4.6 it did not set this parameter to X, but in 6.0 It is set to 'X' and I don't know why.

Am I right that the program execution should not set GLOBALDATA-KPLTAB to 'X' according to the function call?

Edited by: mrwhite on Jul 23, 2009 9:43 AM

Read only

0 Likes
3,904

Hello MrWhite,

IS_SUPPLIED or IS_REQUESTED are used just to check if calling program is expecting value back in that particular variable which is pass using optional parameter of some function module.

So, for any optional variable if that variable is provided by calling program as argument then you can check that in

called program by checking if that parameter is supplied or not? and accordingly you can return value for that parameter.

Thanks,

Augustin.

Read only

Former Member
0 Likes
3,904

Thanks for the replies.