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: 

Create new modus with same content which the current modus

Former Member
0 Kudos

Hello,

is there a possibility to create a new modus with the same content as the current modus?

Best Regards,

TomSd

1 ACCEPTED SOLUTION

Former Member
0 Kudos

You may create new mode with the same transaction.

I'm not sure, that you may just "copy-paste" the content from one mode into another.

To create new mode with the same transaction, you may use the following code:

data: l_current_tcode like sy-tcode.

move sy-tcode to l_current_tcode.


    CALL FUNCTION 'TH_CREATE_MODE'
      EXPORTING
        transaktion    = l_current_tcode
        del_on_eot     = 1
*        PARAMETERS     = l_pars
        process_dark   = 'X'
      IMPORTING
*        mode           =  
      EXCEPTIONS
        max_sessions   = 1
        internal_error = 2
        no_authority   = 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.

What transaction do you need to display?

Message was edited by: Cyrill Smirnov

3 REPLIES 3

Former Member
0 Kudos

You may create new mode with the same transaction.

I'm not sure, that you may just "copy-paste" the content from one mode into another.

To create new mode with the same transaction, you may use the following code:

data: l_current_tcode like sy-tcode.

move sy-tcode to l_current_tcode.


    CALL FUNCTION 'TH_CREATE_MODE'
      EXPORTING
        transaktion    = l_current_tcode
        del_on_eot     = 1
*        PARAMETERS     = l_pars
        process_dark   = 'X'
      IMPORTING
*        mode           =  
      EXCEPTIONS
        max_sessions   = 1
        internal_error = 2
        no_authority   = 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.

What transaction do you need to display?

Message was edited by: Cyrill Smirnov

0 Kudos

Hi,

the problem is that i want to take the whole current content from the transaction, f.e. VA01 order creation with all positions ....

Best regards,

TomSd

Former Member
0 Kudos

I think, that it's not possible, unfortunetaly.