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

BAPI for Knvv text

Former Member
0 Likes
1,909

Hi all,

I'd be greatful if anyone of you could guide me for the bapi, Is there is any bapi for knvv table text. In KNVV table we have four fields (VKBUR, VKGRP, KVGR1, KVGR2) and the related text we can get in table TVKBT TVGRT TVV1T TVV2T. plz tell me if there is any bapi where we just put these four fields and we can get related text ..

Thnks for ur help

Puneet

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,433

Hi Puneet,

The input for all these tables are different. There are separate function modules. Check these

ISP_SELECT_SINGLE_TVKBT - for table TVKBT
ISP_SELECT_SINGLE_TVGRT - for table TVGRT
WB2_TVV1T_ARRAY_SELECT - for table TVV1T
WB2_TVV2T_ARRAY_SELECT - for table TVKBT

Regards

7 REPLIES 7
Read only

Former Member
0 Likes
1,434

Hi Puneet,

The input for all these tables are different. There are separate function modules. Check these

ISP_SELECT_SINGLE_TVKBT - for table TVKBT
ISP_SELECT_SINGLE_TVGRT - for table TVGRT
WB2_TVV1T_ARRAY_SELECT - for table TVV1T
WB2_TVV2T_ARRAY_SELECT - for table TVKBT

Regards

Read only

0 Likes
1,433

Thnks Ravi,

but how we use this FM WB2_TVV1T_ARRAY_SELECT and also can we have one FM for all fields?

Thnks again

Puneet

Read only

0 Likes
1,433

Hi,

Try it this way

DATA : IT_TVV1T TYPE TABLE OF TVV1T_KEY,
       WA_TVVIT TYPE TVV1T_KEY,

       ET_TVV1T TYPE TABLE OF TVV1T.

WA_TVVIT-SPRAS = 'E'. 
WA_TVVIT-KVGR1 = '01'. "--> Pass your value here

APPEND WA_TVVIT TO IT_TVV1T.

CALL FUNCTION 'WB2_TVV1T_ARRAY_SELECT'
  TABLES
    IT_TVV1T              = IT_TVV1T
    ET_TVV1T              = ET_TVV1T
 EXCEPTIONS
   NOT_FOUND             = 1
   PARAMETER_ERROR       = 2
   OTHERS                = 3
          .
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Regards

Read only

0 Likes
1,433

Thanks Ravi,

Plz clearify how ill capture the valu of field bezei. Like at and of the report shud i write...

Write: IT_TVV1T-BEZEI. or what u get the value..

thnks for your help

Puneet

Read only

0 Likes
1,433

Hi,

Check this

DATA : IT_TVV1T TYPE TABLE OF TVV1T_KEY,
       WA_TVVIT TYPE TVV1T_KEY,

       ET_TVV1T TYPE TABLE OF TVV1T,
       WA       LIKE LINE OF ET_TVV1T.

WA_TVVIT-SPRAS = 'E'.
WA_TVVIT-KVGR1 = '01'.

APPEND WA_TVVIT TO IT_TVV1T.

CALL FUNCTION 'WB2_TVV1T_ARRAY_SELECT'
  TABLES
    IT_TVV1T              = IT_TVV1T
    ET_TVV1T              = ET_TVV1T
 EXCEPTIONS
   NOT_FOUND             = 1
   PARAMETER_ERROR       = 2
   OTHERS                = 3
          .

LOOP AT ET_TVV1T INTO WA.

WRITE : / WA-SPRAS,
          WA-KVGR1,
          WA-BEZEI.

ENDLOOP.

Regards

Read only

Former Member
0 Likes
1,433

Hello

Try BAPI_CUSTOMER_CHANGEFROMDATA1

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,433

Hello Puneet

Perhaps the fm BAPI_SALES_AREAS_GET might be useful for you.

Regards

Uwe