2013 Aug 31 6:06 AM
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
2013 Aug 31 6: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
2013 Aug 31 6: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.
2013 Aug 31 6: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
2013 Aug 31 7:15 AM
2013 Aug 31 7:29 AM
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
2013 Aug 31 7: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.