Infoset (SQ02) - hardcode selections ?

Hi.
I need to build a BW datasource from an R/3 infoset. We have two fields in the infoset that need to be restricted. Instead of just having these two fields as selections (which actually get passed through to BW as selections in the InfoPackage), we want to hardcode the values.
Unfortunately I can't pull any ABAP people to help me right now. Is this something that can be included in the 'AT SELECTION-SCREEN' section of the 'Code' area within SQ02?
We have so far created two selections: A & B and just somehow want to restrict A to "X" and B to "Y" instead of the user entering it.
Is this possible? Do we even need to do this in ABAP?
Thanks.

no-one?? surely this is something that is relatively straight forward for an ABAPer?

Similar Messages

  • Code at Infoset SQ02 - Start of Selection - not working

    I have a code at SQ02 infoset START-OF-SELECTION:
    select bukrs
      into table i_bukrs
      from t001
      where bukrs in ('SP$00007').
    if sy-subrc = 0.
    endif.
    where SP$00007 is a select-option at the query selection screen.
    This coding is not working. It is always returning sy-subrc 4. How do I acces a select option form the query start of selection?
    Where I am doing wrong? I have got the 'SP$00007' from the generated code of query.
    If I try like this it gives me a syntax error:
    where bukrs in SP$00007.
    Any idea what I am doing wrong?

    The Solution:
    DATA cond_syntax TYPE string.
    CONCATENATE 'BUKRS' 'IN SP$00007'
                INTO cond_syntax SEPARATED BY space.
    SELECT bukrs
      INTO TABLE i_bukrs
      FROM t001
      WHERE (cond_syntax).
    IF sy-subrc = 0.
      LOOP AT i_bukrs INTO wa_bukrs.
        AUTHORITY-CHECK OBJECT 'J_B_BUKRS'
                 ID 'BUKRS' FIELD wa_bukrs-bukrs.
        IF sy-subrc <> 0.
          MESSAGE s000(z_zzz_ca_messages)
          WITH
          'You do not have authorization to view Company Code '
           wa_bukrs-bukrs
           ' data.'.
          LEAVE LIST-PROCESSING.
        ENDIF.
      ENDLOOP.
    ENDIF.
    If there is a better way please let me know?

  • ABAP QUERY - SQ02 addition of logic in infoset (END-OF-SELECTION)

    I guys I have read this discussion: http://scn.sap.com/message/8193608#8193608
    but solve partially my problem.
    In particular I need special logic to interpret the single field from field symbol, for example:            
         loop at <goo> assigne <goo_wa>.                  
               tot_qty = tot_qty + <goo_wa>vbap-zmeng.
         endloop.
    I would like to add new row, with my logic into stracture of query %G00.
    thanks for any idea Omar

    resolved, it is must to use for all filed-symbols
    example
    types: beging of l_summary,
         matnr type matnr,
    end of l_summary.
    data: lt_summary type standard table of l_summary,
             ls_summary type line of lt_summary,
             lf_string type string.
    fiel-symbols: <gt> type standard table,
    <ls> type any,
    <lf> type any.
    lf_string = '%G00[]'.
    unassign <gt>
    assign (lf_string) to <gt>.
    if <gt> is assigned.
    loop at <gt> assigning <ls>.
    lf_string = '<ls>-vbap-matnr'.
    unassign <lf>.
    assign (lf_string) to <lf>.
    if <lf> is assigned.
    ls_summary-matnr = <lf>.
    endloop

  • Creation of additional fields in Infoset SQ02

    Hi Experts,
    I'm a FICO consultant trying to create a query.
    Requirement : Link RSEG Table to BKPF Table in the join condition
    Link: RSEG-BELNR concatenated with RSEG-GJAHR = BKPF-XBLNR
    Now I'm trying to create an additional field in SQ02 named MiroYear and in the field code part i gave the below piece of code
    "CONCATENATE RSEG-BELNR RSEG-GJAHR INTO MIROYEAR."
    It shows no syntax errors. I added the same to the field group as well.
    Issue: The additional field (MIROYEAR) is not appearing in the join condition in SQ02.
    Is this the right way to create an additonal field? Have i made any mistake? Or any of you have any better ideas to join RSEG and BKPF in SQ02?
    Your quick response will be appreciated
    Best Regards
    Vimal

    Hi,
    Table RESG and BKPF are linked BKPF-AWKEY.
    Now first of all if you create an additional field, that field will not appear in the join.
    One way will be to create an infoset with direct read to table RSEG, and then inside add additional fields for each BKPF field.
    Then in the code
    CONCATENATE RSEG-BELNR RSEG-GJAHR into MIROYEAR
    select single ....
    into (ADDFIELD1, ADDFIELD2, ADDFIELD3,.....)
    from BKPF
    where awkey = miroyear.
    Regards,
    Khusro Habib

  • Transport Req for Infoset - SQ02

    Hello all,
    First time I created a generic datasource based on Infoset . The Infoset is created in SQ02 (Joining 2 tables).
    Now I have problem in collecting this Infoset in the transport request.
    I tried doing in transport connection, but it collects only the datasource.
    Later I collected the classic Infoset in transport connection under the same transport request.
    Please let me know if i am wrong or missed to collect some objects.
    Regards..
    Balaji

    Hi,
    First go to Transport connection and select the collection mode as collect automatically.
    then select all the prerequsites given by the system.
    Otherwise go to Transport connection and select grouping and further select the option 'In dataflow before and afterwards'.
    And then transport it.
    Hope it helps you.
    Regards,
    Swathi J H

  • HR Infosets - switch object selection question?

    Dear All,
    I encounter this issue. I create a HR Infosets using logical database PNPCE. As the requirement of our HR Dept, so we need to add more extras fields (by code).
    The problem when we switch on/off object selection (from menu):
    - When the object selection is off: all the extras fields I add are available.
    - When the object selection is on: all of them are not available.
    This is my idea. All the field of infosets will be display when the object selection is on depend on SAP internal field, and the extra field we add by code will not be displayed.
    But it's my opinion. So please help me with this issue.
    Thanks in advanced.
    Thien.
    Edited by: Pham Thien on Nov 18, 2008 3:12 AM

    Hi,
    We can hide those options by implementing the Layoutsets. If you need to hide those options for standard admin user itself, then you need to change the standard Layoutsets, which is not recommended. These options are defined in the "Command Group" of the Layoutsets.
    You can Navigate to Layoutsets thru below path.
    Sys Admin -> System Configuration -> Knowledge Management ->Content Management -> User Interface -> Settings -> Layoutset
    Tweaking over the Layoutset Command group properties will hide the options which you mentioned.
    Thanks,
    Mahendran B.

  • Infoset query ('At Selection-Screen') - Urgent

    Hi All,
    The below code for selection criteria 'At Selection-Screen' for an infoset-query works ok, but i find 2 problems, can someone help.
    1. When user presses F4, i wanted the output to display
       SG Singapore
       IN   India
       But at the moment it just displays
       SG
       IN
    2. If the user enters any other value apart from the above 2 i do not want the query to execute, instead show something like enter a valid value. But at the moment if i enter another country code manually just to test eg: US, the query runs with this selection which i do not want.
    Hope my problem is clear, await inputs.
    Code:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR VEN_CTY-LOW.
            IT_LAND-VEN_CTY = 'SG'.
            IT_LAND-LTEXT   = 'Singapore'.
              APPEND IT_LAND.
            IT_LAND-VEN_CTY = 'IN'.
            IT_LAND-LTEXT   = 'India'.
              APPEND IT_LAND.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'VEN_CTY'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN
        EXCEPTIONS
          PARAMETER_ERROR = 1
          NO_VALUES_FOUND = 2.
    IF SY-SUBRC = 0.
        READ TABLE IT_LAND INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO VEN_CTY-LOW.
    ENDIF.

    Hi vivek,
    for the 2nd problem,
    create a range for ingapor and india say r_range.
    and
    r_range will have two values say india, singapore.
    loop at VEN_CTY.
    if ven_cty not in r_range.
    display error message.
    exit.
    endloop.
    try this and let me know.
    reward if helpful.
    thanks .
    ranya

  • Regarding Hardcoding selection-screen field.

    Hi frnds,
                   I want to hardcode vbak-erdat in my selection screen , i m using loop at screen . and i m also usiing INITIALIZATION EVENT,where i am initializing vbak-erdat.
    so frnds can anyone help me in this regard.
    Thanks,
    satish

    Hi,
    Please look at the code below :
    TABLES : bsis.
    SELECTION-SCREEN : BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETER : sp_sel radiobutton group rad USER-COMMAND radio DEFAULT 'X',
                sp_all RADIOBUTTON GROUP rad.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    SELECT-OPTIONS : so_bukrs FOR bsis-bukrs MODIF ID sp1.
    SELECT-OPTIONS : so_hkont FOR bsis-hkont MODIF ID sp2.
    SELECTION-SCREEN END OF BLOCK b2.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
      IF sp_sel = 'X'.
          IF screen-group1 = 'SP2'.
            screen-input = '0'.
            screen-invisible = '0'.
            screen-required = '0'.
            MODIFY SCREEN.
          ENDIF.
          elseif  sp_all = 'X'.
            IF screen-group1 = 'SP1'.
             screen-input = '0'.
             screen-invisible = '0'.
             screen-required = '0'.
             MODIFY SCREEN.
           ENDIF.
         endif.
        ENDLOOP.
    Thanks,
    Sriram Ponna.

  • Create infoset - sq02

    Hi all,
    I want to create infoset in sq02 with 3 tables.
    and want to add some condition and put their value default.
    Is this possible ?
    I also tried it with external program, but i get error.
    Plz help me how to do it.
    thanks in advance.

    Yes ,it is possible to add code in infoset.
    open sq02 give infoset name click change,in app tool bar click on extras
    there on right side you have option code.you can write your code there.

  • INFOSET SQ02

    Hi friends,
    I am new to ABAP Query, when we create infoset, it shows 4 options for our data source, i want to work with 4th option ie..<b>Data Retrieval from program</b> , can any one through light on it. any kind of document ar any kind of help is rewarded.
    Thanks
    Rohit

    Hi Rohit,
    Try writing a Z<Prgrm> which has only data retrieval statements like SELECT statements and fill a final internal table (The internal table type should be known in the ABAP Dictionary). Specify this structure and the program.
    When a Query(SQ01) is created based on this Infoset, the program is executed the internal table (whose structure is known globally in ABAP Dictionary) is filled. This can be used to display the data.
    Please let me know if further details are required from my side.
    Thanks & Regards,
    Goutham

  • Error in generating infosets - SQ02

    Hello Experts,
    I was trying to create an infoset based on multiple tables. I get error "In Unicode programs, the "(" character cannot appear in names, as it does here in the name "TEXT5()".", after I add tables and try to generate the infosets.
    I saw many posts on such errors however, those are basically for ABAP programs where we need to uncheck the unicode checkbox in attributes of the program. I am not using any APAB program however, just generating infosets after adding tables...
    So, how to quell this error? Any ideas are appreciated.
    Thanks in advance.
    Sarvesh Hasija

    Hello,
    I just created an infoset based on "Direct read of table" and specified the table name "HRHAP" (which is for appraisals).
    After creating it, I tried to generate the infoset and it gives this error.
    I was not able to generate this infoset even once.
    Let me know if you have more questions on this to help me.
    Regards,
    Sarvesh

  • SAP  infoset  SQ02  - Add field  for LDB

    Hi all,
       I have to modify a sap query,   which uses infoset ZDES.  I have to add table ANLH  so that i can get field ANLHTXT.   The infoset uses the LDB "ADA" which has many other tables  and structures.
    Now  if i have to add the  table ANLH  ,  how should  i go about , I cannot change the LDB  as it asks  for DEV key,  the only way is to modify the Infoset ZDES.
    Can  anyone please tell me  how  to go about this .
    Thx in adv.
    Dan

    If you can modify the infoset, its well. You can do it.
    Open the infoset ZDES, add additional field ANLH-ANLHTXT and add them to the group. Write code in the field you created. generate and add the corresponding field as output field. For this you need not add a whole table, instead you can add the field as extra field and write code under it to get it.
    But performance wise, it will not be 100 % efficient becuause for every row fetched your abap code is run. But to me, its the only way you can handle it without disturbing the SAP code.
    regards,
    Sandeep Josyula
    *Mark helpful answers

  • INFOSET  - SQ02   - WAERS FIELDS

    Hi
    I generated a infoset using table COSP, when I click in generate infoset, sap shows this warning message:
    Compare field group fields with Data Dictionary
    Currency field CCCUR-WAERS will not be filled
    Currency field TKA01-WAERS will not be filled
    How can I  fix the value for fields CCCUR-WAERS and TKA01-WAERS  in my query ?   when I execute the query this dont show the correct values for some fields because waers field.
    Points avaliable.

    Shidar, thanks for your help.
    values in controlling area currency aren't displayed correctly (1000 COP is displayed like 10 COP ).... values in object currency are wrong too, but values in document currency are correct because document currency field is available for parameters.
    I'm working in document currency, but I would like to know why SQ00 doesn't take in account  controlling area currency and object currency ... ¿it is an error ? ¿there are some way to fix it?

  • Infoset Query in Datasource.

    I'm using a Infoset query based on an ABAM program as a datasource. For passing parameters, form Infopack to the program I defined the parameters in the Infoset (SQ02 -> Extras -> Selections -> parameters). After doing this, when I include this Infoset in my new Datasource and save it, I'm not getting the paramter defined in the Infoset. All other fields in Infoset look fine. The parameter defined should appear in Datasource as PARAM_P_<param name>, which can be used as selection parameter in the Infopack. Can anyone tell what I'm missing out and where?
    Thanks in advance!
    - Sree

    Hi Sree,
    Try testing your datasouce in your source system with tcode RSA3? Can you get data back from that?
    Have you defined that field as a selection field in RSO2?
    Hope this resolves the issue for you. Cheers!

  • Interactivity in ABAP Query [SQ01]. Working on ABAP 4.6C version.

    Hi,
    I have created a Infoset[SQ02]( basically selecting data from VBAK and VBAP for Sales Order) and assigned this infoset to user group[SQ03]. Using this i have created a Query [SQ01].
    In the output i have the "<b>SALES ORDER NUMBER</b>".
    Once the sales order number is double-clicked on i have to display the VA03 transaction with the sales order number in it.
    My doubt is, how is this interactivity acheived. I am working on ABAP 4.6C.
    Thanks in Advance for your esteemed replies.
    Regards,
    Raghavendra Goutham P.

    AT LINE-SELECTION.
    case sy-cucol.
    when 16 OR 17 . "Col No
    DATA: BDCDATA TYPE TABLE OF BDCDATA.
    DATA: ITAB TYPE TABLE OF BDCMSGCOLL.
    DATA: PROGRAM LIKE SY-REPID,
          WA_BDCDATA TYPE BDCDATA.
    WA_BDCDATA-PROGRAM  = 'SAPMV45A'.
    WA_BDCDATA-DYNPRO   = '0102'.
    WA_BDCDATA-DYNBEGIN = 'X'.
    WA_BDCDATA-FNAM     = 'VBAK-VBELN'.
    WA_BDCDATA-FVAL     = IT_ITAB-VBELN.
    APPEND WA_BDCDATA TO BDCDATA.
    CLEAR WA_BDCDATA.
    CALL TRANSACTION 'VA03'  USING BDCDATA  MODE 'A'
                             MESSAGES INTO ITAB.
    Regards
    Ravi

Maybe you are looking for