Skip to Content
0
Former Member
Dec 12, 2006 at 09:28 PM

How to differentiate whether user entered '0' or no value in the parameter?

71 Views

I need some clarification.On my selection screen I have 4 parameters( P_QTYLL,P_QTYUL,P_AMTLL,P_AMTUL). I have to check the values entered by the user in those fields and I have to display the user entered values in the next screen.My problem is if the user enters '0'(in any of the above fields) means '0' has to displayed in the next screen.But if he enters nothing means then nothing has to be displayed in the next screen.My problem is I am checking for '0', against the values(initial,'',space,0) for user entered value.But I am unable to differentiate the '0' and nothing(no value) even though I checked against the values(initial,'',space,'0').All the 4 conditions are treating both the '0' and 'novalue' the same.How to differentiate whether user entered '0' or entered nothing(no value).

for example below is my code

IF P_QTYLL EQ 0.

P_QTY_LL = P_QTYLL.

ENDIF.

IF P_QTYUL EQ 0.

P_QTY_UL = P_QTYUL.

ENDIF.

IF P_AMTLL EQ 0.

P_AMTLL_S = 0.

ENDIF.

IF P_AMTUL EQ 0.

P_AMTUL_S = 0.

ENDIF.

IF P_QTYLL EQ ''.

P_QTY_LL = ' '.

ENDIF.

IF P_QTYUL EQ ' '.

P_QTY_UL = ' '.

ENDIF.

IF P_AMTLL EQ ' '.

P_AMTLL_S = ' '.

ENDIF.

IF P_AMTUL EQ ' '.

P_AMTUL_S = ' '.

ENDIF.

LIKE THE ABOVE I checked against the values space,initial.But using those I am not getting any difference for no value and '0' .All the four values(space,initial,'0','') are treating both the '0' and no value in the same way.

Thanks,

Balaji