Skip to Content
0
Former Member
Sep 07, 2010 at 07:27 AM

Other ways to simulate a Transaction?

17 Views

Hi everyones, I'm facing a difficult problem that I cannot solve.

We need to modify a SAP Transaction (for example: "XK01"). So far, we have 2 ways to meet our requirement:

1. Copy Module Pool SAPMF02K to ZSAPMF02K, then edit right on the copy.

2. Create a wrapper screen. it means that we will create a screen similar to screen 100 of SAPMF02K, then we get the information which users entered, pass it to XK01 by using this piece of Code:

PERFORM dynpro USING:
        'X'   'SAPMF02K'        '0100',
        ' '   'RF02K-LIFNR'     rf02k-lifnr,
        ' '   'RF02K-BUKRS'     rf02k-bukrs,
        ' '   'RF02K-EKORG'     rf02k-ekorg,
        ' '   'RF02K-KTOKK'     rf02k-ktokk,
        ' '   'RF02K-REF_LIFNR' rf02k-ref_lifnr,
        ' '   'RF02K-REF_BUKRS' rf02k-ref_bukrs,
        ' '   'RF02K-REF_EKORG' rf02k-ref_ekorg,
        ' '   'USE_ZAV'         use_zav,
        ' '   'BDC_OKCODE'      '/00'.  "Enter

  opt-dismode = 'N'.  "Do not show 
  opt-defsize = 'X'.

  CALL TRANSACTION 'XK01' USING bdc_tab MESSAGES INTO messtab OPTIONS FROM opt.

FORM dynpro USING    dynbegin name value.
  IF dynbegin = 'X'.
    CLEAR bdc_tab.
    MOVE:  name TO bdc_tab-program,
           value TO bdc_tab-dynpro,
           'X'  TO bdc_tab-dynbegin.
    APPEND bdc_tab.
  ELSE.
    CLEAR bdc_tab.
    MOVE:  name TO bdc_tab-fnam,
           value TO bdc_tab-fval.
    APPEND bdc_tab.
  ENDIF.
ENDFORM.

Our customer didn't accept 1st method with those reason:

1. If we copy&modify SAP standard module pool, it may cause some issues when an SAP note is issued with the module pool

2. If we copy&modify SAP standard module pool, it will increase the testing efforts because it is mandatory to test all the functions/menus in all the screens individually.

Then they prefer the second method.

with the second method, we can create a screen with fields and pass data to transaction XK01 successfully, but our problem is that the creation of Menu, Button of XK01 is very difficult and take a lot of effort.

I want to ask if there are any other ways to do the requirement, instead of those 2 methods.

If not, what is the simple way which help me create a wrapper screen that simulate the XK01 screen.

Thankyou very much!!

Regards,

Long

Edited by: dragonking88 on Sep 7, 2010 9:29 AM