‎2006 Feb 06 6:18 PM
Hi,
I have been given a code generated by SAP Quickviewer (transaction SQVI). The client expects me to design an ABAP Report using this code as a guideline. Is this practically possible. I don't even have access to the name of the quickview. No tech spec too.
Some lines of the code: Just to give you guys the feel of it...
REPORT AQL3SYSTQV000116ORDERS_CPR====
LINE-SIZE 253 NO STANDARD PAGE HEADING LINE-COUNT 000(001).
INCLUDE <SYMBOL>.
INCLUDE <ICON>.
SELECTION-SCREEN: BEGIN OF BLOCK PROG
WITH FRAME TITLE TEXT-F58.
%FA00000 /BAY0/AXCMR_AUT2-SUBSTITUTE
TABLES /BAY0/AXCMR_AUT2.
TABLES VBAP.
TABLES VBPA.
TABLES /BAY0/AXCMR_CPR.
*TABLES KNA1.
DATA AVBEGKNA1 LIKE KNA1.
TABLES KNA1.
TABLES VBAK.
DATA %COUNT-VBAK(4) TYPE X.
DATA %LINR-VBAK(2).
-
SELECT VBAKANGDT VBAKAUART VBAKBNDDT VBAKERDAT VBAK~ERNAM
VBAKERZET VBAKKUNNR VBAKVBELN VBAKVKORG VBAP~ABGRU
VBAPARKTX VBAPMATNR VBAPPOSNR VBAPPRODH VBAP~VBELN
/BAY0/AXCMR_CPRKUNAG /BAY0/AXCMR_CPRKUNWE
/BAY0/AXCMR_CPRMATNR /BAY0/AXCMR_CPRPRICE
/BAY0/AXCMR_CPRVKORG VBPAKUNNR VBPAPARVW VBPAVBELN
AVBEGKNA1KUNNR AVBEGKNA1LAND1 AVBEGKNA1NAME1 AVBEGKNA1ORT01
/BAY0/AXCMR_AUT2ML1 /BAY0/AXCMR_AUT2ML2 /BAY0/AXCMR_AUT2~ML3
/BAY0/AXCMR_AUT2ML4 /BAY0/AXCMR_AUT2OBJID
/BAY0/AXCMR_AUT2PRICE /BAY0/AXCMR_AUT2SUBSTITUTE
/BAY0/AXCMR_AUT2VKORG KNA1KUNNR KNA1LAND1 KNA1NAME1
KNA1~ORT01
INTO (VBAK-ANGDT , VBAK-AUART , VBAK-BNDDT , VBAK-ERDAT , VBAK-ERNAM
, VBAK-ERZET , VBAK-KUNNR , VBAK-VBELN , VBAK-VKORG , VBAP-ABGRU
, VBAP-ARKTX , VBAP-MATNR , VBAP-POSNR , VBAP-PRODH , VBAP-VBELN
, /BAY0/AXCMR_CPR-KUNAG , /BAY0/AXCMR_CPR-KUNWE
, /BAY0/AXCMR_CPR-MATNR , /BAY0/AXCMR_CPR-PRICE
, /BAY0/AXCMR_CPR-VKORG , VBPA-KUNNR , VBPA-PARVW , VBPA-VBELN
, AVBEGKNA1-KUNNR , AVBEGKNA1-LAND1 , AVBEGKNA1-NAME1
, AVBEGKNA1-ORT01 , /BAY0/AXCMR_AUT2-ML1 , /BAY0/AXCMR_AUT2-ML2
, /BAY0/AXCMR_AUT2-ML3 , /BAY0/AXCMR_AUT2-ML4
, /BAY0/AXCMR_AUT2-OBJID , /BAY0/AXCMR_AUT2-PRICE
, /BAY0/AXCMR_AUT2-SUBSTITUTE , /BAY0/AXCMR_AUT2-VKORG
, KNA1-KUNNR , KNA1-LAND1 , KNA1-NAME1 , KNA1-ORT01 )
FROM ( VBAK
INNER JOIN VBAP
ON VBAPVBELN = VBAKVBELN
INNER JOIN /BAY0/AXCMR_CPR
ON /BAY0/AXCMR_CPRKUNAG = VBAKKUNNR
AND /BAY0/AXCMR_CPRVKORG = VBAKVKORG
AND /BAY0/AXCMR_CPRMATNR = VBAPMATNR
INNER JOIN VBPA
ON VBPAKUNNR = /BAY0/AXCMR_CPRKUNWE
AND VBPAVBELN = VBAPVBELN
INNER JOIN KNA1 AS AVBEGKNA1
ON AVBEGKNA1KUNNR = /BAY0/AXCMR_CPRKUNWE
INNER JOIN /BAY0/AXCMR_AUT2
ON /BAY0/AXCMR_AUT2PRICE = /BAY0/AXCMR_CPRPRICE
AND /BAY0/AXCMR_AUT2VKORG = /BAY0/AXCMR_CPRVKORG
INNER JOIN KNA1
ON KNA1KUNNR = /BAY0/AXCMR_CPRKUNAG )
WHERE VBAK~ANGDT IN SP$00003
AND VBAK~AUART IN SP$00001
AND VBAK~BNDDT IN SP$00002
AND VBAK~ERDAT IN SP$00004
AND VBAK~ERNAM IN SP$00005
AND VBAP~ABGRU IN SP$00010
AND VBAP~MATNR IN SP$00006
AND VBAP~POSNR IN SP$00007
AND VBAP~PRODH IN SP$00009
AND VBAP~VBELN IN SP$00008
AND /BAY0/AXCMR_CPR~KUNAG IN SP$00016
AND /BAY0/AXCMR_CPR~KUNWE IN SP$00015
AND /BAY0/AXCMR_CPR~MATNR IN SP$00014
AND /BAY0/AXCMR_CPR~PRICE IN SP$00013
AND VBPA~KUNNR IN SP$00011
AND VBPA~PARVW IN SP$00012
AND /BAY0/AXCMR_AUT2~ML1 IN SP$00022
AND /BAY0/AXCMR_AUT2~ML2 IN SP$00021
AND /BAY0/AXCMR_AUT2~ML3 IN SP$00020
AND /BAY0/AXCMR_AUT2~ML4 IN SP$00019
AND /BAY0/AXCMR_AUT2~OBJID IN SP$00018
AND /BAY0/AXCMR_AUT2~SUBSTITUTE IN SP$00017.
%DBACC = %DBACC - 1.
-
Please help with this.
thanks,
Vishal.
‎2006 Feb 08 1:45 PM
Thank you James and Ankur.
The client wants me to add two more fields to the existing ALV output. I have copied the code into a Z program and it executes properly. The client wants me to change the names of all the data objects acc. to the client specs.
I would like to know one more thing... In case I get the name of the quickview that has generated this code, will it help me understand the logic faster? All i know is that quickview will have the tables used, the joins and selection conditions. Can I find any more details that I can use?
Regards,
Vishal.
‎2006 Feb 06 7:16 PM
My advice would be to make sure the client tells you what they want the new ABAP Report to do that is <u>different</u> from the Quickviewer Report. If the client does not have a formal technical spec process, then you at least need to be told verbally or via e-mail what to change. Without that information you cannot proceed with any meaningful development.
Assuming that you can get that information, all you need to do is to create a copy of the Quickviewer program (via SE38) since the Quickviewer program is just a regular ABAP program. Then you must get a feel for what the code is currently doing (understand the logic) so that you can proceed with making the changes required for the new version.
Another approach might be to simply get an understanding of the Quickviewer code and start your own ABAP Report from scratch (using your own preferred style of coding).
Have fun!
Regards,
James Gaddis
‎2006 Feb 07 7:13 AM
Hi Vijay,
What exactly the requirement is. Is it that the client wants to have as many downloads options as this generated programs have.
Then you can surelu copy the code and create a Z report.
Thanks & Regardsm,
Ankur
‎2006 Feb 08 1:45 PM
Thank you James and Ankur.
The client wants me to add two more fields to the existing ALV output. I have copied the code into a Z program and it executes properly. The client wants me to change the names of all the data objects acc. to the client specs.
I would like to know one more thing... In case I get the name of the quickview that has generated this code, will it help me understand the logic faster? All i know is that quickview will have the tables used, the joins and selection conditions. Can I find any more details that I can use?
Regards,
Vishal.
‎2006 Feb 08 3:37 PM
If you know the name of the QuickView, looking at it in transaction SQVI (System-> Services-> QuickViewer) via the Change or Display function you can also see the following:
The fields selected for display (as well as all available fields),
The sort sequence (if any was defined),
The table fields included on the selection screen,
The technical names for all of these fields (use the Shift-F5 function to toggle between technical name and long text).
There may also be some comments listed in the QuickView header that might have some useful information (or not).
These things may indirectly help you understand the logic. To find out the details you'll need to dig into the code.
Regards,
James Gaddis