Hi,   dialog prog  validation

hi
pl.  can anybody reply for the following query.
i would like to know by how many ways validation is done in dialog prog and where in the flowlogic editor it is written.
pl provide code with example.
thanx.
rocky robo

u can do the validation in PBO.
but the good place is inside <i>chain end chain.</i>
For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.
CHAIN.
FIELD chk_connobj.
FIELD chk_inst.
FIELD chk_devloc.
FIELD ehaud-haus.
FIELD eanl-anlage.
MODULE modify_screenfields.
ENDCHAIN.
*& Module modify_screenfields INPUT
* text
MODULE modify_screenfields INPUT.
CLEAR okcode.
okcode = sy-ucomm.
CASE okcode.
WHEN 'ENTER' OR 'EXECUTE'.
IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
chk_devloc EQ c_x.
IF ehaud-haus IS INITIAL.
SET CURSOR FIELD 'EHAUD-HAUS'.
MESSAGE e000(zo_spa) WITH text-017. " Enter Connection obj
ELSE.
PERFORM conn_obj_check.
ENDIF.
ENDIF.
ENDMODULE. " modify_screenfields INPUT
hope u got the concept.
rgds
Anver

Similar Messages

  • How to populate both key and text in drop down list in dialog prog screen

    Hi, Can anyone please advice how to display both key and text in the drop down list in dialog prog screen. I tried with below code. keys and texts are getting populated in values table but only text is appearing when click on drop down. need to display both key and text in the drop down. Thanks in advance.
    TABLES: ZRPP_MODELS, ZRPP_FFLSTRATEGY.
    TYPE-POOLS : VRM.
    DATA : field_id TYPE VRM_ID ,
           values   TYPE VRM_VALUES,
           value    LIKE LINE OF values.
    FORM fill_model_list .
      select MODEL MODEL_DESC from ZRPP_MODELS into value.
        APPEND value TO VALUES.
      endselect.
      CALL FUNCTION 'VRM_SET_VALUES'
        EXPORTING
          id     = 'ZRPP_MODELS-MODEL'
          values = values.
    ENDFORM.

    You need to concatenate KEY & VALUES
      wa_values-key = '1'.
      wa_values-text = '1 - One'.
      append wa_values to i_values.
      wa_values-key = '2'.
      wa_values-text = '2 - Two'.
      append wa_values to i_values.
      wa_values-key = '3'.
      wa_values-text = '3 - Three'.
      append wa_values to i_values.
      call function 'VRM_SET_VALUES'
        exporting
          id              = 'LIST_BOX'
          values          = i_values
        exceptions
          id_illegal_name = 1
          others          = 2.

  • Prob in Dialog Prog.

    Hi All
    I am facing prob in Dialog Prog Report.
    Created 1 Sel-screen, when the options are given after executing, it runs well.
    But when coming back to sel-screen & giving new options, its giving previous records also.
    (I have cleared IT).
    Regards.

    Hi,
    CLEAR wa_itab.     " Clears work area
         REFRESH it_itab.  "  Clears contents of internal table
         SELECT * FROM <table> INTO TABLE it_itab WHERE field IN s_sel.

  • Dialog Prog. with a selection screen

    Hi Gurus,
    How its possible to achieve a SELECTION-SCREEN with in a Dialog Prog. Pls. give me rough idea.
    Thank you.

    Hi,
    If you are taking about to use the selection screen in you Dialog Program than please follow the following.
    You will have to add following Lines in PBO and BAI You need a custom Control on the your Screen where you display your sub screen.
    PBO
    CALL SUBSCREEN <custom_control_name> INCLUDING '<Programe_name_where_sub_screen'> '<Screen Number'>
    PAI
    CALL SUBSCREEN <custom_control_name>
    In Program it must be like this.
    selection-screen begin of screen 0001 as subscreen.
        parameters: date like sy-datum.
    selection-screen end of screen 0001.
    Hope above will help you,
    Please Reply if not Clear,
    Kind Regards,
    Faisal

  • Dialog prog. doubt

    hi alll,
    i've created one dialog prog. in that prog. i created inserted table control. in that control i placed two TXTNAME and TXTAGE (input/output field). BUT I activated, the folllowing error occurs during runtime :
    The txtname is not assigned to a loop "LOOP ... ENDLOOP" muthu appear in "PBO" and "PAI".
    pls solove my problem

    Hi,
    While defining a table control on a screen, the following statements are mandatory :
    1. CONTROLS : <TABLECONTROL> TYPE TABLEVIEW USING SCREEN <SCREENNO.>
    2. In the Flow Logic,
      a. In the PBO.
        Loop at itab with <tablecontrol>.
        endloop.
      b. In the PAI,
        loop at itab.
        endloop.
    In your case, ensure that the Statement 2 is present.
    Reward if helpful.
    Regards

  • Hi experts only  dialog prog

    hi experts
    i would like to know how to disable a pushbutton in dialog progr initially when the prog is executed.
    i have to show 2 push buttons on application tool bar, one of them is active and the other is not active .
    after execution when active button is pressed, the other disabled button should get active.
    how is this possible??
    thanx
    rocky

    create 2 PF status and show where required

  • Reg Dialog Prog..

    Hi,
       Any one can send me the sample dialog program..I created one DP it contains 2 text field and one push button, when i press the button it ll not work.

    Hi,
    plz go through the following example-----
    T A B L E D E C L E R A T I O N
    TABLES : Z8T024E.
    C O N S T A N T S
    DATA : ok_code_501(20).
    DATA : A1(20).
    DATA: D_FIRST VALUE 'Y'. " DECLEARING A FLAG
    data: dyname like d020s-prog value 'Z8VIJAY_T024E_RIV',
    dynumb like d020s-dnum value '0501'.
    data: begin of dynpfields occurs 3.
    include structure dynpread.
    data: end of dynpfields.
    C O N T R O L S
    CONTROLS : TAB_CONTROL TYPE TABLEVIEW USING SCREEN 501.
    I N T E R N A L T A B L E
    DATA : BEGIN OF I_TAB OCCURS 0,
    z8_ekorg TYPE z8ekorg, "purchasing organization
    z8_ekotx TYPE z8ekotx, "description
    z8_bukrs TYPE z8bukrs, "company code
    END OF I_TAB.
    *& Module USER_COMMAND_0501 INPUT
    text
    module USER_COMMAND_0501 input.
    OK_CODE_501 = SY-UCOMM.
    CASE OK_CODE_501.
    *-for save--
    WHEN 'SAV1'.
    LOOP AT I_TAB.
    SELECT SINGLE * FROM Z8T024E
    WHERE Z8_EKORG = I_TAB-Z8_EKORG
    AND Z8_BUKRS = I_TAB-Z8_BUKRS.
    ****IF DATA EXITS THEN UPDATE.....
    IF SY-SUBRC = 0.
    UPDATE Z8T024E SET Z8_EKOTX = I_TAB-Z8_EKOTX
    WHERE Z8_EKORG = I_TAB-Z8_EKORG AND Z8_BUKRS = I_TAB-Z8_BUKRS.
    ENDIF.
    ENDLOOP.
    D_FIRST = 'Y'.
    CLEAR OK_CODE_501.
    **-for exit-
    WHEN 'EX01'.
    SET SCREEN 0.
    LEAVE SCREEN.
    ENDCASE.
    ENDMODULE. " USER_COMMAND_0501 INPUT
    *& Module STATUS_0501 OUTPUT
    text
    module STATUS_0501 output.
    SET PF-STATUS 'Z8VIJAY'.
    SET TITLEBAR 'TABLE CONTROL FOR Z8T024E'.
    IF D_FIRST = 'Y'.
    REFRESH I_TAB.
    SELECT
    z8_ekorg
    z8_ekotx
    z8_bukrs
    INTO CORRESPONDING FIELDS OF TABLE i_tab
    FROM z8t024e
    WHERE Z8_BUKRS = '5504'.
    D_FIRST = 'N'.
    ENDIF.
    TAB_CONTROL-LINES = 200.
    endmodule. " STATUS_0501 OUTPUT
    *& Module ADD_ENTRIES OUTPUT
    text
    module ADD_ENTRIES output.
    CLEAR I_TAB.
    READ TABLE I_TAB INDEX tab_control-current_line.
    TAB_CONTROL-V_SCROLL = 'X'.
    *TAB_CONTROL-H_GRID = 'X'.
    *TAB_CONTROL-V_GRID = 'X'.
    IF I_TAB-Z8_EKORG = '' OR I_TAB-Z8_BUKRS = ''.
    LOOP AT SCREEN.
    IF SCREEN-NAME = 'I_TAB-Z8_EKOTX'.
    SCREEN-OUTPUT = 1.
    SCREEN-INPUT = 0.
    MODIFY SCREEN.
    ENDIF.
    ENDLOOP.
    ENDIF..
    endmodule. " ADD_ENTRIES OUTPUT
    *& Module READ_ENTRIES INPUT
    text
    module READ_ENTRIES input.
    MODIFY I_TAB INDEX tab_control-current_line.
    IF I_TAB-z8_bukrs IS INITIAL.
    ENDIF.
    endmodule. " READ_ENTRIES INPUT
    *& Module DISPLAY OUTPUT
    text
    module DISPLAY output.
    *when display-
    IF SY-UCOMM = 'DISP'.
    IF I_TAB-Z8_EKORG <> ''.
    LOOP AT SCREEN.
    SCREEN-INPUT = 0.
    SCREEN-OUTPUT = 1.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    ENDIF.
    *when change-
    IF SY-UCOMM = 'CH01'.
    IF I_TAB-Z8_EKORG = '' OR I_TAB-Z8_BUKRS = ''.
    LOOP AT SCREEN.
    SCREEN-INPUT = 0.
    SCREEN-OUTPUT = 1.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    ENDIF.
    *when create-
    IF SY-UCOMM = 'CR01'.
    LOOP AT SCREEN.
    CLEAR I_TAB.
    REFRESH I_TAB.
    SCREEN-INPUT = 1.
    SCREEN-OUTPUT = 1.
    MODIFY SCREEN.
    ENDLOOP.
    ENDIF.
    endmodule. " DISPLAY OUTPUT
    **& Module help INPUT
    text
    *module help input.
    *CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
    EXPORTING
    DOKLANGU = SY-LANGU
    DOKTITLE = ' '
    CALLED_BY_TCODE =
    CALLED_BY_PROGRAM =
    CALLED_BY_DYNP =
    CALLED_FOR_TAB = 'Z8T024E'
    CALLED_FOR_FIELD = 'Z8_EKORG'
    CALLED_FOR_TAB_FLD_BTCH_INPUT =
    CALLED_BY_CUAPROG =
    CALLED_BY_CUASTAT =
    MERGE_DZ_IF_AVAILABLE =
    MEMORYID =
    EXPLICIT_MEMORYID = ' '
    TABLES
    LINKS =
    EXCLUDEFUN =
    EXCEPTIONS
    OBJECT_NOT_FOUND = 1
    SAPSCRIPT_ERROR = 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.
    *endmodule. " help INPUT
    *& Module help INPUT
    text
    module help input.
    if sy-subrc = 0.
    endif.
    REFRESH dynpfields.
    move '0001' to dynpfields-fieldname.
    append dynpfields.
    CALL FUNCTION 'DYNP_VALUES_READ'
    EXPORTING
    dyname = dyname
    dynumb = dynumb
    TRANSLATE_TO_UPPER = ' '
    REQUEST = ' '
    PERFORM_CONVERSION_EXITS = ' '
    PERFORM_INPUT_CONVERSION = ' '
    DETERMINE_LOOP_INDEX = ' '
    tables
    dynpfields = dynpfields
    EXCEPTIONS
    INVALID_ABAPWORKAREA = 1
    INVALID_DYNPROFIELD = 2
    INVALID_DYNPRONAME = 3
    INVALID_DYNPRONUMMER = 4
    INVALID_REQUEST = 5
    NO_FIELDDESCRIPTION = 6
    INVALID_PARAMETER = 7
    UNDEFIND_ERROR = 8
    DOUBLE_CONVERSION = 9
    STEPL_NOT_FOUND = 10
    OTHERS = 11
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endmodule. " help INPUT
    *& Module HELP1 INPUT
    text
    module HELP1 input.
    endmodule. " HELP1 INPUT
    *& Module HELP2 INPUT
    text
    module HELP2 input.
    endmodule. " HELP2 INPUT
    What is Dialog Progrmming.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb2d40358411d1829f0000e829fbfe/content.htm
    This link Give you all details about Modulepool
    http://sap.mis.cmich.edu/sap-abap/abap09/index.htm
    Regards,
    Priyanka.

  • Regarding Dialog Prog

    Hi,
            I want to know about the steps to create dialog program,

    Hey,
    If the field name is FLD1 here is the code you need to write in the PAI module
    field FLD1 module check_fld1.
    Inside module check_fld1 u need to code your validations. Also refer the help for ON-INPUT and ON-REQUEST additions.
    -Kiran
    *Please reward helpful answers

  • How can I stop OK button from closing dialog when validations are failing?

    I am using jDev 11.1.1.6.0.
    I am using a commandButton with a showPopupBehavior. If I change values in the dialog that cause validation messages, I can still press the OK button and the dialog closes. Is there a way to prevent the dialog form closing (without use of javascript) if there are validation errors? Is this a bug in ADF?
    My .jsff page contains the following fragment
    <af:commandButton id="cb-new"
    text="#{ResourcesGenBundle['AltTxt.New.Newobject']}..."
    immediate="true" useWindow="true">
    <af:showPopupBehavior popupId="p-crf" triggerType="action"/>
    </af:commandButton>
    <af:popup id="p-crf" contentDelivery="lazyUncached"
    binding="#{pageFlowScope.manageRule.createRuleFolderPopup}">
    <af:dialog id="d-crf"
    title="#{ZspBusinessRulesGenBundle['Action.CreateRuleFolder.CreateRuleFolderInManageSalesP']}"
    contentWidth="360" contentHeight="360" resize="on"
    dialogListener="#{pageFlowScope.manageRule.onCreateRuleFolderDialogEvent}"
    stretchChildren="first">
    <f:subview id="s-mrf">
    <jsp:include page="/oracle/apps/spe/businessRules/publicUi/page/ManageRuleFolderPF.jsff"/>
    </f:subview>
    </af:dialog>
    </af:popup>

    trick was to set autoCancel="disabled" on the popup and hide the popup in the DialogListener when appropriate

  • Dialog OO - validation check

    HI All,
    My dialog OO contains 3 tabstrips.
    I have validations checking for the fields at the subscreen of each tabstrips (in PBO).
    When validation fails, i coded the following:
    message e000(zz) with 'Error
    I am expecting the error msg to display at the status bar. But now it is showing a pop up screen with an Exit button. When Exit, I am back to SAP Easy Access (main screen)
    Please comment how I can launch an error msg at the status bar. Thanks

    Hi Rich,
    Thanks for pointing it out. I mistakenly put the checking on PBO, for now i have already put back to PAI.
    However im facing another problem. That's, in my tabstrips(display mode) my part of checking(PAI) will be triggered whenever i click a button on main screen. May i know how could i just make the checking available when my tab is in CHANGE mode?
    Your comment is highly appreciated.
    Thanks in advance.

  • Select option in Dialog prog

    Hi,
    I'm developing a dialog programming. 1st screen is the selection screen, i need to code the input for Parameter -> Material number , Select-option -> Plant. Problem hits on select option Plant.
    If we code via normal type 1 executable program, i just need code like -> Select-options: S_PLANT for mara-werks. Since right now im in dialog programming then i need to code my own LOW and HIGH value. I have done that. But i need to code in the Multiple selection/Extension button that next to HIGH.
    Do u guys know is there any FM that helping to create Multiple selection/Extension button? Like standard once click on it, it contains single value, ranges, exclude single value, exclude ranges...
    Please comment.

    Hi,
    1. Create the subscreen using the selection screen
    2. Create the subscreen area in the Dialog program
    3. Call this subscreen created  in point 1 in the subscreen area of dialog programing.
    selection-screen : begin of screen 0050 as subscreen.
    select-option : s_pernr for pa0000-pernr.
    selection-screen : end of screen 0050.
    start-of-selection
    call screen 100.
    in PBO
      call subscreen <subscreen area>including sy-repid '0050'.
    in PAI
      call subscreen <subscreen area> .

  • Dialog prog.

    Can anyone plz give me sample code to handle pageup, nextpage, previouspage, lastpage options for a table  in screen in Dialog Program.
    Thanks.

    Hi,
       Have a look at these good links-
    http://help.sap.com/saphelp_webas630/helpdata/en/9f/db9cdc35c111d1829f0000e829fbfe/content.htm
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sap-img.com/
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sapgenie.com/links/abap.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c9/5472fc787f11d194c90000e8353423/frameset.htm
    http://help.sap.com/saphelp_47x200/helpdata/en/52/670ba2439b11d1896f0000e8322d00/frameset.htm
    http://fuller.mit.edu/tech/dialog_programming.html
    http://www.sappoint.com/abap/dptc1.pdf
    http://help.sap.com/saphelp_46c/helpdata/en/08/bef2dadb5311d1ad10080009b0fb56/content.htm
    http://www.sappoint.com/faq/faqdiapr.pdf
    http://www.sapdevelopment.co.uk/dialog/dialoghome.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    <b>check sample code.</b>http://www.sapgenie.com/abap/example_code.htm
    http://www.sap-img.com/abap.htm
    http://www.allsaplinks.com/dialog_programming.html
    Mark useful answers.
    Regards,
    Tanuja.

  • Dialog Prog to Display fields of Table or Structure in screen dynamically.

    Hello Experts ,
           I am working on a dialog programming I wish to display any given table/structure on the screen - to be very clear.
    1st screen -
        One input box which can take any SAP standard or custom tableor structure as input <-- Press enter
    2 nd screen -
        I wish to see the fields of the structure in column format dsiplayed in the screen ( Like ALV Grid in the page).
    Please tell me the logic or similar example so i can refer thanks in advance.
    Thanks,
    Sriram.

    Hello Srinivas,
      Your program looks really looks and simple but the porb is we have 4.6c here. So the syntax lines
    CREATE DATA gv_dref TYPE TABLE OF (p_table).
       is not accepted by the system if we enter as it is (error - unable to interpret table - possible cause of error or spelling) 
    but it accepts
    CREATE DATA gv_dref TYPE p_table.
    but at the time of select query its not talking it has a internal table to show data , finalltyit dumps.
    [ASSIGN gv_dref->* TO <fs_itab>.
      "Select the data
      SELECT * FROM (p_table) INTO TABLE <fs_itab> UP TO 100 ROWS.
    So my problem is to find a way to dynamically display a table or view .
    Please guide.
    Regards,
    Sriram.

  • Hi gurus,    dialog prog

    hi buddies
    i have dev dia prog, only prob with it is that in table control there is vertical bar and when this vertical bar is moved up or down, the current line sy-tabix no gets changed (the system picks up wrong index no).
    i am using following command to pick up changed data on screen.
    MODIFY itab from itab INDEX TC-current_line.
    but TC-current_line picks up wrong value only when vertical scroll bar is moved up or down.
    what is the solution for this???
    thanx
    rocky

    Hello Rocky,
    IN the PBO of the event create a module.
    and use.
    DECRIBE TABLE ITAB LINES SY-TLINES
    Regards,
    Vasanth

  • HI ALL- DIALOG PROG

    HI
    I WOULD LIKE TO KNOW HOW TO PASS NEGATIVE VALUE TO AN INTERNAL TABLE FIELD IN DIALOG PROGRAM.
    I HAVE TABLE CONTROL IN THAT WHOLE INTERNAL TABLE FIELDS ARE INPUT AND OUT ENABLED,, BUT IT IS NOT ALLOWING NEGATIVE VALUES IN FIELDS.
    WHAT TO DO TO TAKE NEGATIVE VALUE IN DIALOG PROGRAM??
    THANX IN ADVANCE
    ROCKY

    In the table control field
    double click on the cell , and give the text as "_________________V" and make sure it is Quan field format. in the attributes.
    then it iwll allow negative values.

Maybe you are looking for

  • Digital Invoice for Mexico

    Hi All, We are in the process of implementing Digital Invoice for Mexico. I have few queries regarding that. I did search SDN regarding this topic but couldn't get a clear picture SSF process . Hence i am posting this thread. Below are my queries. 1.

  • HT5945 maverick make my mac can't detect hard disk

    after I've installed maverick, my mac cannot detect my hard disk. what should i do to allow my mac to be able to use the hard disk? My hard disk is TRANSCEND

  • Reuse_alv_grid_display TITLE problem after refresh

    All, I have a alv report using fm reuse_alv_grid_display. While calling initially this fm i am passing the grid tile in I_GRID_TITLE parameter. its displaying in grid, then after user click on the app toolbar button , i am doing some filteration , th

  • Exchange Management Console require workstation local administrative rights to run?

    Does launching the Exchange Management Console require local administrative permissions?   I understand I need Exchange permissions to perform Exchange tasks, but I am wondering what permissions are required just to run the Management Console? Jason

  • Query regarding mapping (aggregated)

    Hi, I need some help in mapping. SOURCEis as below: <E1EDP01> <E1EDP05> <KSCHL>ZRTP</KSCHL> <KRATE>100</KRATE> </E1EDP05> <E1EDP05> <KSCHL>ZIPP</KSCHL> <KRATE>200</KRATE> </E1EDP05> </E1EDP01> TARGET <E1EDP01> <E1EDP05> <KSCHL>ZRTP</KSCHL> <KRATE>300