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

selection screen validation

Hi i am developing a report where in i have 3 blocks for selection criteria..1st block has drop down menu for carrier service(UPS,FEDEX etc) second one has delivery number and third block has 5 tracking number input ..

PARAMETERS:P_XSITD LIKE ZTRK_PAK-XSITD,

P_SHPACT LIKE ZTRK_PAK-SHIPACCT.

SELECTION-SCREEN:END OF BLOCK B1.

SELECTION-SCREEN:BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.

PARAMETERS:P_VBELN LIKE ZTRK_PAK-VBELN.

SELECTION-SCREEN:END OF BLOCK B2.

SELECTION-SCREEN:BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.

PARAMETERS:P_TRACN1 LIKE ZTRK_PAK-TRACKN,

P_TRACN2 LIKE ZTRK_PAK-TRACKN,

P_TRACN3 LIKE ZTRK_PAK-TRACKN,

P_TRACN4 LIKE ZTRK_PAK-TRACKN,

P_TRACN5 LIKE ZTRK_PAK-TRACKN.

SELECTION-SCREEN:END OF BLOCK B3.

i need to validate firstly the delivery number..if delievery number is entered validate the tracking number 1.

if tracking number 1 or 2 or 3 or 4 or 5 is entered validate delivery number is not blank.

how can i do it..i am new to ABAP..someone help me please.

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 Jan 10, 2007 at 04:58 PM

    Hi,

    Try this..

    AT SELECTION-SCREEN.

    • CHeck if one the tracking number is given then the delivery number is mandatory.

    IF NOT P_TRACN1 IS INITIAL OR

    NOT P_TRACN2 IS INITIAL OR

    NOT P_TRACN3 IS INITIAL OR

    NOT P_TRACN4 IS INITIAL OR

    NOT P_TRACN5 IS INITIAL.

    IF P_VBELN IS INITIAL.

    MESSAGE E208(00) WITH 'Delivery is mandatory if tracking number is entered'.

    ENDIF.

    ENDIF.

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 05:01 PM

    write code in screen-validations.

    if delivery is not initial..check tracking number 1 is valid or not.

    if tracking 1,2,3,4,5 are not space then check delivery is not initial.

    if not p_del is initial.

    validate tracking 1.

    endif.

    if not p_tr1 is initial and

    not p_tr2 is initial and

    not p_tr3 is initial and

    not p_tr4 is initial and

    not p_tr5 is initial and

    check delivery is not initial

    endif.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 05:05 PM

    Make the delivery no P_VBELN a mandatory parameter . So whether tracking number 1 or 2 or 3 or 4 or 5 is entered then by default system will check that P_VBELN is not blank. So no need to write any specific code to check P_VBELN not blank.

    below is the code for tracking no.

    at selection-screen.

    write the validation rules for TRACKING NUMBERS.

    regards,

    barath.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 05:53 PM

    Hi,

    You Can validate your delivery number and Tracking number on the event.

    For Delivery Number.

    At selection-screen on field P_VBELN.

    Write the select query for validation.

    For Tracking Number.

    At selection-screen on field P_TRACN1.

    If P_VBELN is not initial.

    Write the select query for validating Tracking Number.

    endif.

    Regards,

    Aman

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 10, 2007 at 10:14 PM

    thanks for the feedbacks..also validating i need to verify delivery number and each of 5 tracking numbers against a custom table i wud be developing(for ex say ITAB)..if there is a matching betrween a delivery num and a tracking number i need to display image..how can i do it.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      Use a select query to read all the matching entries specified in Where clause into an internal table.

      Then use a Read Table..statement to check if the entry is existing and then do the processing.

      Regards

      Subramanian

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.