Validate a field on selection screen based on value entered on anothr field

HI,
There is a program with some fields in selection screen in EWM. The first field is Warehouse. I need to add another field 'Entity to Dispose' in such that what ever value I enter in Warehouse field, its corresponding values should only be displayed as F4 help for 'Entity to Dispose' field.
For eg: If I select the warehouse as 0799(lets say), then the F4 help for Entity to Dispose field should display only the values which are related to warehouse 0799 (and any other values pertaining to other warehouse should not appear).
Could anyone suggest, how this can be achieved?
Thanks in advance.
Regards,
Pavan

Hi,
You can use FM
DYNP_VALUES_READ
DYNP_VALUES_UPDATE
to read the another field value and Using that field build your internal table for f4 values.
and use FM F4IF_INT_TABLE_VALUE_REQUEST for F4 values..
do this on AT SELECTION-SCREEN ON VALUE REQUEST FOR <YOUR_F4_FIELDNAME>.

Similar Messages

  • Display input field on selection screen based on condition

    Hi,
    I have a report with selection with no of  input fields and a checkbox .I want to hide  few i/p fileds based on checkbox i/p.
    If the checkbox = 'X',then only those fields should apper on screen for input.
    how do we get this on sel screen.
    thanks in advance.

    Hi,
    you can use this code as reference.
    Here, depens on check box, in the next screen resepective select options will be displayed.
    You can use this logic for your requirement.
    REPORT Z50871_SELECTOPS_DYNAMIC.
    PARAMETERS : CH_EBELN AS CHECKBOX,
    CH_VBELN AS CHECKBOX.
    DATA: V_EBELN TYPE EKKO-EBELN,
    V_VBELN TYPE VBAK-VBELN.
    SELECTION-SCREEN BEGIN OF SCREEN 100.
    SELECT-OPTIONS : EBELN FOR V_EBELN MODIF ID G1,
    VBELN FOR V_VBELN MODIF ID G2.
    SELECTION-SCREEN END OF SCREEN 100 .
    AT SELECTION-SCREEN OUTPUT.
    IF SY-DYNNR = 100.
    IF CH_EBELN = 'X' AND
    CH_VBELN = ''.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 EQ 'G1'.
    SCREEN-ACTIVE = '1'.
    ELSE.
    SCREEN-ACTIVE = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF CH_VBELN = 'X' AND
    CH_EBELN = '' .
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 EQ 'G2'.
    SCREEN-ACTIVE = '1'.
    ELSE.
    SCREEN-ACTIVE = '0'.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ELSEIF CH_EBELN = 'X' AND CH_VBELN = 'X'.
    LOOP AT SCREEN.
    IF SCREEN-GROUP1 EQ 'G1'
    OR SCREEN-GROUP1 EQ 'G2' .
    SCREEN-ACTIVE = '1'.
    ENDIF.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    ENDIF.
    AT SELECTION-SCREEN.
    IF SY-DYNNR = 1000.
    IF CH_EBELN = 'X' OR CH_VBELN = 'X'.
    CALL SELECTION-SCREEN 100.
    ELSE.
    MESSAGE I000(Z50871MSG) WITH 'Please select atleast one checkbox'.
    ENDIF.
    ENDIF.
    Regards
    Sandeep Reddy

  • How to disable a field in selection screen based on condition.

    Hi,
    I have 2 radio buttons- p_normd, p_recov  and 2 other controls - like text boxes, say tb1 and tb2. and some mandatory fields below.
    If i choose p_normd, i want one control(tb2) to be disabled and if i choose p_recov, i want the other control(tb1) to be disabled(tb2 should be enabled then.)
    Currently i am using the following code. The 1'st radiobutton is intially checked. But the problem is when i click on the 2'nd radio button, the other control(tb1) is not getting disabled. When i double click, i get an error telling mandatory field to be filled. Only after the other mandatory fields below are filled, and after i double click on the unchecked radiobutton, the other control gets disabled.
    Please suggest what to do..
    The current code below:
      AT SELECTION-SCREEN OUTPUT. "ON RADIOBUTTON GROUP rg01.
      LOOP AT SCREEN.
      IF  p_normd EQ c_x  AND screen-group1 = 'SC2'.
            MOVE 0 TO screen-input.
          MODIFY SCREEN.
      ENDIF.
      IF p_recov EQ c_x AND screen-group1 = 'SC1'. "IF screen-name = 'ERDAT-LOW' OR screen-name = 'ERDAT-HIGH'.
            MOVE 0 TO screen-input.
            MODIFY SCREEN.
      ENDIF.
      ENDLOOP.
    Thanks,
    Ammu

    Hi
    declare your parameter as below:
    parameters: p_x type c radio button group g1 user-command r.
    in at selection screen output event .
    check for the radio button.
    loop at screen.
    if screen group is <desired value>
    then screen-active = 0 or 1. <do whatever you want to do.>
    modify screen.
    endloop.
    see below the sample code.
    <<<<<AT SELECTION SCREEN EVENT>>>>>
    AT SELECTION-SCREEN ON BLOCK B1.
      IF P_LCOST = C_X.
        PERFORM CLEAR_FIELDS.    " Clearing fields before loading the screen
        CALL SELECTION-SCREEN 100 STARTING AT 20 5.
      ELSEIF  P_MCOST = C_X.
        PERFORM CLEAR_FIELDS1.          " Clearing fields before loading the screen
        CALL SELECTION-SCREEN 101 STARTING AT 20 5.
      ENDIF.
      IF SY-SUBRC = 0.
        PERFORM VALIDATION.             " Validating selection screen input
      ELSE.
        LEAVE TO TRANSACTION C_TRAN.
      ENDIF.
    <<<<<<DECLARATION PART>>>>>>
    SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    PARAMETERS: P_LCOST RADIOBUTTON GROUP GI DEFAULT 'X',
                P_MCOST RADIOBUTTON GROUP GI.
    SELECTION-SCREEN END OF BLOCK B1.
    SELECTION-SCREEN BEGIN OF SCREEN 100 AS WINDOW TITLE TEXT-002.
    SELECTION-SCREEN BEGIN OF BLOCK B2.
    PARAMETERS: P_COAREA TYPE CSKS-KOKRS OBLIGATORY,         " controlling area
                P_FYR    TYPE COEP-GJAHR OBLIGATORY,         " fiscal year
                P_PERIOD TYPE COEP-PERIO OBLIGATORY.         " fiscal period
    SELECT-OPTIONS: S_CCNTR FOR V_KOSTL OBLIGATORY,       " Cost Center
                    S_COELM FOR V_KSTAR MODIF ID M1,       " Cost element
                    S_PDATE FOR V_BUDAT OBLIGATORY.       " posting date.
    SELECTION-SCREEN END OF BLOCK B2.
    SELECTION-SCREEN END OF SCREEN 100.
    SELECTION-SCREEN BEGIN OF SCREEN 101 AS WINDOW TITLE TEXT-003.
    SELECTION-SCREEN BEGIN OF BLOCK B3.
    PARAMETERS:     P_CCODE  TYPE T001-BUKRS OBLIGATORY,         " Company Code
                    P_FYEAR  TYPE COEP-GJAHR OBLIGATORY.         " fiscal year
    SELECT-OPTIONS:   S_GLACC FOR V_HKONT OBLIGATORY,       " G/L Account
                      S_PCNTR FOR V_PRCTR MODIF ID M2,      " Profit Center
                      S_PODATE FOR V_BUDAT OBLIGATORY.      " posting date.
    SELECTION-SCREEN END OF BLOCK B3.
    SELECTION-SCREEN END OF SCREEN 101.
    thanks
    LG
    Edited by: LalitG on Apr 13, 2011 1:38 PM

  • Updating a field on one screen based on values in another screen

    We have defined a new screen (ccalled Customer Data) for the Business Partner transaton BP.
    On this screen is a new field that has been defined and appended to BUT000. The field is a kind of customer GUID that allocates a unique ID string to a customer (we call it a matchcode, not to be confused with the SAP standard meaning).
    The value in the field is calculated by a function module, which needs uses some of the address data on the standard address tab of the BP transaction. If that data on the address screen changes, then the following needs to happen:
    1) The matchcode field on the Customer Data screen needs to be updated.
    2) When saved, the new matchcode is updated to the database (not a problem if the matchcode is recalcuated on the Customer Data screen).
    Here are the questions:
    1) How can I access the updated data on the address screen in the Customer Data screen? I was under the impression that the funtion modules which respond to events on each page are in their own function groups, so I cannot see the changed data from any function module bound to the Customer Data screen events. Is that true?
    2) How could I access the changed data on the address screen to re-calculate the matchcode field?
    BR,
    Tony.

    Closed; I spent a lot of time analysing this.Answer I think is no.
    1) No guarantee of the order in which the screens are processed (DSAVE event for addresses is after DSAVE for custom screen, so scratch that).
    2) Data exists in separate memory areas for separate screens and needs to be passed by EXPORT/IMPORT. 1) prevents this.

  • Search Help for input field2 based on value entered in input field 1

    Hi All,
    I have a requirement where in my view, i have two fields.
    1. PO
    2. PO Item
    For PO i could get the standard search help from DDIC, but i need to provide search help for PO Item based on PO selected.
    How can i do that. Any help is highly appreciated.
    Thanks,
    Ajay

    Hi Ajay ,
    following steps cn help u :
    1 Declare the WDR_OVS Component in the used component list in your WD component .
    2  Now go to the View, in the Properties Tab click the Create Controller Usage Button.
    3 It will open a screen with Component Use Entries. There select the Component Use OVS with Interface Controller . Press Enter.
    4 Go to the Context Tab, Right Click the Context and select Create à Attribute , for PO item in ur case .
    5 In the Input Help Mode Field, Select u2018Object Value Selectoru2019 from the dropdown. Then press F4 in the Field OVS Component Usage.
    6 Declare one event handler method with Name ON_OVS in the Method tab of the view. Then Press F4 in the Column Event. 
    Select the Event OVS as shown below and Press Enter. 
    for more info and illustration , also refer :
    http://help.sap.com/saphelp_erp2005/helpdata/EN/30/d7fa41c915da6fe10000000a1550b0/content.htm
    https://wiki.sdn.sap.com/wiki/display/WDABAP/ABAPWDObjectValueSelector(OVS)
    http://wiki.sdn.sap.com/wiki/display/Snippets/OVSSearchHelpinWebDynproAbap
    regrds,
    amit

  • Unable to have field in selection screen of Infopackage

    Hello Gurus,
    I have a small problem,
    I am unable to bring on field in selection screen in Infopackage,
    even thou the object is ticket in DataSources selection option,
    I have noted that the object is of type DEC is it something to do with,
    Or is their any other way to have this object in selection screen of Infopackage,
    Please help me on this,
    Thanks & Regards,

    Bhanu its field type is DEC that’s why its not coming in selection screen in Infopackage .This is a big problem in our Development as this field is SPRIO(Procurement Priority) and we want to restrict this field with conduction SPRIO EQ 1.
    Our DataSource is based on Infoset , Bhanu is it possible to restrict this Field in Infoset writing some code. As their is option in Infoset for CODE we tried this but didn’t work.
    or any other way to restrict this field with 1.
    I really appreciate your reply.
    Thanks Once again.

  • Validating field on  selection screen

    wht is the meaning of validation
    how to validate a particular field on selection screen
    suppose parameters:p_vkorg like vbak-vkorg.
    how to validate p_vkorg.
    pz give me coding

    Hello pavan,
    Validation means "checking whether the input which u are gining to the selection secreen is valid or not". means...
    Lets take your example only...
    parameters:p_vkorg like vbak-vkorg.
    in selection screen you will give inout in that parameter....
    users can give any input... lets suppose I'll give input as ABC... which is not in the table VBAK. No need to excute the code once we came to know that the input is not there in the table. So we will do validation like...
    at selection-screen on p_vkorg.
    select * from vbak where vkorg = p+vkorg. " This is the case with Parameter.
    at selection-screen on p_vkorg.
    Select * from vbak where vkorg = p+vkorg. " This is the case with Selct-option.
    if the input that u r giving is present in the table... the above stmt will execute successfully, otherwise not.
    You can make use of System variable SY-SUBRC and you can go ahead with ur coding...
    Reward If Helpful
    Regards
    Sasidhar Reddy Matli.
    Message was edited by:
            Sasidhar Reddy Matli

  • Field Validation for Authorization Object field on selection screen

    Hi Experts,
    We have included a new field u2018Authorization Objectu2019 in the selection screen which should be reflected in the field Authorization Object of the spool property. Please let us know how we can provide F4 help for this field and also validate it in the code.
    The data element "RSPOAUTH" is used for the field on selection screen parameter. However, as there is no value table attached to the domain, we are unable to provide any F4 help and hence cannot validate the field in the code.
    Looking forward for your valuable reply.
    Thanks in advance.
    --Warm Regards,
      Prajakta Kanitkar.

    Hi Prajakta,
       You can refer the following code for getting F4 help.
    TYPES: BEGIN OF stru_btc,
             zesgbtc TYPE zhr_del_btc,
           END OF stru_btc.
    DATA: it_btc TYPE STANDARD TABLE OF stru_btc
    SELECT-OPTIONS: s_zzbtc FOR pa0001-zzbtc NO INTERVALS.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_zzbtc-low.
      SELECT * FROM zbtc INTO CORRESPONDING FIELDS OF TABLE it_btc.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'BTC'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'S_ZZBTC'
          value_org       = 'S'
        TABLES
          value_tab       = it_btc
        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.
    Hope this will help you.
    Thanks & Regards.
    Aniruddha

  • How can I add a new field in selection screen for this report

    *& Report  ZGS_BARKODLA_HIZLI_GIRIS
    report  zgs_barkodla_hizli_giris.
    tables: mara,
            mseg,
            mch1,
            *mch1,
            mkpf,
            mchb ,
            makt.
    type-pools: esp1.
    data: i_message_tab  type esp1_message_tab_type,
          wa_message_tab type esp1_message_wa_type ,
          sc_count type i.
    ALV
    type-pools: slis, kkblo.
    data: gs_layout   type slis_layout_alv                     ,
          gt_fldcat   type slis_t_fieldcat_alv with header line,
          gt_header   type slis_t_listheader   with header line,
          gt_sortin   type slis_t_sortinfo_alv with header line,
          g_repid     like sy-repid                            .
    define add-fieldcat.
      gt_fldcat-fieldname     = &1.
      gt_fldcat-ref_tabname   = &2.
      gt_fldcat-seltext_s     = &3.
      gt_fldcat-seltext_m     = &3.
      gt_fldcat-seltext_l     = &3.
      gt_fldcat-reptext_ddic  = &3.
      gt_fldcat-ddictxt       = 'M'.
      append gt_fldcat.
      clear  gt_fldcat.
    end-of-definition.
    types: begin of titab,
            sel   type xfeld,
            matnr type matnr,
            maktx type maktx,
            charg type charg_d,
            menge type menge_d,
            erfmg type erfmg,
           end of titab.
    data : witab type titab.
    data : itab type table of titab.
    data : ok_code type sy-ucomm.
    controls: tc_itab type tableview using screen 0100.
    data: gv_header like bapi2017_gm_head_01,
          gv_code   like bapi2017_gm_code.
    BAPI export parameters
    data: gv_headret type bapi2017_gm_head_ret,
          gv_matdoc  type bapi2017_gm_head_ret-mat_doc,
          gv_matyear type bapi2017_gm_head_ret-doc_year.
    data : lv_objek like inob-objek .
    data : ls_inob  like inob .
    data : imseg type ty_t_mseg.
    data : wmseg type mseg.
    data : answer.
    data : count type i.
    data : v_atinn type atinn.
    BAPI movement details
    data: i_goodsmvt_items type bapi2017_gm_item_create occurs 0
          with header line.
    data: i_return type bapiret2 occurs 0 with header line.
    start-of-selection.
    call function 'CONVERSION_EXIT_ATINN_INPUT'
       exporting
         input  = 'Z_ORAN'
       importing
         output = v_atinn.
      call screen 100.
    *&      Module  status_0100  OUTPUT
    module status_0100 output.
      set pf-status '100'.
      set titlebar '100'.
      mseg-werks = 1000.
      mseg-umwrk = 1000.
    **added
      sc_count = sc_count + 1.
      if sc_count eq 1.
        mseg-bwart = 313.
      endif.
      mkpf-budat = sy-datum.
    **added
      describe table itab lines tc_itab-lines.
    endmodule.                 " status_0100  OUTPUT
    *&      Module  user_command_0100  INPUT
    module user_command_0100 input.
      data field(20).
      data: line_t like sy-index.
      data: lines  like sy-index.
      data line_count like sy-loopc.
      data: begin of cols,
             screen      like screen,
             index       type i,
             selected(1) type c,
             vislength   like icon-oleng,
             invisible(1) type c,
           end   of cols.
      case ok_code.
        when 'DELE'.
          delete itab where sel eq 'X'.
        when 'ENTE'.
          check *mch1-charg is not initial.
          read table itab into witab with key charg = *mch1-charg.
          if not sy-subrc is initial.
            witab-charg = *mch1-charg.
            select single matnr from mch1 into witab-matnr
                               where charg eq witab-charg.
            if not syst-subrc is initial.
              set cursor field '*MCH1-CHARG'.
              message e115(12) with *mch1-charg.
            endif.
            select single maktx from makt into witab-maktx
                               where matnr eq witab-matnr
                                 and spras eq syst-langu.
            witab-erfmg = 1.
            concatenate witab-matnr witab-charg into lv_objek .
            clear ls_inob .
            select single * into ls_inob
                            from inob
                            where objek = lv_objek and
                                  klart = '023'    and
                                  obtab = 'MCH1' .
            select single atflv from ausp into witab-menge
                     where objek = ls_inob-cuobj and
                           klart = '023' .
            append witab to itab.
    **added
            clear *mch1-charg.
    **added
          endif.
        when 'SAVE'.
          if mkpf-budat is initial.
            set cursor field 'MKPF-BUDAT'.
            message e055(00).
          endif.
          if mseg-lgort is initial.
            set cursor field 'MSEG-LGORT'.
            message e055(00).
          endif.
          if mseg-umlgo is initial.
            set cursor field 'MSEG-UMLGO'.
            message e055(00).
          endif.
          if mseg-bwart is initial.
            set cursor field 'MSEG-BWART'.
            message e055(00).
          endif.
          refresh imseg.
          loop at itab into witab.
            move-corresponding witab to wmseg.
            append wmseg to imseg.
          endloop.
          call function 'ZMM_POPUP_WITH_DATA'
            exporting
              imseg  = imseg
            importing
              answer = answer.
          if answer eq 'Y'.
            perform create_goods_movement.
          endif.
        when 'P--'.
          clear ok_code.
          perform paging using 'P--'.
          set cursor field 'MARA-MATNR' line 1.
        when 'P-'.
          clear ok_code.
          perform paging using 'P-'.
          set cursor field 'MARA-MATNR' line 1.
        when 'P+'.
          clear ok_code.
          clear lines.
          perform paging using 'P+'.
          set cursor field 'MARA-MATNR' line 1.
        when 'P++'.
          clear ok_code.
          perform paging using 'P++'.
          set cursor field 'MARA-MATNR' line 1.
        when 'SORA'.
          read table tc_itab-cols into cols with key selected = 'X'.
          if sy-subrc is initial.
            field = cols-screen.
            field = field+5(10).
            sort itab ascending by (field).
          endif.
        when 'SORZ'.
          read table tc_itab-cols into cols with key selected = 'X'.
          if sy-subrc is initial.
            field = cols-screen.
            field = field+5(10).
            sort itab descending by (field).
          endif.
        when 'PRNT'.
          perform write_alv.
      endcase.
    endmodule.                 " user_command_0100  INPUT
    *&      Module  read_table  OUTPUT
    module read_table output.
      mara-matnr = witab-matnr.
      makt-maktx = witab-maktx.
      mch1-charg = witab-charg.
      mseg-menge = witab-menge.
      mseg-erfmg = witab-erfmg.
      line_count = sy-loopc.
    endmodule.                 " read_table  OUTPUT
    *&      Module  write_table  INPUT
    module write_table input.
      witab-matnr = mara-matnr.
      witab-maktx = makt-maktx.
      witab-charg = mch1-charg.
      witab-menge = mseg-menge.
      witab-erfmg = mseg-erfmg.
      modify itab from witab index tc_itab-current_line.
    endmodule.                 " write_table  INPUT
    *&      Module  exit  INPUT
    module exit input.
      leave to screen 0 .
    endmodule.                 " exit  INPUT
    *&      Form  create_goods_movement
    form create_goods_movement .
      clear : gv_header, i_return[], i_goodsmvt_items[].
      gv_header-doc_date = gv_header-pstng_date = mkpf-budat.
      gv_header-pr_uname = sy-uname.
    GM with reference to reservation
      loop at itab into witab.
        i_goodsmvt_items-material   = witab-matnr.
        i_goodsmvt_items-entry_qnt  = witab-erfmg.
        i_goodsmvt_items-entry_uom  = 'ST'.
        i_goodsmvt_items-move_type  = mseg-bwart.
        i_goodsmvt_items-plant      = mseg-werks.
        i_goodsmvt_items-stge_loc   = mseg-lgort.
        i_goodsmvt_items-move_plant = mseg-umwrk.
        i_goodsmvt_items-move_stloc = mseg-umlgo.
        i_goodsmvt_items-batch      = witab-charg.
        append i_goodsmvt_items.
      endloop.
    find BAPI processing transaction
      if gv_code is initial.
        perform determine_bapi_code using mseg-bwart
                                 changing gv_code.
      endif.
      call function 'BAPI_GOODSMVT_CREATE'
        exporting
          goodsmvt_header  = gv_header
          goodsmvt_code    = gv_code
        importing
          goodsmvt_headret = gv_headret
          materialdocument = gv_matdoc
          matdocumentyear  = gv_matyear
        tables
          goodsmvt_item    = i_goodsmvt_items
          return           = i_return[].
    cancel blocking process
      loop at i_return where type eq 'E' or type eq 'A' or type eq 'X'.
        exit.
      endloop.
      if sy-subrc ne 0.
        refresh i_message_tab.
        call function 'BAPI_TRANSACTION_COMMIT'
          exporting
            wait = 'X'.
        wa_message_tab-msgid = 'M7'..
        wa_message_tab-msgty = 'S'.
        wa_message_tab-msgno = '060'.
        wa_message_tab-msgv1 = gv_matdoc.
        wa_message_tab-msgv2 = ''.
        wa_message_tab-msgv3 = ''.
        wa_message_tab-msgv4 = ''.
        append wa_message_tab to i_message_tab.
      else.
        refresh i_message_tab.
        call function 'BAPI_TRANSACTION_ROLLBACK'.
    write a message as there is an unexpected error.
        loop at i_return.
          wa_message_tab-msgid = i_return-id.
          wa_message_tab-msgty = i_return-type.
          wa_message_tab-msgno = i_return-number.
          wa_message_tab-msgv1 = i_return-message_v1.
          wa_message_tab-msgv2 = i_return-message_v2.
          wa_message_tab-msgv3 = i_return-message_v3.
          wa_message_tab-msgv4 = i_return-message_v4.
          append wa_message_tab to i_message_tab.
        endloop.
      endif.
      call function 'C14Z_MESSAGES_SHOW_AS_POPUP'
        tables
          i_message_tab = i_message_tab.
    endform.                    " create_goods_movement
    *&      Form  determine_bapi_code
    form determine_bapi_code using p_bwart type bwart
    changing p_code type bapi2017_gm_code.
      data: lt_t158b type table of t158b with header line.
      clear p_code.
      select tcode from t158b into corresponding fields of table lt_t158b
      where bwart eq p_bwart.
      loop at lt_t158b.
        select single gmcode from t158g into p_code
        where tcode eq lt_t158b-tcode.
        if sy-subrc is initial.
          exit.
        endif.
      endloop.
    endform. " determine_bapi_code
    *&      Form  paging
    form paging using code.
      data: i type i,
            j type i.
      case code.
        when 'P--'. tc_itab-top_line = 1.
        when 'P-'.
          tc_itab-top_line = tc_itab-top_line - line_count.
          if tc_itab-top_line le 0.
            tc_itab-top_line = 1.
          endif.
        when 'P+'.
          i = tc_itab-top_line +  line_count.
          j = tc_itab-lines -  line_count + 1.
          if j le 0.
            j = 1.
          endif.
          if i le j.
            tc_itab-top_line = i.
          else.
            tc_itab-top_line = j.
          endif.
        when 'P++'.
          tc_itab-top_line = tc_itab-lines - line_count + 1.
          if tc_itab-top_line le 0.
            tc_itab-top_line = 1.
          endif.
      endcase.
    endform.                    " paging
    *&      Form  write_alv
    form write_alv .
      perform find_list_header.
      perform fill_field_cat.
      perform fill_sortinfo.
      g_repid = sy-repid.
      gs_layout-colwidth_optimize = 'X'.
      gs_layout-zebra             = 'X'.
      answer = 'Y'.
      call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
          i_buffer_active        = ''
          i_callback_program     = g_repid
          i_save                 = 'A'
        i_callback_top_of_page = 'TOP_OF_PAGE'
          is_layout              = gs_layout
          it_fieldcat            = gt_fldcat[]
         it_sort                = gt_sortin[]
        tables
          t_outtab               = itab[].
    endform.                    " write_alv
         Form  find_list_header
    form find_list_header.
      data : v_datum(10),
             v_datlo(10),
             v_dathi(10),
             v_uzeit(8).
      clear: gt_header, gt_header[].
      gt_header-typ  = 'H'.
      gt_header-info = sy-title.
      append gt_header.
      clear gt_header.
      gt_header-typ  = 'S'.
      gt_header-key  = 'Çal&#305;&#351;t&#305;rma Zaman&#305; : '.
      write syst-datum to v_datum.
      write syst-uzeit to v_uzeit.
      concatenate v_datum '/' v_uzeit into gt_header-info.
      append gt_header.
    endform.                    " find_list_header
         Form  fill_field_cat
    form fill_field_cat.
      refresh gt_fldcat.
      clear   gt_fldcat.
      gt_fldcat-key = 'X'.
      add-fieldcat 'MATNR'  'MARA' ''.
      add-fieldcat 'MAKTX'  'MAKT' ''.
      add-fieldcat 'CHARG'  'MSEG' ''.
      gt_fldcat-do_sum = 'X'.
      add-fieldcat 'MEINS'  'MARA' 'Olcu Birimi '.
      gt_fldcat-do_sum = 'X'.
      add-fieldcat 'ERFMG'  'MSEG' 'Adet'.
    endform.                    " fill_field_cat
         Form  fill_sortinfo
    form fill_sortinfo.
      gt_sortin-up            = 'X'.
      gt_sortin-fieldname     = 'MATNR'.  append gt_sortin.
    endform.                    " fill_sortinfo
         Form  top_of_page                                              *
    form top_of_page.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          i_logo             = 'ZKUTAS'
          it_list_commentary = gt_header[].
    endform.                    " top_of_page

    HI,
    if it is a normal report program then you can directly create a Selection screen field.
    After the Type-pool you can use Parameters or Select-options to create the selection screen field..
    If it is a Modulpool program then you can create a selection scren field like
    SELECTION-SCREEN BEGIN OF SCREEN 1100 AS SUBSCREEN.
    PARAMETERS: p1(10) TYPE c.
    SELECTION-SCREEN END OF SCREEN 1100.
    defines a selection screens – 1100 – as subscreens.
    The next screen number of screen 100 is 100 (statically-defined).
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN area INCLUDING sy-repid number.
    PROCESS AFTER INPUT.
      MODULE cancel AT EXIT-COMMAND.
      CALL SUBSCREEN area.
      MODULE user_command_0100.
    look at the below link
    http://help.sap.com/saphelp_nw2004s/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/content.htm
    Regards
    Sudheer

  • How can i declare a single radio button field in selection-screen ?

    How can i declare a single radio button field in selection-screen ?

    >
    Rob Burbank wrote:
    > And how will you turn it off once it is turned on??
    >
    > Rob
    Thats correct ;)...See ravi if users will ask so many things its our Job to convay the correct solution ....
    Just post your org requirement..SOo some body guide you better//
    Sas

  • Error message disble the Fields in Selection Screen

    Hi,
    In my Report i am validating some fields as mandatory.
    If the field is initial then one Error message should be display in the screen and user has to modify the selection screen.
    But after displaying the errro message my selection screen is input disable except the mandatory field.
    I want all the fields should be input enable.
    Sample code for Error message,
    MESSAGE E018 WITH 'Enter Plant'.
    Please provide the code for this.

    Performing checks on SELECTION-SCREEN
    - if the check uses only one independent field (e.g.: value exist in a table) use a[ AT SELECTION-SCREEN ON <field>|http://help.sap.com/abapdocu/en/ABAPAT_SELECTION-SCREEN_EVENTS.htm#!ABAP_ALTERNATIVE_2@2@], the field will be editable when error is raised
    - if the check uses some fields, group them using [SELECTION-SCREEN BEGIN OF BLOCK <block>/END OF BLOCK <block>|http://help.sap.com/abapdocu/en/ABAPSELECTION-SCREEN_BLOCK.htm] and then [AT SELECTION-SCREEN ON BLOCK  <block>|http://help.sap.com/abapdocu/en/ABAPAT_SELECTION-SCREEN_EVENTS.htm#!ABAP_ALTERNATIVE_4@4@], each field of the block will be editable when error is raised
    So, if you really want that each and every field be editable when an error is raised, declare every parameter and select-options in a big block, and perform the check in a unique AT SELECTION-SCREEN ON BLOCK xxx.
    Use Error message, Warning and Information don't break the flow of the report.
    Regards,
    Raymond

  • Mandatory field in selection screen of pnp logical database report

    Hi experts,
         Im using pnp logical database in my report.
    It give the standard selection screen. I need to make some fields in the selection screen as mandatory like pnpwerks.
    How its possible. Give me some solution.
    Thanks,
    Priya.

    how about if u do this step
    1. Goto- Attribute.
    2. Click "Change"
    3. Click 'HR Report Category'
    4. Click 'Create Report Category'
    5. Click 'new entries' for careating Report Category
    5. Select newly create report category
    6. Click the folder 'Definition of Organizational Selection'.
    7. Click 'New entries'.
    8. Here you assign the required fields to be displayed, for eg pywerks - personal area.
    9. finally assign this newly created 'report category' in the screen you will get upon clicking 'HR report Category' button in the Program attribute screen.
    Hope this may help you.  I am not much into hr abap. but sharing the info which i am aware.

  • 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

  • Adding customer field to selection screen of RFKORD11 - Customer  Statement Printing Program:

    Hello,
    We are required to add an important customer field to selection screen of customer
    statement printing program: RFKORD11 for our South African branch.
    Please advise us regarding this matter,
    is there a proper user-exit or a repair is needed?
    Kind Regards.

    Enhancement
    text
    F050S001
    FIDCMT, FIDCC1,
      FIDCC2: Edit user-defined IDoc segment
    F050S002
    FIDCC1: Change
      IDoc/do not send
    F050S003
    FIDCC2: Change
      IDoc/do not send
    F050S004
    FIDCMT, FIDCC1,
      FIDCC2: Change outbound IDoc/do not send
    F050S005
    FIDCMT, FIDCC1,
      FIDCC2 Inbound IDoc: Change FI document
    F050S006
    FI Outgoing IDoc:
      Reset Clearing in FI Document
    F050S007
    FIDCCH Outbound:
      Influence on IDoc for Document Change
    F180A001
    Balance Sheet
      Adjustment
    FARC0001
    Enhancements within
      archiving (FI)
    FARC0002
    Additional Checks for
      Archiving MM Vendor Master Data
    FEDI0001
    Function exits for
      EDI in FI
    FICT0001
    Exits for
      inter-company transactions
    RFAVIS01
    Customer Exit for
      Changing Payment Advice Segment Text
    RFBVX001
    Enhancement for bank
      directory transfer (Austria)
    RFEPOS00
    Line item display:
      Checking of selection conditions
    SAPLBANK
    User exit: Bank data
    SAPLF040
    WF: Preliminary
      posting (authorized for release)
    SAPLF051
    Workflow for FI
      (pre-capture, release for payment)
    SAPLFCPD
    One-time account data
      or different payee in booking
    SAPLSSRV
    User exit: Bank
      account numbers
    RFKORIEX
    Automatic
      correspondence
    please check which one  is better .

  • How to Add field to Selection screen of Tx. FBL5N

    Hi All,
    In Tx. FBL5N, there is a field Customer number (on Customer selection screen).
    In addition to the above we need to add field Customer name in Selection screen.
    How do we go about it ?
    PS :- We have found steps to add fields to FBL5N output. But, we dont want it on output, we want to add it on Selection screen.
    Regards,
    Ashish

    Hi,
    Only certain table fields are allowed in dynamic selection, please see this sap note for detail :
    Sap Note 310886 - Line items: Dynamic selections ignored
    Permitted tables:
    SKA1: all fields
    SKB1: all fields
    BSIS: all fields
    So BKPF-CPUDT field is not allowed for dynamic selection.
    check this thread Add new Fields to Dynamic Selection FBL5n
    Or
    Enhancing Selection Views in the dynamic selection of some SAP transactions like FB03, FBL3N, FBL5N
    This enhancing related to SAP OSS Note: 188663 and 832997
    Requirement: The business requires the Doc. Header Text be added in the dynamic selection in SAP transactions FB03
    ■Execute Transaction code SE36. Click F4. Enter the SAP table name wherein you think the field could be found. In this case the SAP table is BKPF and the logical database is BRF
    ■From the initial screen of SE36, Choose from the path EXTRAS >> Selection Views
    ■Copy Selection View u201CSAPu201D to u201CCUSu201D
    ■Change the selection views u201CCUSu201D
    ■In the right corner, double click your table BKPF.
    ■In the right corner, check whether what functional groups does your field belong. If it is 01 then input it beside your field name.
    ■Then Save it afterwards.
    Prabhudas

Maybe you are looking for

  • Automount in Gnome 3.4.1 is broken

    Hi all! I have a strange issue with gnome 3.4.1 and automount on both my laptop and my PC. When I plug an usbkey, I can hear the sound "plop" but nothing happen, no notification to open nautilus, and in nautilus, the usb device isn't showed, isn't mo

  • Distributed partitioning

    Hi! First of all thank you for the time you grant me... and sorry for my english too! I currently work for my university on databases distribution and partitioning concepts. I installed two oracle instances on two servers. Each instance contains one

  • LR Preferences - Data Entry Bug?

    Can anyone supply me with a list, or cite to a list, of preferences in the file "com.adobe.Lightroom2.plist?" I am asking this because no one answered my question about the space bar zoom toggle problem I get from time to time. It stops working every

  • Im told firefox is installed on my nexus7 but it is not also flash player is not installing

    I am trying to install firefox on my nexus7 google says its installed but it is not. also trying to install astro file manager am told its installed but it is not. also adobe flash wont install.

  • Where do i find my score

    Hi Guys where do i find my sjcp score , currently i am able to view only my result in sun databae but not acheived score....please help me if any one know how to check my exam score in sun database Thanks