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: 

WBS Conversion Routines

Former Member
0 Kudos

Hi,

Have few doubts in these routines.

CONVERSION_EXIT_ABPSN_INPUT

CONVERSION_EXIT_ABPSN_OUTPUT

CONVERSION_EXIT_ABPSP_OUTPUT

CONVERSION_EXIT_ABPSP_INPUT

CONVERSION_EXIT_CUNIT_INPUT "Conversion exit for commercial (3-char) measurement unit INPUT

CONVERSION_EXIT_CUNIT_OUTPUT "Conversion exit for commercial (3-char) measurement unit OUTPUT

Dont understand the functionality of these rules, in the sense i just understood that these rules are used for conversion from one Input form to Output form and viceversa.

Can anyone explain if there is any other underlying functionality involved in these Function Modules.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Sajan,

1. Why conversion exits are used !

The main purpose is as below :

SCREEN VALUE <------> UNDERLYING ACTUAL VALUE

2 EG.

Personnel Number PERNR is a field

NUMC 8

3. So personnel number 1, 2 ,3 are

ACTUALLY STORED as

00000001

00000002

00000003

in the database.

4. HOWEVER,

When showing on screen,

it shows as 1, 2, 3 (and not with ZERO padded)

(Here comes into pictre the conversion exit OUTPUT)

5. On selection screen if we enter 2

for pernr,

then when data is fetched from SQL,

it is not fetched as 2 only.

(Bcos it won't be found)

Rather it is fetched as 00000002

(Here comes into pictre the conversion exit INPUT)

Regards,

Amit M.

11 REPLIES 11

Former Member
0 Kudos

Hi Sajan,

1. Why conversion exits are used !

The main purpose is as below :

SCREEN VALUE <------> UNDERLYING ACTUAL VALUE

2 EG.

Personnel Number PERNR is a field

NUMC 8

3. So personnel number 1, 2 ,3 are

ACTUALLY STORED as

00000001

00000002

00000003

in the database.

4. HOWEVER,

When showing on screen,

it shows as 1, 2, 3 (and not with ZERO padded)

(Here comes into pictre the conversion exit OUTPUT)

5. On selection screen if we enter 2

for pernr,

then when data is fetched from SQL,

it is not fetched as 2 only.

(Bcos it won't be found)

Rather it is fetched as 00000002

(Here comes into pictre the conversion exit INPUT)

Regards,

Amit M.

0 Kudos

Hi Amit,

Thats fine, but my point here is if we have a particular Cuurency value say USD, there can be scenarios when the currency might change say Euros. Under such a case can we using these exits to do the conversion to the base currency (USD) and store it in the Table. Again when we are fetching it would it execute the output query and change it to Euros and show it??

Pls clarify!

Sajan.M

0 Kudos

these conversion functions are specific to their domains.

to convert currency from one format to another the factors will be from currency to currency and the current exchange rate.

you can use FM

CURRENCY_CONVERT_TO_EURO

to convert to euro.

Regards

Raja

0 Kudos

Hi Raja,

I understood tht aspect. But what i am asking is when we are using these Function modules like ABPSP, ABPSN and CUNIT can we make modifications in those Source codes, in the sense, can we do those From Currency To currency manipulations by oursleves in the code?

If that is not possible then there could be only one possible rule. Hope you understood what i am asking.

Sajan.M

0 Kudos

do you mean chaning the code in the standard FM?

that will be modification which you can do with the modification assistant but that will affect there processing whereever these conversion exits are used.

Regards

Raja

0 Kudos

No raja, What am trying to drive is that, When i name a particular FM in ABPSP is it possible to say the functionality of that FM without looking at the Source Code.

Basically am really confused abt that. I have come across the ALPHA rules. So that is what i am trying to understand. Are ABPSP, ABPSN and CUNIT are standard function Modules?

In that case can u tell me its functionality.

Sajan.M

0 Kudos

Hi again,

1

When i name a particular FM in ABPSP is it possible to say the functionality of that FM without looking at the Source Co

NO. Either documentation or source code,

we have to look at either one of them,

to know what that FM is doing.

Only the FM Name

cannot be the decisive factor.

CONVERSION_EXIT_*********OUTPUT

CONVERSION_EXIT_*********INPUT

Such naming convention is

specifically for conversion exits.

(as specified in sap documentation)

2

Are ABPSP, ABPSN and CUNIT are standard function Modules

Yes they are standard Function modules.

But since i have not used it,

not come across them,

nor there is any documentation,

nor the word ABPSP, ABPSN and CUNIT are familiar

(If the word was BUKRS,PERNR etc, then we could have

deduced something)

It is difficult to say what the FMS do.

Moreover, their source code is also

not simple.

regards,

amit m.

0 Kudos

Hi Sajan,

As others have already stated, these are standard function modules and you cannot change the source code without an Object Key. It is also not advisable to change the code as you might not know where these are used. If you are trying to know how these are used, here is an example.

You give the POSID - (Work Breakdown Structure Element (WBS Element) as input to the function module 'CONVERSION_EXIT_ABPSP_INPUT' and get the PSPNR ie the WBS Element as the output.


  data: w_posid like prps-posid 
                value '8-1-2001-003-000002-1001'.
  data: w_pspnr like prps-pspnr.
   call function 'CONVERSION_EXIT_ABPSP_INPUT'
    EXPORTING
      input     = w_posid
    IMPORTING
      output    = w_pspnr
    EXCEPTIONS
      not_found = 1
      others    = 2.

Regards,

Suresh Datti

0 Kudos

Hi Amit,

I think when we look in se37 giving names like these,

CONVERSION_EXIT_ABPSN_INPUT

CONVERSION_EXIT_ABPSN_OUTPUT

CONVERSION_EXIT_ABPSP_OUTPUT

CONVERSION_EXIT_ABPSP_INPUT

I am able to view the source code, If these are going to be standard SAP FM's then by looking at these Source Codes could you let me know the functionality?

May be if my client had done any customizations i wouldnt be able to use the functionality that you are giving, but looks like thats a rarity.

Pls throw some light on this.

Sajan.M

0 Kudos

Hi Sajan,

here is an exmple for 'CONVERSION_EXIT_ABPSP_OUTPUT'

This function module Converts PS_POSNR (8 digits, internal) to PS_POSID (24 digits, external).


  CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
    EXPORTING
      input  = ps_posnr
    IMPORTING
      output = ps_posid.

Instead of going through the osurce code, you will be better off using it to understand what it does.

Regards,

Suresh Datti

0 Kudos

Hi again,

1 CONVERSION_EXIT_ABPSP_OUTPUT

This FM

is used in context with PS Module.

It has got to do with WBS Element.

2. For more help see the documentaion

on datalement of table

ISEG Field PS_PSP_PNR

3. In se37, open the above FM

Execute

Type 1 in Input Prameter

Again execute

4. In oUTPUT u WILL GET something like

DWT.04.SAN.001

(This might be some coding of WBS element

in the PS module)

5. Now to test the reverse.

Open the revere FM

CONVERSION_EXIT_ABPSP_INPUT <---INPUT

6. Here, in Input type, what u got above.

DWT.04.SAN.001

And in output u will get 000001

This is what i could search till now.

I hope it helps.

*----


From documentaion :

*----


Definition:

WBS Element

Project System (PS)

A structural element in a work breakdown structure representing the

hierarchical organization of a project.

A WBS element describes a task or a partial task that can be divided.

Project System (PS)

WBS elements are the individual structure elements in the work breakdown

structure (WBS).

The term describes a concrete task, or a partial task, which can be

further subdivided.

Material Requirements Planning (PP-MRP)

Individual structural element in a work breakdown structure (WBS)

representing the hierarchical organization of an R/3 project. Describes

either a concrete task or a partial one that can be further subdivided.

Return ->

regards,

amit m.

Message was edited by: Amit Mittal