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

To make a parameter obligatory

mariano_gallicchio2
Participant
0 Likes
2,470

Helllo expert,

i have defined de LDB PNP in my program and the infotype 0001.

I want to make some of the parameters of the selection screen of the LDB obligatory.

How can i do that?

Thanks!

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,310

you can do it in the at selection screen output event.

like:

AT SELECTION-SCREEN OUTPUT.
loop at SCREEN.
  if screen-NAME = 'parameter name'. " put the name of the parameter here, if you do notknow the name goto the screen and get it,
    screen-REQUIRED = 1.
   endif.
   MODIFY SCREEN.
endloop.

4 REPLIES 4
Read only

Former Member
0 Likes
1,311

you can do it in the at selection screen output event.

like:

AT SELECTION-SCREEN OUTPUT.
loop at SCREEN.
  if screen-NAME = 'parameter name'. " put the name of the parameter here, if you do notknow the name goto the screen and get it,
    screen-REQUIRED = 1.
   endif.
   MODIFY SCREEN.
endloop.

Read only

Former Member
0 Likes
1,310

Hi,

what is the field name that you want make as obligatory after using LDB PNP.

write the field name so that i can send the code for selecting field as obligatory parameter.

Thankls & Regards,

S. Vijay

Read only

mariano_gallicchio2
Participant
0 Likes
1,310

Hi Vijay, the field is PNPBUKRS.

With the solution presented by Soumyaprakash it work perfectly, but if you have another solution, i would like to hear that.

Thanks!

Read only

Former Member
0 Likes
1,310

Hi,

In one program i have used PNP as LDB and i used ORGEH(org. unit) i declared as parameter and i made as obligatory.

see the below code. it is working fine.

SELECTION-SCREEN BEGIN OF BLOCK frame1 WITH FRAME TITLE text-fr1.

SELECT-OPTIONS: date FOR p0000-begda no-extension no intervals.

parameters: p_orgeh like p0001-orgeh OBLIGATORY.

SELECT-OPTIONS: p_werks FOR p0001-werks,

p_btrtl FOR p0001-btrtl,

p_persg FOR p0001-persg.

PARAMETERS: all_ee AS CHECKBOX.

SELECTION-SCREEN SKIP.

PARAMETERS: out_fil(80) DEFAULT '/appl/data/hrms/?????' LOWER CASE.

SELECTION-SCREEN END OF BLOCK frame1.

Thanks & Regards,

S. Vijay