cancel
Showing results for 
Search instead for 
Did you mean: 

problem with numeric screen field....

Former Member
0 Kudos
678

hi,

I've gotta situation that,

In sales order we gotto determine WBS element(ps_psp_pnr) based on some conditions, if none of the condition is satisfied then the 'project definition'(prps-pspid) has to be concatenated with '.99' and displayed as WBS element.

Now the actual problem is, WBS element is of numeric character type whereas the projectdefinition(pspid)+.99 is of charcter type. So it throws me a dump. Even then, the screen field of WBS element doesnt shows any non numeric character and shows error message.

So how do i overcome this situation? Can anyone help me? Its quiet urgent.

Prompt answeres will be rewarded with points.

with regards,

praveen.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Praveen

Instead of numeric field try to use the decimal field and pass the decimal field value to that conversion routine.

Hope it will work.

Cheers

Sasi

Former Member
0 Kudos

Hi Praveen,

here is sample code.hope it will work fine.

DATA: BEGIN OF ITAB OCCURS 0,

PSPNR LIKE PRPS-PSPNR,

ERDAT LIKE PRPS-ERDAT,

END OF ITAB.

SELECT PSPNR ERDAT FROM PRPS INTO TABLE ITAB WHERE ERDAT in s_date.

*loop at the internal table that u have the data.

LOOP AT ITAB.

CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'

EXPORTING

INPUT = ITAB-PSPNR

IMPORTING

OUTPUT = W_PTYPE.

CONCATENATE W_PTYPE '.99' INTO W_WTYPE.

here you take this into another internal table and append that internal tab

endloop.

Former Member
0 Kudos

hi frenz,

I worked out all the cases and suggestions, nothing solved my problem.... still serching a method to do that.

N E way thank you for ur replies.

With regards,

praveen.

Vinod_Chandran
Active Contributor
0 Kudos

Hi Praveen,

One last try. Can you try the following.

Run SE16 transaction

Enter table PRPS and press 'Enter' key

Now it will display the WBS elements. Is this with '.'?

Whatever you see here is the way the WBS is stored in

the table.

Double click on a line and check the WBS element in the next screen. What you see here? Is it with '.'?

Please give the value of WBS you see in these screen. I do not have any values in this table.

Thanks

Vinod

Former Member
0 Kudos

Hi Vinod,

I tried all these things. Every where if its done by SAP, numeric screen fields displays alphabets and special charcters also.

Best example is in VA01. When you give material number and qty and press enter, the WBS element will be determined. And mostly wat i see on that field is alphabets..like 'BASIC', which is actually pspid in prps table.

Thats y i'm trying that. I awridy knwo but this ABPSP conversion routine. It inturns calls another conversion routine ... But their input and output are typeless and have no specific length.(INPUT, OUTPUT). So when i execute it seperately it's working but when i use in my exit, it fails with dump.

So how does standard SAP do this? And y not us?

With regards,

praveen.

Message was edited by: Praveen Rajendran

Vinod_Chandran
Active Contributor
0 Kudos

Hi Praveen,

If you take SE16 and PRPS, you can see how SAP store it internally and show externally. In the first screen where it shows the line items, the WBS element value is the one stored internally and if you double click and see the WBS value in the next screen it is the one showed in the transaction screen.

For the conversion routine, even if the parameters are type less, you have to pass the variable with type.

For example

data: w_POSNR type PS_POSNR,

w_wbs(8).

w_wbs = '123.55'.

CALL FUNCTION 'CONVERSION_EXIT_ABPSP_INPUT'

EXPORTING

input = w_wbs

IMPORTING

OUTPUT = w_posnr

EXCEPTIONS

NOT_FOUND = 1

OTHERS = 2.

IF sy-subrc <> 0.

MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Former Member
0 Kudos

HI PRAVEEN,

You try the code what i have given you will get out put in this model T-CAR-ABCD-000111.99. i hope this is the out put that you require.

regards

kiran

Former Member
0 Kudos

Hi Praveen,

PS_PSP_PNR is of type NUMC and you cannot have '.' in this field. You can only have numbers in there. You will have change your rule.

Former Member
0 Kudos

hi adavi,

Thats right. but there's a small change. System doesnt allows us to do it. But we are able to see alphabets and '.' in the same field. SAP does this internally. But problem is we are not able to do that for our values. And throws dump.

Can anyone temme how system do this? I tried debugging it. Still i couldnt figure it out.

with regards,

praveen,

Former Member
0 Kudos

I am not sure I understood you here 'But we are able to see alphabets and '.' in the same field.'

What do you mean by that? Are you talking about seeing such values on the screen or in the table? It has to be on the screen, that it is shown like that, which means it is using a different data element/domain for that field. Please tell us where you see this field having alphanumeric values. Do F1 on that field and click on the 'technical info' button and see what the field is.

Srinivas

Vinod_Chandran
Active Contributor
0 Kudos

Hi Praveen,

Can you try the conversion exit before passing the values to the WBS element fields.

CONVERSION_EXIT_ABPSN_INPUT

CONVERSION_EXIT_ABPSN_OUTPUT

Thanks

Vinod

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

If the WBS element field is of type numeric then you are limited to what you can put in that field. You can move character data to the field, this includes the "." in ".99". I am assuming that you are unable to change the type for WBS Element.

Regards,

Rich Heilman

Former Member
0 Kudos

Hi rich,

No i couldnt do that....can u temme how to do that?

I have saved alphabets in variables of numeric data types.... but here its a conversion routine assigned for WBS element(conversion_exit_abpsp_output) is throwing the dump. So how do i overcome this?

After that temmme how to make system to accept alphabets on numeric character screen field.

With regards,

praveen.

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

You can not use alpha characters in numeric fields. The system will not allow it.

Regards,

Rich Heilman