Abap query: Create selections for extras field

Hi,
I have a custom query and Infosets where I have defined customer fields in Extras tab (infosets).
Now I want create (into Infosets) a selections field (select-options) to filter the extras field created but I receive message AQ120 that say I can't do that !
You know some trick to do this ?
(I don't have any database table to join with selections)
Thanks,
Daniels

Hi
U can use the extrafield in the selection-screen of the query, why do u need to create a SELECT-OPTION in the infoset?
Max

Similar Messages

  • Should I create setters for static fields ?

    Hi all,
    I don't know if here is the right forum for this question, but I'd like to know if is recommended to create setters for static fields of a class or if I can directly assign a value to those fields.
    Thanks.

    No question, you can assign to static fields, it's more a question of style and thoughts about future requirements. At some point in the future maybe you'll want such setting to have side effects. Personally I think using getters and setters everywhere (even on isntance fields) can be a bit obsessive.
    On the whole, there's not that many occasions where accessing static fields that directly from outside the class makes sense. It's usually better, to my mind, to use a singleton pattern for global values. For me, static variables are more likely to either be constants, or things like instance lists more likely to be accessed through an Iterable interface.

  • Performance tuning for ABAP Query (created from t-cd SQ01)

    Hello all,
    We created ABAP Query report from transaction SQ01.
    But the generated report has an appropriate SQL statement which causes performance problem.
    To solve this issue, I guess the easiest way is;
    0. Give up to use it.
    1. Copy it to another object in the customer namespace.
    2. Ajust SQL statement.
    But I'm wondering if there're appropriate ways to adjust SQL statement of Query.
    Could anybody give me any better idea?
    Thank you
    Yuko

    You can try this: Create 2 ranges, for objnr and cdtcode and fill like:
    ra_objnr-sign = 'I'.
    ra_objnr-option = 'CP'.
    ra_objnr-low = 'OR*'.
    append ra_objnr.
    ra_code-sign = 'I'.
    ra_code-option = 'CP'.
    ra_code-low = 'CO*'.
    append ra_code.
    SELECT objnr udate utime
    FROM jcds
    INTO TABLE it_jcds
    WHERE objnr IN ra_objnr
    AND stat = l_tj02t
    AND cdtcode IN ra_code
    AND inact = space
    Regards,
    John.

  • ABAP QUERY: Obligatory selection fields

    Hello,
    I have created an ABAP QUERY and i can't find a way to make any of the selection fields obligatory.
    Is this possible?
    Regards

    Hi, Everyone .
    We can do that .
    At selection-screen output (code section 13), set "1" to the field REQUIED by using MODIFY SCREEN code .
    (You can get Dynpro number by F1 key or T-cd SE51 )
    Masao .
    Edited by: MASAO NONAKA on Oct 20, 2008 9:12 AM

  • PNPCE in ABAP Query(SQ01) Selection is not working completely

    Hi All,
    I have developed an ABAP query using LDB PNPCE. I am reading data from IT000,IT0001 etc . I test the query in QA and I noticed that the PNCPCE screen doesn’t care about the selection in query. Like I have given the date range in PNCPE default screen. But it’s not filtering that data at all. It pulling up the employee’s regardless of date, it behaves the same for field action type (P0000-MASSn). The surprising thing is that for company code its working fine. My question is that Why PNPCE standard screen-selection not filtering data in ABAP query.
    Did any one of you also experience that?
    FYI
    I also find an OSS note # 730005 but we are already on 52 Patch !!
    OSS note :PNPCE: Incorrect data of infotype 0000 and 0001
    Symptom
    When you carry out a reprot which is based on logical database PNPCE, errors occur during the processing of infotypes 0000 and 0001.
    Other terms
    PNPCE, AS PERSON, P0000, P0001, data selection period, person selection period, CHECK_IT_0000_DATA_RESTRICTED, CHECK_IT_0001_DATA_RESTRICTED
    Reason and Prerequisites
    You start a report which is based on logical database PNPCE. In the report, infotype 0000 or 0001 is processed (that is, it was declared via the INFOTYPES statement). At event 'GET GROUP' or 'GET PERAS', the system either returns too few data records in the infotype tables or it returns data records twice.
    The error (missing data records) has only occured since the implementation of Note 687004 or the import of Support Package SAPKE47028.
    Solution
    Implement the attached corrections. or import the corresponding Support Package.
    Thanks,
    Saquib Khan

    Hi Saquib,
       Recently i am facing the same issue can u pls do reply how you have overcome this issue..The data is not getting picked up at the right time it is lately picked up by the program . Earlier it was PNP and it has been changed to PNPCE also we had implemented OSS Note 687004 and the later's Notes  were also implemented but still now we are unable to track down why there is delay in picking up the records this has been happening for the past 8-10 Months(i m not sure far more before). I am finding 2 main issues,
    1. we are using GET peras in PNPCE and no other event after that may be this is not fetching all the data because my selection screen does contain PERSONID where i suppose there should be GET PERSON event to define it
    2. RP_READ_INFOTYPE macro while using for P0000 ,, the code in the macro is such that it fetches using P0001 also ...I suppose if there are any inconsistency between IT0 and IT1 then this might one to take care ...
    kindly let me know how you have approached to resolve this issue.

  • Creating OVS for a field

    Hi All ,
    I am trying to add the OVS for a particular field in my web dynpro application and for this I have done the folllowing:
    1. I added the component WDR_OVS to my component interface.
    2. I then added the following to my component controller
    OVS     WDR_OVS                                 System Component for OVS Input Help
    OVS     WDR_OVS     INTERFACECONTROLLER     Generic Input Help
    3. I set the input help mode as 'Object Value Selector' and OVS Component usage as 'OVS' for the attribute 'Alternate_payee'.
    4 . I then created a even handler type method ON_OVS in the main view and inserted the following code to it:
    DATA: lifnr TYPE lfa1-lifnr,
            f4lfb1_z TYPE lfb1,
            filkd TYPE bseg-filkd,
            t_zemtab TYPE STANDARD TABLE OF izemtab,
            w_zemtab  LIKE LINE OF t_zemtab.
      DATA: lt_value_set TYPE TABLE OF wdr_context_attr_value,
                ls_value_set LIKE LINE OF lt_value_set.
      SELECT SINGLE * FROM  lfb1 INTO f4lfb1_z
                      WHERE lifnr = w_lifnr
                      AND   bukrs = '001'.
      CALL FUNCTION 'FI_VENDOR_ALTERN_PAYERS_READ'
        EXPORTING
          i_lifnr            = w_lifnr
          i_filkd            = filkd
          i_bukrs            = '001'
          i_lfb1_head_office = f4lfb1_z
        TABLES
          t_zemtab           = t_zemtab.
    data w_alt_emp_string type string.
      LOOP AT t_zemtab INTO w_zemtab.
        concatenate w_zemtab-empfb ' ' w_zemtab-name1 ' ' w_zemtab-ORT01 ' ' w_zemtab-STRAS ' ' w_zemtab-PFACH into w_alt_emp_string RESPECTING BLANKS.
        ls_value_set-text = w_alt_emp_string.
        ls_value_set-value = w_alt_emp_string.
    append ls_value_set to lt_value_set.
      ENDLOOP.
    DATA lo_nd_alt_payee_info TYPE REF TO if_wd_context_node_info.
    DATA lo_nd_alt_payee TYPE REF TO if_wd_context_node.
    lo_nd_alt_payee = wd_context->get_child_node( name = wd_this->wdctx_alt_payee ).
    lo_nd_alt_payee_info = lo_nd_alt_payee->get_node_info( ).
             lo_nd_alt_payee_info->set_attribute_value_set(
                name =  `ALERNATE_PAYEE`
                value_set = lt_value_set ).
    Now when I run the application and do F4 on the desired field I am getting the short dump as ''OVS: Methode SET_OUTPUT_TABLE Cannot Be Called "
    Can you please tell me what am I missing here?
    Edited by: rajatg on Jul 27, 2011 9:42 PM

    Hello,
    WDR_OVS->OVS event follows a phase model approach. Once you create a event handled method for the OVS, the code template will be auto generated and it will look like this
    * declare data structures for the fields to be displayed and
    * for the table columns of the selection list, if necessary
      types:
        begin of lty_stru_input,
    *   add fields for the display of your search input here
          field1 type string,
        end of lty_stru_input.
      types:
        begin of lty_stru_list,
    *   add fields for the selection list here
          column1 type string,
        end of lty_stru_list.
      data: ls_search_input  type lty_stru_input,
            lt_select_list   type standard table of lty_stru_list,
            ls_text          type wdr_name_value,
            lt_label_texts   type wdr_name_value_list,
            lt_column_texts  type wdr_name_value_list,
            lv_window_title  type string,
            lv_group_header  type string,
            lv_table_header  type string.
      field-symbols: <ls_query_params> type lty_stru_input,
                     <ls_selection>    type lty_stru_list.
      case ovs_callback_object->phase_indicator.
        when if_wd_ovs=>co_phase_0.  "configuration phase, may be omitted
    *   in this phase you have the possibility to define the texts,
    *   if you do not want to use the defaults (DDIC-texts)
          ls_text-name = `FIELD1`.  "must match a field name of search
          ls_text-value = `MYTEXT`. "wd_assist->get_text( `001` ).
          insert ls_text into table lt_label_texts.
          ls_text-name = `COLUMN1`.  "must match a field in list structure
          ls_text-value = `MYTEXT2`. "wd_assist->get_text( `002` ).
          insert ls_text into table lt_column_texts.
    *      lv_window_title = wd_assist->get_text( `003` ).
    *      lv_group_header = wd_assist->get_text( `004` ).
    *      lv_table_header = wd_assist->get_text( `005` ).
          ovs_callback_object->set_configuration(
                    label_texts  = lt_label_texts
                    column_texts = lt_column_texts
                    group_header = lv_group_header
                    window_title = lv_window_title
                    table_header = lv_table_header
                    col_count    = 2
                    row_count    = 20 ).
        when if_wd_ovs=>co_phase_1.  "set search structure and defaults
    *   In this phase you can set the structure and default values
    *   of the search structure. If this phase is omitted, the search
    *   fields will not be displayed, but the selection table is
    *   displayed directly.
    *   Read values of the original context (not necessary, but you
    *   may set these as the defaults). A reference to the context
    *   element is available in the callback object.
          ovs_callback_object->context_element->get_static_attributes(
              importing static_attributes = ls_search_input ).
    *     pass the values to the OVS component
          ovs_callback_object->set_input_structure(
              input = ls_search_input ).
        when if_wd_ovs=>co_phase_2.
    *   If phase 1 is implemented, use the field input for the
    *   selection of the table.
    *   If phase 1 is omitted, use values from your own context.
          if ovs_callback_object->query_parameters is not bound.
    ******** TODO exception handling
          endif.
          assign ovs_callback_object->query_parameters->*
                                  to <ls_query_params>.
          if not <ls_query_params> is assigned.
    ******** TODO exception handling
          endif.
    *     call business logic for a table of possible values
    *     lt_select_list = ???
          ovs_callback_object->set_output_table( output = lt_select_list ).
        when if_wd_ovs=>co_phase_3.
    *   apply result
          if ovs_callback_object->selection is not bound.
    ******** TODO exception handling
          endif.
          assign ovs_callback_object->selection->* to <ls_selection>.
          if <ls_selection> is assigned.
    *        ovs_callback_object->context_element->set_attribute(
    *                               name  = `COLUMN1`
    *                               value = <ls_selection>-column1 ).
    *      or
    *        ovs_callback_object->context_element->set_static_attributes(
    *                               static_attributes = <ls_selection> ).
          endif.
      endcase.
    you need to adapt this code to pass the required structure and data.
    BR, Saravanan

  • Limiting Query View selections for Web reports

    In web reports, users currently have Query View Selection but they want to be  able to just see views that they have created and not all others. 
    How can this be done?
    Does creating views in web and in BEX pull different auth objects or is it same? - Which objects are check in WEB views? Bex views use s_rs_comp with the QVW componenet.. but the trace does not show any log like this.

    Hi,
    User specific protection of queries are controlled by authorization object S_RS_COMP1.
    Authorization RSZOWNER = "$USER" allows the user access to activities in all the components he is an owner of.
    Check out this link, the analyst 3 scenario is what you are looking for:
    http://help.sap.com/saphelp_nw04/helpdata/EN/41/05453caff4f703e10000000a114084/content.htm
    Regards,
    Zaheer

  • Drop down in the selection for the field from the table

    Hi.
    i want to put the drop down for the field from the table fo which i dont know the number of entries for the field zregion1 of the table zbwcntry.
    please tell me how to use the function module and what could be the line of codes.
    the drop down is for the select option on the slection screen of the classical report.
    please help .

    HI,
    Check below code..it may help you.
    REPORT Zbunu .
    TYPES :BEGIN OF STR ,
           MATNR TYPE MATNR ,
           END OF STR .
    DATA : ITAB TYPE TABLE OF STR WITH HEADER LINE,
           VAR TYPE MARA-MATNR .
    PARAMETERS : S_MATNR TYPE MATNR ,
                  P_MATNR TYPE MATNR.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR S_MATNR .
    SELECT MATNR FROM MARA INTO
    CORRESPONDING FIELDS OF TABLE ITAB UP TO 1000 ROWS.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
      EXPORTING
      DDIC_STRUCTURE         = ' '
        retfield               = 'MATNR'
      PVALKEY                = ' '
       DYNPPROG               = SY-CPROG
       DYNPNR                 = SY-DYNNR
       DYNPROFIELD            = 'S_MATNR'
      STEPL                  = 0
      WINDOW_TITLE           =
      VALUE                  = ' '
       VALUE_ORG              = 'S'
      MULTIPLE_CHOICE        = ' '
      DISPLAY                = 'X'
      CALLBACK_PROGRAM       = ' '
      CALLBACK_FORM          = ' '
      tables
        value_tab              = ITAB
      FIELD_TAB              =
      RETURN_TAB             =
      DYNPFLD_MAPPING        =
    EXCEPTIONS
       PARAMETER_ERROR        = 1
       NO_VALUES_FOUND        = 2
       OTHERS                 = 3
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    Regards
    Ansumesh

  • Abap query to select a line item # from bseg on basis of following pattern:

    Hello,
    I want to retrieve the line item # from bseg which has the following pattern,
    account type = S
    AND
    gl account starting from 135***** , 136***** , 137*****
    , 138***** , 139*****
    hope i am comprehendable. How do i go on writing the query,
    Thanks..
    Shehryar

    Hi Shehryar,
    This will fetch records with GL A/C starting with <b>13</b> only , if you want 14 and others also write sepearate conditions using <b>LIKE</b> statements.
    REPORT zztest.
    DATA : itab TYPE STANDARD TABLE OF bseg WITH HEADER LINE.
    SELECT * FROM bseg INTO TABLE itab WHERE <b>koart = 'S'
    AND
    hkont LIKE '13%'</b>.
    This will take a lot of DB time for fetching the records, try to include Key Fields(BUKRS and GJAHR .. if possible others).
    Regards,
    Arun Sambargi.
    Regards

  • How to position a check box in an ABAP query's selection screen?

    Hi Experts,
    I am working on SAP queries and for that I have created an infoset. There was a requirement to have a checkbox at selection screen, which we can obtain by Infoset-> Extras->"Selections" tab -> create a parameter as a checkbox.
    However, it is appearing at the first place among all the selection screen elements which are defined in the infoset.
    Is there any way to have it positioned as per the requirement? (We have checked the option of "sequence on selection screen" provided while creating the checkbox, however, it does not work for us).
    Kindly have a look at the attached screen shots.
    Here , in the file, “Test Par” is the selection text for the parameter declared.
    Thanks
    Mohit

    I think I have it 90%there. I have no error now, it edits a
    record fine, if you add the checkbox to the record it adds it, and
    if you take it away, it does that. BUT now it will not add a new
    record.
    This is my code now for the update / insert
    <cfif not IsDefined("FORM.admin")>
    <cfset IsAdmin= 0>
    <cfelse>
    <cfset IsAdmin= 1>
    </cfif>
    <cfif isDefined("Form.RecordID")>
    <cfquery datasource="#APPLICATION.dataSource#">
    UPDATE user
    SET user.Fname=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.Fname#">,
    user.Lname=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.Lname#">,
    user.userName=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.userName#">,
    user.password=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.password#">,
    user.email=<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.email#">,
    user.admin =<cfqueryparam value="#IsAdmin#"
    CFSQLType="CF_SQL_INTEGER">
    WHERE ID =<cfqueryparam value="#form.RecordID#"
    cfsqlType="CF_SQL_INTEGER">
    </cfquery>
    <cflocation url="indexUser.cfm?RecordID=#Form.RecordID#"
    addtoken="no">
    <cfelse>
    <cfquery result="GetNewRecord"
    datasource="#APPLICATION.dataSource#" dbtype="ODBC">
    INSERT INTO user
    (Fname, Lname, userName, password, email, admin)
    VALUES (<cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.Fname#">,
    <cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.Lname#">,
    <cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.userName#">,
    <cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.password#">,
    <cfqueryparam cfsqltype="cf_sql_varchar"
    value="#form.email#">,
    <cfqueryparam value="#IsAdmin#"
    CFSQLType="CF_SQL_INTEGER">)
    </cfquery>
    <cflocation url="indexUser.cfm">
    </cfif>
    Is there a better way to write this so it will work? I have
    everything else working including the checkbox showing checked if
    it is checked in the db, I believe this is my last hang up on a
    checkbox.
    Any ideas?

  • SAP Query column sequence for Totalling fields

    Hi all
    We have a custom query in 4.6C in which the output displays only the total of Totaling fields maintained in the sequence Amount > Withholding Tax > Net Amount  (all currency related fields).
    However after upgrade to ECC 6.0, we notice that we are no longer able to sequence the output list to Amount > Withholding Tax > Net Amount
    Though we maintain the Totaling fields in the sequence Amount > Withholding Tax > Net Amount , the list is generated in the sequence Amount > Net Amount > Withholding Tax  and the sequence is changed accordingly in the Basic List after a test display of the Output.
    Is anyone aware if the sequencing control is removed in ECC based for the Totaling Fields?
    Kindly help share.
    Thanks in Advance
    Vinodh S

    Hi Faheem,
    After changing the column sequence i clicked configuration button and click save button and again clicked Configuration and selected Administrative button there i can see the column sequence change and clicked activate button .now if i close and reopen the transaction my column sequence is same with out changes that i made .
    you asked me to save the changes where i can do exactly ? Could you please tell in briefway from scratch so that i can trace where i done mistake.
    Thanking you in advance.
    Regards,
    narasimha.

  • Extend dynamic selection for a field added on PRPS table

    Hi Gurus,
    I want to see the field that I've added in PRPS table as part of dynamic selection on the reports like S_ALR_87013542/ S_ALR_87013532. The LDB for project systems is PSJ. How do I make it appear as a dynamic selection on the selection-screen criteria for these reports?
    Thanks...

    Hi,
    We have done this a lot on my project.  Follow these steps:
    (1) Transaction SE36 for logical database PSJ
    (2) Choose menu path Extras -> Selection views (Ctrl+F7)
    (3) Change the "Origin of view" to SAP
    (4) Find the PRPS_R node in the top, right "Tables/nodes" view.
    (5) Double-click PRPS_R.
    (6) Find your custom field that you added in PRPS (in the bottom "Table fields/node fields" view.
    (7) Choose and enter a 2-character Function Group ID (see the top, left view) next to the new field.
    (8) Save and transport...
    Best Regards,
    James Gaddis

  • ABAP Code Date Selection for InfoPackage Scheduler

    Hello Group
    I need to automate the selection of valid condition records for an extraction that have a From and To date range.
    I noticed there is an option (Routine for time interval) to write ABAP code along with a template that is available in the InfoPackage.
    I think the logic for the selection would be any record
    Valid from       <= today
    Valid to           >= today
    Can anyone help with the ABAP code?
    The template is as follows:
    program conversion_routine.
    Type pools used by conversion program
    type-pools: rsarc, rsarr, rssm.
    tables: rsldpsel.
    Global code used by conversion rules
    $$ begin of global - insert your declaration only below this line  -
    TABLES: ...
    DATA:   ...
    $$ end of global - insert your declaration only before this line   -
    form compute_time_dependent_dates
      changing p_datefrom type d
               p_dateto   type d
               p_subrc like sy-subrc.
          Insert source code to current selection field
    $$ begin of routine - insert your code only below this line        -
              p_datefrom =
              p_dateto   =
              p_subrc = 0.
    $$ end of routine - insert your code only before this line         -
    endform.
    Thank You for your help!!
    Frank

    I resolved the problem . I have changed the order of read table l_t_range because I need the header .
    In the loop at datos I add the line l_t_range-iobjnm = 'ZXGE_UNO'.
    The problem wasn't the call RFC it was that I built l_t_range bad. I need the infoObject name.
    This is correct!!
    READ TABLE L_T_RANGE WITH KEY
             FIELDNAME = '/BIC/ZXGE_UNO'.
    LOOP AT DATOS.
          L_T_RANGE-FIELDNAME = '/BIC/ZXGE_UNO'.
          L_T_RANGE-IOBJNM = 'ZXGE_UNO'.
          L_T_RANGE-SIGN = 'I'.
          L_T_RANGE-OPTION = 'EQ'.
          CONCATENATE '00' DATOS-WA+3(4) INTO L_T_RANGE-LOW.
          APPEND L_T_RANGE.
        ENDLOOP.
    *READ TABLE L_T_RANGE WITH KEY+
    +*FIELDNAME = '/BIC/ZXGE_UNO'.+
    +*    L_IDX = SY-TABIX.+
    +*    MODIFY L_T_RANGE INDEX L_IDX
    Thanks a lot
    Ana

  • Creating calender for a field in a form

    hi,
    We have a date field in our form.We would like to implement it with a calendar.kindly help
    tahks and regards

    If you are talking of a date picker in a form, there is no ready-made solution. However, if you can generate the dates through a sql query, you can create a dynamic LOV and make the form field of type POPUP and attach the LOV to it. But the popup lov can show only 10 values at a time.
    Infact, there are lot of postings on date picker in this forum. If you perform a search, I am sure you will come out with good hits. Otherwise, lot of javascript sites have ready-made date-picker codes.
    If you come across such code, you can incorporate the same by generating the same code using htp.p() in a pl/sql block in the additional pl/sql section.
    While building the form, you can choose to build a custom form and then you can create an image link that calls the javascript you generate in the additional pl/sql section.
    Or,
    If you have some code that generates the dates in a browser window, you can create a procedure and call it through the link field in the form.

  • Java Dictionary Project + create autonumber for KEY field?

    Hi there,
    I would like to create a Java Dictionary project that has a table with an AUTONUMBER as the key field.
    I know exactly how to do this in SQL Server using the IDENTITY field but cannot see an option when using the Java Dictionary project?
    Any ideas?
    Thanks for the help
    Lynton

    Has there been an update to this recently?  I am in need of exactly the same information.  The FAQ lists this:
    <i>Can I deploy a Java Dictionary table along with the table content?
    Yes. You can deliver the Java Dictionary table along the table content. There are two possibilities:
    Export from a reference database
    Specification of the table entries in an XML file (since SP5)
    Note that there is no modification support for table entries that are delivered in this way. Therefore, you can deliver table entries with program character or for examples, but not for templates or customizing data.</i>
    Now, I may be reading the note incorrectly, but it makes it sound like if you do populate a table with a XML file, the records cannot be modified thereafter.  Is this true?
    I'd also like to know how to develop the XML and where to put it, etc.  I've had no luck searching for this information.
    Thanks!

Maybe you are looking for