cancel
Showing results for 
Search instead for 
Did you mean: 

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

suryakumar1223
Explorer
0 Kudos

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.

Sandra_Rossi
Active Contributor
0 Kudos

Please edit your question, select your code and press the button [CODE], which makes the code appear colored/indented, it will be easier for people to look at it. Thank you!

raymond_giuseppi
Active Contributor
0 Kudos

Better create a z-table with foreign keys and a maintenance view (add available text tables) + dialog to handle it, you will get consistenchy checks, when in TVARVC anything can be input.

Accepted Solutions (0)

Answers (1)

Answers (1)

Vchopra
Explorer
0 Kudos

Hi Pavan ,

Can't we try creating a custom Z-table with the 3 fields you mentioned .. I believe they are inter-related so this solution might suffice. You might have to first select the Z-table and populate the Range tables. Later on you can use this Range tables in your code later. I don't get much from your code snippet on the requirements