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

Link Between FI and PS

michael_teran
Participant
0 Kudos
2,093

HI,

I have a problem when I try to get some FI documents starting my SELECT with PROJ Table, at the end I sould find BSEG-PRCTR field

I tried to read

(1) PROJ-PSPNR = PRPS-PSPHI

(2) PRPS-PSPNR = BSEG-PROJ

But it did not work ,, after that I tried with  Func. CONVERSION_EXIT_KONPD_OUTPUT and CONVERSION_EXIT_ABPSP_OUTPUT but it did not work too

Can anybody help me for solving my problem

Thanks

4 REPLIES 4
Read only

former_member195402
Active Contributor
0 Kudos
1,274

Hi MIchael,

your 1st step is fine to get all top PRPS elements.

But the link between PRPS and BSEG may be on a deeper level, so include a new step 2 to get all wbs elements.

This can be done using fm AIPR_GET_HIERARCHY_TO_WBSELEM. The result can be found in table ET_OBJLIST_PS.

For this elements (where PSPNR is not empty) you can access BSEG with FOR ALL ENTRIES.

Regards,

Klaus

Read only

former_member191761
Active Participant
0 Kudos
1,274

Hi

Can you please give more details on the code you are writing.

At which table selection it is failing? PROJ or PRPS or BSEG?

Thanks

Sri

Read only

0 Kudos
1,274

The problem is, When I try to filter BSEG table with PRPS-PSPNR it does not match anything because BSEG-PROJ has a convesion routine which change values for example:

PRPS-PSPNR = 10000

BSEG-PROJ    =  10000 apparently but the true value is something like that AD-0003 , i used  CONVERSION_EXIT_ABPSP_OUTPUT  but it didnt work because BSEG-PROJ is NUMC08  and not CHAR ...


I try to make directy link between  BSEG-PROJ = PRPS-PSPNR . but doesn't work becasuse Is the same value apparenty but it doesnt


Thanks



Read only

0 Kudos
1,274

Hi ,

Please pass PRPS-PSPNR to BSEG-PROJK field and it should work . Please check if there is valid data in BSEG for that PRPS-PSPNR. I have tried below code and it worked.

DATA:lv_wbs   TYPE PS_POSNR VALUE  '01111111', (numeric value)
           lv_belnr TYPE belnr_d,
           lv_projk TYPE PS_PSP_PNR.

SELECT SINGLE belnr
                             projk
         FROM bseg
         Into (lv_belnr, lv_projk)
         WHERE bukrs = 'XXXX'
          AND  projk = lv_wbs.
  IF sy-subrc = 0.
   WRITE:lv_belnr.
  ENDIF.

Thanks

Sri