How to use offset for select-option parameter ?

Hi experts
could anybody please let me know how to use offset for select-option parameter. i can able to use offset for table fields, variabiles and all , but don't know how to use for parameters.
following is my code
SELECT-OPTIONS: s_prctr  FOR vbsegs-prctr OBLIGATORY.
here "prctr"  length is 10.
i'm using two tables  1. vbsegd-bupla
                                2. vbsegs-prctr
here prctr+6(4) = bupla.
"Bupla" length is 4
SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
                                                             WHERE belnr = it_vbkpf-belnr
                                                               AND gjahr = it_vbkpf-gjahr
                                                               AND bukrs = it_vbkpf-bukrs
                                                               AND bupla IN s_prctr.  
the above statement is not working as prctr and bupla lenths are different. here i want to use offset.
SELECT belnr gjahr bukrs prctr sgtxt buzei FROM vbsegs INTO CORRESPONDING FIELDS OF TABLE it_vbsegs FOR ALL ENTRIES IN it_vbkpf
                                                            WHERE belnr = it_vbkpf-belnr
                                                              AND gjahr = it_vbkpf-gjahr
                                                              AND bukrs = it_vbkpf-bukrs
                                                              AND prctr IN s_prctr.
this is working as prctr and s_prctr lengths are equal.
could anybody please help me out in this.
Thanks in advance.
regards
satish

Below code will work for you.
SELECT-OPTIONS: s_prctr  FOR vbsegs-prctr OBLIGATORY.
RANGES: s_bupla FOR vbsegd-bupla.
s_bupla[] = s_prctr[].
DELETE ADJACENT DUPLICATES FROM s_bupla.
SELECT belnr gjahr bukrs bupla sgtxt buzei FROM vbsegd INTO CORRESPONDING FIELDS OF TABLE it_vbsegd FOR ALL ENTRIES IN it_vbkpf
                                                              WHERE belnr = it_vbkpf-belnr
                                                                AND gjahr = it_vbkpf-gjahr
                                                                AND bukrs = it_vbkpf-bukrs
                                                                AND bupla IN s_bupla.

Similar Messages

  • How to assign search help using ovs for select options for ALV in web dynpr

    how to assign search help using ovs for select options for ALV in web dynpro

    Hi,
    refer http://wiki.sdn.sap.com/wiki/display/WDABAP/InputhelpofObjectValueSelectioninWDABAP
    http://www.****************/Tutorials/WebDynproABAP/OVS/page1.htm
    and http://wiki.sdn.sap.com/wiki/display/Snippets/WebDynproAbap-OVSsearch+help
    Thanks,
    Chandra

  • How to do validations for select-options

    Hi gurus,
    can you suggest me
    how to do validations for select-options
    Thanks&ragards,
    Kals.

    HI,
    TABLES: BKPF.
    TYPES: BEGIN OF TY_BKPF,
           BUKRS TYPE BUKRS,   "COMPANY CODE
           GJAHR TYPE GJAHR,   "FISCAL YEAR
           MONAT TYPE MONAT,   "FISCAL PERIOD
    DATA: T_BKPF TYPE TABLE OF TY_BKPF,
          W_BKPF TYPE TY_BKPF.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS: S_CODE   FOR BKPF-BUKRS,
                    S_YEAR   FOR BKPF-GJAHR,
                    S_PERIOD FOR BKPF-MONAT.
    SELECTION-SCREEN: END OF BLOCK B1.
                        AT SELECTION-SCREEN                           *
    IF S_CODE IS INITIAL OR S_YEAR IS INITIAL OR S_PERIOD IS INITIAL.
      MESSAGE E000(0) WITH 'ENTER VLAUES'.
    ENDIF.
    SELECT SINGLE * FROM BKPF WHERE BUKRS IN S_CODE.
      IF SY-SUBRC <> 0.
      MESSAGE E000(0) WITH 'ENTER VALID VALUES'.
      ENDIF.
    reward if useful
    thanks and regards

  • How to add OBLIGATORY for SELECT-OPTIONS

    Hi experts,
    I can use OBLIGATORY for PARAMETERS
    PARAMETERS :s_WMno  TYPE LINK-LGNUM DEFAULT 'SCA' OBLIGATORY.
    I want to add OBLIGATORY for SELECT-OPTIONS. How to do this?
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME .
        SELECT-OPTIONS:  s_matnr FOR mara-matnr .
    SELECTION-SCREEN END OF BLOCK b1.
    Many thanks.

    Hi,
    TABLES spfli.
    SELECT-OPTIONS : carrid FOR spfli-carrid OBLIGATORY. " This makes only Low field Obligatory
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name = 'CARRID-HIGH'. " To make High field also obligatory
          screen-required = 1.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Cheerz
    Ram

  • How to pass value to select-option parameter using SET PARAMETER Command

    Hi,
        Am passing values to selection-screen fields in report RV13A004 ( used in VK11, VK12 and VK13). using below statement but material number is select-option in this report. am able to pass  MATERIAL FROM using SET PARAMETER ID, can i know how to pass values MATERIAL TO range in select-options fields using SET PARAMETER Command ??
    Passing values to parameter id
    set parameter id 'VKS' field kschl.
    set parameter id 'VKO' field vkorg.
    set parameter id 'VTW' field vtweg.
    set parameter id 'KDA' field erdat.
    set parameter id 'MAT' field matnr_from.
    Change condition price.
    call transaction 'VK12' and skip first screen.
    Thanks in advance.
    Regards,
    Balamurugan.

    Hi,
    instead of using set parameters and dden call transaction use this..........
    submit RV13A004  WITH SELECTION-TABLE rspar
    Effect
    If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:
    SELNAME (length 8),
    KIND (length 1),
    SIGN (length 1),
    OPTION (length 2),
    LOW (length 45),
    HIGH (length 45).
    To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:
    SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals
    KIND must contain the type of selection screen component (P for parameters, S for selection criteria)
    SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.
    If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.
    The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.
    Notes
    In contrast to selection tables, the data types of the components LOW and HIGH in table rspar are always of type CHAR and are converted to the type of the parameter or selection criterion during transfer, if necessary.
    When entering values, you must ensure that these are entered in the internal format of the ABAP values, and not in the output format of the screen display.
    Cheers
    Will.

  • How to use offset in select query

    Suppose i have data like ssonje     00000001 as a one field in database table . i have to segregate this two data. how should I do this.the first part is of 12 characters and the last is of 10 character long.

    Hi Naveen,
    I am again in trouble, Now the requirement were changed. I am sending you the code which i had implemented.
    Now, the user enter username(ie UNAMED) and document id (ie. TEMPD) and the output should be doucment id, which has been search through database table RFDT , field SRTFD, this field contains both the username and the document id.
    That means: suppose user enters UNAMED as SSONJE and TEMPD as 0000000030, then i want to fier the select query from RFDT on field SRTFD and get only the document id of that user which user enter on input field-UNAMED.
    i had tried but result were not coming.
    please go through the code.
    data:uname type UF05A-UNAMD.
    data:temp type UF05A-TEMPD.
    TYPES: BEGIN OF TEITAB_RFDT,
           SRTFD TYPE RFDT-SRTFD,
           END OF TEITAB_RFDT.
    DATA: ITAB_RFDT TYPE TABLE OF TEITAB_RFDT.
    DATA: WA_RFDT TYPE TEITAB_RFDT.
    DATA: STR(22) TYPE c.
    SELECT-OPTIONS:UNAMED FOR uname,
    TEMPD FOR TEMP.
    UNAMED-option = 'CP'.
    append UNAMED.
    CONCATENATE UNAMED TEMPD INTO STR.
    SELECT SRTFD FROM RFDT INTO CORRESPONDING FIELDS OF TABLE ITAB_RFDT WHERE SRTFD eq str.
    LOOP AT ITAB_RFDT INTO WA_RFDT.
    SPLIT WA_RFDT AT SPACE INTO STR1 STR2.
      WRITE: / STR1,STR2.
    ENDLOOP.
    Please mentioned what is the way to do this.
    Thanks

  • How to use OFFSET for CHAR type value in Bex query

    infoobject A value = 1102007
    Type = CHAR
    I want to have an offset for this infoobject created in query say 1 to 12 months
    in month of 10/2007 value = 1102007
    remember above 1 is always CONSTANT
    then
    in month of 11/2007 value = 1112007
    in month of 12/2007 value = 1122007
    how to do this since the infoobject is of TYPE- CHAR ,its gives we cannot do the OFFFSET in the query ,for doing OFFSET the infoobject must be of type numeric or NUMC.
    is it possible achieve this in to update rules?? since i cannot change the type of this infoobject now in the middle of production support
    please help
    thanks

    Hi,
    You will have to add a characteristic to your cube.
    The format should be NUMC
    In the update-routine you will have to convert the char value to numc
    Success
    udo

  • How to get calender in f4 help for select options in module pool (URGENT)

    Hi All,
    how to get calender in f4 help for select options in module pool
    Please help .
    Thanx in advance,
    amruta

    Hi Amruta,
    First of all, you can not create select-options directly in module pool.
    For creating <b>select-option is dialog prog</b> follow these steps:
    1. create your selection screen model as subscreen by:
    SELECTION-SCREEN BEGIN OF SCREEN 2000 AS SUBSCREEN.
    PARAMETRS: P_MATNR LIKE MARA-MATNR.
    SELECT-OPTIONS: S_BISMAT FOR MARA-BISMAT.
    SELECTION-SCREEN END OF SCREEN 2000.
    2. create a screen ( example 100 ) in your module-pool dedicated for selection-screen. on this screen layout sketch a sub-screen name like subscree_2000.
    3. write this bit of code in PBO and PAI of the screen 100;
    CALL SUBSCREEN SUBSCREEN_2000.
    4. include this code in PBO:
    INCLUDING SY-REPID '2000'
    6. write user_command of PAI, call screen which is going to executable after selection-screen.
    5. create a transcation for this dialog module pool with screen 100.
    6. execute this transaction and you can see it's behaving like cool with select-options.
    After that in [bprocee on value-request]</b>, use F4_DATE for both from and to option field.
    Hope it will solve the problem.
    Regards
    Krishnendu

  • HOW  TO PASS SELECT-OPTIONS PARAMETER TO A FUNCTION MODULE.

    Hi friends.
    HOW DO U PASS A SELECT-OPTIONS PARAMTER TO A FUNCTION MODULE AS ITS IMPORT PARAMETER(IN MY CASE rfc fM) .
    Really urgent!!!
    thanks to one and all

    Hi,
    If you are passing a single value, its better you take it from s_option-low or s_option-high (select options).
    Else if you are passing values to the FM in a loop for all select option values, then better you declare an internal table with type <b>WSELKUNNR</b>.
    get low & high fields from each row & pass them.
    It will make you clear when you check out your select options in debug mode by entering different combinations of inputs.

  • How to set default values in initialization event for select option

    Abapers,
    I have 3 GL account like 0024831231,0024831238,0024831245.
    Please help me how to set default values in select-options ( s_hkont ) in INTIALIZATION event
    Thanks

    Select option is table <Structure> with fields, low, high, sign & option
    you need to append the value into the select option, with appropriate value in low or
    example:
    S_HKONT-low  = <value>
    S_HKONT-SIGN = 'I'
    S_hkont-OPTION = 'EQ'
    append s_hkont.
    Default value for select-option also can be added directly in select-option statement.
    Regards,
    Mahesh

  • F4 help for select options based on parameter value

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

    hi all,
    I need a help to create an F4 help for select options for object id based on parameter value of object type, I mean once an object type is given the f4 help should contain object id's only of that type for each option.
    Regard's,
    Girija
    Moderator Message : Duplicate post locked. Continue with [f4 help for select options based on parameter value |f4 help for select options based on parameter value;.
    Edited by: Vinod Kumar on May 17, 2011 1:36 PM

  • How to write Error message for select options?

    Hi
    i have this select option statement
    SELECT-OPTIONS: s_fevor FOR afko-fevor.
    how to write error message for this?
    Regards
    Smitha

    Error messages are displayed for Select-options mostly on two conditions:
    1) You needs to check wether a value is entered or not its done by:
    a)
    Select-options:SELECT-OPTIONS: s_fevor FOR afko-fevor Obligatory.
       In this case error message is automatically throwed by system.
    b) You can do this in Selection Screen events.
    Ex:
    AT SELECTION-SCREEN./AT SELECTION-SCREEN ON S_FEVOR.
    IF S_FEVOR-LOW IS INITIAL.
    MESSAGE 'XXXXX' TYPE 'E'.
    ENDIF.
    2) You need to Validate the entered value:
    You can do this in Selection Screen events.
    Ex:
    AT SELECTION-SCREEN./AT SELECTION-SCREEN ON S_FEVOR.
    SELECT FEVOR
                 FROM AFKO
                 INTO AFKO-FEVOR
                 UP TO 1 ROWS
    ENDSELECT.        
    IF SY-SUBRC NE 0.
    MESSAGE 'XXXXX' TYPE 'E'.
    ENDIF.
    Regards,
    Gurpreet

  • How to use ABAP include in SLT parameter

    Hi Frzz,
    Could some one guide me how to use ABAP include in SLT parameter to perform calculations.
    Best Regards,
    Krishna.

    Hi,
    We can have ABAP includes within SLT advanced replicaiton settings.
    Go to IUUC_REPL_CONTENT select the applicable schema configuration name.click on "Select Configuration" button.
    you could see all the tables that are in replication.
    select the required table and then click on "edit settings for selected tables".
    in the next screen select "IUUC_***_RUL_MAP" tab . here we hve the option to insert line of code or abap include as per the requriement.
    please refer the techincal manual of SLT as well for more detailed information on advanced replicaitons within SLT.
    Thank you.
    Shishupal

  • Freely Programed Help for select-option field

    Hi,
    how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    Please suggest where i am doing wrong??
    Edited by: kranthi kumar on Dec 29, 2010 6:19 PM

    >
    kranthi kumar wrote:
    > Hi,
    >
    > how can i set freely programmed help for select option field, i mean while adding selection field what are the parameters that are important for freely programmed help.
    >
    > i have implemented iwd_value_help in one component comp1 and declared the usage of comp1 in comp2 where i actually defined the usage of select-option component.
    >
    > i used parameter   i_value_help_type = if_wd_value_help_handler=>co_prefix_appldev while adding selection field, however when i presss F4 icon, the following message is coming
    >
    > View WD_VALUE_HELP does not exist within the component WDR_SELECT_OPTIONS
    >
    > Please suggest where i am doing wrong??
    >
    > Edited by: kranthi kumar on Dec 29, 2010 6:19 PM
    Hi Kranthi,
    Please help me to understand your design.
    Why would you like to create a Freely programmed value help for select-option?. why not use wdr_select_option directly ?

  • Using roadmap and select-options

    I'm new to abap web dynpro, i'm using a roadmap with 4 views. This is working fine but, when I try to use select options in view1 they don't show. When I set view1 as default view the select options are working fine.
    this is how my current web dynpro looks like:
    Main view -> roadmap with viewcontainerUIElement
        view1 -> viewContainerUIElement + table (in the window I embedded the select options in the viewContainerUIElement)
        view2
        view3
        view4
    In view1 I'm using wddoinit to initialise the select options.
    Thanks in advance!

    Hi Srinivas,
    According to you mail, I will provide some solution please try them. It will definitely works.
    ---> Create a attribute which holds the lead selection values of the RADIO_GROUP.
    ---> When you click on the Next View, You will fire the plug. Right. Just before firing the Plug, update the above
          attribute with update information.
    > Do the same code for Select-options code in the WDDOINIT except the passing the values to the select-options.
    > Please pass the attribute information to Select-options with updated information in the method WDDOMODIFYVIEW every time. Without creating a attribute also you can approach the same method. Just for simple access we can create a attribute. Otherwise without that we can do the same.
    So Just populate the values into Select-options depending on the value of RADIO_GROUP you will do the same coding WDDOMODIFYVIEW. But initialization of SELECT-OPTIONS can be only done in the method WDDOINIT method only. WDDOINIT method only execute first time once you go through it and go back and move forward then this method won't execute.
    I hope this logic will work for you. If not Please send me the Code related to SELECT-OPTIONS and RADIO_GROUP Button information.
    I will be in office today up to 4.45 PM (IST). You can contact me in this time otherwise we will discuss on webex tomorrow morning at 9 AM.
    Warm Regards,
    Vijay

Maybe you are looking for

  • The document could not be saved error when Saving to a SharePoint Document Library

    I am having an error when opening and commenting on Adobe PDF's that are stored in SharePoint 2010. When I attempt to save a PDF I have commented on I get the following error: The Document could not be saved. The server said: "The operation failed be

  • OS X 10.5.6 versus Windows Server 2000 SFM

    We have recently deployed a number of Macintosh (Mac Pros and iMacs) running OS X 10.5.6. When copying a directory to a Windows Server 2000 running Services for Macintosh, the directory permission are not duplicated and, more problematically, cannot

  • Icons not showing in munu bar

    Hi , I migrated my forms into 10g successfully. I am having an issue with icons . All my icons are showing on the menu bar except for two. if I take the mouse and move the mouse The hint displays but the icons are not visible. the properties are the

  • Inserting Fields in AppleWorks

    I am attempting to insert another field into the database, but I get a message saying that there is not enough room for the extra field and that I should move things around to make room. I've made enought room to hold about 3 extra fields, and I keep

  • Java error message 'Can't find Java Home'

    While Installing an application, I can see the error popup window 'Can't find Java Home'. Why it occur the error message only most newer PC. Please advise me Thanks in Advance, Ponmuthu