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

Similar Messages

  • Regarding Infoset (At Selection-Screen) - Urgent

    Hi All,
    In Infoset 'Selections' tab, i have defined a selection parameter 'country', i want the user to have options to input only 5 country codes. The country code i am reading from LFA1-LAND1 as this relates to Vendor.
    I would like to know, what code should i enter in 'At Selection-Screen' to ensure that, when the user press F4 they only see these 5 country code + the description?
    Hope my problem is clear, await inputs.
    Vivek

    Hi Vivek,
    Here i am trying to give you the code again. Please try this code in your program.
    SELECT-OPTIONS: land1  FOR lfa1_land1.
    DATA: BEGIN OF IT_LAND OCCURS 0,
              LAND1  LIKE LFA1_LAND1,
              LTEXT(15)  TYPE C,
              END OF IT_LAND.
    IT_LAND-LAND1 = 'IN'.
    IT_LAND-LTEXT = 'INDIA'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'DE'.
    IT_LAND-LTEXT = 'GERMANY'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'AF'.
    IT_LAND-LTEXT = 'AFGHANISTAN'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'AT'.
    IT_LAND-LTEXT = 'Austria'.
    APPEND IT_LAND1.
    IT_LAND-LAND1 = 'AD'.
    IT_LAND-LTEXT = 'Andorra'.
    APPEND IT_LAND1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR LAND1-LOW.
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'LAND1'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO LAND1-LOW.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR LAND1-HIGH.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          RETFIELD   = 'LAND1'
          VALUE_ORG  = 'S'
        TABLES
          VALUE_TAB  = IT_LAND
          RETURN_TAB = IT_RETURN.
      IF SY-SUBRC = 0.
        READ TABLE IT_RETURN INDEX 1.
        MOVE IT_RETURN-FIELDVAL TO LAND1-HIGH.
      ENDIF.

  • Sap query report-selection screen modification

    Hi
    I  have created a SAP query report using the logical database KDF ,the selection screen was created automatically.For vendor report open item and Cleared item Push button would be there in FBL1N but here it only displays Open key date,clearing dates.The open key date is mandatory to give though i give clearing dates as i need vendor cleared items.
    Is ther way to change the selection screen to get the option open item and cleared item push button as in FBL1N.
    This is because i was filtering a vendor only for particular doc type only for clearing items but report takes open item too though i meantioned clearing date rate.How to modify the selection screen in sap query report when Logicaldatabase is selcted.

    I need to get only the cleared items.I donot need open items.Then if go for BSIK is it wrong.Should go only for BSAK.
    I couldnt find the table BSAK in logical database KDF.
    Edited by: mysap query on Mar 18, 2009 3:15 PM
    Edited by: mysap query on Mar 18, 2009 3:15 PM

  • 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?

  • Query views - selection screen fields double

    Hi expects,
    BW 3.5 SP13.
    Do you know why I have double fields in WEB report selection screen ? example Month/year ?
    In WEB properties I flag 'Display same variables only once'.
    I have a WEB report with one table based on a query and with two charts based on query views from the query. Some fields are mandatory in selection screen Month/year.
    Br,
    Ole Paludan

    Hi,
    It's query views based on same query also use in WEB report, so variables are the same.
    Query view Purpose: to get fewer key figures to charts - but still by query show all key figures in table.
    BR,
    Ole

  • Query regarding selection screen

    Hi experts,
    I have a requirement that once I get my output on a selection screen, suppose it has just 1 row and 4 columns. If I click on each of these 4 columns, a new transaction/report etc. needs to be called. How can I achieve this functionality?
    Thanks,
    Ajay.

    Hi,
    Say you have an internal table with fields as:
    VBELN (sales order)
    POSNR (sales order line item)
    WERKS (plant)
    MATNR (matnr)
    And you write all these fields on output screen using reporting and when you click on any column field then a particular transaction/report should be called, then follow the below mentioned logic:-
    DATA : BEGIN OF it_final OCCURS 0,
             vbeln TYPE vbap-vbeln,
             posnr TYPE vbap-posnr,
             werks TYPE vbap-werks,
             matnr TYPE vbap-matnr,
           END OF it_final.
    DATA : fldname(25) TYPE c,
           fldvalue(25) TYPE c.
    START-OF-SELECTION.
      "select query into it_final internal table
    AT LINE-SELECTION.
      GET CURSOR FIELD fldname VALUE fldvalue.
      CASE fldname.
        WHEN 'IT_FINAL-VBELN'.
          WRITE : / fldvalue.
          "code to call transaction/report
        WHEN 'IT_FINAL-POSNR'.
          WRITE : / fldvalue.
          "code to call transaction/report
        WHEN 'IT_FINAL-WERKS'.
          WRITE : / fldvalue.
          "code to call transaction/report
        WHEN 'IT_FINAL-MATNR'.
          WRITE : / fldvalue.
          "code to call transaction/report
      ENDCASE.
    END-OF-SELECTION.
      ULINE.
      FORMAT HOTSPOT.
      LOOP AT it_final.
        WRITE : /1 it_final-vbeln, 10 it_final-posnr, 20 it_final-werks, 30 it_final-matnr.
        HIDE : it_final-vbeln, it_final-posnr, it_final-werks, it_final-matnr.
      ENDLOOP.
      ULINE.
    Now to call a transaction user:-
    SET PARAMETER ID '<param_id>' FIELD '<field_value>'.
    CALL TRANSACTION '<t_code>' AND SKIP FIRST SCREEN.
    To call a report use:-
    SUBMIT <report_name> WITH <parameter_name1> = <field_value1>
                         WITH <parameter_name2> = <field_value2>
                         "and so on use parameters
                         AND RETURN.
    <paramater_name> refer to the parameter of the called report <report_name>
    and <field_value> refer to value for the parameter to be passed.
    Hope this helps you.
    Regards,
    Tarun

  • SAP Query and selection screen fields

    Hi,
    I am currently modifying a Query. I have added a new selection field. The fieldname for this selection field has been autogenerated within the query and I have pasted a bit in here:
    SELECT-OPTIONS SP$00015 FOR ZERROR_FLG LOWER CASE.
    SELECT-OPTIONS SP$00022 FOR KNA1-ERDAT.
    SELECT-OPTIONS SP$00023 FOR KNA1-ERNAM.
    SELECT-OPTIONS SP$00027 FOR ZLOEVM LOWER CASE.
    SELECT-OPTIONS SP$00030 FOR ZPARTNERNO
    NO INTERVALS NO-EXTENSION.
    I relation to this select -option, I want to execute a few lines of code that only is executed if the user has filled in a value in teh ZPARTNERNO field. However, no matter if I use the field name ZPARTNERNO or SP$00030 it has no effect.
    Any good ideas ?

    HI,
    In the AT SELECTIOn-SCREEN event, you can write the code
    IF not <b>SP$00030[]</b> is initial.
    write the code which you want to execute before the output
    ENDIF.
    if you want in START-OF-SELECTION>
    IF not <b>SP$00030[]</b> is initial.
    write the code which you want to execute before the output
    ENDIF
    Regards
    Sudheer

  • SAP Query DB - Selection screen

    Hi!
    I am workin with a DB for SAP Query.  I tried it and there is just one problem: In the report selection screen there is a field (from the DB) that is mandatory. I wanted to exclude that field or at least to make it not mandatory. Is it possible? How?
    Thank you

    Hi,
    Go to SQ01. Input your Query. Press change button. Press Basic list. In the left side you will see check box for list fields and selection fields. Remove the check box for whatever field you dont wan in the selection screen.
    Thanks,
    Senthil

  • Help needed in selection screen - Urgent

    Hi Experts,
    I have a selection screen. I have three radi buttons in that selection screen. Based on the selection of the radio buttons I need to activate corresponding selection screen parameters.
    e.g : if radiobutton1 is selected, njo activation needed,
           if radiobutton2 is selected, activate selection screen parameter p_one,
           if radiobutton3 is selected, activate selection screen parameter p_two.
    All three radiobuttons are attached to the same radio button group.
    I have assigned the parameters p_one, p_two, p_three to MODIF ID as follows.
    p_one - NULL
    p_two - t01
    p_three - t02.
    on the selection of a radio button I want the corresponding parameter to get activated.
    please help me.
    Regards,
    Arul jothi A.

    hi
    jothi
    AT SELECTION-SCREEN OUTPUT.                                      
      CASE SY-TCODE.                                                 
        WHEN 'ZEDI6'.                                                
          LOOP AT SCREEN.                                             
            CASE SCREEN-GROUP4.                                      
              WHEN '001'.                  "Sales order select       
                SCREEN-ACTIVE = '1'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '002'.                  "Delivery select          
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                        
              WHEN '003'.                  "Invoice select           
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
              WHEN '004'.                  "PO Select                
                SCREEN-ACTIVE = '0'.       "1=Active, 0=Don't display
                MODIFY SCREEN.                                       
    regards
    praveen

  • Detailed pop up screen in selection screen - urgent

    hai experts,
    how can we give a detailed pop up screen in selection screen.
    My requirement is,
    To display Details of spool Nos taken for current porogram to take print out from end user.
    from OWN SPOOL REQUEST displays all other programs........
    can any one give a right solution?
    reward will avail for use full answer.
    thanks in advance.
    regards,
    jai.m

    Hi Jai
    May be you can use this FM POPUP_WITH_TABLE_DISPLAY_OK with the list of spool number populated into internal table.
    If you are particulary looking for selection screen, then decalre your selection screen as below
    Selection-screen begin of screen 9000.
    Selection-screen end of screen.
    Then use the statement Call selection-screen 9000 starting at x y.
    Hope this helps !
    Regards
    Ranganath

  • Restricting values F4 help in selection screen-Urgent

    Hi,
    can anyone pls tell how can I ristrict the values for search help in any field in selection screen.
    please tell me the way to hide some values in F4 help in selection screen so that user can not see those data for selection.
    Regards

    i think u can not hide the data.........
    create own f4 help............restrict the data and then pass it the f4 internal table....
    fro exp;;;;;
    types : begin of ty_tab,
              post_code1 like adrc-post_code1,
             end of ty_tab.
      data : it_tab type ty_tab occurs 0.
      data : lt_field type table of dfies,
             lw_field type dfies.
      select post_code1 from adrc into corresponding fields of table it_tab.
      call function 'F4IF_INT_TABLE_VALUE_REQUEST'
          exporting
            retfield        = 'POST_CODE1'
            dynpprog        = sy-repid
            dynpnr          = sy-dynnr
            dynprofield     = 'LI_LIST1'
            value_org       = 'S'
          tables
            value_tab       = it_tab
         field_tab       = lt_field
          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
    Anbu

  • Code for selection screen,  urgent

    Hi Everyone,
      I need code for selection screen.
      I have four radio buttons, p1, p2,p3,p4(assume)
    If I select second radiobutton, remaining three radiobuttons should be in disable mode and also the information under them should be in disable mode. Give the coding details. Thanks in advance. U will be rewarded.
    Regards,
    Nagaraju

    Hi,
    REPORT ZTEST222 .
    PARAMETERS : p_add  RADIOBUTTON GROUP radi
                             USER-COMMAND radio MODIF ID MOD,
      p_disp RADIOBUTTON GROUP radi DEFAULT 'X'  MODIF ID pod,
      p_chng RADIOBUTTON GROUP radi MODIF ID rad,
      p_er_log RADIOBUTTON GROUP radi MODIF ID cod.
    SELECT-OPTIONS : s_idn    FOR  vendor   MODIF ID mod,
                                   s_pcode  FOR ws_c_pcode MODIF ID pod.
    PARAMETERS:  p_plant    LIKE  zaw_pol_plan-plant   MODIF ID rad,
                 p_zzvend   LIKE  zaw_pol_plan-zzvendor   MODIF ID cod.
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF p_add EQ 'X'.
          IF screen-group1 EQ 'MOD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_disp EQ 'X'.
          IF screen-group1 EQ 'POD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_chng EQ 'X'.
          IF screen-group1 EQ 'RAD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    IF p_er_log EQ 'X'.
          IF screen-group1 EQ 'COD'.
            screen-active = 1.
            MODIFY SCREEN.
    ELSE.
             screen-active = 0.
            MODIFY SCREEN.
    ENDIF.
    Pls. reward if useful
        ENDLOOP.
    Pls. reward if useful

  • Query on selection screen

    Hi all,
    Please give me the solutions to the following in selection screen:
    1. In selection-screen there is one select-options and one parameter.
    Now,if the select-opotions range is given 30 to 40 then, the parameter should be populated with 'A'.
    If the select -options is given the value 50, then the value should be 'P'.
    If the select-optons is given the value 65,then the value should be 'X'.
    if the select-options is given the value 87, then the value should be 'N'.
    2) In the selection - screeen there is one check box and select-options.
    By default the check-box will be deselected and select-options will be defaulted with system date.
    Now, when the checkbox is selected the select-options should be empty.
    And again, when the checkbox is deselected then again the select-optons should be populated with system date.
    Please let me know solutions to the above asap.
    All points will be awarded.
    Thanking you in advance.
    Regards,
    A.Srinivas

    Hi Srinu,
    Try below code. I have used matnr in select-options. Change it according to your data element.
    TABLES: mara.
    SELECT-OPTIONS: s_matnr FOR mara-matnr.
    PARAMETERS: p_c TYPE c.
    PARAMETERS: p_chk AS CHECKBOX USER-COMMAND chk.
    SELECT-OPTIONS: s_date FOR sy-datum DEFAULT sy-datum.
    AT SELECTION-SCREEN.
      IF p_chk = 'X'.
        CLEAR s_date[].
      ELSE.
        s_date-low = sy-datum.
        APPEND s_date.
      ENDIF.
    AT SELECTION-SCREEN OUTPUT.
      IF s_date[] IS NOT INITIAL.
        p_chk = ''.
      ENDIF.
      LOOP AT s_matnr.
        IF s_matnr-low = '000000000000000030' AND s_matnr-high = '000000000000000040'.
          p_c = 'A'.
          exit.
        ENDIF.
        CASE s_matnr-low.
          WHEN '000000000000000050'.
            p_c = 'P'.
          WHEN '000000000000000065'.
            p_c = 'X'.
          WHEN '000000000000000087'.
            p_c = 'N'.
        ENDCASE.
      ENDLOOP.

  • Query in Selection screen!!!!

    Hi all,
            I have a requirement which requires me to validate the data entered in the selection screen when the data entered in the selection screen is saved as a variant.
    That is, when the save button in the selection screen is clicked, then the data entered in the selection screen should be validated.
    Can anyone please tell me how to achive the above.
    Regards,
    Vijay

    Hi Bala,
      As also said by others do it like this way as the example below:
    Parameters:
      p_kunnr type kna1-kunnr.
    Data:
      lw_kunnr type kna1-kunnr.
    At Selection-screen.
      Case sy-ucomm.
        When 'SPOS'.
          Select Single kunnr
            from kna1
            into lw_kunnr
           where kunnr eq p_kunnr.
          If sy-subrc ne 0.
            Message 'enter correct customer number' type 'E'.
          Endif.
      Endcase.
    With luck,
    Pritam.

  • Selection screen urgent

    Hi .
    Would  you please help me about define a selection with this rules ..On selection screen  select-options date for sy-datum .
    if radio button A selected I want to refresh date's screen only year and this selection will be in terms of whole year .
    if radio button B selected I want to refresh date's screen only month and year (01.2006 - 04-2006 ) .and make this selection available 01.01.2006 - 31.04.2006.User do not have to see days .
    if radio button C selected I want to refres date's screen as listbox 1.period 2. period 3. period . And 1 . period is selected make available 01.01.2006 .31.04.2006.
    2.is selected  01.05.2006. 31.08.2006.
    3. is selected 01.09.2006 31.12.2006.
    Thanks in advance ..

    Append a function code to your radio-button.
    And screen-group to you optional parameters/select-options
    in your SELECTION-SCREEN OUPUT (PBO)
    set the desired parameter active or inactive depending on with button is on
    LOOP AT SCREEN.
    IF screen-group1 = c_group1.
    if button1 = 'X'.
    screen-active = 1.
    else
    screen-active = 0.
    endif.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    Regards

Maybe you are looking for

  • Value in data type p filed not displayed properly

    Hi, One of my programs downloads a file to UNIX server, here the data which i am downloading, one of the fields is of type P (it is of domain type DEC). The field displays very strangecharactershen i view it in UNIX server. I am using OPEN DATASET in

  • TS3274 My screen has stopped rotating...how do I fix this?

    My screen has stopped rotating when Inchance the angle...how do I fix this?

  • Calling javascript from java

    I am not able get the javascript funtion executed. Pl. help me. A Javascript function is called from Java by using the showDocument method. A URL is needed with "javascript:" as the protocol. [Java applet] import java.applet.*; import java.net.*; pub

  • Create order based upon notification in NWBC / Portal

    Dear experts, How to create a maintenance order based upon a notification, using the POWL for notifications ? I am using NWBC and would like to create a maintenance order, based upon a notification put in process. In R/3, this works fine using transa

  • How to acquire video from PCI TV tunner card in Labview

    Hello Guys, I am a new commer in this fourm and this is my first post. I am working on a project where i need to acquire analog video into labview 8.5 for this purpose i have a analog security camera and PCI TV tunner card (Manufactured by ASUS) and