Skip to Content
avatar image
Former Member

New Session

I need to call a transaction in a new session when ever a user clicks a customer in basic list.so could any one tell me how to create a new session(external session).i have tried to see the code that is written by SAP to create a new session, but i could'nt find that button in gui status of any screen in SAP and even there is no code in PAI.so could any one tell me how to do that or else please tell me how to see where the code is written for that.

hope to see some replies on this..

bye

yogi raj

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • avatar image
    Former Member
    Mar 11, 2004 at 10:50 AM

    use function module SAPGUI_SET_FUNCTIONCODE

    i.e.

    CALL FUNCTION 'SAPGUI_SET_FUNCTIONCODE'

    EXPORTING

    FUNCTIONCODE = '/OSE80'

    • EXCEPTIONS

    • FUNCTION_NOT_SUPPORTED = 1

    • OTHERS = 2

    .

    Add comment
    10|10000 characters needed characters exceeded

    • Or you can create a Z_CALL_TRANSACTION function and use STARTING NEW TASK addition. ABAP4_CALL_TRANSACTION will not allow you to skip the first screen and fill the batch input data table in release 4.70.. If you need you can use the source code below: (Simple but it works)

      function z_call_transaction.

      *"----


      ""Local interface:

      *" IMPORTING

      *" VALUE(TRANSACTION_CODE) LIKE SY-TCODE

      *" VALUE(I_MODE) LIKE DATATYPE-CHAR0001 DEFAULT 'N'

      *" VALUE(I_UPDATE) LIKE DATATYPE-CHAR0001 DEFAULT 'S'

      *" EXPORTING

      *" VALUE(E_SUBRC) LIKE SY-SUBRC

      *" TABLES

      *" TBDCDATA STRUCTURE BDCDATA

      *" TBDCLOG STRUCTURE BDCMSGCOLL OPTIONAL

      *"----


      if tbdclog is requested.

      call transaction transaction_code using tbdcdata mode i_mode

      update i_update

      messages into tbdclog.

      else.

      call transaction transaction_code using tbdcdata mode i_mode

      update i_update.

      endif.

      e_subrc = sy-subrc.

      endfunction.