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: 

Profit Center Substitution Rule in OBBH

kabil_g
Active Participant
0 Kudos

Hi frds,

Depot to Factory concept

Substitution Rule program name is ZRGGBS000.

I want to change the profit center for particular posting key as 50..

By default system is picking the material master profit center . I want to change the profit center at the time of PGI.

Below my codes.

IF bseg-ebeln IS NOT INITIAL.

     SELECT SINGLE bsart INTO v_bsart

       FROM ekko

       WHERE ebeln = bseg-ebeln .

     IF v_bsart EQ 'DF'.

      IF bseg-bschl EQ '50' AND bseg-ktosl = 'ZSL'.

         bseg-prctr = '4076'.

         bseg-gsber = bseg-pargb.

       ENDIF.

     ENDIF.





Getting error message try to do PGI

Profit center XXXX does not exist for 28.05.2015.


1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

You need to insert the leading 0:

  bseg-prctr = '0000004076'.


Max

2 REPLIES 2

Former Member
0 Kudos

Hi

You need to insert the leading 0:

  bseg-prctr = '0000004076'.


Max

0 Kudos

Thanks a lot working