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: 

Question about field PROJ in AFVC.

Former Member
0 Kudos

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.

5 REPLIES 5

Former Member
0 Kudos

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

0 Kudos

can you post the sample code for this function? Thank you.

0 Kudos

0 Kudos

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.

0 Kudos

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.