Calling Java Services from ABAP code
Hi,
How to call Java services (not web service) from ABAP code?
I have a requirement where JAVA team has developed some services that can be called from URL or from a Java application.
Ex: when this URL is executed,
http://localhost:8080/artemis7_802/triton/mycompany.remoteFunctions.RequirementsList.a7x?requestid=3023&requestname=I6PRAO1&skill=SAP&skill=JAVA
It returns a XML file on browser.
And I have no idea about the 2nd way i.e. from Java application!
Now, how can ABAP call these java methods?
I heard that something can be done via maintaining RFC destinations in SM59 to call Java services? Can this be done with my requirement?
Please help.
Thanks and regards,
Amey
Posted it in WD ABAP forum.
Similar Messages
-
Error while calling java program from ABAP
Hi Experts,
We are trying for RFC inbound scenario.
We followed the below blog
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
We are working with SAP JCO 3.0.2
We are getting the error : 'STFC_CONNECTION' could not be found in the server repository.
After I run the Java server program if I execute the RFC destination directly from SM 59 it is showing successful messages.
If I stop the java program then this RFC is failing. Based on this we concluded that RFC to Java connection is working fine.
But as mentioned in blog if we call the RFC Destination from ABAP program it is giving the below error,
'STFC_CONNECTION' could not be found in the server repository.
If we test the RFC destination using RFC_TRUSTED_CHECK standard FM we are getting the below error.
'RFCPING' could not be found in the server repository.
We create the RFC destination of Type : TCP/IP as exactly mention in the blog.
Please help us in resolving this issue.
Thanks
PrincePabi,
Using the RFC connection,we can establish a link between Java and SAP.
Afterwards,hope we can call Java program from ABAP.
Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
DATA: REQUTEXT LIKE SY-LISEL,
RESPTEXT LIKE SY-LISEL,
ECHOTEXT LIKE SY-LISEL.
DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
DATA: RFC_MESS(128).
REQUTEXT = 'HELLO WORLD'.
RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION RFCDEST
EXPORTING
REQUTEXT = REQUTEXT
IMPORTING
RESPTEXT = RESPTEXT
ECHOTEXT = ECHOTEXT
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
IF SY-SUBRC NE 0.
WRITE: / 'Call STFC_CONNECTION SY-SUBRC = ', SY-SUBRC.
WRITE: / RFC_MESS.
ENDIF.
Regards,
Sree -
Is it possible to call web service from ABAP SAP 4.6 c..If yes how
Hi Friends,
Is it possible to call web service from ABAP-SAP 4.6 c..If yes Could you please let me know how.
Thanks in Advance.
Murali Krishna K
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:09 PM
Edited by: Murali Krishna Kakarla on Jan 26, 2008 7:11 PMOlivier CHRETIEN wrote:>
> Hi Terry,
>
> So these function modules must use the SAPHTTPA RFC destination which uses the exe saphttp.exe ?
>
> How much abap code lines do you have for a web service call ?
> Do you have to code the call specifically for each different web service ?
> Are you able to use the WSDL ?
>
> Nice job if you have coded your own private SOAP runtime !
>
> But I don't think this is an easy solution for everybody...
>
> Regards,
>
> Olivier
Yes, SAPHTTPA (runs on application server) and/or SAPHTTP (runs on front-end pc), one of which, is required for HTTP communication. So far, nothing too elaborate as far as SOAP goes, but the logic is simplistic. Here's some sample code:
DEST = 'SAPHTTPA'.
TRANSLATE HOST TO LOWER CASE.
MYURL = 'wssrvTest/Service.asmx/GetByOrderItem'.
CONCATENATE HOST MYURL INTO MYURL.
REQUEST_HEADERS-DATA =
'Content-type: application/x-www-form-urlencoded'.
APPEND REQUEST_HEADERS.
CLEAR REQUEST_HEADERS.
*........Convert Order Number to External Format........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ORDER
IMPORTING
OUTPUT = ORDER.
*........Convert Item Number to External Format.........................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = ITEM
IMPORTING
OUTPUT = ITEM.
*........Convert Material Number to External Format.....................
CALL FUNCTION 'CONVERSION_EXIT_ALPHA_OUTPUT'
EXPORTING
INPUT = MATERIAL
IMPORTING
OUTPUT = MATERIAL.
CONCATENATE 'sOrder=' ORDER
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sItem=' ITEM
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CONCATENATE '&sMaterial=' MATERIAL
INTO REQUEST_BODY-DATA.
APPEND REQUEST_BODY.
CLEAR REQUEST_BODY.
CALL FUNCTION 'HTTP_POST'
EXPORTING
ABSOLUTE_URI = MYURL
RFC_DESTINATION = DEST
BLANKSTOCRLF = 'X'
TABLES
RESPONSE_ENTITY_BODY = RESPONSE_BODY
REQUEST_ENTITY_BODY = REQUEST_BODY
RESPONSE_HEADERS = RESPONSE_HEADERS
REQUEST_HEADERS = REQUEST_HEADERS
EXCEPTIONS
CONNECT_FAILED = 1
TIMEOUT = 2
INTERNAL_ERROR = 3
TCPIP_ERROR = 4
DATA_ERROR = 5
SYSTEM_FAILURE = 6
COMMUNICATION_FAILURE = 7
OTHERS = 8.
CHECK SY-SUBRC = 0. "more appropriate msg goes here
LOOP AT RESPONSE_BODY.
IF RESPONSE_BODY+0(7) <> '<string' AND
RESPONSE_BODY+0(8) <> '</string' AND
RESPONSE_BODY+0(5) <> '<?xml'.
SPLIT RESPONSE_BODY-DATA AT '=' INTO FIELD_NAME FIELD_VALUE.
TRANSLATE FIELD_NAME TO UPPER CASE.
CASE FIELD_NAME.
WHEN 'HEIGHT'.
HEIGHT = FIELD_VALUE.
WHEN 'WIDTH'.
WIDTH = FIELD_VALUE.
WHEN 'LENGTH'.
LENGTH = FIELD_VALUE.
WHEN 'WEIGHT'.
WEIGHT = FIELD_VALUE.
WHEN 'QTY'.
QTY = FIELD_VALUE.
ENDCASE.
ENDIF.
ENDLOOP.
Hope this helps...
Terry
Edited by: Terry West on Feb 4, 2008 3:08 PM -
Calling Java program from ABAP
Hi All,
my ABAP program downloads one file to one folder. Then one Java program is running to Encrypt the file.
Now , they want to call the JAVA program in ABAP, so that they can encrypt the file before downloading.
Is it possible to call a Java program from ABAP ? If Yes, please give me the detailed procedure.
Thanks
pabiPabi,
Using the RFC connection,we can establish a link between Java and SAP.
Afterwards,hope we can call Java program from ABAP.
Below is the sample piece of code to establish RFC connection(link) between Java and SAP.
DATA: REQUTEXT LIKE SY-LISEL,
RESPTEXT LIKE SY-LISEL,
ECHOTEXT LIKE SY-LISEL.
DATA: RFCDEST like rfcdes-rfcdest VALUE 'NONE'.
DATA: RFC_MESS(128).
REQUTEXT = 'HELLO WORLD'.
RFCDEST = 'JCOSERVER01'. "corresponds to the destination name defined in the SM59
CALL FUNCTION 'STFC_CONNECTION'
DESTINATION RFCDEST
EXPORTING
REQUTEXT = REQUTEXT
IMPORTING
RESPTEXT = RESPTEXT
ECHOTEXT = ECHOTEXT
EXCEPTIONS
SYSTEM_FAILURE = 1 MESSAGE RFC_MESS
COMMUNICATION_FAILURE = 2 MESSAGE RFC_MESS.
IF SY-SUBRC NE 0.
WRITE: / 'Call STFC_CONNECTION SY-SUBRC = ', SY-SUBRC.
WRITE: / RFC_MESS.
ENDIF.
Regards,
Sree -
Call Java Program from ABAP Program
Dear all,
In our scenario, we need to let ABAP call services provided by a standalone Java program. From online help I found some overview introduction and I'd make the called program a registered program in a RFC with type "T" (TCP/IP Connection). Can anybody give some concrete documentation? A step-by-step guide would be greatly appreciated.
Best Regards
Jeromecheck this thread
Re: Calling Java API from ABAP using JCo -
How to call java program from ABAP
Hi Experts,
My requirement is to call java programs from ABAP. For that i have set up SAP JCO connection by using this link http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/739. [original link is broken] [original link is broken] [original link is broken] Connection gets sucessfully. After this how to call java program from ABAP as per our requirement. Please help me out.
Also i tried this way also.. but while executing the DOS Command line appear & disappear in few seconds. So couldnt see the JAVA output. Please help me out to call java programs in ABAP..
DATA:command TYPE string VALUE 'D:Javajdk1.6.0_20 injavac',
parameter TYPE string VALUE 'D:java MyFirstProgram'.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
application = command
parameter = parameter
OPERATION = 'OPEN'
EXCEPTIONS
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
OTHERS = 8.
Thanks.This depends on the version of your Netweaver Java AS. If you are running 7.0, you will have to use the Jco framework. The Jco framework is deprecated since 7.1 though. If you want to build a RFC server in 7.1 or higher, it is adviced that you set it up through JRA.
Implement an RFC server in 7.0:
http://help.sap.com/saphelp_nw04/helpdata/en/6a/82343ecc7f892ee10000000a114084/frameset.htm
Implement an RFC server in 7.1 or higher:
http://help.sap.com/saphelp_nwce72/helpdata/en/43/fd063b1f497063e10000000a1553f6/frameset.htm -
Calling Java API from ABAP using JCo (Part 2)
Hello,
This is an additional question to thread Calling Java API from ABAP using JCo
Has anyone managed to get the input parameter value
input.getString("REQUTEXT")
that is being passed from ABAP?
If yes, what kind of setting you need to do? Because when I execute, it has no value.
Thus, the below ECHOTEXT parameter returns blank value:
output.setValue(input.getString("REQUTEXT"),"ECHOTEXT");
When I debug by printing the below line, the input XML is indeed without value:
System.out.println(input.toXML());
Anybody knows how to pass input variable from ABAP to JAVA using JCo?
rgs,
hiroshiHallo Hiroshi,
as far as I can see, you are doing it the right way. The problem might be that the ABAP program does not fill in this parameter because something went wrong in the SAP System.
Have you tried setting a breakpoint (an HTTP session - remote breakpoint) and tried checking step by step if the value is being processed and put into the REQUTEXT field?
Bye,
Sameer -
Calling Java API from ABAP using JCo
I need to call Java API from ABAP & BSP also. For this I have got useful information related to JCo from following blog:
/people/gregor.wolf3/blog/2004/08/26/setup-and-test-sap-java-connector-outbound-connection
But, I am facing one problem. On executing Java program myExample5.java (recommended by Gregor Wolf) from command line I get following error message:
Server JCOSERVER01 changed state from [ STOPPED ] to [ STARTED ]
Exception in server JCOSERVER01:
com.sap.mw.jco.JCO$Exception: (129) JCO_ERROR_SERVER_STARTUP: Server startup failed at Thu Apr 26 13:46:32 IST 2007.
This is caused by either a) erroneous server settings, b) the backend system has
been shutdown, c) network problems. Will try next startup in 1 seconds.
Connect to SAP gateway failed
Connect_PM TPNAME=JCOSERVER01, GWHOST=gateway, GWSERV=3300
LOCATION CPIC (TCP/IP) on local host
ERROR hostname 'gateway' unknown
TIME Thu Apr 26 13:46:32 2007
RELEASE 640
COMPONENT NI (network interface)
VERSION 37
RC -2
MODULE ninti.c
LINE 336
DETAIL NiPGetHostByName2: hostname 'gateway' not found
SYSTEM CALL gethostbyname_r
COUNTER 1.
Can anyone please help me out. Do I need to do any setting?
I'll surely reward points.
Thanks & Regards,
Nilesh KumarHi Nilesh,
From the error i think that the error is with the hostname.
Please enter the the Application Server IP/Hostname.
If you are loggin to SAP System "XX1" from SAP GUI. Then click the change Item tab and see Application server name/IP let say "XX2" for hostname or "xx.xx.xx.xx" for IP.
Replace <i>srv[0] = new Server("gateway","sapgw00","JCOSERVER01",repository);</i>
with <i>srv[0] = new Server("XX2","sapgw00","JCOSERVER01",repository);</i>
If App Server is IP then replace with
<i>srv[0] = new Server("xx.xx.xx.xx","sapgw00","JCOSERVER01",repository);</i>
Let me know if it is throwing any error.
Thanks,
Prashil -
Calling web service from ABAP - version 4.6C
Hi,
I would like to know how to call a web service from ABAP. Version is 4.6C. Any help would be greatly appreciated.
Thank you,
RekhaHi Rekha,
Please go through these..
call web service using ABAP
http://help.sap.com/saphelp_nw04/helpdata/en/a0/da0710b6560a4e80fb94f3f712dfc0/frameset.htm
http://help.sap.com/saphelp_nw04/helpdata/en/e9/ae1b9a5d2cef4ea4b579f19d902871/frameset.htm
Hope these help you!
cheers,
Prashanth -
Hi All,
I need to call a Java function from ABAP. Currently i work on client machine and i have a sample java program with me. What do i need to do in order to execute that Java program from ABAP se38 program?
1. Should i place that java program on server in order to execute?
2. How to maintain RFC Destination in SM59? what is meant by program id and gateway mentioned in in SM59 under create option.
Can some one help me with this regard?
Points will be awarded!!
Thanks in advance,://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/59ef6011-0d01-0010-bfb0-b51381e00509
http://www.erpgenie.com/abap/bapi/example.htm
Reward points if it is useful... -
Calling java class from abap function moduile
Is it possible to call java class from function module.
i am a java guy. my need is to call a java class from a function module in the backend. which in turn performs certain functions.
i would be highly obliged if someone could let me know if this is possible.
regards
Srikumar VHi Srikumar ,
you can call a java webservice in ABAP .
u can call the webservice and via that u can trigger the java class..
Regards
Renu -
JCo Outbound( calling Java Function from ABAP )
HI,
I want to call a JAVA function from ABAP.I have installed the JCo toolkit and included the sapjco.jar file in the classpath of my system.
When i execute the program(Example5.java,provided with sapjco.zip) from the command prompt,it is working fine,the server listens to the calls made from ABAP via RFC destination.
But if i copy the same program in NWDS in a JAVA project,to run it from there as JAVA application,after including the sapjco.jar file in the project JAVA build path,i get the following error,marked by a red cross ,at the head of the program,even before i run it.
<b>This compilation unit indirectly references the missing type com.sap.jdsr.writer.DsrIPassport (typically some required class file is referencing a type outside the classpath)</b>
What changes do i need to make,to run it from NWDS?
I tried to include the sapjcorfc.dll file along with the sapjco.jar in the java build path,but it doesn't help.
Please tell how to solve this issue?
Regards,
Siddharthahello sid,
which jco version are you using?
are you using the same jco lib when running in command
line and in nwds?
if you are, try checking the order of the your classpath.
your jco lib (which you are using in command line) should
come first in order prior to the default libraries in your project.
regards
jo -
What is the use of a proxy client to test web service from ABAP code?
In NW640, we need to create a proxy client to test our web service from a ABAP code.
Why is this so? What is the significance of a proxy client? Is this mandatory? Can we test the webservice from a ABAP code without proxy client?Hi Gopal,
There are two types of proxies that can be generated from ABAP - the client proxy (to call an internet web service) and a server proxy (to communicate with XI). It sounds to me like you are looking for information about the client proxy, if so you can see the following link from SAP Help:
http://help.sap.com/saphelp_nw04s/helpdata/en/e5/a68d10f4eb894087fc9c1c3f9ae433/frameset.htm
Hope this helps.
Sudha -
How to call a transaction from ABAP code
Hi everybody,
How do I run a transaction from my ABAP code?
For example, through my ABAP code, I want to call the ME24 transaction (Maintain Purchase Order).
Thanks for the help,
RoyCALL TRANSACTION
Syntax
CALL TRANSACTION ta { [AND SKIP FIRST SCREEN]
| [USING bdc_tab [bdc_options]] }.
Extras:
1. ... AND SKIP FIRST SCREEN
2. ... USING bdc_tab [bdc_options]
Effect
The statement CALL TRANSACTION calls the transaction whose transaction code is contained in data object ta. The data object ta must be of character type and must contain the transaction code in uppercase letters. If the transaction specified in ta cannot be found, an untreatable exception is triggered. The additions suppress the display of the initial screen and allow you to execute the transaction using a batch input session.
At CALL TRANSACTION the calling program and its data is kept, and after exiting the called transaction, processing is resumed in the calling program after the call.
When the transaction is called, the ABAP program linked with the transaction code is loaded in a new internal session. The session of the calling program is kept. The called program runs in an SAP LUW of its own.
If the called transaction is a dialog transaction, after loading the ABAP program the event LOAD-OF-PROGRAM is triggered and the dynpro defined as initial dynpro of the transaction is called. The initial dynpro is the first dynpro of a dynpro sequence. The transaction is finished when the dynpro sequence is ended by encountering the next dynpro with dynpro number 0 or when the program is exited with the LEAVE PROGRAM statement.
If the called transaction is an OO transaction (as of release 6.10), when loading all programs except class pools the event LOAD-OF-PROGRAM is triggered and then the method linked with the transaction code is called. If the method is an instance method, implicitly an object of the corresponding class is generated and referenced by the runtime environment. The transaction is finished when the method is finished or when the program is exited using the LEAVE PROGRAM statement.
After the end of the transaction call, program execution of the calling program resumes after the CALL TRANSACTION statement.
Note
At the statement CALL TRANSACTION, the authorization of the current user to execute the called transaction is not checked automatically. If the calling program does not execute a check, the called program must check the authorization. To do this, the called program must call function module AUTHORITY_CHECK_TCODE.
Addition 1
... AND SKIP FIRST SCREEN
Effect
This addition suppresses the display of a screen of the initial dynpro of a called dialog transaction. The addition AND SKIP FIRST SCREEN suppresses the first screen under these prerequisites:
For the initial dynpro, in the Screen Painter the own dynpro number must not be specified as the next screen number.
All mandatory input fields of the initial dynpro must be filled completely and with the correct values by the SPA/GPA parameters
If these prerequisites are met, that screen of the dynpro is displayed that is specified in the Screen Painter as the next dynpro of the initial dynpro.
Example
If the static next dynpro of the initial dynpro of the called dialog transaction FLIGHT_TA is not the initial dynpro itself, its screen is suppressed, because its input fields are filled using the SPA/GPA parameters CAR and CON.
DATA: carrid TYPE spfli-carrid,
connid TYPE spfli-connid.
SET PARAMETER ID: 'CAR' FIELD carrid,
'CON' FIELD connid.
CALL TRANSACTION 'FLIGHT_TA' AND SKIP FIRST SCREEN.
Addition 2
... USING bdc_tab [bdc_options]
Effect
Use this addition to pass an internal table bdc_tab of row type BDCDATA from the ABAP Dictionary to a dialog transaction. The additions bdc_options control the batch input processing. When a transaction with addition USING is called, the system field sy-binpt is set to value "X" in the called program - while this transaction is running, no other transaction can be called with this addition.
The internal table bdc_tab is the program-internal representation of a batch input session and must be filled accordingly. The structure BDCDATA has the components shown in the table below.
Component Description
PROGRAM Name of the program of the called transaction
DYNPRO Number of the dynpro to be processed
DYNBEGIN Flag for the beginning of a new dynpro (possible values are "X" and " ")
FNAM Name of a dynpro field to be filled or batch input control statement, for example, to position the cursor
FVAL Value to be passed to the dynpro field or to the control statement
Using the internal table bdc_tab, you can provide any number of screens of the called transaction with input and user actions.
System Fields
sy-subrc Description
0 The batch input processing of the called transaction was successful.
< 1000 Error in the called transaction. If within the transaction a message was sent, you can receive it using the addition MESSAGES.
1001 Error in batch input processing.
Note
Outside of ABAP Objects you can specify the additions AND SKIP FIRST SCREEN and USING together. However, this does not make sense, because the addition AND SKIP FIRST SCREEN is desigend only to fill the mandatory input fields using SPA/GPA parameters, while the batch input table specified with USING controls the entire transaction flow including the display of the screens.
Example
Call of the Class Builder (transaction SE24) and display of class CL_SPFLI_PERSISTENT. The internal table bdcdata_tab contains the input for the batch input processing of the first dynpro (1000) of the transaction. Using structure opt, the batch input processing is set to suppress the first screen and to display the next screen in the standard size.
DATA class_name(30) TYPE c VALUE 'CL_SPFLI_PERSISTENT'.
DATA: bdcdata_wa TYPE bdcdata,
bdcdata_tab TYPE TABLE OF bdcdata.
DATA opt TYPE ctu_params.
CLEAR bdcdata_wa.
bdcdata_wa-program = 'SAPLSEOD'.
bdcdata_wa-dynpro = '1000'.
bdcdata_wa-dynbegin = 'X'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_CURSOR'.
bdcdata_wa-fval = 'SEOCLASS-CLSNAME'.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'SEOCLASS-CLSNAME'.
bdcdata_wa-fval = class_name.
APPEND bdcdata_wa TO bdcdata_tab.
CLEAR bdcdata_wa.
bdcdata_wa-fnam = 'BDC_OKCODE'.
bdcdata_wa-fval = '=CIDI'.
APPEND bdcdata_wa TO bdcdata_tab.
opt-dismode = 'E'.
opt-defsize = 'X'.
CALL TRANSACTION 'SE24' USING bdcdata_tab OPTIONS FROM opt. -
hi,
I have VC++ code.
I want to run java program from VC++ (SDK).
Can I call it?
plz help it's urgent....
thanks in advance...We do it all the time using the JNI invocation API (this is actually how the java.exe application works).
Here's a tutorial I just found (not sure how good it is, but it should get you going):
http://www.inonit.com/cygwin/jni/invocationApi/
One note: If you are going to be invoking the JVM from different threads in your native app, there is some special handling you will have to do - the above tutorial doesn't address this scenario (a dig through the JNI docs should help with that one, though).
Cheers,
- K
Maybe you are looking for
-
RAID problems, cant choose my system HD
hi there i recently added an old 40GB HD to my AGP Powermc G4, whose system HD is 80 GB (15GB left) i wanted to join the two together in a striped RAID set-up so that things like iMovie run faster, but when i use disk utility and it prompts me to dra
-
Eastern European characters in PDF report
Hi. I have successfully integrate Apache FOP into APEX as per http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html document. The only problem (for now) I have is displaying eastern european characters in
-
Why can't I scroll using the scroll wheel
Today (01/31) I installed my new computer (HP h9-1180 Phoenix). I'm connected to a home network with two computers (#1 new, #2 old, and laptop). For some reason, no matter what mouse I use, I'm unable to scroll using the scroll wheel. If I want to sc
-
so i did a software update on my X, and after all said and done it was fine till i tried to get a new app and found that the marketplace would not open anymore because the app for the marketplace was gone, the icon was still there but it would just b
-
Hi, I have developed a report where I need to display 2 types of report. Hierarchical and Grid. Both the Hierarchical and Grid has variants. Now user can be able to select a variant from the selection screen for both types(Hierarchical and Grid). How