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

Conversion of WBS Element.

Former Member
0 Likes
9,652

Hello Experts,

I have an alv report in which i need to display WBS element. I tried to convert it  and pass it to alv but it still shows element in alv report as <<<PR00355453>>>.

I tried following code.

CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'

       EXPORTING

         input  = wa_zfi0200-wbs_element

       IMPORTING

         output = wa_zfi0200-wbs_element.

Help will be appreciated.

Regards,

PS

1 ACCEPTED SOLUTION
Read only

arindam_m
Active Contributor
0 Likes
6,237

Hi,

The best way might be to just populate the ALV control structure CONVEXIT field to control the same this way the Looping and extra processing in code(via FM usage) can be avoided. Also see if the output data type of the column is appropriate one used for WBS elements.

The domain PS_POSNR is the one which has the Conversion Exit built in. Just use it before using the ALV control structure CONVEXIT field by setting it as 'X'.

Cheers,

Arindam

5 REPLIES 5
Read only

former_member209120
Active Contributor
0 Likes
6,237

Hi Purushotham,

you are trying to convert from 8 to 24 char but using same wa_zfi0200-wbs_element in input and output

CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'

          EXPORTING

            input  =  wa_zfi0200-wbs_element

          IMPORTING

            output = wa_zfi0200-wbs_element.

change output reference field.

i tried like this i am getting

data : input type string,
        output type string.


input = '00000111'.

CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
   EXPORTING
     input         = input
  IMPORTING
    OUTPUT        = output.

WRITE : / output.


Read only

arindam_m
Active Contributor
0 Likes
6,238

Hi,

The best way might be to just populate the ALV control structure CONVEXIT field to control the same this way the Looping and extra processing in code(via FM usage) can be avoided. Also see if the output data type of the column is appropriate one used for WBS elements.

The domain PS_POSNR is the one which has the Conversion Exit built in. Just use it before using the ALV control structure CONVEXIT field by setting it as 'X'.

Cheers,

Arindam

Read only

Former Member
0 Likes
6,237

Hi Arindam,

would you please explore a bit?

regards,

PS

Read only

arindam_m
Active Contributor
0 Likes
6,237

Hi,

I think you meant 'Explain'. So the code you must be populating the ALV with the catalog control stucture of type lvc_t_fcat. This basically helps control Grid Functions that are processed during exit.

Say the Internal table that you pass to the ALV will have a field type for the WBS column. Try making that of domain PS_POSNR. the domain will link it to the associated conversion exit that SAP has for WBS.

Then clear the flag field CONVEXIT this would allow the associated Conversion exit for the domain to work and you get the external format of the WBS in the ALV.

Cheers,

Arindam

Read only

Arun_Prabhu_K
Active Contributor
0 Likes
6,237

Hi Purushottam,

If you had declared your WBS variable like PRPS-pspnr, automatically conversion from NUMC 8 to CHAR 24 will take place in the ALV report.

Regards.