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

global parameter in Module function

adil
Participant
0 Likes
755

i create Function Module with P1 as importing parametre . in source code of the Module fuction i call a FROM AA.

the problem that P1 is considerate as local parametre.

i want to use P1 in code of the FORM AA without passing as parametre in FROM.

can anybody help me please?

source of MF Z_SPLIT_LONG_TEXT

**********************************************************************************

FUNCTION Z_SPLIT_LONG_TEXT.

*"----


""Local interface:

*" IMPORTING

*" P1 LIKE TYPE1.

PRFORM AA

ENDFUNCTION.

&----


FORM AAA.

P1 = P1 + I

ENDFORM

5 REPLIES 5
Read only

Former Member
0 Likes
708

Hi.

If you want to have P1 as a global parameter.

first you need to rename your importing parameter to say p2..

then

in SE37->Goto->Main Program.

you would find an Include XXXXXXXXXTOP program

where you can put your declaration.

santhosh

Read only

Former Member
0 Likes
708

hi yassine82

declare ur p1 as reference insteed of like it will work

thanks & regards

snehi chouhan

Read only

Former Member
0 Likes
708

Hi, I understand that you want to define a subroutine inside a function module and want to use the importing parameter. While this being the case, just declare a local variable with in that subroutine definition with using or changing parameters and while calling the routine use your importing parameter.

Regards,

Vijayalakshmi

Read only

adil
Participant
0 Likes
708

I like to see in source code , importing parametr with the word " globale"

like this ( globale interface) instead of 'local interface'

FUNCTION Z_SPLIT_LONG_TEXT.

*"----


**""Globale interface:**

*" IMPORTING

*" VALUE(LIMIET) LIKE ZSPLIT-LIMIET

*" TABLES

*" TE_SPLITSEN STRUCTURE TLINE

*" GESPLITST STRUCTURE ZSPLIT

Edited by: yassine82 on May 2, 2008 5:20 PM

Read only

Sm1tje
Active Contributor
0 Likes
708

Forget about it.

Edited by: Micky Oestreich on May 2, 2008 9:34 PM