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

problem regarding passing value to a function module

Former Member
0 Likes
458

Hi friends i have a senario.

PERVE LIKE T009B-PERIV VALUE 'K4'.

iam using the below function module.

P_GJAHR = S_GJAHR-LOW.

P_POPER = S_POPER-LOW.

CALL FUNCTION 'FIRST_DAY_IN_PERIOD_GET'

EXPORTING

I_GJAHR = P_GJAHR

  • I_MONMIT = 00

I_PERIV = PERVE

I_POPER = P_POPER

IMPORTING

E_DATE = DATE1

EXCEPTIONS

INPUT_FALSE = 1

T009_NOTFOUND = 2

T009B_NOTFOUND = 3

OTHERS = 4

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

actually my problem is as u can see i have

I_PERVE = PERVE

parameter in the function module which basically gets fisical year varaient.

but iam hard coding this value as u can see on the top.

like when i enter company code the fiscal varient should be automatically taken.

how can i do that.

Regards,

priyanka.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
423

I think this data is stored in table T093C

you should have then


parameters : p_ccode type burks.


data : l_periv type t093c-periv.

start-of-selection.

select single periv
from t093c
into l_periv
where bukrs = p_ccode.

2 REPLIES 2
Read only

Former Member
0 Likes
423

Hi,

If you want PERIV value based on company code, you can fetch the value from table T001 into variable GV_PERIV and pass to the FM.

Check the table for T001 for PERIV field.

With Regards,

Dwarakanath.S

Read only

Former Member
0 Likes
424

I think this data is stored in table T093C

you should have then


parameters : p_ccode type burks.


data : l_periv type t093c-periv.

start-of-selection.

select single periv
from t093c
into l_periv
where bukrs = p_ccode.