Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

default value to a field in PBO

Hi all,

I need to set a default value to a fields in a screen.

But when i declared field as NUMC , i am not able to store 0 (zero value) into it .

and also when iam declaring as integer also iam not able to store 0 .

Pls anybody let me know how to set the defualt value.

its urgent

Tags:
Former Member
Former Member replied

Hi Madhavi,

This is the issue with NUMC type field. It will not display zero on the screen. As you want it only numeric field then NUMC not suit your need as it can also store CHAR values. So you better declare it as CHAR field and in the code give error if someone enters CHAR values for that field like below.

IF l_field CA sy-abcde.

ERROR -Only numeric values allowed.

ENDIF.

Regards,

Atish

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question