cancel
Showing results for 
Search instead for 
Did you mean: 

HELP!!! blank value on characterist

former_member184029
Participant
0 Kudos

Hi, experts

I need a big help, I'm having a problem with data values, I have a field wich contain a transaction code, on transfer rule I have

  IF temp_comm_estr-/BIC/ZCTTRANSA = SPACE.
    RESULT = temp_comm_estr-/BIC/ZCTTRANSA.
  ELSE.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
      EXPORTING
        INPUT  = temp_comm_estr-/BIC/ZCTTRANSA
      IMPORTING
        OUTPUT = RESULT.
  ENDIF.

But when value is equal to space and we simulate the update value is blank, if I put a value 9999 it's showed. How can I do if value is blank, show value equal 0?

Regards

Tokio

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Tokio

IF temp_comm_estr-/BIC/ZCTTRANSA = SPACE.

RESULT = 0.

Thanks

Tripple k

former_member184029
Participant
0 Kudos

Hi Tripple k

Thanks for answering, I test it, but still problem.

Regards

Tokio

Former Member
0 Kudos

Hello

Try this it should work..blank value is not space it is initial value

IF temp_comm_estr-/BIC/ZCTTRANSA IS INITIAL.

RESULT = 0.

former_member184029
Participant
0 Kudos

Hi

Thanks for answering, Yes I tried with "IS INITIAL" but still problem

Regards

Tokio

former_member184029
Participant
0 Kudos

Hi

I guess that is the way how we declared field, is numchar... How can I show it zero and not blank on the report.

Is there something to convert format to show zero (0)???

I tried with a var type char and move to field declared numchar, but still showed in blank.

Thanks in advance.

Tokio

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi....What happen if the transaction have non numeric Characters ? like SE38 , NUMC dont support letters.

Regards..

Former Member
0 Kudos

Hi...questions...Do you want to store 0 when is space? ...what exactly data type are you using for this field?

Regards

former_member184029
Participant
0 Kudos

Hi Oscar

Do you want to store 0 when is space?

R:Yes

what exactly data type are you using for this field?

R: data type NUMC long 4.

Regards

Tokio

Former Member
0 Kudos

Hi,

if the datatype is numc, it is absolutely enough to just say

if .... = space.

result = 0.

else.

????

endif.

The else need to be specified a bit more, because as oscar already mentioned, numc does not take characters, it only takes numbers. Addtionally, there is no need to do the alpha conversion. That is done by the system automatically, but assigning characters to it will do nothing.

regards

Siggi

PS: may be you need to change the data type to char.

Message was edited by:

Siegfried Szameitat

Former Member
0 Kudos

Hi...

Try this...

IF temp_comm_estr-/BIC/ZCTTRANSA = SPACE.

RESULT = '0'.

Regards

former_member184029
Participant
0 Kudos

Hi Oscar

Thanks, I tried but no successful.

Tokio

Former Member
0 Kudos

Hi,

may be you should change your coding as follows:

IF temp_comm_estr-/BIC/ZCTTRANSA = SPACE.

RESULT = 0.

ELSE.

result = temp_comm_estr-/bic/zcttransa.

endif.

CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'

EXPORTING

INPUT = result

IMPORTING

OUTPUT = RESULT.

regards

Siggi

former_member184029
Participant
0 Kudos

Hi Siggi

Thanks for your answering, I tested but still on blank

Regards,

Tokio

Former Member
0 Kudos

Hi,

how is the definition of your result field? Is it a char field with alpha conversion active?

regards

Siggi

former_member184029
Participant
0 Kudos

Hi Siggi

RESULT LIKE /BIC/VZ_CTRANSAT-/BIC/ZCTTRANSA, No, it is NUMCHAR and when I try to active alpha conversion, system doesn't get it.

Thanks

Tokio