‎2004 Oct 22 3:19 PM
Hello Friends,
I am trying to call the BAPI 'BAPI_HELPVALUES_GET' for the Business partner, actually I wana see the list of all aviable Business partner avaiable in the system.
Here is my code:
data: des_Table type standard table of BAPIF4E with default key,
wa_myTab like line of des_Table.
data: val_Table type standard table of BAPIF4C with default key,
wa_myTab1 like line of val_Table.
data: help_Table type standard table of BAPIF4D with default key,
wa_myTab2 like line of help_Table.
CALL FUNCTION 'BAPI_HELPVALUES_GET'
EXPORTING
OBJTYPE = 'BUS1006'
OBJNAME = 'BusinessPartner'
METHOD = 'GetDetail'
PARAMETER =
FIELD =
EXPLICIT_SHLP =
MAX_OF_ROWS = 0
DESCRIPTIONONLY = ' '
IMPORTING
RETURN =
TABLES
SELECTION_FOR_HELPVALUES =
HELPVALUES = help_Table
VALUES_FOR_FIELD = val_Table
DESCRIPTION_FOR_HELPVALUES = des_Table
.
But when i execute the above code, it gives me the following error !
"Field "TABLES" is unknown. It is neither in one of the specified tables nor defined by a "DATA" statement."
I have no idea why this error is comming, though I have specified all mandatory tables,
and also can any one help me in identifying what should i have to send in parameter and field, in export parameter.
Many thanks
Marek
‎2004 Oct 22 3:37 PM
Hi Marek,
Because you have commented out al lot of parameters, but not 'PARAMETER =' and 'FIELD = the ABAP-compiler will read your code like FIELD = TABLES.
So, just put an '*' before both the PARAMETER and FIELD fields if you don't need them.
Regards,
John.
‎2004 Oct 22 3:43 PM
Hi John,
Many thanks for your response,
can you tell me what should I have to mention in parameter and feild, in order to bring the list of all avaiable sap bp in system.
Many thanks,
Marek
‎2004 Oct 22 3:52 PM
Hi Marek,
Take a look at the documentation (transaction SE37) for this BAPI; all parameters are documented quiet well.
Furthermore it is always helpful to search for the 'Where-used' to see some examples of this BAPI in the SAP-system.
Hope you succeed in making this work.
Regards,
John.
‎2004 Oct 22 4:18 PM
Hi John
Thanks for your reply,
I am just confused what can be the parameter value of PARAMETER, cause this parameter is the parameter of method getDetail and the getDetail BAPI of BusinessPartner has only one export parameter which is,BUSINESSPARTNER
and when I write this code,
data: myreturn like BAPIRETURN.
data: des_Table type standard table of BAPIF4E with default key,
wa_myTab like line of des_Table.
data: val_Table type standard table of BAPIF4C with default key,
wa_myTab1 like line of val_Table.
data: help_Table type standard table of BAPIF4D with default key,
wa_myTab2 like line of help_Table.
CALL FUNCTION 'BAPI_HELPVALUES_GET'
EXPORTING
OBJTYPE = 'BUS1006'
OBJNAME = 'BusinessPartner'
METHOD = 'GetDetail'
PARAMETER = 'BUSINESSPARTNER'
FIELD =
EXPLICIT_SHLP =
MAX_OF_ROWS = 0
DESCRIPTIONONLY = ' '
IMPORTING
RETURN = myreturn
TABLES
SELECTION_FOR_HELPVALUES =
HELPVALUES = help_Table
VALUES_FOR_FIELD = val_Table
DESCRIPTION_FOR_HELPVALUES = des_Table
.
write myreturn.
It shows me this message when "write myreturn" executes,
collective search help BUPA in feild BUT000 has not been processed.
Might be you can provide me with a single clue, that what shold be the value of parameter and feild, ??
Many thanks,
‎2004 Oct 22 4:30 PM
Hi Marek,
According to the documentation you should also specify the FIELD of the parameter you want to return, which could be for instance BPARTNER (the business partner number).
Regards,
John.
‎2004 Oct 22 4:41 PM
Hi John,
Even I am sending the following as export parameter
EXPORTING
OBJTYPE = 'BUS1006'
OBJNAME = 'BusinessPartner'
METHOD = 'GetDetail'
PARAMETER = 'BUSINESSPARTNER'
FIELD = 'BPARTNER'
it gives me the following error msg,
Es&038 Collective search help BUPA in field BUT000- has not been processed.
Many thanks, for your kind help!
Marek
‎2004 Oct 22 5:30 PM
In FIELD parameter, you need to pass the value of BPARTNER. For example '1234' not 'BPARTNER'.
‎2004 Oct 23 9:31 AM
Hi Nablan,
R u sure that I have to specify any specific BPARTNER no, like 1234, than might be It will return me any specific Business partner, but I want to get the complete list of all avaiable Business Partner.
with Regards,
Marek
‎2004 Oct 23 10:22 AM
Hi,
Alternatively you could use "BPAR_S_BPCENTRAL_PARTNER_PREP" for BP search help.
Regards
Raja
‎2004 Oct 23 10:33 AM
Hi Durairaj,
Thanks for your reply
For my more information, is this a BAPI "BPAR_S_BPCENTRAL_PARTNER_PREP", ?
Can you pls suggest something about the code which I mentioned in my above post, what is possibilly wronge, or which value I still has to mentioned. ?
Let me know pls, if you have an example like this it would be nice if you share here, ??
With Regards
Marek
‎2004 Oct 23 11:11 AM
Hi Marek,
This is not a BAPI (not a RFC) thus cannot be called from external system.
As far as your other question: i havent used the mentioned BAPI but something did feel quiet right.
You wanted a list of all Business Partners, but you are trying to call GetDetail method - which is meant for getting details of a single BP.
If you debug the function BPAR_S_BPCENTRAL_PARTNER_PREP you sould be able to find how it fetches the BPs list.
Regards
Raja
‎2004 Oct 23 4:59 PM
hi,
I was calling Getdetail, cause I would like to have the detail of all avaiable SAP Business Partner in the system. now even I have used the GetList method, I am getting the same error!
Your mentioned funtion, also did not help me cause they have not call the BAPI, which I intent to call.
DOES any one have any clue, what is possibly wronge in my code, or what I am missing here !
Many thanks,
Marek
‎2004 Oct 24 5:17 AM
> hi,
>
> I was calling Getdetail, cause I would like to have
> the detail of all avaiable SAP Business Partner in
> the system. now even I have used the GetList method,
> I am getting the same error!
for BUS1006 i dont see a method called GetList
> Your mentioned funtion, also did not help me cause
> they have not call the BAPI, which I intent to call.
Why it has to be a BAPI! r u accessing this information remotely?
> DOES any one have any clue, what is possibly wronge
> in my code, or what I am missing here !
I wil check your code and come back to you.
> Many thanks,
> Marek
‎2004 Oct 24 6:34 AM
Hi,
Try the following for 'BAPI_HELPVALUES_GET'
These are the various search helps available for businesspartner.
BUPAA SH Partner by address
BUPAB SH Partner by bank details
BUPAI SH Partner by Identification Number
BUPAP SH Partner, general
BU_NSO SH Search Help for Unsaved Objects
BUPAR SH Partners by Role
BUPAY SH Partner by Address (Rough Search)
BUPAU SH Partner According to User
BUPAV SH Partner According to Internet User
BP_BUPAG SH Business Partner
FSBP_ALIAS SH FSBP: Business Partner and Aliases
Note: fill the EXPLICIT_SHLP parameter with the desired search help name.
CALL FUNCTION 'BAPI_HELPVALUES_GET'
EXPORTING
OBJTYPE = 'BUS1006'
*OBJNAME = 'BusinessPartner'
METHOD = 'GetDetail'
PARAMETER = 'BUSINESSPARTNER'
*FIELD =
EXPLICIT_SHLP = BP_BUPAG SH (structure)
MAX_OF_ROWS = 0
DESCRIPTIONONLY = ' '
IMPORTING
RETURN =
TABLES
SELECTION_FOR_HELPVALUES =
HELPVALUES = help_Table
VALUES_FOR_FIELD = val_Table
DESCRIPTION_FOR_HELPVALUES = des_Table
Hope it helps.
Regards
Raja
‎2004 Oct 29 10:57 AM
Hi Durairaj,
I am sorry for the late reply, actually I has having a kind of fever for last few days, and was not able to do any kind of work
Today, I try to slove my old problem as per ur advise.
Pls let me know how u come to know about these help values, and what BP_BUPAG is ?? is it a of structure or what ??, ofcouse I have to define it with Data: satement, so that purpose I need to initilize it. I looked in se11 to check it, if its a type of structure, but seems not to me, pls advise.
Many thanks,
PS: I just want to have a list of all Business Partner avaiable in the system.
‎2004 Oct 29 12:58 PM
Hi Marek
Just for a quick work around I would like to tell something.
I do not have a connection to an SAP system for the moment but I guess "BP_BUPAG" passed to the "EXPLICIT_SHLP" should be the description structure of the search help. You can retrieve it using the function module <b>"F4IF_GET_SHLP_DESCR"</b>. Then pass the output of this FM to the "EXPLICIT_SHLP" parameter of "BAPI_HELPVALUES_GET" .
<u>And why you couldn't see the structure is that I guess it is defined in the type-pool <b>"SHLP"</b>.</u>
<u><b>e.g.</b></u>
TYPE-POOLS: shlp .
DATA ls_shlp TYPE shlp_descr_t.
CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
EXPORTING
shlpname = 'BP_BUPAG'
IMPORTING
shlp = ls_shlp .
CALL FUNCTION 'BAPI_HELPVALUES_GET'
EXPORTING
OBJTYPE = 'BUS1006'
*OBJNAME = 'BusinessPartner'
METHOD = 'GetDetail'
PARAMETER = 'BUSINESSPARTNER'
*FIELD =
EXPLICIT_SHLP = ls_shlp
*MAX_OF_ROWS = 0
*DESCRIPTIONONLY = ' '
*IMPORTING
*RETURN =
TABLES
*SELECTION_FOR_HELPVALUES =
HELPVALUES = help_Table
VALUES_FOR_FIELD = val_Table
DESCRIPTION_FOR_HELPVALUES = des_Table .
I hope this will help some...
*--Serdar
‎2004 Oct 29 3:32 PM
Hello Serdar Jee,
kee haal chal naay ?
Thanks for your kind reply ,
Now I am using the code, as below, but when I execute it, gives me the exception 'TYPE CONFLICT WHEN CALLING A FUNCTION MODULE !'
REPORT Z_HELPVALUES.
TYPE-POOLS: shlp .
DATA ls_shlp TYPE shlp_descr_t.
data: myreturn like BAPIRETURN.
data: des_Table type standard table of BAPIF4E with default key,
wa_myTab like line of des_Table.
data: val_Table type standard table of BAPIF4C with default key,
wa_myTab1 like line of val_Table.
data: help_Table type standard table of BAPIF4D with default key,
wa_myTab2 like line of help_Table.
CALL FUNCTION 'F4IF_GET_SHLP_DESCR'
EXPORTING
shlpname = 'BP_BUPAG'
IMPORTING
shlp = ls_shlp .
CALL FUNCTION 'BAPI_HELPVALUES_GET'
EXPORTING
OBJTYPE = 'BUS1006'
OBJNAME = 'BusinessPartner'
METHOD = 'GetList'
PARAMETER = 'BUSINESSPARTNER'
FIELD = 'BPARTNER'
EXPLICIT_SHLP = ls_shlp
MAX_OF_ROWS = 0
DESCRIPTIONONLY = ' '
IMPORTING
RETURN = myreturn
TABLES
SELECTION_FOR_HELPVALUES =
HELPVALUES = help_Table
VALUES_FOR_FIELD = val_Table
DESCRIPTION_FOR_HELPVALUES = des_Table
.
write myreturn.
write wa_myTab.
Any idea pls, what is wronge, How I can manage to see all avaiable Business Partner in the SAP System.
Many thanks,
‎2004 Oct 29 4:42 PM
Hi,
You must pass a structure type BAPISHLP to parameter EXPLICIT_SHLP .
move values from ls_shlp to a structure type BAPISHLP
Regards
Venkat
‎2004 Oct 29 4:57 PM
hi venkat,
Thanks for your reply
Now I am using this line of code
data: help type BAPISHLP.
CALL FUNCTION 'BAPI_HELPVALUES_GET'
EXPORTING
OBJTYPE = 'BUS1006'
OBJNAME = 'BusinessPartner'
METHOD = 'GetList'
PARAMETER = 'BUSINESSPARTNER'
FIELD = 'BPARTNER'
EXPLICIT_SHLP = help
MAX_OF_ROWS = 0
DESCRIPTIONONLY = ' '
IMPORTING
RETURN = myreturn
TABLES
SELECTION_FOR_HELPVALUES =
HELPVALUES = help_Table
VALUES_FOR_FIELD = val_Table
DESCRIPTION_FOR_HELPVALUES = des_Table
.
write myreturn.
write wa_myTab.
But myreturn table give msg with E, the complet msg is
ES&038Collective search help BUPA in field BUT000- has not been processed.
ANY clue or any advise pls ??
Marek
‎2004 Oct 29 5:23 PM
Hi,
R u passing the same values in help structure ?
HELP-SHLPNAME 'BUPA'
HELP-SHLPTYPE 'SH'
Regards
Venkat
‎2004 Oct 29 5:35 PM
Hi Venkat,
I am not explicitly passing any thing else
all code I have mentioned in my above post, !
what else I need to pass ??
thanks
Marek
‎2004 Oct 29 5:43 PM
Hi Marek,
add these 2 lines to your code before calling the FM.
help-SHLPNAME = 'BP_BUPAG' .
help-SHLPTYPE = 'SH' .
Regards
Venkat
‎2004 Oct 29 6:09 PM
Hi,
Thankyou very much for you help!
Can you pls explain a bit process, that what is going on !
What are these values: help-SHLPNAME = 'BP_BUPAG' .
help-SHLPTYPE = 'SH' .
Now atleast I am not getting any error! but still, it does not show me all Business Partner, when I print wa_myTab (write wa_myTab), it shows me 0, 16 times like 0000000000000000.
Many many thanks,
Marek
‎2004 Oct 29 6:29 PM
Hi Marek,
BP_BUPAG is the search help assigned to the field PARTNER.It selects values from BUT000 Table.
To know more about this Function Module read documentation for this FM in SE37 .
Regards
Venkat
‎2004 Oct 29 6:35 PM
Hi venkat,
okey, I will give it a must read,
can you pls tell me why not this program prints all business partner, even though I am printing all tables lile
write myreturn.
write wa_myTab.
write wa_myTab1.
write wa_myTab2.
Any suggestion, pls,
thanks indeed,
Marek
‎2004 Oct 29 7:47 PM
Hi Marek,
It should return all values of PARTNER field in table BUT000 through HELPVALUES table and the first 10 charecters of field HELPVALUES will be the value .Check your BUT000 table.
Regards
Venkat
‎2004 Oct 30 6:57 AM
Hi Marek,
It was weekend here (thrus & Fri), thus couldnt answer your queries. any how you got enough from others.
How i have got the list of search helps which i gave u in another post?
here it is
Name of the BAPI: BAPI_HELPVALUES_GET_SEARCHHELP
Import parameters Value
OBJTYPE BUS1006
OBJNAME BusinessPartner
METHOD GetDetail
PARAMETER Businesspartner
FIELD
Regards
Raja
‎2004 Oct 30 10:56 AM
Hello Friends,
Many many thanks for your reply, without ur help It might took me longer you deserve point now (venkat and Raja)
Any way, now I am able to see the Bussiness partner No. of all Business Partner avaiable in SAP system, is there any way that I can see there firstName and LastName as well.
Many thanks once again!
Marek
‎2004 Oct 30 11:52 AM
Use search help BUPAA
You will get the following values.
MC_CITY1 EN 0001 000000 000025 City name in upper case for search help
POST_CODE1 EN 0002 000026 000010 City postal code
MC_STREET EN 0003 000037 000025 Street name in upper case for search help
HOUSE_NUM1 EN 0004 000063 000010 House Number
COUNTRY EN 0005 000074 000003 Country Key
MC_NAME1 EN 0006 000078 000035 Search Help Field 1 (Name 1/Last Name)
MC_NAME2 EN 0007 000114 000035 Search Help Field 2 (Name 2/First Name)
BU_SORT1 EN 0008 000150 000020 Search Term 1 for Business Partner
BU_SORT2 EN 0009 000171 000020 Search Term 2 for Business Partner
PARTNER EN 0010 000192 000010 Business Partner Number
Kindly mark this thread as answered.
Regards
Raja
Message was edited by: Durairaj Athavan Raja
‎2004 Nov 10 9:24 PM
hi Durairaj,
I wana know one thing, If I wana call this BAPI "BAPI_HELPVALUES_GET", then u have identified that I have to call the function "F4IF_GET_SHLP_DESCR", ??
The function F4IF_GET_SHLP_DESCR is not RFC enabled ??
What would be the possible solution if I wana call the BAPI BAPI_HELPVALUES_GET from JAVA ??
Any suggestion PLS
Marek
‎2004 Nov 13 7:26 AM
Hi,
You dont need F4IF_GET_SHLP_DESCR
istead use BAPI_HELPVALUES_GET_SEARCHHELP (mentioned earlier in this thread)
Regards
Raja
‎2004 Nov 13 11:16 PM
Hello Durairaj,
I have used "BAPI_HELPVALUES_GET_SEARCHHELP" in one of my java program, but its not working , as its not java thread, so I cant post my JAVA code here in this thread, if you have experience of JAVA with BAPI pls drop me mail at web_cheela@yahoo.com , I would like to post you my code, might be you can help me in identifying the problem.
So nice of you, and Many thanks!
Marek.
‎2004 Nov 14 7:22 AM
Hi Marek,
If you still need help u can send your code to my email id venkat@ezcindia.com .
Regards
Venkat
‎2004 Nov 14 9:19 AM
Hi Marek,
Read documentation for Business Object "Helpvalues" which helps u to understand the functionality .It has got examples also.I am pasting it here.
Method
Helpvalues.GetSearchhelp "BAPI_HELPVALUES_GET_SEARCHHELP"
Determine Search Help for F4 Process
Functionality
This function enables you to determine search helps for finding values (F4 help) for BAPI parameters.
You must specify either the object name (parameter ObjName) or the object type of the object (parameter ObjType), the name of the method for the object (parameter Method), and the name of the parameter for the method (parameter Parameter). If the parameter is structured, you must also specify the name of the field in the Field parameter.
If the function runs successfully, the name of a search help with type and short text appears in the table parameter ShlpForHelpvalues. If a collective search help is defined for the parameter or for the field of a structured parameter, then the return table contains the names of all its elementary search helps with their types and short texts.
A entry of this type in a BAPISHLP table can be specified for the BAPI Helpvalues.GetList (BAPI_HELPVALUES_GET) to determine F4 value helps.
The table parameter DescriptionForHelpvalues specifies meta data for restricting the data selected by the BAPI Helpvalues.GetList.
Notes
Example
You want to define a search help for the VENDOR field of the BAPI parameter ReservationItems for the method MaterialReservation.GetDetail. To enable this, the BAPI Helpvalues.GetSearchhelp requires the following parameters:
Parameter: Value:
-
OBJTYPE
OBJNAME 'MaterialReservation'
METHOD 'GetDetail'
PARAMETER 'ReservationItems'
FIELD 'VENDOR'
If successful, the table parameter ShlpForHelpvalues contains the following entries:
SHLPNAME SHLPTYP REPTITLE:
-
KR EDI SH Vendors by Country/Company Code
KREDK SH Vendors by Company Code
KREDL SH Vendors by Country
KREDP SH Vendors by Personnel Number
...
One of these entries can be specified for the BAPI Helpvalues.GetList (BAPI_HELPVALUES_GET) in the parameter ExplicitShlp, and used to determine a value help.
Method
Helpvalues.GetList "BAPI_HELPVALUES_GET"
Determine Allowed Input Values (F4) for Fields in BAPI Parameters
Functionality
This method determines the valid help values (F4) for a parameter or field of a structured BAPI parameter.
Notes
The help values are based on check tables, fixed domain values, or value helps defined in a data element. If no search help of this type is defined, no help values can be specified.
This method can only be used for BAPI parameters. A check is made to see whether the field exists in the named parameter, in the method, and in the business object.
You must send the name or object type name of the business object, the method, and the parameter with the name defined in the BOR, to the Helpvalues.GetList method. If you have a field from a structured parameter, you also need to specify its name. You cannot obtain the total value help for all fields of a structure by not explicitly specifying a field when calling the method.
As an alternative, you can use details in the parameter ExplicitShlp to send specific search helps. The parameters ObjType, ObjName, Method, Parameter and Field must still be filled, so that the BAPI authorization checks can be made.
Note that this method only takes elementary search helps into account. For collective search helps, read the documentation on the method Helpvalues.GetSearchHelp.
The help values - together with other useful information - are returned in the parameter Helpvalues.
The Description4HV parameter contains meta information that describes the column contents sent in the Helpvalues parameter. Note that SAP does not guarantee the stability of search helps. You must use the Description4HV parameter to correctly interpret the values sent in the Helpvalues parameter.
The Values4Field parameter only contains help values without short texts.
You can assign an authorization check to value helps. For data protection reasons, tables of type A (master data and transaction data) and tables of type L (temporary data) cannot be read.
Exceptions for master data can be defined with explicit authorization checks on the data element of the parameter or the parameter field. The values are only returned if the caller has the correct authorizations. Otherwise, an error message is triggered (see the Return parameter). The authorization required is documented in each individual BAPI.
Example
You want to determine the valid help values for the National field (country code). The field is in the BAPI Employee.GetList in the PersonalData parameter.
If you call the method with the following parameters:
ObjType
ObjName 'Employee'
Method 'GetList'
Parameter 'PersonalData'
Field 'National'
MaxOfRows '0'
DescriptionOnly 'X'
the Description4HV parameter contains:
TABNAME (Table) FIELDNAME (Field) ... FIELDTEXT (Description)
-
H_T005 LAND1 Country code
H_T005 LANDX Country
H_T005 NATIO Nationality
Note: If you use the test environment of the Function Builder for testing, you must select case-sensitive.
The help values are sent in the Helpvalues parameter. This parameter also usually contains other useful information, such as texts. This texts are in the logon language. The following values are in the Helpvalues parameter:
...
AT Austria Austrian
AU Australia Australian
...
The Values4Field parameter only contains the input values for the National field:
...
AT
AU
...
The information from the Helpvalues parameter can be offered by the application in a dialog. A line of the Helpvalues parameter can be selected to access the correct help value in the Values4Field parameter.
If you only want to select the countries that start with 'A', the following data must be in the Selection4Helpvalues parameter:
SELECT_FLD SIGN OPTION LOW HIGH
-
LANDX I CP A*
Messages are returned in the Return parameter. The documentation for this parameter contains the return codes and their meanings.
Further Information
For more information, see the BAPI Programming Guide in the SAP Library under CA-BFA.
Regards
Venkat
‎2004 Nov 14 9:29 AM
Hello Venkat,
Thanks for your reply,
I am trying to call BAPI_HELPVALUES_GET_SEARCHHELP from Java environment, I am sending all required Import parameters but still dont know why I dont see the expected result !
Any way, thanks for ur reply, I will go through the documentation again,
Marek
PS: I have sent you email also !
‎2004 Nov 15 1:56 PM
If you would like an example of this BAPI in use, you might have a look at the following weblog.
/people/thomas.jung3/blog/2004/11/01/bsp-value-input-help-popups-version-20-part-1
This example is a standalone WebAS calling this function from a R/3 for use in BSP. Not exactly what you are doing, but the example and use of the BAPI might help. You probably want to skip to part 2 of the weblog because it actually has the coding for the BAPI call.
‎2004 Nov 16 4:49 AM
Hi,
What do u mean by <i><b>its not working</b></i>?
R u getting error message? or?
I have tried the following code in my system (4.7 WAS6.2)
and its working fine.
Name of the BAPI: BAPI_HELPVALUES_GET_SEARCHHELP
Import parameters Value
OBJTYPE BUS1006
OBJNAME BusinessPartner
METHOD GetDetail
PARAMETER Businesspartner
FIELD
Regards
Raja