04-29-2009 4:27 PM
In a part of my program i did select statements on required tables including AFVC to retrieve data. There's a problem coming in the middle, I do the select from table AFVC which has field PROJ. When i run debbuger, PROJ value that are retrieved is a 8 character number (ex: 00123456). But the value of PROJN is supposed to be sth like P: 12345 - T - E (which is more than 8 char) , because this is what i actually get for field PROJN when i observe AFVC in se11. Can you please tell me how to get the value P: 12345 - T - E? Thanks.
04-29-2009 5:00 PM
Hello,
you could use the function module CONVERSION_EXIT_ABPSP_OUTPUT.
Input is AFVC-PROJN, output a character field which is long enough. Or reference your output field on the data element PS_POSID.
Or you read the table prps with afvc-Projn and take the field prps-posid ( that's what this function does, but in this function it's a buffered read).
Regards Wolfgang
04-29-2009 5:45 PM
04-29-2009 7:24 PM
04-29-2009 7:47 PM
I did go to the link that you gave me above before, but still confused..What is the input field and what is the output field? I don't need to write the output of PROJN field, but i want it to be converted so that i can reference the pspnr in PRPS to it. 3 tables i use are coss, afvc and prps.
04-29-2009 9:24 PM
Check this code in debug mode :
REPORT zj_test NO STANDARD PAGE HEADING.
DATA: lv_projn TYPE afvc-projn,
lv_out TYPE char40.
SELECT SINGLE projn FROM
afvc INTO lv_projn
WHERE aufpl EQ '0000000363'. " give some value from your system
WRITE lv_projn.
CALL FUNCTION 'CONVERSION_EXIT_ABPSP_OUTPUT'
EXPORTING
input = lv_projn
IMPORTING
output = lv_out.
WRITE: lv_out.