Skip to Content
author's profile photo Former Member
Former Member

Conversion of WBS Element.

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Aug 31, 2013 at 05:59 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

    • 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

  • Posted on Aug 31, 2013 at 05:24 AM

    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.



    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 31, 2013 at 06:29 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.