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

default value for selection screen field

Former Member
0 Likes
2,343

Hi all,

I am using LDB PNPCE. I want to give default value for field Personnel area on selection screen.

How can I do it?

Thanks

Rahul

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,085

Hi,

If you use PNP LDB in the attributes the selection screen fields for Personal Araea are named as : PNPWERKS-lOW and PNPWERKS-high.

So in the Initialization: you write code and can default values.

Loop at PNPwerks.

assign default values for sign, option, low and high and append.

Endlloop.

Regards,

Anji

Message was edited by:

Anji Reddy Vangala

5 REPLIES 5
Read only

Former Member
0 Likes
1,085

Hello,

try that


NODES pernr.
 
INITIALIZATION.
*<b>gray out</b> 
  LOOP AT SCREEN.
    IF screen-name = 'PNPBUKRS-LOW'
    OR screen-name = 'PNPBUKRS-HIGH'.
      screen-input = 0.
      MODIFY SCREEN.
    ENDIF.
  ENDLOOP.
 
*default
  pnppernr-low = 4711.
  PNPPERNR-sign = 'I'.
  PNPPERNR-option = 'EQ'.
  append PNPPERNR.

Vsanth

Read only

0 Likes
1,085

thanks a lot

Read only

Former Member
0 Likes
1,086

Hi,

If you use PNP LDB in the attributes the selection screen fields for Personal Araea are named as : PNPWERKS-lOW and PNPWERKS-high.

So in the Initialization: you write code and can default values.

Loop at PNPwerks.

assign default values for sign, option, low and high and append.

Endlloop.

Regards,

Anji

Message was edited by:

Anji Reddy Vangala

Read only

0 Likes
1,085

thank you

Read only

Former Member
0 Likes
1,085

Hi Rahul,

In the INITIALIZATION event we can set the default values for selection screen fields.

INITIALIZATION.

loop at screen.

if screen-name = 'S_MATNR-LOW'.

CLEAR S_MATNR.

s_matnr-low = '1234'.

s_matnr-option = 'EQ'.

s_matnr-sign = 'I'.

append s_matnr.

CLEAR S_MATNR.

s_matnr-high = '5678'.

s_matnr-option = 'EQ'.

s_matnr-sign = 'I'.

append s_matnr

clear s_matnr.

endif.

endloop.

Hope it helps.

Mark if useful

Regards,

Saumya