Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Transfer a char type varialble value to NUMC type variable

Former Member
0 Likes
2,258

Hi all,

I have a BSEG-PROJK type NUMC(8) variable and one xyz type CHAR(50) variable.

I have to pass value from xyz to BSEG-PROJK

my e.g is that while I am passing

xyz= 'M-000064'

BSEG-PROJK = xyz

then the value of BSEG-PROJK is 00000064 but i need M-000064

1 ACCEPTED SOLUTION
Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,340

First check the field definition in the dictionnary, BSEG-PROJK. the data element is PS_PSP_PNR, and the domain is PS_POSNR. This domain uses a conversion exit ABPSP, so from domain definition we can see that

- the internal value has a 8 numeric length format

- the external value has a 24 character length format

You can use the FM CONVERSION_EXIT_ABPSP_INPUT and CONVERSION_EXIT_ABPSP_OUTPUT to convert between the two formats.

Regards,

Raymond

Hi all,

I have a BSEG-PROJK type NUMC(8) variable and one xyz type CHAR(50) variable.

I have to pass value from xyz to BSEG-PROJK

my e.g is that while I am passing

xyz= 'M-000064'

BSEG-PROJK = xyz

then the value of BSEG-PROJK is 00000064 but i need M-000064

4 REPLIES 4
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,340

Common sense tells me the 'M' in 'M-000064' is not numeric. Why do you expect this to be copied to a numeric field ?

Read only

RaymondGiuseppi
Active Contributor
0 Likes
1,341

First check the field definition in the dictionnary, BSEG-PROJK. the data element is PS_PSP_PNR, and the domain is PS_POSNR. This domain uses a conversion exit ABPSP, so from domain definition we can see that

- the internal value has a 8 numeric length format

- the external value has a 24 character length format

You can use the FM CONVERSION_EXIT_ABPSP_INPUT and CONVERSION_EXIT_ABPSP_OUTPUT to convert between the two formats.

Regards,

Raymond

Read only

Former Member
0 Likes
1,340

BUT BSEG table has PROJK field with value M-000064.

and in my requirement i have to put that value to BSEG-PROJK

Read only

0 Likes
1,340

Hi,

The value M-000064 is showing in field PROJK of BSEG, due to the conversion routine ABPSP attached in the domain level of this field.

- To check the actual value stored in data base level

- SE16 Give table name=>to see the table contents Press F7=>settings=>user parameters=> uncheck the check box check conversion exit.

- now the value in field PROJK will show in numeric.

Regards

DKS