Skip to Content
author's profile photo Former Member
Former Member

selection-screen validation.

hi all,

this my selection screen

SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,

s_lifnr FOR ekko-lifnr,

s_bedat FOR ekko-bedat OBLIGATORY,

s_bukrs FOR ekko-bukrs OBLIGATORY.

SELECTION-SCREEN END OF BLOCK b1.

if i enter EBELN in selection screen, bedat shoulnot be mandatory.

if EBELN field is blank BEDAT should be mandatory..

how to do tat,please help me out

Regards

Suprith

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2008 at 11:01 AM

    Remove obligatory for BEDAT...

    Add below code in ur program...

    TABLES: SSCRFIELDS. " Fields on selection screens

    Form to Validate data specified on Selection Screen

    CHECK SSCRFIELDS-UCOMM EQ 'ONLI'.

    PERFORM SELECTIONSCREEN_VALIDATIONS.

    In this perform check whether EBELN is passed, then check whether BEDAT is passed or empty and don't trigger any message.

    if EBELN is not passed check whether BEDAT has a value and if there exists no value, trigger a message.

    Form looks as below...

    FORM SELECTIONSCREEN_VALIDATIONS .

    IF P_PCUPLD = C_PC_SELECTED.

    IF SY-BATCH EQ C_PC_SELECTED.

    CLEAR SSCRFIELDS-UCOMM.

    MESSAGE E001(ZZ) WITH TEXT-014.

    " File cannot be upload from presentation server when execute in

    " Batch Mode.

    ENDIF.

    ENDFORM. " SELECTIONSCREEN_VALIDATIONS

    Don't create multiple threads for same post...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 19, 2008 at 12:13 PM

    hi

    try this...

    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.

    SELECT-OPTIONS : s_ebeln FOR ekko-ebeln,

    s_bedat FOR ekko-bedat OBLIGATORY,

    SELECTION-SCREEN END OF BLOCK b1.

    at selection-screen on block b1

    if s_ebeln is initial.

    if s_bedat is initial.

    message 'Enter date' type 'E'.

    endif.

    endif.

    regards

    padma

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 20, 2008 at 08:22 AM

    Use event

    AT SELECTION SCREEN on s_bedat.

    if bedat is empty.

    message type E

    endif.

    Hope this helps!

    Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 20, 2008 at 08:23 AM

    Use AT SELECTION SCREEN on field.

    for more help press F1 on same.

    Amit.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Sep 23, 2008 at 11:23 AM

    closed

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.