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

selection-screen

Former Member
0 Likes
821

Hi all,

I have 2 parameters in selection screen.

Ex:

parameters: p_vkorg like vbak-vkorg,

p_kunnr like vbak-kunnr.

So if the enterd value in p_vkorg does not exist in vbak i want to disable p_kunnr..

How can we do this?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
792

Hi,

You can use the event 'AT SELECTION SCREEN ON OUTPUT'.

And use the propperty of the SCREEN table field INPUT set to 0.

Regards,

Vivek Kute.

10 REPLIES 10
Read only

Former Member
0 Likes
793

Hi,

You can use the event 'AT SELECTION SCREEN ON OUTPUT'.

And use the propperty of the SCREEN table field INPUT set to 0.

Regards,

Vivek Kute.

Read only

Former Member
0 Likes
792

See the example here.

http://www.sap-img.com/abap/change-the-input-fields-dynamically-in-a-screen.htm

Regards,

Ravi

Note - Please mark all the helpful answers

Read only

0 Likes
792

Thanks for replies.

But how you validate the entry for p_vkorg..

<b>We have to validate only in At selection-screen event.</b>

So after validationg how can we disable next paramater?

Read only

0 Likes
792

Hi

Did u check my code?

Regs

Manas Ranjan Panda

Read only

Former Member
0 Likes
792

I dont know whether i got you right

normal you do tis validation

At selction-screen on p_vkorg

IF NOT S_PERNR IS INITIAL.

SELECT SINGLE VKORG

FROM VBAK

INTO VBAK-PERNR

WHERE VKORG = P_VKORG.

IF SY-SUBRC NE 0.

MESSAGE E000(ZMESS).

ENDIF.

ENDIF.

If you want to validate two fields then put else condition

and write seond v alidation

Read only

Former Member
0 Likes
792

AT SELECTION_SCREEN OUTPUT.

select single vkorg from <tab1> where vkorg = p_vkorg

if sy-subrc NE 0.

loop at screen.

if screen-name = p_kunnr.

screen-input = '0'.

screen-visible = '0'

modify screen.

endif.

endif.

Regs

Manas Ranjan Panda

Read only

Former Member
0 Likes
792

Hi,

you can use like this..

Parameters p1 as checkbox modif id z1.

at selection-screen output.

loop at screen.

if screen-group1 = 'Z1'.

screen-input = 0.

modify screen.

endloop.

you can check for p_vkorg is exist in vbak or not.. and disable p_kunnr..

Regards,

Srini

Read only

Former Member
0 Likes
792

Initially you can hide the parameter P_KUNNR and when the user enters a value in P_VKORG, it can be enabled :

parameters: p_vkorg like vbak-vkorg,

p_kunnr like vbak-kunnr.

AT SELECTION-SCREEN OUTPUT.

if p_vkorg is initial.

loop at screen.

if screen-name = 'P_KUNNR'.

screen-input = 0.

modify screen.

endif.

endloop.

else.

loop at screen.

if screen-name = 'P_KUNNR'.

screen-input = 1.

modify screen.

endif.

endloop.

endif.

Regards,

Deepa

Read only

Former Member
0 Likes
792
REPORT YCHATEST LINE-SIZE 350.

TABLES : VBAK.

PARAMETERS: P_VKORG LIKE VBAK-VKORG,
            P_KUNNR LIKE VBAK-KUNNR.

AT SELECTION-SCREEN OUTPUT.

  SELECT SINGLE VKORG FROM VBAK INTO VBAK-VKORG  WHERE VKORG = P_VKORG.
  IF SY-SUBRC NE 0.
    LOOP AT SCREEN.
      IF SCREEN-NAME = 'P_KUNNR'.
        SCREEN-INPUT = '0'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.
  ELSE.
    LOOP AT SCREEN.
      IF SCREEN-NAME = 'P_KUNNR'.
        SCREEN-INPUT = '1'.
        MODIFY SCREEN.
      ENDIF.
    ENDLOOP.

  ENDIF.

Reward if helpful

Read only

0 Likes
792

Hi All,

Thanks..It works