Skip to Content
0
Jan 20 at 10:50 AM

Is it possible to check sales org and dealer and country in TVARVC?

135 Views Last edit Jan 20 at 07:50 PM 2 rev

Hello,

Currently I'm checking

Range: r_org FOR vbrk-vkorg,

r_dealer FOR vbrk-kunrg.

Constants: kst_salesorg VALUE 'ZV_INVOICE'.

we are maintaing zv_ invoice in TVARVC

WE have Sp01 sp02 sp03.....( We are maintaing these values in TVARVC-LOW

First we have this condition

SELECT * FROM tvarvc INTO TABLE tbl_org WHERE name = kst_salesorg .

IF sy-subrc = 0.

LOOP AT tbl_org.

r_org-low = tbl_org-low .

r_org-sign = 'I'.

r_org-option = 'EQ'.

IF tbl_org-low = 'SP01'.

r_dealer-low = tbl_org-high.

r_dealer-sign = 'I'.

r_dealer-option = 'EQ'.

APPEND r_dealer.

ENDIF.

APPEND r_org.

ENDLOOP.

*Check for the relevant sales org

IF vbdkr-vkorg IN r_org[].

Then i had requirement to check for dealer too

so I added dealer code in TVARVC-HIGH(only one dealer code for SP01 I had given)

Then,

IF vbdkr-vkorg eq 'SP01' and vbdkr-kunrg EQ r_dealer-low .

SO WHAT CAN I DO TO CHECK FOR COUNTRY?

How to add country in TVARVC?

I need to check

This is previous requirement.