BAPI at INPUT give range like SELECT-OPTIONS

hi all
     i don't know weather it right forum for BAPI , but writing under this .
     my requirement is like , as we give range in SELECT-OPTIONS,
like wise i want to give range in BAPI at INPUT level .
i.e.  say i want to get details of Vendors , i will write a BAPI and i will give VENDOR code range to get information of all vendor with in that range.
please guide me in this .

Hi!
You could use this bapi fm: BAPI_VENDOR_GETDETAIL
I could imagine it like this:
1. You have to create an FM, with the RA_LIFNR range.
2.
SELECT * FROM lfa1 INTO TABLE gt_lfa1
WHERE lifnr IN ra_lifnr.
LOOP AT gt_lfa1 INTO gs_lfa1.
CALL FUNCTION 'BAPI_VENDOR_GETDETAIL'
with the parameters
collect data into an output table
ENDLOOP.
3. Give back the output table to the caller program
Regards
Tamá

Similar Messages

  • HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.

    HOW TO DESIGN RANGE SELECTION IN MODULE PULL LIKE SELECT-OPTION.
    how can we add range selection in screen painter.
    regards.

    Hi,
       create two input fields and a push button like select option in the screeen.
    Try checking this logic
    <b>Program:</b>
    <b>ranges</b> ra_matnr for mara-matnr.
    <b>Layout field name declaration:</b>
    Give the low field name as ra_range-low
      and high field name as ra_range-high.
    extension for pushbutton.--exten(function code)
    next -- function code for the enter key.
    PBO
    module status_3000.
    PAI
    module user_command_3000.
    <b>module user_command_3000.</b>
    if sy-ucomm = exten.
      call screen 400. (screen which shows extension values can be kept).
    elseif sy-ucomm = Next.
    if ra_matnr-low is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    if ra_matnr-high is not initial.
        ra_matnr-SIGN = 'I'.
        ra_matnr-OPTION = 'EQ'.
        APPEND ra_matnr.
        clear ra_matnr.
    endif.
    endif.
    endmodule.
    module status_3000.
    read table ra_matnr  index 1 into ra_matnr .
    set pf-status '3000'.
    set title '3000'.
    endmodule
    Br,
    Laxmi.

  • Z_Dialog prog initial input screen-looking like selection screen of Report?

    Hi Experts,
    In internet, I found 2 screens( code is not mentioned there) and mentioned that, they r Dialog Prog. screens, they r as below,
    1 - Initial input screen-programmer mentioned it as a selection screen-1000
    2 - Output screen in ALV grid (Object ALV)
    So, when I saw this initial input screen, it looks like same as selection screen 1000 of a report prog., I mean, its containing all selection screen components, like Select-options with out interval, with out extension, blocks, titles for these blocks!!
    So,pls. let me know that,
    1) How the programmer achived this screen? is he used like,
    SELECTION SREEN 1000 START
    END OF SELECTION SCREEN 1000
    2) How these input fileds r looking like select-optins, parameters,  blocks etc.?
    thanq

    Putting selection screens on dialogue transactions have been covered before in the forum. Please search.
    Rob

  • How to get all values in the range of select option into internal table?

    Hi,
    I need to capture all entries coming in the range of select option into one internal table.
    How to do get that?
    For E.g
    select-options: matnr for mara-matnr.(select option)
    IF I enter G0100013507892 as lower value of matnr and G0100014873947 as higher value
    and if there are 10,000 materials in the above range, then I want to capture all theses 10000 materails in one internal table. How to do that?
    Regards,
    Mrunal

    Hello Mrunal Mhaskar  ,
    What i understand you can do one thing  go in debug mode
    Try this code : -
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-low IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-low.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    LOOP AT s_matnr_ex.
      IF s_matnr_ex-high IS NOT INITIAL.
        i_matnr-matnr = s_matnr_ex-high.
        i_matnr-option = s_matnr_ex-option.
        APPEND i_matnr.
        CLEAR : i_matnr.
      ENDIF.
    ENDLOOP.
    In the i_matnr table high and low values are there.
    Regards,
    Vandana.

  • Is possible in a dialog screen attach a field functional like select-option

    hi,
       Is it possible - in a dialog screen - to attach a field that has functionality like Select-options fields?
    And if so - how?
    and information about complex_selections_dialog

    Hi,
    Look at the below links
    module pool programming " to add selection-option on screen"
    module pool programming " to add selection-option on screen"
    Regards
    Sudheer

  • Multiple inputs like select-option

    Hi everybody,
    Please let me know if there exists an option in BSP for multiple inputs in inputfield, like we have in select-option in R/3.
    Thanks

    Hello Swarnali,
    You need to fill internal table of select-option once you got into the event AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    so sudo code will be:
    AT SELECTION-SCREEN ON VALUE REQUEST FOR so_carr-LOW.
    Select data from table.
       so_carr-LOW = value
       append so_carr.
    You can also use NO INTERVAL to suppress the so_carr-HIGH value on selection screen.
    Thanks,
    Augustin.

  • How to restrict more than one 1 range in select option on selection screen.

    Hi all,
    I have a requirement where I need to restrict user from giving more than 1 range for a date selct option ..other all features of multiple selection will be as usual...
    for eg we can do this if we disable / hide other cells if the user clicks on multiple ranges tab.. If only 1 cell is available to give the range user will not be able to give more than 1 range....
    I was thinking if I could use select_options_restrict but how do i fill its parameters...
    Can anyone send me the sample code or the same to achieve this functionality...I have used select_options_restrict to hide multiple ranges itself  ... But here user will be able to give range but only 1....
    Thanks and Regards
    Sweta

    HI,
    Please try the below logic.
    SELECT-OPTIONS: so_addr   FOR    ADR6-SMTP_ADDR NO INTERVALS.
    ***********remove_range_for_select_option******************* .
      DATA: ls_restrict  TYPE  SSCR_RESTRICT,    "The type for SELECT_OPTIONS_RESTRICT
            ls_opt_list  TYPE  SSCR_OPT_LIST,    "One list of options
            ls_asn       TYPE  SSCR_***.         "One line of table associating selection screen
                                                                      "object with opt. list
      CLEAR: ls_restrict,
             ls_opt_list,
             ls_asn.
    *Only EQ valid, discrete values, Include & Exclude
      ls_opt_list-name       = 'EQ'.
      ls_opt_list-options-eq = 'X'.
      APPEND ls_opt_list TO ls_RESTRICT-OPT_LIST_TAB.
      LS_ASN-KIND            = 'S'.
      LS_ASN-NAME            = 'SO_ADDR'.            "Select Option
      LS_ASN-SG_MAIN         = 'I'.
      LS_ASN-SG_ADDY         = '*'.
      LS_ASN-OP_MAIN         = 'EQ'.
      LS_ASN-OP_ADDY         = ' '.
      APPEND LS_ASN TO LS_RESTRICT-***_TAB.
    *Make use of SELECT-OPTIONS easier on the selection screen
      CALL FUNCTION 'SELECT_OPTIONS_RESTRICT'
        EXPORTING
          RESTRICTION            = LS_RESTRICT
        EXCEPTIONS
          TOO_LATE               = 1
          REPEATED               = 2
          SELOPT_WITHOUT_OPTIONS = 3
          SELOPT_WITHOUT_SIGNS   = 4
          INVALID_SIGN           = 5
          EMPTY_OPTION_LIST      = 6
          INVALID_KIND           = 7
          REPEATED_KIND_A        = 8
          OTHERS                 = 9.
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Edited by: Rajasekhar Reddy P on Mar 16, 2009 2:03 PM

  • Parameters will it work like Select-Option is there any chance

    Hi Every One
    I am using Parameters to do selection .but in one case i need to get  some data for the whole month .i have the values in 2 different variables .(If we use select-option then we can use sign,option,low,high .).but how to do here . Any idea is please do let me know.
    Sravya

    Hi,
    <li>Define range table.
       DATA:r_data TYPE RANGE OF datum,
            w_data LIKE LINE OF r_data.
    <li>Build range table
       w_data-low  = parameter1.
       w_data-high = parameter2.
       w_data-sign  = 'I'.
       w_data-option  = 'BT'.
       APPEND w_data TO r_data.
       CLEAR  w_data.
    <li>Use that in SELECT statement.
    SELECT * FROM <db_tab> INTO TABLE <it_tab> WHERE <date_field> IN r_data.
    Thanks
    venkat.O

  • Import parameter shall be same type like select option

    Hey guys,
    how can i make it possible that my importparameter of my FB has the type of the select option field of my program??
    I need something like a tabletype or a list of values.
    Thx

    Hi,
    <li>Define like below
    DATA: s_matnr TYPE RANGE OF mara-matnr.
    or
    TABLES: mara.
    RANGES: s_matnr FOR mara-matnr.
    Thanks
    Venkat.O

  • Using widecard character or range in selection option

    Hi gurus',
    i am making a report on PS Module.
    I have taken selection fields as follows.
    SELECT-OPTIONS : in_psphi FOR proj-pspnr OBLIGATORY        "Project
    when i run and insert the project name in in_psphi-low and in_psphi-high then output will come accordingly.
    now i want to put project range using widecard character say  IC* or IC-0000000001 to IC-999999999
    then it has shown project not found. I found in many standard reports like CN52N where  you can put widecard character or range like above.
    Please let me know how to do.
    Pravin

    hello parvin,
    use this code and then execute your program,
    now you would be able to fetch the projects with wild card entry serach
    DATA: PSPID1 TYPE  PROJ-PSPID.
    RANGES: R_PNR  FOR  PSPID1.
    RANGES: R_PSPID FOR PSPID1.
    SELECT-OPTIONS: S_PSPID FOR PSPID1.
       IF NOT S_PSPID[] IS INITIAL.
         LOOP AT S_PSPID.
           IF  NOT S_PSPID-HIGH IS INITIAL.
             IF S_PSPID-HIGH CA '*' .
               R_PNR-LOW = S_PSPID-HIGH.
               R_PNR-OPTION = 'CP'.
               R_PNR-SIGN = 'I'.
               APPEND R_PNR.
               CLEAR R_PNR.
    * GET HIGHER VALUE
               SELECT MAX( PSPID )
                           INTO R_PSPID-HIGH
                           FROM PROJ
                           WHERE PSPID IN R_PNR.
               IF R_PSPID-HIGH IS INITIAL.
                 SELECT MAX( PSPID )
                         INTO R_PSPID-HIGH
                         FROM PROJ
                         WHERE PSPID <= S_PSPID-HIGH.
               ENDIF.
             ELSE.
               R_PSPID-HIGH = S_PSPID-HIGH.
             ENDIF.
    * GET LOWER VALUE
             IF  S_PSPID-LOW  CA '*' .
               SELECT MIN( PSPID )
                       INTO R_PSPID-LOW
                       FROM PROJ
                       WHERE PSPID IN S_PSPID.
               IF R_PSPID-LOW IS INITIAL.
                 SELECT MIN( PSPID )
                      INTO R_PSPID-LOW
                      FROM PROJ
                      WHERE PSPID >= S_PSPID-LOW.
                 IF  R_PSPID-LOW IS INITIAL.
                   R_PSPID-LOW =  S_PSPID-LOW.
                 ENDIF.
               ENDIF.
             ELSE.
               R_PSPID-LOW =  S_PSPID-LOW.
             ENDIF.
             R_PSPID-OPTION = S_PSPID-OPTION.
             R_PSPID-SIGN = S_PSPID-SIGN.
             APPEND R_PSPID.
             CLEAR R_PSPID.
           ELSE.
             R_PSPID = S_PSPID.
             APPEND R_PSPID.
             CLEAR R_PSPID.
           ENDIF.
         ENDLOOP.
         S_PSPID[] = R_PSPID[].
       ENDIF.
    now use the s_pspid  as u were using earlier.
    It will surely help
    Regards
    Geeta gupta

  • Create Popup like Select options

    Hi at all,
    I want to create a button that calls a popup like in the select options, without using the select options component.
    In Standard ABAP there is a function called "COMPLEX_SELECTIONS_DIALOG" who creates and call the dialog.
    Does anybody know an adaption for this function in Web Dynpro for ABAP?
    Thx a lot to all.
    Dirk

    Hello Dirk,
    We have a new enhacement in code wizord by which you could replicate a screen into a webdynpro view.
    So the framework would choose different ui elements to create similar screen,
    Regards
    Anurag Chopra

  • ZScreen(SE51)   Input field  should have Select option

    Hi ,
    I need to create one Select option on Screen designed using screen painter .
    Later I want to use in PAI of screen in select query as Select option .
    Mean to say in where clause of select query i have to use <b>IN</b> for that input field .
    Looking for some helpful responses .
    SS

    Hi,
    You can create a selection screen by using the normal SELECT-OPTIONS command as a subscreen and then call the subscreen in your main screen.
    SELECTION-SCREEN BEGIN OF SCREEN scr AS SUBSCREEN.
    call the sub screen using normal command.
    CALL SUBSCREEN b INCLUDING prog dynnr .
    regards,
    Mahesh

  • High range in select-options

    how to hide the high value in select-options statement,its urgent

    hi,
    at designing only u can make select options with out high value as
    tables : MARA.
    SELECT-OPTIONS : s_MATNR FOR MARDt-MATNR NO INTERVAL
    at run time to hide the selct options high value try like this
    AT SELECTION-SCREEN OUTPUT.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'S_MATNR-HIGH'.
    SCREEN-INVISIBLE = 1.
    SCREEN-ACTIVE = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP
    IF HELPFUL REWARD SOME POINTS.
    with regards,
    Suresh aluri.

  • Multiple range in select option

    Hi,
    I have to give four ranges for Gl account at the time of data selection. so could you please tell me how can I do this.
    For exa : 1.(2111 to 2222) or
                  2.(2333 to 2444) or
                  3.(2555 to 2666) or
                  4. (2777 to 2888).
    Regards,
    Amar

    Hi,
    ranges: r_fieldname for tablename-fieldname.
    r_fieldname-sign = 'I'.       "including
    r_fieldname-option = 'BT'. "between
    r_fieldname-low = '2111'.
    r_fieldname-high = '2222'.
      APPEND r_fieldname.
      Clear       r_fieldname.
    same way append 2333 to 2444,  2555 to 2666, 2777 to 2888
    Thanks,
    Krishna..

  • Select options restrication of ranges

    Hello Experts.
    in the selection screen i need to have an option to enter the movement types.suppose if user  will give like 10 and 100.The system should not take all the values between 10 to 100 like select options. It SHOULD GIVE ONLY 10 AND 100 RECORDS so please tell me how to code this . Already i declared like .. select-options s_bwart for mseg-bwart. so please tell me how to restrict this even if i use select options also. Thanks for all the replies.

    Dear,
    This is quite simple.
    Do like this in your declration.
    SELECT-OPTIONS : S_BWART FOR MSEG-BWART  NO-EXTENSION .
    here you have single input field for BWART in your selection screen, with a arrow in front of it.
    Click on this arrow and now enter all values which need to be entered.
    10
    100
    and now only these  which you put here is considered only.
    reward if useful.
    Amit Singla
    Message was edited by:
            Amit Singla

Maybe you are looking for

  • HP M8100N pavilion usb ports no longer recognizes external drive

    My Paviilion M8100N USB ports no longer recognizes my external drives. I have VISTA premium operating system.

  • How can I display multiple column results of a sql query?

    I'm wanting to display the results of a query selecting from multiple columns, but I can't seem to find an item type that will allow this. I've tried LOV, multiselect, display as text and others. Any ideas on how to do this. Here is my basic query: S

  • Can't access movies and television section of podcast directory

    Very simply, as of this afternoon, every time I click on the Movies and Television category of the podcast directory, I get a message telling me that this feature is not available in the UK. All other sections work as normal. Any ideas?

  • Regarding one FM "text_convert_tex_to_sAP'

    hi friends data: begin of itab occurs 0,       itab(255) type c,       end of itab. data: var1 type TRUXS_T_TEXT_DATA. constants: file type RLGRAP-FILENAME value 'C:\DOCUMENTS AND SETTINGS\JANAGAR_S\DESKTOP\IDOCSTATUS.TXT' . CALL FUNCTION 'TEXT_CONVE

  • Broken speaker?

    I have a problem with calls - the speaker simply doesnt work! Sometimes it helps when I turn on the loudspeaker option, but not always. I've checked the speaker in "diagnosing" and everything works well, it seems not to work "only" when I'm making ca