on 2005 Aug 09 6:00 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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,
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
29 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.