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: 

Execute a function module without going trough se37

Former Member
0 Kudos
859

Hello Experts,

I am building an interface which will allow user to access some function modules without having to go thru se37 (therefore no need to remember module name).

To accessthe program they will just need to click on the push button in the screen explaining wat the FM does.

I want the program to open in a different session than that of my interface.

-- I do not have the option here to attach a transaction code to the FM and call the transsaction code instead of the FM.

Any suggestions?

2 REPLIES 2

madhu_vadlamani
Active Contributor
0 Kudos
125

Hi ,

Check like this.

REPORT ZEX_ABAB4CALLTRANSACTION .

Data: itab_bdc like BDCDATA occurs 0 with header line,

itab_SPAGPA like RFC_SPAGPA occurs 0 with header line ,

itab_messTab like BDCMSGCOLL occurs 0 with header line.

Data: d_sysubrc like sy-subrc.

move: 'AAT' to itab_spagpa-PARID,

'OR' to itab_spagpa-parval.

APPEND itab_spagpa.

CALL FUNCTION 'ABAP4_CALL_TRANSACTION'

EXPORTING

TCODE = 'VA01'

SKIP_SCREEN = 'X'

MODE_VAL = 'A'

UPDATE_VAL = 'A'

IMPORTING

SUBRC = d_sysubrc

TABLES

USING_TAB = itab_bdc

SPAGPA_TAB = itab_SPAGPA

MESS_TAB = itab_messTab

EXCEPTIONS

CALL_TRANSACTION_DENIED = 1

TCODE_INVALID = 2

OTHERS = 3

.

IF SY-SUBRC <> 0.

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

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

ENDIF.

Regards,

Madhu.

kesavadas_thekkillath
Active Contributor
0 Kudos
125

Just write "call transaction SE37 with your functon module name( bdcdata )...Similar to a bdc call.

Kesav