‎2011 Sep 14 10:16 AM
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?
‎2011 Sep 14 11:00 AM
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.
‎2011 Sep 14 11:21 AM
Just write "call transaction SE37 with your functon module name( bdcdata )...Similar to a bdc call.
Kesav