Selection-screen fields validation for dialog

Hello ABAP Gurus
Requirements: this is a report wherein , depending upon the correct select-options , user will pick some field values from table and some will be entered by the user in the next se51 custom screen for creation of a record in a ztable .
the problem is :without validating select-options values , it calls the se51 screen 100.
How to keep the cursor at the selection-screen field until & unless user enters the correct i/p s .if i/p are correct then only it should call screen 100 otherwise remain in the selection screen only .
*& Report ZSD_REP_QUOT_BANK_CREATE *
REPORT ZSD_REP_QUOT_BANK_CREATE NO STANDARD PAGE HEADING LINE-SIZE 255.
TABLES: VBAK,VBAP,VBRK,ZSD_TABL_QOTBANK,MARA,KONV.
DATA: OK_CODE LIKE SY-UCOMM,
SAVE_OK_CODE LIKE SY-UCOMM,
WA_ITAB LIKE ZSD_TABL_QOTBANK,
ANSWER TYPE C,
COPIED ,
STS TYPE N,
EMGRP LIKE MARA-EXTWG,
QTY LIKE ZSD_TABL_QOTBANK-QTY,
UPRICE LIKE ZSD_TABL_QOTBANK-UPRICE,
TOT LIKE ZSD_TABL_QOTBANK-TOT,
INO LIKE VBAP-POSNR.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-000.
SELECT-OPTIONS: S_QTNO FOR ZSD_TABL_QOTBANK-QTNO
NO INTERVALS NO-EXTENSION OBLIGATORY,
S_ITNO FOR ZSD_TABL_QOTBANK-ITNO
NO INTERVALS NO-EXTENSION OBLIGATORY.
S_MATNO FOR ZSD_TABL_QOTBANK-MATNO
NO INTERVALS NO-EXTENSION. "
SELECTION-SCREEN END OF BLOCK b1.
AT SELECTION-SCREEN.
SELECT SINGLE VBTYP
INTO VBAK-VBTYP
FROM VBAK
WHERE VBELN IN S_QTNO.
IF SY-SUBRC EQ 0 AND VBAK-VBTYP NE 'B'.
MESSAGE I005(ZQOTBANK).
SET CURSOR FIELD S_QTNO-LOW.
SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
ENDIF.
CLEAR WA_ITAB.
SELECT SINGLE QTNO ITNO
INTO WA_ITAB
FROM ZSD_TABL_QOTBANK
WHERE QTNO IN S_QTNO
AND ITNO IN S_ITNO.
IF SY-SUBRC EQ 0.
MESSAGE I001(ZQOTBANK).
SET CURSOR FIELD S_QTNO-LOW.
SET CURSOR FIELD S_ITNO-LOW.
SUBMIT (SY-REPID) VIA SELECTION-SCREEN.
ENDIF.
*START-OF-SELECTION.
END-OF-SELECTION.
CALL SCREEN 0100.
*& Module STATUS_0100 OUTPUT
text
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS '0100'.
SET TITLEBAR '0100'.
ZSD_TABL_QOTBANK-QTNO = S_QTNO-LOW.
SELECT SINGLE BUKRS_VF VKORG VTWEG SPART KUNNR ERDAT BNDDT
KNUMV
INTO (ZSD_TABL_QOTBANK-CCODE,
ZSD_TABL_QOTBANK-SORG,
ZSD_TABL_QOTBANK-DISTCHAN,
ZSD_TABL_QOTBANK-DIV,
ZSD_TABL_QOTBANK-CUSTNO,
ZSD_TABL_QOTBANK-QTDAT,
ZSD_TABL_QOTBANK-QTVALDAT,
VBAK-KNUMV)
FROM VBAK
WHERE VBELN IN S_QTNO
AND VBTYP = 'B'.
IF SY-SUBRC EQ 0.
SELECT SINGLE KWMENG POSNR MATNR
INTO (QTY , INO , ZSD_TABL_QOTBANK-MATNO)
FROM VBAP
WHERE VBELN IN S_QTNO.
SELECT SINGLE EXTWG
INTO EMGRP
FROM MARA
WHERE MATNR EQ ZSD_TABL_QOTBANK-MATNO.
ZSD_TABL_QOTBANK-ITNO = INO.
ZSD_TABL_QOTBANK-EMATGRP = EMGRP.
ZSD_TABL_QOTBANK-QTY = QTY.
SELECT SINGLE KBETR
INTO UPRICE
FROM KONV
WHERE KNUMV = VBAK-KNUMV
AND KPOSN = INO
AND KSCHL = 'PR00'.
ENDIF.
ZSD_TABL_QOTBANK-UPRICE = UPRICE.
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-CGL_QTY.
UPRICE = ZSD_TABL_QOTBANK-CGL_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-CGL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-BHEL_QTY.
UPRICE = ZSD_TABL_QOTBANK-BHEL_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-BHEL_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-ALSTOM_QTY.
UPRICE = ZSD_TABL_QOTBANK-ALSTOM_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-ALSTOM_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-SIEMENS_QTY.
UPRICE = ZSD_TABL_QOTBANK-SIEMENS_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-SIEMENS_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-TELK_QTY.
UPRICE = ZSD_TABL_QOTBANK-TELK_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-TELK_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
QTY = ZSD_TABL_QOTBANK-OTH_QTY.
UPRICE = ZSD_TABL_QOTBANK-OTH_UPRICE .
TOT = QTY * UPRICE .
ZSD_TABL_QOTBANK-OTH_TOT = TOT .
CLEAR: QTY, UPRICE, TOT.
ENDMODULE. " STATUS_0100 OUTPUT
*& Module USER_COMMAND_0100 INPUT
text
MODULE USER_COMMAND_0100 INPUT.
CASE OK_CODE.
WHEN 'SAVE'.
INSERT ZSD_TABL_QOTBANK.
IF SY-SUBRC EQ 0.
MESSAGE I000(ZQOTBANK).
COMMIT WORK.
CALL SELECTION-SCREEN 1000.
ELSE.
MESSAGE E001(ZQOTBANK).
CALL SELECTION-SCREEN 1000.
ENDIF.
ENDCASE.
ENDMODULE. " USER_COMMAND_0100 INPUT
*& Module EXIT_COMMAND INPUT
text
MODULE EXIT_COMAND INPUT.
SAVE_OK_CODE = OK_CODE.
CLEAR OK_CODE.
CASE SAVE_OK_CODE.
WHEN 'CANCEL'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Quotation Bank Entry'
TEXT_QUESTION = 'Do you want to Cancel ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE PROGRAM.
ELSE.
CALL SELECTION-SCREEN 1000.
ENDIF.
WHEN 'EXIT'.
CALL FUNCTION 'POPUP_TO_CONFIRM'
EXPORTING
TITLEBAR = 'Quotation Bank Entry'
TEXT_QUESTION = 'Do you want to Exit ?'
TEXT_BUTTON_1 = 'Yes'
TEXT_BUTTON_2 = 'No'
DEFAULT_BUTTON = '2'
IMPORTING
ANSWER = ANSWER.
IF ANSWER = '1'.
LEAVE PROGRAM.
ELSE.
CALL SELECTION-SCREEN 1000.
ENDIF.
ENDCASE.
ENDMODULE. " EXIT_COMMAND INPUT
Thnx in Advance

Put the statement
CALL SCREEN 100
in the event <b>AT SELECTION-SCREEN</b> and NOT in <b>END-OF-SELECTION</b>.
Regards,
Subramanian V.

Similar Messages

  • SELECTION-SCREEN FIELD VALIDATION

    Hi All!
             I am trying to write this ABAP program in 4.7 Enterprise. I wish to selectively display (based on radio buttons) selection screen blocks and make them mandatory in runtime. I use code like this:
    AT SELECTION-SCREEN ON SAL_ORG.    (this is one of the fields that will be obligatory)
        IF RD2 EQ 'X'.
            IF SAL_ORG IS INITIAL.
                 MESSAGE 'THIS FIELD IS MANDATORY' TYPE 'I'.
            ENDIF.
        ENDIF.
    Now, if I execute this as is, then I will get this message as soon as the block is displayed, not just after hitting the execution button. Can you please tell me how I should put a condition on this checking. I know it is triggered by SY-UCOMM = 'ONLI' but i am not sure where to put the condition.
                   Thanks in advance!

    hello J.C.!
                  this is what worked for me finally:
                  AT SELECTION-SCREEN.
                  CHECK sy-ucomm EQ 'ONLI'.
                  IF RD2 EQ 'X'.
                      IF SAL_ORG IS INITIAL.
                          MESSAGE 'THIS FIELD IS MANDATORY' TYPE 'I'.
                      ENDIF.
                  ENDIF.
    SAP says sscrfields-ucomm is unrecognized. can you please tell me what it is actually? why did you prefer using it instead of SY-UCOMM? If possible, please direct me to some good reference on calling selection screen.
    I have given your answer 10 points by the way. I am very new here, so i don't know what exactly it's role is, but i figured it is something significant.

  • Selection screen fields order in report painter report..

    hi experts,
    i have a  problem with selection screen fields order in report painter report.
    Actually in report painter report selection screen order is different compare to report writer report selection screen.
    how should i get the same selection screen fields order For  Report painter  report compare to Report Writer report ?
    For example, Report Writer selection screen order is:
      ledger:
      company code:
      period:
      current fiscal year:
      previous fiscal yer:
      previous quarter end period:
    where as Report Painter selection screen order is:
      ledger:
      previous fis year:
      current fis year:
      company code:
      period:
      previous quarter end period:
    please help me regarding with this.
    Thanks and Regards,
      NAGARJUNA.

    hi nagarjun,
    Go to Sq01, select the query and goto to change mode.go to the next screens till u reach Selection fields. Here u enter the NO field in the sequence which u want ot appear in the selection screen and it is done. Save and execute.
    Ex:
    Selection fields No
    Exclude Cancelled Lots 5
    Material number 1
    Plant 2
    Material type 3
    Inspection Lot Origin 4
    Regards,
    Lokesh

  • Validating a selection-screen field

    Hi all,
    I am Anil.can any body explains me how to validate a selection-screen field for the following scenario?
    I have customer nos ranging from 100-1000.among them i dont have any sales orders for the customers who are in between 150-250.I have sales order(VBELN) as select-options and Plant(WERKS) as Parameter on the selection-screen.I want to validate these fields without hardcaode.How can i do that?Please send me the complete code.
    I am not getting how to validate a field  which is declared as parameter?
    regards and thanks in advance.
    Anil.

    Make sure that u are validating against the header table.
    say eg if u wnat t validate matnr in marc, then do as below.
    SELECT-OPTIONS: s_matnr FOR  marc-matnr.                  "Material No
    AT SELECTION-SCREEN.
    *Validate material no details
      PERFORM validate_matno.
    FORM validate_matno.
    DATA: v_matnr LIEK mara-matnr.
      SELECT SINGLE matnr INTO v_matnr
             FROM <b>mara</b>
             WHERE matnr IN s_matnr.
      IF sy-subrc NE 0.
        MESSAGE i128.
        LEAVE LIST-PROCESSING.
      ENDIF.
    ENDFORM.
    Dont select from marc.
    Hope this is clear.

  • Dialog programming - How to place a select-option field in a dialog screen

    Hi all,
    In Dialog Programming, How to place a select-option field in a dialog screen.
    Kindly give me some example code...
    Thanks,
    Jaffer Ali.S

    hi Ali,
    U can add select-options in ur module pool by using  SELECTION-SCREEN BEGIN OF SCREEN <scrn> AS SUBSCREEN  command.
    check this link for reference.....
    http://help.sap.com/saphelp_47x200/helpdata/en/e7/deb237b9a9a968e10000009b38f8cf/frameset.htm
    Example Code :
    DATA : ok_code TYPE sy-ucomm.
    SELECTION-SCREEN BEGIN OF SCREEN 1010 AS SUBSCREEN.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: p_rad1 RADIOBUTTON GROUP grp1 DEFAULT 'X',
                p_rad2 RADIOBUTTON GROUP grp1,
                p_rad3 RADIOBUTTON GROUP grp1.
    SELECT-OPTIONS: s_matnr FOR  mara-matnr,
                    s_matkl FOR  mara-matkl,
                    s_mtart FOR  mara-mtart.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN END OF SCREEN 1010.
    START-OF-SELECTION.
      CALL SCREEN 100.
    *&      Module  STATUS_0100  OUTPUT
    MODULE status_0100 OUTPUT.
    SET PF-STATUS 'xxxxxxxx'.
    SET TITLEBAR 'xxx'.
    CALL SCREEN 1010 .
    ENDMODULE.                    "status_0100 OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      CASE ok_code.
        WHEN 'EXIT'.
          LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    SCREEN 100 ****************
    PROCESS BEFORE OUTPUT.
      MODULE status_0100.
      CALL SUBSCREEN sub_1010 INCLUDING sy-repid '1010'.
    <b>***** where sub_1010 is name of sub-screen area</b>
    PROCESS AFTER INPUT.
      CALL SUBSCREEN sub_1010.
      MODULE user_command_0100.
    <<< REMOVED BY MODERATOR >>>
    Harimanjesh AN
    Edited by: Marcelo Ramos on Dec 17, 2008 7:54 PM

  • 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

  • Can we create serach help for a selection screen field

    Can we create serach help for a selection screen field with out creating searchhelp object.
    I mean is it possible to create serchelp in the program itself with some specific values i want to give.
    E.g say we can define any internal table and fill it with values and using that into selection screen fields
    Regards
    Mave

    AT SELECTION-SCREEN ON VALUE-REQUEST FOR paymeth.
      PERFORM PAYMENT_HELP.
    FORM PAYMENT_HELP.
      DATA: begin of DESCR_TAB occurs 0,
            DESCR LIKE BKPF-BKTXT,
            END OF DESCR_TAB.
      DATA: gd_repid like sy-repid.
      gd_repid = sy-repid.
      DESCR_TAB-DESCR = 'aaaaa'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'bbbbb'.
      append DESCR_TAB.
      DESCR_TAB-DESCR = 'ccccc'.
      append DESCR_TAB.
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
           EXPORTING
                retfield    = 'DESCR'
                DYNPPROG    = gd_repid
                DYNPNR      = '1000'
                DYNPROFIELD = 'paymeth'
                VALUE_ORG   = 'S'
                DISPLAY     = ' '
           TABLES
                value_tab   = DESCR_TAB.
    endform.
    Svetlin

  • How to put Mandatory option for selection screen fields in ABAP Queries

    Hi Experts
    Can anyone tell me how to put mandatory option for the selection screen fields in ABAP Queries.
    Manually I had written code in the At Selection Screen  option in infoset to display error message if that field is blank.
    But I need to display the selection fields with the tick mark (obligatory mark).
    How to do this?
    Appropriate answers will be awarded

    Hi
    For parameter option
    parameters : p_kunnr type kna1-kunnr  obligatory.
    For select option
    select-options: s_date for vbak-erdat obligatory.
    Plz rewards points ,
    Regards ,
    Ganesh.

  • How to display the selection screen fields for selected checkboxes

    Hi all,
             I have 7 checkboxes, for each check box we have some seletion screen fields.if i select first check box,i want to display first slection screen fields only.
    and if we select more than one check box how to display the selection screen fields for selected check boxes,please help me this
    Thanks
    sriman.

    hi,
    Try this code
    report z_13317_sdn2.
    tables : mara, marc, dd03l.
    parameters : p_chk1 as checkbox user-command ABC,
                 p_chk2 as checkbox user-command PQR,
                 p_chk3 as checkbox user-command XYZ.
    select-options : s_matnr for mara-matnr modif id A,
                     s_ersda for mara-ersda modif id A,
                     s_werks for marc-werks modif id B,
                     s_lvorm for marc-lvorm modif id B,
                     s_tab for dd03l-tabname modif id C.
    data: v_chk1,
          v_chk2,
          v_chk3.
    at selection-screen output.
      loop at screen.
        if screen-group1 = 'A' or
           screen-group1 = 'B' or
           screen-group1 = 'C'.
            screen-input = 0.
           modify screen.
        endif.
      endloop.
      loop at screen.
        if v_chk1 = 'X'.
          if screen-group1 = 'A'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk2 = 'X'.
          if screen-group1 = 'B'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
        if v_chk3 = 'X'.
          if screen-group1 = 'C'.
            screen-input = 1.
            modify screen.
          endif.
        endif.
      endloop.
    at selection-screen.
      if sy-ucomm = 'ABC'.
        if v_chk1 = ' '.
          v_chk1 = 'X'.
        else.
          v_chk1 = ' '.
        endif.
      endif.
      if sy-ucomm = 'PQR'.
        if v_chk2 = ' '.
          v_chk2 = 'X'.
        else.
          v_chk2 = ' '.
        endif.
      endif.
      if sy-ucomm = 'XYZ'.
        if v_chk3 = ' '.
          v_chk3 = 'X'.
        else.
          v_chk3 = ' '.
        endif.
      endif.
    Regards,
    Sailaja.

  • Default value for selection screen field

    Hi all,
      I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.
    How can I do it?
    Thanks
    Rahul

    Hi Rahul,
    In the INITIALIZATION event we can set the default values for selection screen fields.
    INITIALIZATION.
    loop at screen.
    if screen-name = 'S_MATNR-LOW'.
    CLEAR S_MATNR.
    s_matnr-low = '1234'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr.
    CLEAR S_MATNR.
    s_matnr-high = '5678'.
    s_matnr-option = 'EQ'.
    s_matnr-sign = 'I'.
    append s_matnr
    clear s_matnr.
    endif.
    endloop.
    Hope it helps.
    Mark if useful
    Regards,
    Saumya

  • Need help on search help on selection screen field

    Hi guyz,
    Please tell me how to pass the parameter or restrict the below search help.
    *s_bsart FOR ekko-bsart . " Doc. Type*
    For the above selection screen field i need to display the data only for cat = F if i click search help.
    Thanks,
    Mohamed Kaleel

    Hi,
    Use At selection-screen for value-request for s_bsart.
    SELECT_OTPIONS: s_bsart FOR ekko-bsart.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_bsart.
    CALL SCREEN 100 STARTING AT 10 5
    ENDING AT 50 10.
    MODULE value_list OUTPUT.
    SUPPRESS DIALOG.
    LEAVE TO LIST-PROCESSING AND RETURN TO SCREEN 0.
    SET PF-STATUS space.
    NEW-PAGE NO-TITLE.
    s_bsart-low = 'F' / 'CAT=F'.
    write :/ s_bsart-low.
    Hide: s_bsart-low
    clear s_bsart-low.
    ENDMODULE.
    AT LINE-SELECTION.
    LEAVE TO SCREEN 0.
    This will resolve the issue.
    Regards,
    Gurpreet

  • Truncation of selection screen field in reports

    Hi,
    Is there any way to avoid truncation of selection screen fields in ABAP reports? For eg, I declare:
    SELECT-OPTIONS: s_test FOR ztest-test_field NO INTERVALS
    The length of this field in the table is 30 chars. However, on displaying the field via selection screen, this gets truncated to around 18 or so. How do I avoid this as I need to display the full length of the field?

    Hi,
    Try this
    Tables : makt.
    select-options maknr for makt-maktx.
    now go to the screen painter of your program in change mode and move the Help buttons first to the Right each. now increasethe length of the Matnr Field length so that they are equal to 40 Char. in your program you have handle the length now if you want to restrict to 18 otherwise it will be ok
    if they don't fit you need incease the Size of the Screen Visible area both in the Screen Painter as well as in the
    Screen Attributes
    You also get an Information Message just ignore that.
    Just open your program in SE80 if you can't go to the screen painter in SE38. the other way just keep this program in Display mode and execute then take F1 help , take Technical Information and double click on the Screen number now go to the Screen Layout and go to Change mode here.
    Regards,
    Shirisha

  • Regarding Search help on selection-screen field

    Hi there,
    I am working on custom tables.
    I have a requirement to maintain search pattern on a selection-screen field.
    selection-screen parameter: p_name which is company name filed from Z table.
    By giving a string like Holl* and by  pressing F4 on the field p_name it has to popup a dialogbox having list of company names starting with Holl.
    Thanks in advance.
    -Tulasi

    Hi
    Go through the link given below :
    How to create a search help for my own fields in selection screen
    F4 search help on report selection screen
    also try :
    CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
    EXPORTING
    DDIC_STRUCTURE = ' '
    RETFIELD = 'VKORG'
    PVALKEY = ' '
    DYNPPROG = SY-REPID
    DYNPNR = SY-DYNNR
    DYNPROFIELD = 'P_VKORG'
    STEPL = 0
    WINDOW_TITLE =
    VALUE = ' '
    VALUE_ORG = 'C'
    TABLES
    VALUE_TAB = T_TABLE1
    FIELD_TAB = field_tab
    RETURN_TAB = RET_TAB
    DYNPFLD_MAPPING = DYN_TAB
    EXCEPTIONS
    PARAMETER_ERROR = 1
    NO_VALUES_FOUND = 2
    OTHERS = 3
    With Regards
    Nikunj shah

  • Selection screen field problem

    Hello experts..
    i have a selection screen , in that i have a field   s_bwart for mseg-bwart.
    some times the user will input the data in the field and sometimes he wont. we have fixed movement types combination like
    11-21 , 13-24 , 13-56 , 101-543 , 101-544 etc.
    if the user did not input any thing in the selection screen , i am populating s_bwart in at-selection screen event with all the mvt types. after executing the report when user presses the back button to come to the selection screen, there the s_bwart field is containing all the mvt types in single values ie in the select options screen. So the user dont want that, if he comes back nothing should be there in the selection screen field s_bwart if he has not inputted anything. if he inputs only 11 mvt type then when he comes back after executing the report he should see only 11 in the select screen field ie s_bwart. Please send the replies on how to solve the problem.

    hi,
    in ur program try to display values for users in START-OF-SELECTION event as it triggers after the selection screen displayed for users. if user doesn't give any input then display default values in this event. and also create a variable
    for ex:
    data: ws_flag type c,
             p_value type i.
    after u display default values for users in selection screen assign the flag as ' X '
    ws_flag = 'X'.
    before leaving ur program based on flag try to do like this.
    if ws_flag = ' X '.
        clear s_data. // s_data is the select options for u.
    else.
         s_data = p_value. // the value which user gave in selection screen as i/p.
    endif.
    if helpful reward some points.
    with regards,
    Suresh Aluri.

  • Regarding Selection-Screen Field Display

    Hi All,
    I have issues with Selection-Screen field display.
    The Actual issue is i had declared a selection screen field as: <b>s_exgen FOR embk-exgen</b>.
    <b>EMBK-EXGEN</b> is actually <b>20</b> Char length field.
    But in output display it is being shown as <b>18</b> Char field though i can type in all <b>20</b> characters.
    But <b>display</b> restricted to <b>18</b> Characters only.
    Can anybody give me the solution for the same!
    Thanks in advance.
    Thanks & Regards,
    Prasad.

    Hi,
    You can decrease the visible length of the field but you can not increase more than database field length. check SAP help on this :
    select-options: s_exgen FOR embk-exgen VISIBLE LENGTH 5.
    ... VISIBLE LENGTH vlen
    Effect
    This addition allows you to shorten the visible length of the corresponding screen field on the selection screen to vlen.
    Variant 2
    SELECT-OPTIONS sel FOR (f).
    Additions as in variant 1.
    Effect
    In this variant, (f) must be a field containing the name of the actual reference field at runtime. The system creates the LOW and HIGH fields as character fields with length 45. However, their appearance on the selection <b>screen is inherited from the reference field whose name is contained in field f at runtime.</b>
    Regards
    Appana

Maybe you are looking for

  • ERROR:  An error occurred while building the default domain

    Hi, I have just installed Oracle JDeveloper 11g R1 (Build 5407) (Oracle JDeveloper Studio Edition for Windows (934 MB) ) on my windows laptop, but when I start JDeveloper I get the message : ERROR: An error occurred while building the default domain.

  • How to make changes in default toolbar

    hi i m using oracle forms 6 and i want to know either it is possible to change in the default toolbar or not if so plz let me know how to make changes in default toolbar and re-adjust according to my need.i know how to create new toolbar and connect

  • Rounding when any discount in sales order

    hi Gurus, Please help me for pricing condition when create sales order. when creating sales order there are some sales order the condition should be: if there is discount(condition type : ZD23) should be rounding if there is no discount rounding shou

  • Flash Container...to big when viewing SWF files

    I have used Flash Professional  CS5.5, to make a SWF.file, that when I save as all, it also includes a FLA file. I use this SWF file in  Dreamweaver CS5.5 , Insert , Media, to view this I have set the Parameters name .swf, . When I select Live View,

  • Special Fonts in Titles

    I am using Premiere Elements 10 on WIndows 7. I have some Hebrew Unicode OpenType Fonts. They do not appear in the font menu, nor can I cut and paste text from another application. How can I use Hebrew characters in titles? Also, is there a way to us