cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Company code determination at Billing header data

Former Member
0 Kudos
2,528

Dear All

We are having two Co Codes A001 (Country - IN, Currency - INR) and B001 (Country - BD, Currency - BDT). We are making STO within the same country for both co code through the same internal sales area. This sales area has been assigned in both the co codes.

Example : STO from plant A to B within Bangladesh Company Code B001.

Intetrnal Sales area 0000 00 00

During Proforma Invoice creation (VF01) the company code at header level (VBRK-BUKRS) gets populated with A001 instead of B001.

Please guide me how to solve this problem. How Co code gets determined at billing header level during VF01.

Thanks in advance

Regards

Animesh

View Entire Topic
0 Kudos

Hi Animesh

The easiest way to see how the company code is determined in Intercompany billing is

to run VF01 and check the logic for your case here in LV60AA93:

Main Program SAPLV60A

Source code of LV60AA93

...

form VBRK_VBRP_FUELLEN

...

  • Setzen Buchungskreis

vbrk-bukrs = vbak-bukrs_vf.

IF vbrk-bukrs IS INITIAL.

vbrk-bukrs = tvko-bukrs.

ENDIF.

IF vbrk-vbtyp CA vbtyp_fkiv.

CLEAR: vbrk-stceg_l,

vbrk-landtx,

vbrk-xegdr.

ENDIF.

IF vbrk-vbtyp CA vbtyp_fkiv AND

t001k-bukrs NE space.

vbrk-bukrs = t001k-bukrs.

ENDIF.

PERFORM t001_lesen USING vbrk-bukrs rc.

Kind regards

Brian