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: 

Other ways to simulate a Transaction?

Former Member
0 Kudos

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

4 REPLIES 4

Former Member
0 Kudos

Well in my eyes the fastest, most easy and safest way is to simply modify XK02.

when there is a new release to this module pool, you will notice it in TA SPAU, and take action.

Depending on your requirement you may be even able to do it all with just enhancements.

ThomasZloch
Active Contributor
0 Kudos

Your customer is unusually smart, since he is correctly rejecting option 1.

What exactly is it that you want to modify? Have you investigated all the enhancement options that SAP provides (user exits, screen exits, BADIs, enhancement spots, ...)?

Thomas

0 Kudos

Unfortunately, our customers don't accept modifying.

We need to add some condition check for fields on XK01, for example: mandatory field check,field's data format check...those check perform on SCREEN

0 Kudos

> Unfortunately, our customers don't accept modifying.

This is not so smart, at least as a dogma. My main criteria for acceptable modifications is:

- no standard enhancement technique is available/feasible

- it is low complexity and locally, for example just injecting a call to a Z-method or form where the actual party takes place

- it is being well documented so there is no confusion during the next SPAU

Thomas