Report Parameters with logical database

Hello
I have to read some HR infotypes that are provided with the logical database PNPCE.
Fort his i have written a report that will use my logical database and get some information.
What i need,are some new input parameters on the screen that are added by my report:
parameters: p_persnr type person-pernr,
                    p_name type p0002-nachn,
                    p_sname type p0002-vorna.
The problem is that i do not know how to link these parameters to my logical database reading.
When i try to call "get <node>" ,my report is not returning anything.
Is there a way to send  my parameters as selection parameters to the logical database?
thank you

The selection screen 1000 is created dynamically during runtime. I doubt change done by SE51 will solve the issue. In fact there is some code which can help on this.
INITIALIZATION.
To restrict the range of PERNRs
  PERFORM z_seloption_restrict USING 'PNPPERNR'.
*&      Form  Z_Seloption_Restrict
* Restrict range in select option
*      -->VALUE(SOP_NAME)  Name of select option as string
FORM z_seloption_restrict USING value(pv_sop_name).
  IF st_restrict-opt_list_tab[] IS INITIAL.
    CLEAR st_opt_list.
    MOVE: 'EQ' TO st_opt_list-name,
          'X'  TO st_opt_list-options-eq.
    APPEND st_opt_list TO st_restrict-opt_list_tab.
  ENDIF.
  REFRESH : st_restrict-***_tab.
*  READ TABLE st_restrict-***_tab INTO st_asst
*                        WITH KEY name = pv_sop_name.
*  IF sy-subrc NE 0.
  CLEAR st_asst.
  MOVE: 'S'         TO st_asst-kind,
        pv_sop_name TO st_asst-name,
        'I'         TO st_asst-sg_main,
        ' '         TO st_asst-sg_addy,
        'EQ'        TO st_asst-op_main.
  APPEND st_asst TO st_restrict-***_tab.
*  ENDIF.
  CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
    EXPORTING
      restriction = st_restrict.
ENDFORM.                    "Z_Seloption_Restrict

Similar Messages

  • How does works default parameters in a program with logical database PNP?

    Hi Friends,
      I have a basic program, i need to filter info with period parameters in a program that uses logical database PNP, but it doesn't work.
      If i use "person selection period" that it's suposed to filter info according to infotype 0001 (as the sap help says), it doesn't work, i use: PNPBEGPS = today and PNPENDPS = today, and the result it's a lot of registers that doesn't meet that criteria.
      Also i tried with: data selection period, today, up to day, current month. And the result it's with the same problem.
      How does works period parameters in a program with logical database PNP?
    This it's the program example, i use the default category.
    REPORT  ZRPHRTEST.
    tables: pernr.
    infotypes: 0001.
    start-of-selection.
    get pernr.
      write: pernr-pernr, p0001-begda, p0001-endda.
    end-of-selection.
    write 'fin'.

    Hi,
    Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
    Syntax: Tables pernr.
                Get pernr.
    Try, activate and test. This should solve your problem.
    Regards,
    Abhijeet

  • How to get the selection parameters from logical database into one of the t

    Hi Sap ABAP Champians,
    How to get the selection parameters from logical database into one of the tab in the tabstrip selection-screen.
    Please help me for this
    Thanks
    Basu

    Hi
    Thanks, that will work, but then I'll have to insert code into all my reports.
    I can see that "Application Server Control Console" is able to rerun a report.
    This must mean that the Report Server has access to the runtime parameters.
    But how?
    Cheers
    Nils Peter

  • Calling standard program with logical database

    Hi all,
    I am trying to call a standard report (RPTBAL00) from a custom program without displaying the selection screen.  I want to fill some of the select-options programmatically. 
    My code is somethig like this
          submit RPTBAL00
            with pernr-pernr = 'XXX'
            with pernr-pnpbegda = '20020101'
            with pernr-pnpenddaa = '99991231'
                          and return.
    but the report gets called with defaults.
    Does anyone know what I am doing wrong?

    Hi
    I seem your code is right, but I don't understand which elements are filled with default values.
    Anyway this is a little code to submit a report with logical database:
    Co.Ge.
      loop at so_umskz.
        move-corresponding so_umskz to selopt.
        append selopt  to frange-selopt_t.
      endloop.
      if sy-subrc = 0.
        frange-fieldname = 'UMSKZ'.
        append frange to range-frange_t.
      endif.
      refresh frange-selopt_t.
      loop at so_zlsch.
        move-corresponding so_zlsch to selopt.
        append selopt  to frange-selopt_t.
      endloop.
      if sy-subrc = 0.
        frange-fieldname = 'ZLSCH'.
        append frange to range-frange_t.
      endif.
      if not range-frange_t[] is initial.
        range-tablename = 'BSIK'.
        append range to trange.
        call function 'FREE_SELECTIONS_RANGE_2_EX'
          exporting
            field_ranges = trange
          importing
            expressions  = texpr.
      endif.
      submit rfitemap
              with ................
              with free selections texpr and return.
    Max

  • IN HR PAYROLL REPORT USING PNP LOGICAL DATABASE

    Dear abapers,
                            when i ab runing HR payroll report usin PNP Logical database there are some error occurs.
                INCLUDE  DBPNPCOM
                         IN UNICODE PROGRAMS, THE "-" CHARECTOR CAN NOT APPEAR IN NAME , AS IT DOES HERE IN THE NAME
                        PNP-SW-FOUND.
         INCLUDE  DBPNPCOM
                       IN UNICODE PROGRAMS , THE "-" THE CHARECTOR CAN NOT APPEAR  IN NAMES, AS IT DOES HERE IN THE NAME
                       PNP-SW-IGNORELOCKEDRECORDS.
         INCLUDE  DBPNPCOM
                       IN UNICODE PROGRAMS , THE "-" THE CHARECTOR CAN NOT APPEAR  IN NAMES, AS IT DOES HERE IN THE NAME
                       PNP-SW-ENQUEUEPERNR.
                            PLEASE GIVE ME SOLUTIONS .
                                                                         THANK YOU SIR.

    Hi, please check, these might be warnings, not errors.

  • SQVI with logical database

    Dear all,
    While creating SQVI with logical database ( PNPCE - HR Master Record ), I found error at the time of saving
    "Global syntax check
                     -> Selection Criteria
                           -> Error in parameter PYPARAID
                                  -> Statement concluding with "...TYPE" ended unexpectedly. "
    Please Help.
    -Maharshi

    Hello,
    SQ02 Infoset Query
    hope its helps

  • Problem with Logical Database DDF

    Hey All,
    I have a problem with Logical Database DDF.
    In my program I am typing this
    GET KNA1 based on selection screen. It is bringing back everything I want except BRAN1 whereby the field is ''. However in SE16 for KNA1 and for the same KUNNR, the field is populated with 'T180'
    I am not understanding this?! I thought LDB where menat to make things easy!!

    I think it's not used by DDF.
    so you must check it with:
    check kna1-bran1 in s_bran1.
    A.

  • Selection screen for HR report with logical database PNP

    Hi All,
       I am writing a HR report. And I use the logical database PNP. Also I create a HR report category for this report. In the report category, I can define the selection screen field. But all these fields are selection option format. My question is How can I add parameters, radiobutton group and checkbox in the selection screen. Thanks.
    Alex

    Hi Alex,
    Sorry for replying so late. Please try this tutorial:
    w w w. s a p t e c h n i c a l. c o m -> tutorials -> ABAP-HR -> Creating HR Report category in PNP logical database
    Sorry, I put it like this, because direct link doens't let me post the answer. Don't know why.
    It can also be something with your custom code in selection screen. Though it works fine for, try to remove COMMENTs and observe the result. Maybe parameters are overlapping somehow. First try this:
    SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS RefDate type DATS.
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    parameters days type i.
    PARAMETERS spvsr like PA0001-MSTBR.
    selection-SCREEN end of BLOCK blk2.
    If that works together with the report category, try to extend it with adding a selection-screen comment, but do this in reversed order (comment goes first and FOR FIELD addition is supplied) like this:
    SELECTION-SCREEN begin of BLOCK blk2 WITH FRAME TITLE text-002.
    PARAMETERS RefDate type DATS.
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN COMMENT 3(10) text-003 for field bflag.  "FOR FIELD, and goes first
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN COMMENT 16(10) text-004 for FIELD fflag.  "here two
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN end of line.
    parameters days type i.
    PARAMETERS spvsr like PA0001-MSTBR.
    selection-SCREEN end of BLOCK blk2.
    If still not working, see if text-003 and text-004 are not too long (you expect them to be 10 chars), This may somehow affect selection screen.
    You may also try with setting cursor position explicity by:
    SELECTION-SCREEN begin of line.
    SELECTION-SCREEN POSITION 3.
    SELECTION-SCREEN COMMENT (10) text-003 for field bflag. 
    parameter BFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN POSITION 16.
    SELECTION-SCREEN COMMENT (10) text-004 for FIELD fflag.  "here two
    PARAMETER FFlag type c RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN end of line.
    It is really hard to identify where can be a bug as it is working fine for me. Keep trying with different variations, it should finally run with some.
    Regards
    Marcin

  • Position of parameters of a report using a Logical Database

    Hallo all,
    Is there any way that I can make the parameters defined by me in a report to appear <b>before</b> the ones defined by the Logical Database it is using ?
    I searched but I couldn't find something relevant.
    I would like to avoid having to copy and modify the LDB program.
    Thanks

    Here are a couple of things you can do:
    1.  Right-click on the subreport and select "Format Subreport...".  Turn off the borders on the subreport.
    2.  Right-click on the subreport and select "Size and Position".  Set the X and Y coordinates both to 0.  This will place the subreport at the top-left of the section where it's located.
    3.  In the subreport, suppress ALL of the sections that you're not using.
    4.  Make the height of the subreport fairly small - it will expand to the size of the data it contains.
    5.  Put the column labels in the Page Header of the main report, using markers on the ruler to identify the placement of the left side of each column header.  Be sure to line the markers up to a specific "tick mark" on the ruler.
    6.  In the subreport, place markers at the same tick-marks on the rule as you used for the column labels on the main report.  Then align the fields in the subreport with the markers.
    This should get you close to the format you're looking for.  If it's not exact, you can look at the report in Preview and tweak the position of the column labels to match the data in the subreport.
    -Dell

  • ABAP Objects and table processing (with logical databases)

    I have a report that is written right now using procedural abap and a logical database.  The report is structured follows (high level):
    start-of-selection.
    get pernr.
      perform get_it0001 using wtab.
      perform get_it0002 using wtab.
      perform get_it0003 using wtab.
      append wtab to itab.
    end-of-selection.
      call function 'reuse_alv_grid_display'
        exporting
          i_structure_name       = 'itabstructure'
        tables
          t_outtab               = itab.
    So basically I'm going through a bunch of personnel numbers, getting a few infotypes and outputting to ALV.  I don't see where ABAP Objects is going to help me for this particular program. 
    Can somebody show me where OO ABAP would make this easier?  Does it even make sense to use OO when you're processing with a logical database?  (Not just PNP, but any logical database in general).
    Thanks in advance.

    Hello Lee
    I assume that the routines GET_ITnnnn are written by yourself. For reading infotypes ABAP Objects provides us with same very helpful classes as shown below:
    * define data
      DATA:
        gif_employee      type ref to if_pt_employee,
        go_employee       type ref to cl_pt_employee,
        gt_infotypes      TYPE tim_tmw_itlist_tab,
        go_control        TYPE REF TO if_pt_td_control,
        go_data           TYPE REF TO if_pt_td_base,
        go_pnnnn          TYPE REF TO if_pt_td_itnnnn,
        gt_p0001          TYPE TIM_P0001_TAB,
        gt_p0002          TYPE TIM_P0002_TAB,
        gt_p0003          TYPE TIM_P0003_TAB.
    start-of-selection.
    GET pernr.
    <b>* Create employee instance</b>
      gif_employee = cl_pt_employee=>get_employee( pernr ).
      go_employee ?= gif_employee.
    <b>* Get master infotypes (0001, 0002)</b>
      CALL METHOD go_employee->get_master_data
        EXPORTING
          im_begda = id_fromdate
          im_endda = id_todate
        IMPORTING
    *      EX_I0000 =
          EX_I0001 = gt_p0001
          EX_I0002 = gt_p0002
    *      EX_I0007 =
    *      EX_I0008 =
    <b>* Append all other required infotypes to itab</b>
      APPEND '0003' TO gt_infotypes.
      CALL METHOD go_employee->get_infotypes
        EXPORTING
          i_itlist      = gt_infotypes
          i_fromdate    = id_fromdate  " start date
          i_todate      = id_todate    " end date
    *      I_FILTER      =
          i_noauthcheck = 'X'
        IMPORTING
          e_result      = gt_infty_request
          e_retcd       = gd_retcd.
    * Please see documentation of parameter e_retcd...
      LOOP AT gt_infty_request INTO go_control.
        go_data = go_control->data.  <b>" get data object</b>
    *   Casting
        TRY.
            go_pnnnn ?= go_data.
          CATCH cx_sy_move_cast_error.
            CONTINUE.
        ENDTRY.
    <b>*   Convert infotype (semi-transparent -> transparent)</b>
        CALL METHOD cl_hr_pnnnn_type_cast=>prelp_to_pnnnn
          EXPORTING
            prelp = lo_pnnnn->prelp
          IMPORTING
            pnnnn = gs_p0003.
        APPEND gs_p0027 TO gt_p0003.
      ENDLOOP.
    The class CL_PT_EMPLOYEE provides us already with very easy access to so-called master infotypes (000, 0001, 0002, 0007 and 0008). All other infotypes can be read using method GET_INFOTYPES.
    Using these classes we have a very convenient and standardized way of accessing all kinds of infotypes.
    Regards
      Uwe

  • Optimization with logical database

    Hi all.
    I have to optimize a report, and it is using BRM logical database to get data from BKPF and BSEG. Could you say to me if it is the faster way or if it would be better to use a SELECT?
    Thanks a lot.
    Marta.

    Hello Marcin,
    Once I met with statement that good ABAPers don't use direct SELECT statement, at least they shouldn't have to.
    What?? This might be true for HR ABAP, where LDBs are used in abundance
    There are so many standard FMs which cover most of SAP db queries.
    Most of these std. FMs are generally "not released" & are not performance friendly either.The "released" BAPIs (BAPIGET) don't cater to all your requirements.
    I seldom use FMs to fetch the data. I find it easy to implement relevant authority objects & build an optimised SQL construct as per my requirement
    Let me know your comments.
    BR,
    Suhas

  • Problem with logical database DDF in ABAP query

    Hi All,
          I have created an ABAP query via the transaction SQ01 using the logical database DDF to retrieve customer master data from tables KNA1 & KNB1. The selection screen used is the screen 903 of the logical database DDF. But now the problem is that when I execute the query, I am getting a blank value in the tax code4(KNA1-STCD4) field though there is value in the KNA1 table for this particular field. This field was added to the table by means of a customizing include. Can anyone suggest a way to get around this problem so that I can view the content of the field STCD4 in the query.
    Thanks and regards,
    Sarath.

    I think it's not used by DDF.
    so you must check it with:
    check kna1-bran1 in s_bran1.
    A.

  • Problem with logical database ADA

    I am trying to create query with asset values and master data fields but when trying to use logical database ADA I am getting error  No component exists with the name "VALUE0". .InfoSet Cannot be Used for InfoSet Query.
    Does anyone have an idea about such problem?

    Hi,
    The message "No component exists with the name "VALUE0"" created when  you omit to edit the field group only happens if no field is assigned to  a fieldgroup, it should not appear if you add at least one field to a  field group.                                        
    regards Bernhard

  • Copy/create program with logical database

    Hi
    I need to create a program with the same selection-screen as SAP standard program RPRAPA00.
    RPRAPA00 is using a logical database, but even that I have passed in the PNP in the attributes of my own progam, I don't get the selection in the top (buttons, key-date info + selection info).
    The rest of my program looks fine.
    Any ideas how I get the missing selections into the selection-screen?

    Hi,
    Define pernr table under tables statement then and use GET PERNR event.This get event is followed by End-Of-Selection.
    Syntax: Tables pernr.
                Get pernr.
    Try, activate and test. This should solve your problem.
    Regards,
    Abhijeet

  • Problem with logical Database PRHI

    Hello all,
    which table contains the internal structure RPSCO_X ??
    Logical database PRHI
    Profil TPIK3
    I need to display the application of funds. (cokp1 ?)
    Thanks for your help.

    Solved

Maybe you are looking for