Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

parameters in a selection-screen output

Former Member
0 Likes
880

Hi Guys,

I have this situation.

Parameters: street(20) type c,

code(10) type c,

number(6) type c.

If street is not initial.

if code is initial and number is initial.

"I have to put information into code or into number.

endif.

endif.

I could do.

AT SELECTION-SCREEN OUTPUT.
IF P_STREET IS NOT INITIAL. "Si está lleno es obligatorio llenar Población o Código Postal
   IF P_CITY1 IS INITIAL AND P_CODE1 IS INITIAL.
      MESSAGE 'write information into Code or into Numberl' type 'E'.
   ENDIF.
ENDIF.
START-OF-SELECTION.

.

It doesn't work very well any idea,please?

Thanks a lot

Hi Guys,

I have this situation.

Parameters: street(20) type c,

code(10) type c,

number(6) type c.

If street is not initial.

if code is initial and number is initial.

"I have to put information into code or into number.

endif.

endif.

I could do.

AT SELECTION-SCREEN OUTPUT.
IF P_STREET IS NOT INITIAL. "Si está lleno es obligatorio llenar Población o Código Postal
   IF P_CITY1 IS INITIAL AND P_CODE1 IS INITIAL.
      MESSAGE 'write information into Code or into Numberl' type 'E'.
   ENDIF.
ENDIF.
START-OF-SELECTION.

.

It doesn't work very well any idea,please?

Thanks a lot

6 REPLIES 6
Read only

Former Member
0 Likes
845

keep it in at selection-screen.

Read only

Former Member
0 Likes
845

Hi,,

Put the code in at seelction screen event

AT SELECTION-SCREEN

IF P_STREET IS NOT INITIAL. "Si está lleno es obligatorio llenar Población o Código Postal

IF P_CITY1 IS INITIAL AND P_CODE1 IS INITIAL.

MESSAGE 'write information into Code or into Numberl' type 'E'.

ENDIF.

ENDIF.

Regards

Shiva

Read only

Former Member
0 Likes
845

HI,

Check this way..

AT SELECTION-SCREEN .
IF P_STREET IS NOT INITIAL. "Si está lleno es obligatorio llenar Población o Código Postal
   IF P_CITY1 IS INITIAL AND P_CODE1 IS INITIAL.
     MESSAGE E016(pn) WITH 'write information into Code or into Numberl'.
   ENDIF.
ENDIF.

Read only

RaymondGiuseppi
Active Contributor
0 Likes
845

Basically AT SELECTION-SCREEN OUTPUT is part of the PBO of the selection-screen dynpro, error messages must be issued in the PAI of a dynpro ([else|http://help.sap.com/saphelp_nw70/helpdata/en/e5/e719bab1d711d295bf0000e8353423/frameset.htm]), look at [online help|http://help.sap.com/saphelp_nw70/helpdata/en/9f/dbaabc35c111d1829f0000e829fbfe/frameset.htm] of the MESSAGE statement, so move your check in a AT SELECTION-SCREEN. or better put the 3 fields in a [block|http://help.sap.com/erp2005_ehp_04/helpdata/EN/79/34a23ad9b511d1950e0000e8353423/frameset.htm] (SELECTION-SCREEN BEGIN OF BLOCK/PARAMETERS/END OF BLOCK) and check the data in a AT SELECTION-SCREEN ON BLOCK, so the three fields will be available for input if an error message is issued.

Regards

Read only

kamesh_g
Contributor
0 Likes
845

hi

Use At selection-screen block

u will get rid of issue .

AT SELECTION-SCREEN ON BLOCK b2.

IF p_chkbox = 'X' AND p_file1 IS INITIAL.

MESSAGE e000.

ENDIF.

IF p_chkbox = '' AND ( NOT p_file1 IS INITIAL ).

MESSAGE e002.

ENDIF.

IF p_chkbox = 'X' AND ( NOT s_ebeln IS INITIAL ).

MESSAGE e001.

ENDIF.

Use the above sample code .

Read only

Former Member
0 Likes
845

Thanks a lot