Friday, October 16, 2009

Steps to create a ‘Z’ transaction for an ABAP Query




1 Get the name of the ABAP query from SE38.


2 Determine the name of the ABAP program which the query generated.
The format of these program names is: CCXXFFFFFFFFFFFFQQQQQQQQQQQQQQ
Where CC = the constant ‘AQ’
XX = a string which varies depending on the client
FFFFFFFFFFFF = functional area for the query, trailing spaces are replaced with ‘=’.
QQQQQQQQQQQQQQ = Query name, trailing spaces are replaced with ‘=’.
Either build the name yourself, or go to se38 enter ‘AQ*query name*’ and press F4. It will pull back one or more programs, there may be several with different values of XX if this is in more than one client.


3 Create an entry in the table ZCATT_CONVERSION. You can use either transaction SE16 or ZCATRCONV. Populate the columns as follows:
ZCATF_CONV_NAM TXN_TO_PGM
ZCATF_FROM_VAL name of the transaction you want to use
ZCATF_TO_VALUE ABAP QUERY
ZCATF_TO_VAL_TXT The FFFFFFFFFFFFQQQQQQQQQQQQQQ portion of the program name
ZCATF_USER Your ID
ZCATF_TIME Current time
ZCATF_DATE Current date


4 Put the table entry into a transport.


5 Run transaction SE93 to create the transaction. Enter the transaction name and press the create icon.


6 Select the ‘Program and Selection Screen’ radio button. Press enter.


7 For transaction text enter ‘Generic frontend for report writer’. For program enter ‘ZCAUT_TXNSPLIT’. This program will read the table entry created above and determine what program to invoke for the report.


8 Press the save icon.


9 Choose a transportable development class and press the save icon.
10 Add this change to the transport created above.
11 Test the transaction.

No comments:

Post a Comment