The selection screen cannot choose the multiple values at first instance?

Hi All,
   I have 2 select-options on the selection screen as follows>>
SELECT-OPTIONS :
                   s_subusr FOR pa0105-usrid NO INTERVALS OBLIGATORY,   
                  s_period FOR vbak-erdat   NO-EXTENSION OBLIGATORY.   
When I try to enter multiple values by clicking the multiple option button when noting is entered as input on the selection screen.I get a error"Make entry in all required fields".
But when I enter a value on the selection screen input for s_subusr and then enter value in s_period and then click on multiple option button I am able to see the multi-option Popup.Now I can enter multiple Values.
Please can anyone help me to enter the values on the multiple option Pop-up whenever the user want?
Regards,
Shashank.

HI
OBLIGATORY means you have to enter the values , with out filling that values and if you click any thing it will show an error message saying that fill alla required fields
so if you want you can remove that
or if you want to keep that OBLIGATORY then fill some values 1st in that select-options and clcik on multiple entries button then it won't show any error
<b>Reward if usefull</b>

Similar Messages

  • Drop down box for the selection screen field of the classical report

    Hi all.
    i want to have the drop down list to choose from, for the region(table:zbwcntry-field:zregion1) on the selection screen.
    what is to be added to the code for this requirement.Also,please note that this is the classical report.
    thanks for this answered.

    hi,
    data  : gv_name  TYPE vrm_id,        " used for vrm id
               gv_repid TYPE sy-repid,      " used to hold program name
    work area to provide drop down list
    DATA :  gs_value TYPE vrm_value,
    Internal table to provide drop down list
    DATA :  gt_values TYPE vrm_values,
    PARAMETER : p_run(12) TYPE c AS LISTBOX VISIBLE LENGTH 12
                                     DEFAULT 'DEFAULT' OBLIGATORY,
    CONSTANTS : gc_run(5) TYPE c VALUE 'P_RUN',    "constant for run mode
    gv_name = gc_run.
      gs_value-key = gc_v1.
      gs_value-text = text-010.
      APPEND gs_value TO gt_values.
      gs_value-key = gc_v2.
      gs_value-text = text-011.
      APPEND gs_value TO gt_values.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id              = gv_name
          values          = gt_values
        EXCEPTIONS
          id_illegal_name = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    Hope this is helpful.
    Rgds.,
    subash

  • How to gray out certain fields on the selection screen based on the radio b

    HI All,
      I have an ALV report. On the selection screen I have 2 radio buttons ..for eg..A and B.
    When radio button A(its on by default) is on..certain fields not relevant to this should be grayed out. Similarly when radio button B is on, certain fields should be grayed out.
    I did the AT SELECTION SCREEN OUTPUT and also did the
    LOOP AT SCREEN....ENDLOOP logic. The logic works but when I click the radio button B...the screen fields automatically does not gray out. I have to press ENTER and then its grays out.
    I know a USER_COMMAND needs to be attached.
    Can anyone give me a step by step details of how to do this. I truly appreciate it. if a screen painter thing is required..please give me the tcode and step by step detail to do this.
    Thanks

    Try this one too:
    REPORT ztest.
    TABLES: mara,
            bkpf.
    CONSTANTS:
                  c_pos(3) TYPE c VALUE 'POS',
                  c_acc(3) TYPE c VALUE 'ACC',
                  c_all(3) TYPE c VALUE 'ALL',
                  c_x TYPE c VALUE 'X'.
    The Selection Screen Definition
    SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: s_mara FOR mara-matnr.
    SELECTION-SCREEN END OF BLOCK b_0.
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-037.
    PARAMETER: rb_all RADIOBUTTON GROUP rb1 USER-COMMAND rad default 'X',
               rb_acc RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF BLOCK b_1.
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-011. "Acct
    SELECT-OPTIONS:   s_blrtc1 FOR bkpf-blart MODIF ID acc,
                      s_blrti1 FOR bkpf-blart MODIF ID acc.
    SELECTION-SCREEN END OF BLOCK b_2.
    SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-011. "Acct
    SELECT-OPTIONS:   s_blrtc2 FOR bkpf-blart MODIF ID all,
                      s_blrti2 FOR bkpf-blart MODIF ID all,
                      s_blrtv2 FOR bkpf-blart MODIF ID all.
    SELECTION-SCREEN END OF BLOCK b_3.
    AT SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      PERFORM f0200_screenfield_hide_logic.
    initialization.
      PERFORM f0200_screenfield_hide_logic.
          FORM f0200_screenfield_hide_logic                             *
    FORM f0200_screenfield_hide_logic.
      LOOP AT SCREEN.
        IF rb_acc = c_x.
          IF screen-group1 = c_all.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
        IF rb_all = c_x.
          IF screen-group1 = c_acc.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDFORM.                    " F0200_SCREENFIELD_HIDE_LOGIC

  • How to Fill the selection screen while calling the transaction

    Hi All,
             my requirement is in one of the screen while i will press a push button it will call one transaction and it will fill the selection screen build order number field and skip the first screen i.e the selection screen it will show the output of that report directly.
    am using this code .
    case sy-ucomm.
    while 'FSLR'.
    set PARAMETER ID 'ANR' FIELD aufnr.
    RANGES s_aufnr FOR afko-aufnr.
          s_aufnr-sign   = 'I'.
          s_aufnr-option = 'EQ'.
          s_aufnr-low    = aufnr.
          APPEND s_aufnr.
    CALL TRANSACTION 'ZFS1' USING s_aufnr
         MODE 'E' .
        AND SKIP FIRST SCREEN.
    endcase.
    here the problem is i cant use both skip screen and using at a time nither the screen is filling nor its skipping the first screen.
    but its not working would any one please help how can i do this functionality?

    Hi
    Do in this way.
    DATA: rspar TYPE TABLE OF rsparams WITH HEADER LINE.
    rspar-selname = 'S_AUFNR'.
    rspar-kind = 'S'.
    rspar-sign = 'I'.
    rspar-option = 'EQ'.
    rspar-low = 'aufnr'.
    APPEND rspar.
    SUBMIT zfs1_prog  VIA SELECTION-SCREEN WITH SELECTION-TABLE rspar AND RETURN.
    If this doesnt suit yer requirement, I wud suggest you to use BDC as below.
    CALL TRANSACTION 'SE11' USING bdcdata
                           MODE   'E'
                           UPDATE 'A'.

  • Displaying Plant as F4 option in the selection screen according to the User Authorization

    Hi all,
    In the selection screen, I need to display the list of plants as F4 search help that the user has authorization.
    How I need to check from the table.
    Please provide me the exact table name where I can get the list of plants that the user has authorization.
    Thanks in Advance.
    Regards,
    karthik

    Hi Madan,
    Thanks for your reply.
    As of now Plant entered in selection screen is validated for authorization like below.
    authority-check object 'M_MATE_WRK'
          id 'ACTVT' field '02'
          id 'WERKS' field p_werks.
       if sy-subrc <> 0.
         message text-010 type c_e.
         exit.
       endif.
    But they are in need of Plants in F4.
    Regards,
    Karthik

  • Changing the selection screen based on the option in list box option

    Hi Experts,
    I have a list box parameter in my selection screen,
    i have four options and i am changing my selection screen based the option selected.
    see my code below,
    at selection-screen output.
      GS_VRM_VALUES-KEY = '1'.
      GS_VRM_VALUES-TEXT = TEXT-S02.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      GS_VRM_VALUES-KEY = '2'.
      GS_VRM_VALUES-TEXT = TEXT-S03.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      GS_VRM_VALUES-KEY = '3'.
      GS_VRM_VALUES-TEXT = TEXT-S04.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      GS_VRM_VALUES-KEY = '4'.
      GS_VRM_VALUES-TEXT = TEXT-S05.
      APPEND GS_VRM_VALUES TO GT_VRM_VALUES.
      CLEAR: GS_VRM_VALUES.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          ID                    = 'P_DROP'
          VALUES                = GT_VRM_VALUES
      EXCEPTIONS
        ID_ILLEGAL_NAME       = 1
        OTHERS                = 2
      IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    LOOP AT SCREEN .
        CASE P_DROP .
          WHEN '1'.
            IF SCREEN-GROUP1 = 'M2' OR
              SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN '2'.
            IF SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN '3'.
            IF SCREEN-GROUP1 = 'M2' OR
                SCREEN-GROUP1 = 'M4' .
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN '4'.
            IF SCREEN-GROUP1 = 'M2' OR
            SCREEN-GROUP1 = 'M3'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
              screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
          WHEN OTHERS.
            IF SCREEN-GROUP1 = 'M2' OR
               SCREEN-GROUP1 = 'M3' OR SCREEN-GROUP1 = 'M4'.
              SCREEN-INPUT = 0.
             SCREEN-ACTIVE = 0.
          screen-invisible = 1.
              MODIFY SCREEN.
            ENDIF.
        ENDCASE.
      ENDLOOP.
    my problem is when i change the option in the list box, the particular modify group ie, the screen is getting changed only after i press enter, So please suggest me how i can change the screen without pressing enter.

    Hi,
    without using VRM_SET_VALUES...you just create one data element by going se11....create one domain for it...now give the values in the "value range" tab....and at the time of declaration just write ..
    PARAMETERS var1 TYPE <your created data element>
                        AS LISTBOX VISIBLE LENGTH 20
                        USER-COMMAND onli
                        DEFAULT <one value>.
    You will get the same effect as list box....and make it mandatory..
    Arunima

  • How to add a field to the selection screen and when the user enters ...

    hi all,
    can any one plesase send the code of how to add a field to seletiion screen and when the user enters in the field , it should be store in the database table , the table is MKPF and the field is BKTXT.  Thanks.

    Hi Kripa,
       If u r using PNP ldb then the screen u will get is the screen for that ldb and if u want to add some more fields then u define using selection-screen..as follows
    SELECTION-SCREEN BEGIN OF BLOCK mysel WITH FRAME TITLE text-111.
    PARAMETERS: n_in_en  RADIOBUTTON GROUP g1,
                q_ev  RADIOBUTTON GROUP g1.
    SELECTION-SCREEN END OF BLOCK mysel.
    SELECTION-SCREEN BEGIN OF BLOCK mysel1 WITH FRAME TITLE text-222.
    PARAMETERS: r_date TYPE sy-datum DEFAULT sy-datum.
    SELECTION-SCREEN END OF BLOCK mysel1.
    SELECTION-SCREEN BEGIN OF BLOCK mysel2 WITH FRAME TITLE text-333.
    PARAMETERS:f_ver(3) TYPE c DEFAULT 1,
               c_no(10) TYPE c DEFAULT '9D0161',
               u_id(15) TYPE c,
               password(15) TYPE c,
               r_email(30) TYPE c DEFAULT PARAMETERS: s_not TYPE c AS CHECKBOX.
    PARAMETERS:t_run TYPE c  AS CHECKBOX.
    SELECTION-SCREEN END OF BLOCK mysel2.
    SELECTION-SCREEN BEGIN OF BLOCK mysel3 WITH FRAME TITLE text-444.
    SELECTION-SCREEN BEGIN OF BLOCK mysel4 WITH FRAME TITLE text-555.
    PARAMETERS: p_ser  RADIOBUTTON GROUP g2,
    a_ser  RADIOBUTTON GROUP g2.
    SELECTION-SCREEN END OF BLOCK mysel4.
    SELECTION-SCREEN BEGIN OF BLOCK mysel5 WITH FRAME TITLE text-666.
    PARAMETERS:p_path TYPE string.
    SELECTION-SCREEN END OF BLOCK mysel5.
    SELECTION-SCREEN END OF BLOCK mysel3.
    u will get this additional screen after the screen of ldb.
    I hope this will help u..
    Thanks & Regards
    Ashu Singh.

  • How to find out the selection screen values

    Hi All,
    in BI we are having the maximum allowed cells as 500000 for a report.
    for some of the reports execution fetching the data morethan 500000 by different users.
    i could findout the report and user who has executed, But i wanted to findout for which selection user has executed.
    is it possible to find out...please help.
    Thanks,
    Krishna.

    Hi,,
    Yes it is possible.
    Open your query result in the design mode by going to BEx Analyzer->Design ToolBar
    Now take one text element and assign it to the variable which you have used for the selection screen.
    Take the same number of text element as there are in selection screen.
    Exit the design mode. In place of the text element you will find the value of the variables assigned to them.

  • Retrieve input values from the selection screen

    I have a requirement to retrieve the variable value or values inputed from the selection screen and label the worksheet tab to replace the tab name 'Sheet1' from the Excel. The only way to do this would be to write a macro to label the sheets but how would I retrieve the value(s) from the selection screen criteria? Is the value of the selection screen entered by the user stored in some table? How would I write the macro to retrieve this value?
    For example, I want to retrieve the company code entered from the selection screen and lets say the company code entered as 10; I would want to replace the worksheet from 'Sheet1' to '10' . Texts would be more recognizable.

    Use the option Layout->Display Text Elements->Variables from the BEx toolbar. This will display Variable screen user input on your workbook in a fixed location. Then you can use your macro to name the worksheet with the cell reference.
    Thanks
    Vineet

  • F4 Help for the selection screen field

    Hi Gurus,
    I have to display F4 help for a selection screen field. i am using following code:
        CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
             EXPORTING
                  retfield        = 'CODE'
                  dynpprog        = lw_repid
                  dynpnr          = sy-dynnr
                  VALUE_ORG       = 'S'
             TABLES
                  value_tab       = gi_text
                 field_tab       = li_fields_tab
                  return_tab      = pi_return_tab
             EXCEPTIONS
                  parameter_error = 1
                  no_values_found = 2
                  OTHERS          = 3.
    My internal table gi_emp has two fields CODE & TEXT. When i select 1 particular value, it returns the CODE value in the pi_return_tab table.
    But my requirement is i have to capture the corresponding TEXT value for the Returned CODE. Ex: following is the F4 help being displayed: -
    001    test
    001    test1
    but is i select code 001(First Value), i also need to capture it's corresponding Text value. In return table pi_return_tab i have only Code value.
    Please help me out.
    Note: Based on return code i can't search into the internal table gi_code, because as shown in the example, code has multiple text.

    Sachin,
    I think this is what you need. The following code will return the key and the text (OR any other columns), if both columns are in the selection screen the selected values (both columns) will also be passed to the corresponding parameters. If you only need the text to be in the return table and not passed to the selection screen then set the parameter for text with NO-DISPLAY option.
    REPORT zktest01 .
    DATA :
      BEGIN OF value_tab OCCURS 0,
        field  LIKE e070-trkorr,
        text   LIKE e07t-as4text,
      END OF value_tab.
    DATA: t_fldtab LIKE dfies OCCURS 0 WITH HEADER LINE,
          t_rettab LIKE ddshretval OCCURS 0 WITH HEADER LINE,
          t_dynmap LIKE dselc OCCURS 0 WITH HEADER LINE.
    PARAMETERS : p_field  LIKE value_tab-field,
                 p_text   LIKE value_tab-text. "NO-DISPLAY.
    INITIALIZATION.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'FIELD'.
      t_fldtab-langu     = 'E'.
      t_fldtab-position  = 1.
      t_fldtab-offset    = 0.
      t_fldtab-fieldtext = 'Key'.
      t_fldtab-reptext   = 'Key'.
      t_fldtab-leng      = 20.
      t_fldtab-intlen    = 20.
      t_fldtab-outputlen = 20.
      t_fldtab-datatype  = 'CHAR'.
      t_fldtab-inttype   = 'C'.
      t_fldtab-headlen   = 20.
      t_fldtab-keyflag   = 'X'.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      t_fldtab-tabname   = 'VALUE_TAB'.
      t_fldtab-fieldname = 'TEXT'.
      t_fldtab-position  = 2.
      t_fldtab-offset    = 20.
      t_fldtab-fieldtext = 'Text'.
      t_fldtab-reptext   = 'Text'.
      t_fldtab-leng      = 60.
      t_fldtab-intlen    = 60.
      t_fldtab-outputlen = 60.
      t_fldtab-headlen   = 60.
      t_fldtab-keyflag   = ' '.
      t_fldtab-lowercase = ' '.
      APPEND t_fldtab.
      value_tab-field = '101'.
      value_tab-text = 'dddd'.
      APPEND value_tab.
      value_tab-field = '202'.
      value_tab-text = 'aaaa'.
      APPEND value_tab.
      t_dynmap-fldname = 'FIELD'.
      t_dynmap-dyfldname = 'P_FIELD'.
      APPEND t_dynmap.
      t_dynmap-fldname = 'TEXT'.
      t_dynmap-dyfldname = 'P_TEXT'.
      APPEND t_dynmap.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_field.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield        = 'FIELD'
                dynpprog        = 'ZKTEST01'
                dynpnr          = '1000'
                dynprofield     = 'P_FIELD'
                value_org       = 'S'
           TABLES
                field_tab       = t_fldtab
                value_tab       = value_tab
                return_tab      = t_rettab
                dynpfld_mapping = t_dynmap
           EXCEPTIONS
                parameter_error = 1
                no_values_found = 2
                OTHERS          = 3.
      IF sy-subrc EQ 0.
      ENDIF.
    START-OF-SELECTION.
    Jeffrey Satriadi

  • To display the selection screen variant name in WAD report output.

    Hello experts,
    I have a requirement which is to display the selection screen variant description in the output of the WAD report.
    I managed halfway, by using the object "Information field", which displays all the values which are selected by the variant.
    Example:I have created a cost center report created using WAD, since I need some graphical displays..
    In the selection screen, I have the characteristic "cost center" as input field. I have created a variant " GM - IT" which will include few cost centers managed by GM. In the output, I want the dispaly to be "Cost center - GM IT". Currently it displays "Cost Center - a,b,c,d" as the values a,b,c,d are the values from the variant name "GM-IT"
    Please let me know if this required any java script. I am not familiar with java / html codes and any help would be much appreciated (and rewarded)
    Thanks in advance
    KS

    Hi,
    Try this.
    If you want to include your variables in your WAD means you have to choose "Force Variable Screen" option to be in enabled condition.
    TO enable this,in WAD select your Template(New Template1) click the WEBITEM , it'll shows all generic properties , here you can enable this "Force variable screen"
    Save and execute your WAD now you can get your variable screen.
    Thanks,
    JituK

  • How to get the F4 help for a field in the selection screen

    Hi all,
    I am working on a report program. In the selection screen, I have the field 'Brand Node ID'(ZNODEID). The requirement is to have the F4 help for this field. This field is available in a 'Z' table ZNODETAB. There is no Value table maintained for the corresponding data element. So, without disturbing the table data element/domain, I should get the F4 help in the selection screen of the report. In the F4 help, data should be fetched from the table ZNODETAB and the field is ZNODEID. Is there any way to do this.
    By searching the function modules, I could find that, we can use the FM F4IF_INT_TABLE_VALUE_REQUEST. But, I am not Sure. Can someone tell me the parameters to be passed to this function module to get the F4 help and the procedure to follow. S_NODEID is the select option used in the program. Please help me in this regard. Thanks in advance.
    Thanks & Regards,
    Paddu.

    look at this code and try
    select-options : S_NODEID for ZNODETAB-ZNODEID.
    at selection-screen on value-request for s_nodeid-low
    perform f4_nodeid using 'S_NODEID-LOW'.
    at selection-screen on value-request for s_nodeid-low
    perform f4_nodeid using 'S_NODEID-HIGH'.
    end-of-selection.
    FORM f4_nodeid  USING    p_field.
      declare it_node.
    select znodeid from ZNODETAB into table it_node.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'ZNODEID'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = p_field
          value           = space
          value_org       = 'S'
          display         = 'F'
        TABLES
          value_tab       = it_node
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    endform

  • Parameter on the selection screen

    Hi All,
    I have a check box and a parameter on the selection screen. If the checkbox is initial, the paramter shouldn't be editable but if the checkbox is ticked, the parameter should be made mandatory to be enetered with value. How can this be done ?
    Thanks in advance.

    Hi,
    Refer to the following code.In this change radiobuttons with the checkbox.
    SELECTION-SCREEN BEGIN OF BLOCK B1.
    parameters: p_erdat like zirpactivity-erdat modif id SC1 ,
                r1 radiobutton group RAD1 user-command ABC default 'X',
                r2 radiobutton group RAD1.
    SELECTION-SCREEN END OF BLOCK B1.
    AT SELECTION-SCREEN.
      check sy-ucomm = 'ABC'.
      check sy-ucomm = 'F8'.
    AT SELECTION-SCREEN OUTPUT.
      loop at screen.
        if  r1 = 'X' and screen-group1 = 'SC1' .
          screen-input = 0.
        ENDIF.
        IF r2 = 'X'.
               screen-group1 = 'SC1'  .
          screen-input = 1.
        endif.
        modify screen.
      endloop.
    Hope this helps.
    Reward if helpful.'
    Regards,
    Sipra

  • Checking the Selection Screen Parameters

    Dear All,
    We are uploading data from various excel sheets into SAP tables. Now at selection screen I just want to check if the location specified exists or not ie. if I have created one variant on one system & then if I am running that report from other system using the variants, since the files does not exists it should throw the error and should return to the selection screen to enter the new parameters.
    Please help me in the code, I am attaching my code herewith.
    Waiting for ur responses,
    Nishu
    *********************CODE***************************
    tables: bseg, zfi_tbl_qty, t001, tgsb.
    data:
            t_excel like alsmex_tabline occurs 0 with header line,
            l_excelfile(128)  type c,
            l_excelfile1(128) type c,
            l_excelfile2(128) type c,
            l_excelfile3(128) type c.
    data: begin of t_bukrs_tmp occurs 0,
             bukrs like t001-bukrs,
          end of t_bukrs_tmp.
    data: begin of t_gsber_tmp occurs 0,
             gsber like tgsb-gsber,
          end of t_gsber_tmp.
    ranges: r_bukrs_tmp for t001-bukrs,
            r_gsber_tmp for tgsb-gsber.
    data: begin of t_type,
           bukrs like bseg-bukrs,
           gsber like bseg-gsber,
           count type i,
         end of t_type.
    data: l_charlen1 type i,
          l_charlen2 type i.
    data:  t_type2 like t_type occurs 0 with header line,
           t_type2_tmp like t_type occurs 0 with header line.
    data:  l_end_row type i,
           l_endrow1 type i,
           l_count type i,
           v_bukrs like bseg-bukrs.
    data : q_count type i value 1,
           v_flag  type i value 0,
           v_gsber like t_type2-gsber.
    data: l_var type c.
    selection-screen begin of block b1 with frame title text-001.
    parameter :  p_file1  type rlgrap-filename obligatory,
                 p_file2  type rlgrap-filename obligatory,
                 p_file3  type rlgrap-filename obligatory,
                 p_file4  type rlgrap-filename obligatory.
    selection-screen end of block b1.
    *perform updation_tbl.
    *clearing the contents of database table before uploading a new file everytime
    delete from zfi_tbl_qty.
    *selection-screen
    at selection-screen on value-request for p_file1.
      call function 'KD_GET_FILENAME_ON_F4'
        exporting
          field_name = p_file1
        changing
          file_name  = p_file1.
    at selection-screen on value-request for p_file2.
      call function 'KD_GET_FILENAME_ON_F4'
        exporting
          field_name = p_file2
        changing
          file_name  = p_file2.
    at selection-screen on value-request for p_file3.
      call function 'KD_GET_FILENAME_ON_F4'
        exporting
          field_name = p_file3
        changing
          file_name  = p_file3.
    at selection-screen on value-request for p_file4.
      call function 'KD_GET_FILENAME_ON_F4'
        exporting
          field_name = p_file4
        changing
          file_name  = p_file4.
    at selection-screen.
      l_excelfile  = p_file1.
      l_excelfile1 = p_file2.
      l_excelfile2 = p_file3.
      l_excelfile3 = p_file4.
    if l_excelfile = l_excelfile1 or l_excelfile = l_excelfile2 or l_excelfile = l_excelfile3
        or l_excelfile1 = l_excelfile2 or l_excelfile1 = l_excelfile3 or l_excelfile2 = l_excelfile3.
            message e010(zn) with 'Files with the same name found Please enter again. '.
    endif.
    start-of-selection.
        select bukrs
               from t001
               into corresponding fields of table t_bukrs_tmp.
        loop at t_bukrs_tmp.
           r_bukrs_tmp-sign = 'I'.
           r_bukrs_tmp-option = 'EQ'.
           r_bukrs_tmp-low = t_bukrs_tmp-bukrs.
           append r_bukrs_tmp.
        endloop.
        select gsber
               from tgsb
               into corresponding fields of table t_gsber_tmp.
        loop at t_gsber_tmp.
           r_gsber_tmp-sign = 'I'.
           r_gsber_tmp-option = 'EQ'.
           r_gsber_tmp-low = t_gsber_tmp-gsber.
           append r_gsber_tmp.
        endloop.
      perform upload_table using l_excelfile   5 2 6 4000.
      perform upload_table using l_excelfile1  5 2 6 4000.
      perform upload_table using l_excelfile2  5 2 6 4000.
      perform upload_table using l_excelfile3  5 2 6 4000.
    if sy-subrc = 0.
      message i010(zn) with 'Files Uploaded Successfully.'.
    if sy-subrc <> 0.
    message e398(00) with 'Files Not Found'.
      leave to screen 0.
    endif.
    ************Calling the other program
    SUBMIT ZFI_REP_IS_CHARGES_POST1.
    *and return.
    *******************Calling the subroutine.
    form upload_table using filename
                           i_begin_col type i
                           i_begin_row type i
                           i_end_col type i
                           i_end_row type i.
      clear   : t_excel.
      refresh : t_excel.
      v_flag = v_flag + 1.
      call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
        exporting
          filename                = filename
          i_begin_col             = 5
          i_begin_row             = 2
          i_end_col               = 6
          i_end_row               = 4000
        tables
          intern                  = t_excel
        exceptions
          inconsistent_parameters = 1
          upload_ole              = 2
          others                  = 3.
      case v_flag.
        when '1'.
          perform fill_int_tab.
        when '2'.
          perform fill_int_tab.
        when '3'.
          perform fill_int_tab.
        when '4'.
          perform fill_int_tab.
      endcase.
    endform.                    "upload_table
    *uploading data from internal table into database table
    *&      Form  fill_int_tab
          text
    -->  p1        text
    <--  p2        text
    form fill_int_tab .
      clear   : t_type2, q_count.
      refresh : t_type2.
      describe table t_excel lines l_endrow1.
      l_endrow1 = l_endrow1 / 2.
      do.
        loop at t_excel where row = q_count.
          if t_excel-col = 1.
            t_type2-gsber = t_excel-value.
          elseif t_excel-col = 2.
            t_type2-bukrs = t_excel-value.
          endif.
        endloop.
        l_charlen1 = strlen( t_type2-bukrs ).
        l_charlen2 = strlen( t_type2-gsber ).
        if ( t_type2-bukrs <> ' ' and t_type2-gsber <> ' ' ).
          if ( l_charlen1 = 4 and l_charlen2 = 4 ).
            append t_type2. clear t_type2.
          endif.
        endif.
        q_count = q_count + 1.
        if q_count > l_endrow1.
          exit.
        endif.
      enddo.
    t_type2_tmp[] = t_type2[].
    clear t_type2.
    refresh t_type2.
    loop at t_type2_tmp where bukrs in r_bukrs_tmp
                      and gsber in r_gsber_tmp.
      move-corresponding t_type2_tmp to t_type2.
      append t_type2.
    endloop.
      sort t_type2 by bukrs gsber.
      loop at t_type2.
        clear v_gsber.
        l_count = l_count + 1 .
        v_gsber = t_type2-gsber.
        at end of gsber.
         at end of bukrs.
            zfi_tbl_qty-company_code = t_type2-bukrs.
            zfi_tbl_qty-barea = v_gsber.
            zfi_tbl_qty-comb = l_count.
            if v_flag = 1.
              zfi_tbl_qty-type = 'A'.    " Item 1
            endif.
            if v_flag = 2.
              zfi_tbl_qty-type = 'B'.    " Item 2
            endif.
            if v_flag = 3.
              zfi_tbl_qty-type = 'C'.    " Item 3
            endif.
            if v_flag = 4.
              zfi_tbl_qty-type = 'D'.    " Item 4
            endif.
         insert  zfi_tbl_qty from zfi_tbl_qty.
          clear l_count.
        endat.
         endat.
      endloop.
    endform.                    " fill_int_tab

    Hi,
    After calling this FM:
    call function 'ALSM_EXCEL_TO_INTERNAL_TABLE'
    exporting
    filename = filename
    i_begin_col = 5
    i_begin_row = 2
    i_end_col = 6
    i_end_row = 4000
    tables
    intern = t_excel
    exceptions
    inconsistent_parameters = 1
    upload_ole = 2
    others = 3.
    *-> try following code:
    if sy-subrc = '2'.
    message 'File not Found' type 'I'.
          leave list-processing.
    endif.
    Regards,
    Kalyan

  • Define path in selection screen to write the output file to pres.  server

    Hi can anyone tell me how to declare a variable so that the user can specify his own path name in the selection screen to store the output file in the presentation server. and please tell me how to link up the output file to the selection screen specified path.
    thanks in advance.

    DATA: FILE_TAB TYPE STRING.
    SELECTION-SCREEN BEGIN OF BLOCK B02 WITH FRAME TITLE TEXT-B02.
    PARAMETERS:
               P_FILE TYPE RLGRAP-FILENAME OBLIGATORY LOWER CASE.
    SELECTION-SCREEN END OF BLOCK B02.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FILE.
      PERFORM OPEN_FILE USING P_FILE.
    FORM OPEN_FILE USING L_FILE.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
        CHANGING
          FILE_NAME     = L_FILE
        EXCEPTIONS
          MASK_TOO_LONG = 1
          OTHERS        = 2.
      IF SY-SUBRC <> 0.
        SY-MSGTY = 'I'.
        MESSAGE ID     SY-MSGID
                TYPE   SY-MSGTY
                NUMBER SY-MSGNO
                WITH   SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        STOP.
      ENDIF.
    ENDFORM.
    FILE_TAB = P_FILE.
      CALL FUNCTION 'GUI_DOWNLOAD'
    *Complete the FM
    Greetings,
    Blag.

Maybe you are looking for

  • Java font smoothing

    I am running JDK 1.4 on a Windows XP machine, and I have cleartype activated. Most fonts on my system look good and smooth, but no text in Java gets antialiased. Does anyone have an idea?

  • Adobe Reader X friert ein

    Mein System ist Windows XP SP3 mit allen Patchdays eingepielt; AVIRA Pro ist der Virenscanner, nur die Windows eigene Firewall. - Adobe Reader (im weiteren AR) 9.4. deinstalliert - keine Probleme. - AR X installiert - keine Probleme. - AR aufgerufen,

  • BCC'd recipents appear in sent message

    When I BCC emails to a group, the BCC'd recipients are visible to all recipents of the message. How can I stop this from happening? I want the BCC'd address to remain hidden. Any ideas would be great.

  • Videos stop downloading at 10mb    please help

    2 different videos stop at 10mb and will not go any further. Any ideas?

  • How to show entity/table comment on diagram

    I've seen in Jeff Smith's "My favorite SQL Data Modeler features" slideshare that you can get tables (and maybe even entities) to show comments/notes embedded in each table/entity's box symbol on the diagram. I've looked and looked but can't figure o