How to use classes in ABAP report

I have classes
1. CL_HRRCF_CANDIDATE_BUPA_BL:-
to get the name of the candiidate
to get the add of the candiidate
to get the telephone no of the candiidate
2. CL_HRRCF_CANDIDATE_INFOTYPE_BL
to get the education data of the candiidate
but i don't know hw to get data from these classes,
so pls help me outwith an example
thanks.

Try this sample code,
  DATA: lr_cdcy                    TYPE REF TO cl_hrrcf_candidacy_bl,
        lr_cand                    TYPE REF TO cl_hrrcf_candidate_bupa_bl,
        stru_requisitions          TYPE if_componentcontroller=>element_requisitions ,
        lt_h_cdcy_list             TYPE rcf_t_list_candidacies_x,
        ls_h_cdcy_list             TYPE rcf_s_list_candidacies_x,
        lt_cdcy_list               TYPE if_componentcontroller=>elements_candidate,
        ls_cdcy_list               TYPE if_componentcontroller=>element_candidate,
        lt_addr                    TYPE rcf_t_addressdata_bp,
        ls_addr                    TYPE rcf_s_addressdata_bp,
        lt_email                   TYPE rcf_t_emaildata_bp,
        ls_email                   TYPE rcf_s_emaildata_bp.
get all declared attributes
  parent_element->get_static_attributes(
    IMPORTING
      static_attributes = stru_requisitions ).
  CALL METHOD cl_hrrcf_candidacy_bl=>get_instance
    RECEIVING
      return = lr_cdcy.
  CALL METHOD cl_hrrcf_candidate_bupa_bl=>get_instance
    RECEIVING
      return = lr_cand.
Hole Kandidatur-Informationen der Kandidaten
  TRY.
      lr_cdcy->get_candidacy_list_x(
        EXPORTING
          ps_req_hrobject  = stru_requisitions-hrobject
   ps_cand_hrobject =
   ps_appl_hrobject =
   p_exclude_draft  = 'x'
        IMPORTING
          pt_candidacies_x = lt_h_cdcy_list
    CATCH cx_hrrcf .
  ENDTRY.
Ergänzen der Informationen mit BusinessPartner-Infos
  LOOP AT lt_h_cdcy_list INTO ls_h_cdcy_list.
    TRY.
        lr_cand->get_contact_data(
          EXPORTING
            ps_cand_hrobject = ls_h_cdcy_list-cand_hrobject
          IMPORTING
            pt_addressdata   = lt_addr
   pt_telefondata   =
   pt_faxdata       =
            pt_emaildata     = lt_email
      CATCH cx_hrrcf .
    ENDTRY.
    READ TABLE lt_addr INDEX 1 INTO ls_addr.
    READ TABLE lt_email INDEX 1 INTO ls_email.
    MOVE-CORRESPONDING ls_h_cdcy_list TO ls_cdcy_list.
    ls_cdcy_list-postcode1 = ls_addr-postl_cod1.
    ls_cdcy_list-city1 = ls_addr-city.
    ls_cdcy_list-email = ls_email-e_mail.
    APPEND ls_cdcy_list TO lt_cdcy_list.
  ENDLOOP.
  CALL METHOD node->bind_table
    EXPORTING
      new_items = lt_cdcy_list.
ENDMETHOD.
Regards,
Pavan

Similar Messages

  • Why and how to use events in abap objects

    Dear all,
      Please explain me why and how to use events in abap objects with real time example
    regards
    pankaj giri

    Hi Pankaj,
    I will try to explain why to use events... How to use is a different topic.. which others have already answered...
    This is same from your prev. post...
    Events :
    Technically speaking :
    " Events are notifications an object receives from, or transmits to, other objects or applications. Events allow objects to perform actions whenever a specific occurrence takes place. Microsoft Windows is an event-driven operating system, events can come from other objects, applications, or user input such as mouse clicks or key presses. "
    Lets say you have an ALV - An editable one ...
    Lats say - Once you press some button  you want some kind of validation to be done.
    How to do this ?
    Raise an Event - Which is handled by a method and write the validation code.
    Now you might argue, that I can do it in this way : Capture the function code - and call the validate method.
    Yes, in this case it can be done.. But lets say .. you change a field in the ALV and you want the validation to be done as soon as he is done with typing.
    Where is the function code here ? No function code... But there is an event here - The data changed event.
    So you can raise a data changed event that can be handled and will do the validation.
    It is not user friendly that you ask the user to press a button (to get the function code) for validation each time he enters a data.
    The events can be raised by a system, or by a program also. So in this case the data changed event is raised by a system that you can handle.
    Also, Lets say on a particular action you want some code to trigger. (You can take the same example of validation code). In this case the code to trigger is in a separate class. The object of which is not available here at this moment. (This case happens very frequently).
    Advantage with events : Event handlers can be in a separate class also.
    e.g : In the middle of some business logic .. you encounter a error. You want to send this information to the UI (to user - in form of a pop up) and then continue with some processing.
    In many cases - A direct method call to trigger the pop up is not done. Because (in ideal cases) the engine must not interact with UI directly - Because the UI could be some other application - like a windows UI but the error comes from some SAP program.
    So - A event is raised from the engine that is handled in the UI and a pop up is triggered.
    Here -- I would have different classes (lets say for different Operating Systems). And all these classes must register to the event ERROR raised in application.
    And these different classes for different Operation systems will have different code to raise a pop-up.
    Now you can imagine : If you coded a pop-up for Windows (in your application logic) .. it will not work for Mac or Linux. But of you raise a event.. that is handled separately by a different UI classes for Win, Linux or Mac  they will catch this event and process accordingly.
    May be I complicated this explanation .... but I couldn't think of a simpler and concrete example.
    Cheers.
    Varun.

  • How to use wildcards in ABAP query where condition?

    Hi,
    Please tell me how to use wildcards in ABAP qurey where condition.
    e.g. select * from mara where matnr = * (wildcard we need to use.
    Thanks & Regards,
    Gaurav T

    Do you want to query asterix * ?
    select * from mara where matnr = '*'.  "then just put it in apstrophes
    or you want certain part of string be used as * ?
    select * from mara where matnr like '%*'  "then use % sign before it
    or maybe you want something like this
    select * from mara where matnr like '%1' . "then it will look for all materials having '1' inside it
    Regards
    Marcin

  • Need samples how to use classes in WebDynpro

    Hi,
    I Need To simple Samples how to use classes in WebDynpro.
    Regards

    Continued....
    and in the model
    right click->create model
    select the radio button import java bean .
    next ADD jars option will be seen
    Browse the jar on the dekstop.
    now add this model to the used models by right clicking on it.
    Now if you go to Data Modeler.
    You will find the used model.
    From there map to the component controller->view Controller.
    And continue with ur coding.
    Hope this helps you.
    Thanks & Regards,
    Lokesh.

  • How to use Class "CL_GUI_CHART_ENGINE" in a abap program ?

    Hi Guys,
    I want to display data in my internal table in the form of a Graph using class "cl_gui_chart_engine".
    I had a look at sample program given by SAP - GRAPHICS_GUI_CE_DEMO but need some help to understand how can we use our own data to be displayed in the graph ? Basically what I am looking for is that where we need to do the changes in creation of XML file so that we can pass our own data ?
    ( perform create_data_demo using l_ixml_data_doc)
    Could you please help me with some sample code or pseudocode ?
    Thanks
    Ashwa

    Thanks Kai,
    I had already done the same thing and got the required output.
    Populate X-Axis ( Categories )
      LOOP AT ITAB.
    Populate Categories
        l_element = p_ixml_doc->create_simple_element(
                  name = 'C' parent = l_categories ).
        l_element->if_ixml_node~set_value( itab-value).
      ENDLOOP.
    Populate Y-Axis ( Values )
      LOOP AT VALUE_TAB.
       l_element = p_ixml_doc->create_simple_element(
                 name = 'S' parent = l_series ).
        l_element->if_ixml_node~set_value( value_tab-value).
      ENDLOOP.
    I am now trying to find the ways to change the default layout of the graph. I guess it should be done in "perform create_custom_demo using l_ixml_custom_doc." . I want that my graph should be displayed as lines instead of bar's.
    Once I achieve this I will share my findings along with sample code with the community.
    I wish I could get some documentation on class "cl_gui_chart_engine" and interfaces like "if_ixml_document".
    Thanks
    Ashwani

  • Fetching Values From JAVA classes into ABAP report

    Hi Experts,
    I have a requirement, in which I need to fetch Java Roles/Groups from  the portal to a ABAP report, for specific users.  The roles inside of our project are not always in sync with the central system.
    I could not find any link with talks about this. Could anybody guide me on how to proceed?
    Regards,
    Trishna

    I have written a report which takes users and specific  roles as the input. Eg, userID :12345  and role/profile :SAP_ALL, SAP_ADMIN..etc in a table. and gives back if the user 12345 has SAP_ALL or not.
    Now I have used RFCs to fetch all the roles for the user from different SAP systems which i further compare .
    What I am unable to do is fetch the portal roles .
    PROBLEM : The portal roles also exist in the central system, but might not be always consistent since they get manually updated in the central system. Hence I want to directly fetch the data from the JAVA Portal.
    WHAT I KNOW : I need to write a JAVA class in NW developer studio which will take the user as the input and give me all the roles/profiles for the same user as output.
    How do I further pass the values to and from  the Java class to my ABAP report?
    I know that I need to use the UME in some way to have this work for me. But since i do not expertize in java I need guidance/steps as to how to proceed.
    Regards
    Trishna

  • How to display barcode in ABAP report

    Hi Experts,
    I want to display the barcode of process order number in ABAP report without using SAP script or smart form. Please let me know how is it possible to display and print the barcode in the ABAP report.
    Thanks in advance.

    Hi,
    Please follow the links below
    Re: Bar Code  Generation in ABAP Report
    Create Barcode in ABAP : conversion to PDF
    also chk the link below, It also gives info about barcodes..
    http://www.mecsw.com/info/appnote/app_024.html
    hope it helps
    Regards,
    Manish

  • How to use the repository; uploading reports from DEV to PROD...

    Hello...
    I'm fairly new to CR-XIr2 (SP3) but have worked with Crystal Reports since v6.0.  I'm trying to figure out how to create a dynamic parameter list that someone can select an item from, which will get sent as an input parameter to the SQL Server 2005 stored proc that populates the report.  I'm also trying to figure out if there's an easy way to copy reports from a DEV environment into PROD.  We have BOE.
    Basically, I would like to find out resources online or in books on how to use the BOE repository for dynamic and/or cascading parameters (i.e. pulling a list of text values & their associated IDs from a lookup table that won't be used in the report), images (i.e. corporate logo), etc..  What complicates things for us is that IT is now requiring us to use a DEV environmentit was really easy when we had unlimited access in PROD!  We also need to put together a process where reports & other repository objects that are copied from DEV to PROD access the correct db, etc.  (Crystal Report in DEV accesses DEV db/repository/etc.when copied to PROD it accesses PROD db/repository/etc.)
    Anyway, I'm just looking for info on where to begin--whether it be a book, a BO/SAP knowledge base article, in-class training from a specific company, etc.  Thanks!

    Hey Markian,
    Can you let me know the process you have followed to migrate from Dev to Prod.
    We can migrate all the reports and objects and database fields through migrate wizard where you can import all the objects, reports and database fields and users to production enterprise.
    Just follow the above scenario and let us know if you are facing any error.
    Try  publish the reports using import wizard and run it in the crystal designer.
    Regards,
    Naveen.

  • How to show Headers in ABAP report

    hii folks,
    plz try to solve my quesions:
    hw to show  two Headers in ABAP report output, like
    eg:
    for first two fields(vendor  A/C no. vendor name ) i have to shw header name like VENDOR  PR. DETAILS & for the nxt following fields(vendor city, state, country)i have to shw VENDOR ADDRESS.(plz gv a exaple)
    2Q) A  INISILIZATION event in report hw many times it triggers.
    3Q) In a ALV report once i double click on a selected record it has to shw its corresponing details.for(DOUBLE CLICK what we use & where i have to defind it)
    thanking u
    sweta.

    1. Please let me know whether it is for Classic list report or ALV.
    2. Initilization is triggered only once when the report is loaded to memmory.
    3.
    3.1.) Declare user_command in events:
    DATA: ls_event type slis_alv_event.
    move 'USER_COMMAND' to ls_event-form.
    append ls_event to gt_events.
    3.2.) Getting cell value ." within the form USER_COMMAND:
    FORM USER_COMMAND USING R_UCOMM LIKE SY-UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    Check function code
    CASE R_UCOMM.
    WHEN '&IC1'. "--> check your own sy-ucomm once you double click the line item
    Check field clicked on within ALVgrid report
    IF RS_SELFIELD-FIELDNAME = 'EBELN'.
    Read data table, using index of row user clicked on
    READ TABLE IT_EKKO INTO WA_EKKO INDEX RS_SELFIELD-TABINDEX.
    ENDIF.
    ENDCASE.
    ENDFORM.
    For More details, please refer to following threads.
    Re: Drill down report
    double click on cell in alv report
    Regards,
    Lijo Joseph
    *reward if useful

  • How to use lexical parameter in report

    i want to use lexical parameter in report and pass parameter from form how it is possible in detail
    A.R

    Hi,
    typically you fill your lexical paramter in the after-paramform-trigger out of the values of your bind-parameters (giving end users directly control over lexical parameters might not be a good idea). Inside PL/SQL a lexical parameter is referenced like bind parameters with ":". In the query it's referenced via "&" and represents a part of the query.
    A simple example.
    - p_deptno as bind parameter
    - p_where as lexical paramter
    - end user choose value for p_deptno (10,20,... or nothing)
    - Trigger: if :p_deptno is not null then
    :p_where := 'WHERE deptno = :p_deptno'
    else
    :p_where := null;
    end if;
    - Query select ... from emp &p_where
    Regards
    Rainer

  • Creation of Generic Data source using function module based on the program which was used to created ABAP report

    Hi,
    We have a requirement to create a BI report based on plant maintenance report. The plant maintenance report is based on a ABAP program with complex logic. My question is i want create a Generic Datasource using Function module and can I include the logic(Abap Program) that is used for plant maintenance report in the function module? Please share your thoughts.
    Thanks,
    Ravi

    Hi,
    Step1-Create a table structure which you need to create same as the fields you require in you data source.
    Step 2-create a custom abap program and inside that call the Client abap program with the selections as required and save the result data in some table
    Step 3-create infoset query.In the infoset query give your table structure name and  program name which you developed.
    Step4-create data source on top of that query

  • How to use Value Variable in Report Painter Column defined as Formula

    Hi Gurus,
    In report painter, how can I add one field (exchange rate) in selection screen, so that user can provide the exchange rate to be used, then execute the report, the exchange rate will used to multiple local currency amount.
    The reason for this is we want use provided exchange rate to convert the amount from once currency to the other currency.
    Alternatively I am studying the functionality of "Value Variable" and found that I can perform the task from this. I have created the value variable but when I am using the variable in Report Painter columns as "&ZVALVAR", system is giving me error. I read the help and it states that use the variable with "&" and do it as it is mentioned.
    Can anybody suggest what I need to do to make it workable.
    Thanks

    I did try using the presentation variable, but that does not work too. I am setting session variable in the dashboard prompt (select 'request variable'). When I use presentation variable, it hard codes the value of the variable name.
    sql is
    select date from work_order where facility = @{p_facility}
    the physical log sql is
    select date from work_order where facility = 'p_facility'

  • How to use structure in ABAP program

    I developing a report in smartforms but i want some fields to be display on the report but unable to find the relvent table as the field is show in structure.i can not find the actual table . is there any specfic way to find the table .or is there any way to use the fields defind in structure in my ABAP program.

    Hi,
      May be iam not clear with the question. But why you want to use structure. In report you can define your own structure, also you can declare your fields directly using standard datatypes.
    Hope this will help!!!
    Amol

  • How to resolve "Internal error: ABAP Report  cannot be loaded" error

    Hi All,
    I am new to SAP.Please help me out from this problem.
    When I am trying to debug BSP page, in debugging mode it shows "Internal error: ABAP Report  cannot be loaded" error and then dumps.
    In transaction ST22 it shows this dump something like this
    Runtime Errors         MESSAGE_TYPE_X
    The current application program detected a situation which really
    should not occur. Therefore, a termination with a short dump was
    triggered on purpose by the key word MESSAGE (type X).
        1 FUNCTION AC_SYSTEM_FLUSH .
        2 *"----
        3 ""Lokale Schnittstelle:
        4 *"  IMPORTING
        5 *"     VALUE(CALLED_BY_SYSTEM) TYPE  C OPTIONAL
        6 *"  EXCEPTIONS
        7 *"      CNTL_SYSTEM_ERROR
        8 *"      CNTL_ERROR
        9 *"----
       10   data: sysubrc like sy-subrc.
       11
       12   CALL FUNCTION 'AC_FLUSH_CALL'
       13        EXPORTING
       14             SYSTEM_FLUSH = 'X'
       15             CALLED_BY_SYSTEM = CALLED_BY_SYSTEM
       16        IMPORTING
       17             MESSAGE_NR   = sysubrc
       18             MESSAGE_TEXT = SY-MSGLI.
       19
       20   sy-subrc = sysubrc.
       21
       22   CASE SY-SUBRC.
       23     WHEN 0.
       24     WHEN 1.
       25 *     system_error
       26       MESSAGE ID 'CNDP' TYPE 'X' NUMBER 007 RAISING CNTL_SYSTEM_ERROR.
       27     WHEN 2.
       28 *     method_call_error
    >>>>>       MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
       30     WHEN 3.
       31 *     property_set_error
       32       MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
       33     WHEN 4.
       34 *     property_get_error
       35       MESSAGE ID 'CNDP' TYPE 'X' NUMBER 006 RAISING CNTL_ERROR.
       36     WHEN OTHERS.
       37       RAISE CNTL_ERROR.
       38   ENDCASE.
       39
       40 ENDFUNCTION.
    Thanks in advance
    Sunil Choudhury

    Hi Sunil,
    The reason for this could be anything, anyways look up for an OSS note with the error message first.
    As a workaround, you can try to use the classic debugger instead of the new ABAP debugger and see if it works.
    You should be logged into SAP via SAP GUI when you are debugging BSP.
    Regards
    Chen

  • How to use RSAN_PROCESS_EXECUTE in abap program

    Hi all,
    Does someone know how to use RSAN_PROCESS_EXECUTE in a abap program to execute an analytical process created in the transaction RSANWB?
    I create a variant 'ZPC_ALIM_DL' for RSAN_PROCESS_EXECUTE. I would like to execute this program with this variant in a background job, but it seems that the job executed but it does nothing.
    See below a part of the code.
    SUBMIT RSAN_PROCESS_EXECUTE
                 WITH VARIANT = 'ZPC_ALIM_DL'
                 USER SY-UNAME VIA JOB L_JOBNM1 NUMBER L_JOBCOUNT1
                 AND RETURN.
    Thanks in advance,
    L.

    Hi Ludovic,
              I am using RSAN_PROCESS_EXECUTE with a variant in process chain. simply include 'abap program' type in process chain mention RSAN_PROCESS_EXECUTE as the program name and mention the variant you created for your apd process and run. I have tested it in dev and it has worked for me. let me know if this helps!
    Thanks
    Suresh R Kovvuru

Maybe you are looking for