Application Development 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: 

BAPI to search for customer

Former Member
0 Kudos

dear all

Iam search for a BAPI to be used in search for particular customer using one of its attribute wich is stored in kna1 table

and also search in its details stored in ADRC taple if possible.

and also BAPI for search for equipment using one of its attribute like serial number or sold to party .

thank you

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
0 Kudos

Try the generic BAPI : BAPI_HELPVALUES_GET (ref [Providing Input Help (F4 Help)|http://help.sap.com/saphelp_46c/helpdata/en/a5/3eca044ac011d1894e0000e829fbbd/frameset.htm])

Regards,

Ramond

14 REPLIES 14

Former Member
0 Kudos

What's wrong with SELECT??

Rob

0 Kudos

you can create your own bapi and return customers on basis of your selection criteria from it.

Former Member
0 Kudos

i want BAPI because i will use it in portal application so select is not possible .

Clemenss
Active Contributor
0 Kudos

Hi lamey ahmed

,

for the first part: use BAPI_BUPA_GET_DETAIL,

second I don't know.

You can use transaction BAPI to explore what functions are abailable in what area.

Regards,

Clemens

kesavadas_thekkillath
Active Contributor
0 Kudos

You can use

BAPI_CUSTOMER_FIND - Search customer

For equipment you have to write a select as said by Rob

Clemenss
Active Contributor
0 Kudos

Hi,

OK, I searched for you: BAPI_EQMT_DETAIL has parameter for serial number.

Regards,

Clemens

raymond_giuseppi
Active Contributor
0 Kudos

Try the generic BAPI : BAPI_HELPVALUES_GET (ref [Providing Input Help (F4 Help)|http://help.sap.com/saphelp_46c/helpdata/en/a5/3eca044ac011d1894e0000e829fbbd/frameset.htm])

Regards,

Ramond

Former Member
0 Kudos

thank you

Raymond Giuseppi

i read the documentation of this BAPI_HELPVALUES_GET and it is good but i want to know

if for example i want to list of customer based on company code and other selection criteria and i have the search help for this

is this BAPI allow me to set the selection criteria and get list based on it as sap search help do .

please give me example to use this search help M_DEBID to search for customers on company code 1000 from the BAPI BAPI_HELPVALUES_GET.

second thing .

and also what is the diffrence between BAPI_HELPVALUES_GET and BAPI_HELPVALUES_GET_SEARCHHELP.

Edited by: lamey ahmed on Dec 8, 2010 12:31 PM

0 Kudos

Hi lamey,

the function module BAPI_HELPVALUES_GET has exceptionally good documentation.

Please read it an makle use of the IMPORTING and TABLES parameters to get what you want:

*"  IMPORTING
*"     VALUE(OBJTYPE) LIKE  BAPIF4A-OBJTYPE DEFAULT SPACE
*"     VALUE(OBJNAME) LIKE  BAPIF4A-OBJNAME DEFAULT SPACE
*"     VALUE(METHOD) LIKE  BAPIF4A-METHOD
*"     VALUE(PARAMETER) LIKE  BAPIF4A-PARAM
*"     VALUE(FIELD) LIKE  BAPIF4A-FIELD OPTIONAL
*"     VALUE(EXPLICIT_SHLP) LIKE  BAPISHLP STRUCTURE  BAPISHLP OPTIONAL
*"     VALUE(MAX_OF_ROWS) LIKE  BAPIF4A-MAX_ROWS DEFAULT 0
*"     VALUE(DESCRIPTIONONLY) LIKE  BAPIF4A-DESCRIP DEFAULT SPACE
*"  EXPORTING
*"     VALUE(RETURN) LIKE  BAPIRETURN STRUCTURE  BAPIRETURN
*"  TABLES
*"      SELECTION_FOR_HELPVALUES STRUCTURE  BAPIF4B OPTIONAL
*"      HELPVALUES STRUCTURE  BAPIF4C
*"      VALUES_FOR_FIELD STRUCTURE  BAPIF4D
*"      DESCRIPTION_FOR_HELPVALUES STRUCTURE  BAPIF4E

EXPLICIT_SHLP can be used to specify the search help

SELECTION_FOR_HELPVALUES can be used to specify complex selection criteria.

Read the genreal documentaion and the parameter documentation, it has many hints for you.

Let us know if successful, Thank you.

Regards,

Clemens

0 Kudos

Yes this BAPI can provide you every parameter of the search help, proceed as wrote, perform some test via SE37, it's easy.

For sample, perform a where used, there are many call in SAP standard like

  lt_sel-select_fld = 'KTGRM'.
  lt_sel-sign       = 'I'.
  lt_sel-option     = 'CP'.
  lt_sel-low        = lv_search.
  APPEND lt_sel.

  CALL FUNCTION 'BAPI_HELPVALUES_GET'
         DESTINATION lv_destination-rfc_dest
       EXPORTING
            objtype                    = 'VBRK'
            method                     = 'CREATEFROMDATA'
            parameter                  = 'BillingDataIn'
            field                      = 'ACCTASGNMT'
            max_of_rows                = 100
       TABLES
            selection_for_helpvalues   = lt_sel
            helpvalues                 = lt_values
            values_for_field           = lt_val_sel
            description_for_helpvalues = lt_desc_fld
        EXCEPTIONS
            communication_failure = 1 MESSAGE lv_mess
            system_failure        = 2 MESSAGE lv_mess.

Regards,

Raymond

Former Member
0 Kudos

thank you for your help

i study the documentation of BAPI_HELPVALUES_GET and i understand SOME PARAMETERS but i cant understand the parameter

OBJTYPE

OBJNAME

METHOD

PARAMETER

FIELD

and where i can fined this attripute for aparticular search help from BOR business object repository as the mentioned

second what is the parameter SHLPTYPE in the import structure BAPISHLP

finaly what is the use of the bapi

BAPI_HELPVALUES_GET_SEARCHHELP

thank you for your time

0 Kudos

Check thread

Regards,

Raymond

Former Member
0 Kudos

Hi,

Use "IDWT_READ_ADDRESS" function module to get the details from adrc table by passing ADRNR as input.

Regards,

Thiru

Former Member
0 Kudos

thank you for all

the issues has been fixed