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: 

FM to convert posid (wbs element ) to pspnr (wbs element)

Former Member
0 Kudos

hi ,

Requirement like

Input wbs element posid = M-GA-0022-007 ( i.e 24 char )

output wbs element pspnr = 00000619 (i.e 8 numc )

so any Funtion module which convert the posid(24 char ) to pspnr ( 8 numc) ?

3 REPLIES 3

Former Member
0 Kudos

Hi,

You can check the conversion routine in such cases.

For your requirement it is CONVERSION_EXIT_ABPSP_INPUT

Hope this helps.

former_member188685
Active Contributor
0 Kudos

Check these Functions

From 8 to 24 char
 CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
          EXPORTING
            input  =  nr_num
          IMPORTING
            output = nr_char.

From 24Char to 8 Char

  CALL FUNCTION 'CONVERSION_EXIT_ABPSP_INPUT'
    EXPORTING
      input           = wbs

   IMPORTING
      output          =   wpspnr

christine_evans
Active Contributor

As with any database field conversion, you can find this out yourself in about 5 seconds by looking at the conversion routine field on the domain that underlies the field.