‎2009 Jan 28 6:37 AM
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
‎2009 Jan 28 6:52 AM
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 TVKBTRegards
‎2009 Jan 28 6:52 AM
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 TVKBTRegards
‎2009 Jan 28 7:50 AM
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
‎2009 Jan 28 8:30 AM
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
‎2009 Jan 28 9:21 AM
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
‎2009 Jan 28 9:28 AM
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
‎2009 Jan 28 6:53 AM
‎2009 Jan 28 8:27 AM
Hello Puneet
Perhaps the fm BAPI_SALES_AREAS_GET might be useful for you.
Regards
Uwe