Application Development 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: 

Conversion problem

Former Member
0 Kudos

Hi Gurus,

I have five fields those are gross weight(sum of net weight(vekp-ntgew) and tare weight ( vekp-tarag)).

Net weight (vekp-ntgew), length(vekp-laeng), width (vekp-breit), height ( vekp-hoehe).

I am passing all these values to idoc. First I am moving all the above values to one structure in that structure the length of gross weight is 15 characters, length of net weight is 15 characters, and length, width hight is of type c and 15 characters. I am moving all the above fields to this structure and then I am moving to IDOC. Finally my idoc contains the fields data in the below way

Gross weight : 150 but I want in 00150.0

Net weight : 100.000 but I want like 00100.0

Length : 10.000 but I want like 00010

Width : 20.000 00020

Height : 30.000 00030

I have tried but still the values are not coming properly.

Please help me because this I need to complete very urgently mean while I will also check at my end.

Thanks a lot.

4 REPLIES 4

former_member223537
Active Contributor
0 Kudos

Hi,

Use FM CONVERSION_EXIT_ALPHA_INPUT to add leading zeroes.

Best regards,

Prashant

varma_narayana
Active Contributor
0 Kudos

Hi Babji.

While copying the Data from Packed to field to Character field in IDOC use the

command UNPACK.

UNPACK <P FIELD> TO <C FIELD> .

See the F1 help on Unpack.

REWARD IF HELPFUL.

0 Kudos

You can use both FM CONVERSION_EXIT_ALPHA_INPUT or UNPACK command.

0 Kudos

Ok thanks for your reply but i want only 5 places before decimal and one place after decimal.