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: 

What is the system field for this..?

naveen_inuganti2
Active Contributor
0 Kudos

Hi.....,

I can pass REPORT NAME in sy-cprog...

I can pass TRANS' CODE in si-tcode... in SYST structure...

Where I can pass the Functionmodule or Function Group Names?

Thanks,

Naveen.I

1 ACCEPTED SOLUTION

Former Member
0 Kudos

hiii

There is no System field for getting Fun module name

Check the table TADIR using OBJECT TYPE = FUNC to know the all function module names and check tables TFDIR and DD10INC for program related FM.

regards

twinkal

11 REPLIES 11

former_member181995
Active Contributor
0 Kudos

No chance to pass that

0 Kudos

There is no system field for FM !

Former Member
0 Kudos

Hi

Try sy-repid.

Aditya

Former Member
0 Kudos

U'll pass to the same .. either sy-tcode or sy-cprog ..

Former Member
0 Kudos

hiii

There is no System field for getting Fun module name

Check the table TADIR using OBJECT TYPE = FUNC to know the all function module names and check tables TFDIR and DD10INC for program related FM.

regards

twinkal

former_member181995
Active Contributor
0 Kudos

Naveen,

hope you got your answer there is no system field for same.

but yes you asked Where I can pass the Functionmodule or Function Group Names?

these are the Text Variable for Placeholders in List Headers you can pass here your FM or FG name but for only forbid calculation.

TVAR0

TVAR1

TVAR2

TVAR3

TVAR4

TVAR5

TVAR6

TVAR7

TVAR8

TVAR9

Amit.

vinod_vemuru2
Active Contributor
0 Kudos

Hi Naveen,

If u r in FM source code then sy-repid Gives the function group name. U can check this debug mode.

Not sure whether u can get the FM name.

Because the source code of Fm is stored in include of that function group.

Include name = FG name+U01, 02.....

Here 01, 02 is the number of FM in the group. When ever we create a Fm in a group it creates new include incremented by 1.

Hope it helps..

Thanks,

Vinod.

0 Kudos

Hi.....Friends....

Thanks for your attention....

Actual problem is...

Iam working with sales order creation process by using BAPI.,

Here as you know we hav to pass internal tables with data...in to BAPI function module..

So here first i used report to handle the code for populating that internal tables...

There i got a problem....Showing some pop-up error while excuting that report...

Later I suggested to add this report name in one include program(related to BAPI)..

So i added reportname in that BAPI...with code like following...

> ......sy-cprog = <myreportname>.

So my problem solved.

Now Iam using Function module for this.....

I did the same thing for this,

> ......sy-cprog = <myFMname>.

But still iam not getting the result?( with the same code iam getting succes in report)

Thanks,

Naveen.I

0 Kudos

Hi Naveen,

As i told already FMname wont work here. Because ur source code of is stored in include program.

So pass that include name instead of FM name and check

U can get the include name in the attributes(TAB) of the FM.

Try this and get back.

Thanks,

Vinod.

0 Kudos

Hi....

Thanks to all....

Where ever we want to use FM code as program code there we can go for INCLUDE PROGRAM NAME

or

PROGRAM NAME , which are appear at attributes tab of that function module..

Thanks,

Naveen Inuganti.

0 Kudos

hi check this..

yes you are right...

you can get it from the attributes of the fm using the attrubutes tab