Default mapping 'My customers'

The list "My Customers" is determined by CIS mobile in the following way by default:

Via SAP HR, infotype 0015, the personal number of the logged on user is read. "My Customers" therefore contains all customers for which this number is selected for the "sales employee" (partner function VE) within the sales area.

Customized mapping

You can define your own mapping instead by returning a list of customer numbers within the VB.NET method "MyClients" in the CIS add-on project.

VB.net

Customized VB.NET method "MyClients" (still empty)

As input parameter the method retrieves an CIS-dictionary object containing the username, organizational data and, if available via SAP HR, the personal number. The customer numbers have to be returned in the parameter "customernumbers" which is parameterized as an array of strings in VB.NET.  The method needs to return the 'true' statement if CIS mobile is to use this customized list of customers.

Example

As an example we want to implement the mapping as it is used as a default by CIS mobile, via the VE partner function. To read the data we use an ABAP routine "MYCLIENTS" in the add-on function module "/GUIXT/CISADDON_INTERFACE".

More details about the technique used here can be found in the section "Retrieve data from the sap system"

VB.net


The ABAP function "MYCLIENTS" in the module "/GUIXT/CISADDON_INTERFACE":

* Read my clients  SAMPLE CODING

* 1 Personal number
* 2 VKORG xxxx
* 3 VTWEG xx
* 4 SPART xx
*
* Out
*  List of KUNNR
form MYCLIENTS tables reqparm resparm   changing   rc type c   msg type c.

  
datapernr like pa0105-pernr.
  
datavkorg like knvp-vkorg.
  
datavtweg like knvp-vtweg.
  
dataspart like knvp-spart.

  
Read Table reqparm index into pernr.
  
Read Table reqparm index into vkorg.
  
Read Table reqparm index into vtweg.
  
Read Table reqparm index into spart.

* Customer numbers
  
databegin of customers occurs 10,
          kunnr 
like kna1-kunnr,
        
end of customers.


  
Select kunnr
     
from KNVP
        
into table customers

         
where vkorg vkorg
         
and   vtweg vtweg
         
and   spart spart
         
and   pernr pernr
         
and   parvw 'VE'.

*  return customers
   
Loop at customers.
      resparm 
customers-kunnr.
      
Append resparm.
   
Endloop.

Endform.