SAP DPSPP_ORDER_SEARCH Function Module for Dealer Portal Spare Parts: Order search









DPSPP_ORDER_SEARCH is a standard dpspp order search SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for Dealer Portal Spare Parts: Order search processing and below is the pattern details for this FM, showing its interface including any import and export parameters, exceptions etc. there is also a full "cut and paste" ABAP pattern code example, along with implementation ABAP coding, documentation and contribution comments specific to this or related objects.


See here to view full function module documentation and code listing for dpspp order search FM, simply by entering the name DPSPP_ORDER_SEARCH into the relevant SAP transaction such as SE37 or SE38.

Function Group: DP_SPP_BCK
Program Name: SAPLDP_SPP_BCK
Main Program: SAPLDP_SPP_BCK
Appliation area:
Release date: N/A
Mode(Normal, Remote etc): Normal Function Module
Update:



Function DPSPP_ORDER_SEARCH pattern details

In-order to call this FM within your sap programs, simply using the below ABAP pattern details to trigger the function call...or see the full ABAP code listing at the end of this article. You can simply cut and paste this code into your ABAP progrom as it is, including variable declarations.
CALL FUNCTION 'DPSPP_ORDER_SEARCH'"Dealer Portal Spare Parts: Order search
EXPORTING
* IT_RG_VBELN = "Sales document number
* IT_RG_SPART = "Division
* IT_RG_MATNR = "Material
* IT_RG_MAKTX = "Material Short Text range
* IV_RETURNABLE = ' ' "List only Returnable Parts
* IT_RG_GBSTK = "Global processing status of the sales document
* IT_RG_TRVOG = "Transaction group: order / inquiry
* IT_RG_AUART = "Sales document type
* IT_RG_KUNAG = "Customer number (sold-to)
* IT_RG_KUNWE = "Customer number (ship-to)
* IT_RG_BSTKD = "Purchase order number
* IT_RG_ERDAT = "Created on
* IT_RG_ERNAM = "Created by
* IT_RG_VKORG = "Sales organization
* IT_RG_VTWEG = "Distribution channel

IMPORTING
ET_SDOC = "Header
ET_SALESDOC = "Items (with header data in POSNR = '0000')

EXCEPTIONS
NO_RECORDS_FOUND = 1
.



IMPORTING Parameters details for DPSPP_ORDER_SEARCH

IT_RG_VBELN - Sales document number

Data type: TRG_CHAR10
Optional: Yes
Call by Reference: Yes

IT_RG_SPART - Division

Data type: TRG_CHAR2
Optional: Yes
Call by Reference: Yes

IT_RG_MATNR - Material

Data type: TDT_RG_MATNR
Optional: Yes
Call by Reference: Yes

IT_RG_MAKTX - Material Short Text range

Data type: WRF_MAKTX_RTTY
Optional: Yes
Call by Reference: Yes

IV_RETURNABLE - List only Returnable Parts

Data type: XFELD
Default: SPACE
Optional: Yes
Call by Reference: Yes

IT_RG_GBSTK - Global processing status of the sales document

Data type: TRG_CHAR1
Optional: Yes
Call by Reference: Yes

IT_RG_TRVOG - Transaction group: order / inquiry

Data type: TRG_CHAR1
Optional: Yes
Call by Reference: Yes

IT_RG_AUART - Sales document type

Data type: TDT_RG_AUART
Optional: Yes
Call by Reference: Yes

IT_RG_KUNAG - Customer number (sold-to)

Data type: TDT_RG_KUNAG
Optional: Yes
Call by Reference: Yes

IT_RG_KUNWE - Customer number (ship-to)

Data type: TDT_RG_KUNAG
Optional: Yes
Call by Reference: Yes

IT_RG_BSTKD - Purchase order number

Data type: TDT_RG_BSTKD
Optional: Yes
Call by Reference: Yes

IT_RG_ERDAT - Created on

Data type: TRG_DATE
Optional: Yes
Call by Reference: Yes

IT_RG_ERNAM - Created by

Data type: TRG_CHAR12
Optional: Yes
Call by Reference: Yes

IT_RG_VKORG - Sales organization

Data type: TRG_CHAR4
Optional: Yes
Call by Reference: Yes

IT_RG_VTWEG - Distribution channel

Data type: TRG_CHAR2
Optional: Yes
Call by Reference: Yes

EXPORTING Parameters details for DPSPP_ORDER_SEARCH

ET_SDOC - Header

Data type: TDT_SDOC
Optional: No
Call by Reference: Yes

ET_SALESDOC - Items (with header data in POSNR = '0000')

Data type: TDT_SALESDOC
Optional: No
Call by Reference: Yes

EXCEPTIONS details

NO_RECORDS_FOUND - No records found with the given search criteria

Data type:
Optional: No
Call by Reference: No ( called with pass by value option)

Copy and paste ABAP code example for DPSPP_ORDER_SEARCH Function Module

The ABAP code below is a full code listing to execute function module POPUP_TO_CONFIRM including all data declarations. The code uses the original data declarations rather than the latest in-line data DECLARATION SYNTAX but I have included an ABAP code snippet at the end to show how declarations would look using the newer method of declaring data variables on the fly. This will allow you to compare and fully understand the new inline method. Please note some of the newer syntax such as the @DATA is not available until a later 4.70 service pack (SP8), which i why i have stuck to the origianl for this example.

DATA:
lv_et_sdoc  TYPE TDT_SDOC, "   
lv_it_rg_vbeln  TYPE TRG_CHAR10, "   
lv_no_records_found  TYPE TRG_CHAR10, "   
lv_it_rg_spart  TYPE TRG_CHAR2, "   
lv_it_rg_matnr  TYPE TDT_RG_MATNR, "   
lv_it_rg_maktx  TYPE WRF_MAKTX_RTTY, "   
lv_iv_returnable  TYPE XFELD, "   SPACE
lv_it_rg_gbstk  TYPE TRG_CHAR1, "   
lv_it_rg_trvog  TYPE TRG_CHAR1, "   
lv_et_salesdoc  TYPE TDT_SALESDOC, "   
lv_it_rg_auart  TYPE TDT_RG_AUART, "   
lv_it_rg_kunag  TYPE TDT_RG_KUNAG, "   
lv_it_rg_kunwe  TYPE TDT_RG_KUNAG, "   
lv_it_rg_bstkd  TYPE TDT_RG_BSTKD, "   
lv_it_rg_erdat  TYPE TRG_DATE, "   
lv_it_rg_ernam  TYPE TRG_CHAR12, "   
lv_it_rg_vkorg  TYPE TRG_CHAR4, "   
lv_it_rg_vtweg  TYPE TRG_CHAR2. "   

  CALL FUNCTION 'DPSPP_ORDER_SEARCH'  "Dealer Portal Spare Parts: Order search
    EXPORTING
         IT_RG_VBELN = lv_it_rg_vbeln
         IT_RG_SPART = lv_it_rg_spart
         IT_RG_MATNR = lv_it_rg_matnr
         IT_RG_MAKTX = lv_it_rg_maktx
         IV_RETURNABLE = lv_iv_returnable
         IT_RG_GBSTK = lv_it_rg_gbstk
         IT_RG_TRVOG = lv_it_rg_trvog
         IT_RG_AUART = lv_it_rg_auart
         IT_RG_KUNAG = lv_it_rg_kunag
         IT_RG_KUNWE = lv_it_rg_kunwe
         IT_RG_BSTKD = lv_it_rg_bstkd
         IT_RG_ERDAT = lv_it_rg_erdat
         IT_RG_ERNAM = lv_it_rg_ernam
         IT_RG_VKORG = lv_it_rg_vkorg
         IT_RG_VTWEG = lv_it_rg_vtweg
    IMPORTING
         ET_SDOC = lv_et_sdoc
         ET_SALESDOC = lv_et_salesdoc
    EXCEPTIONS
        NO_RECORDS_FOUND = 1
. " DPSPP_ORDER_SEARCH




ABAP code using 7.40 inline data declarations to call FM DPSPP_ORDER_SEARCH

The below ABAP code uses the newer in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. Please note some of the newer syntax below, such as the @DATA is not available until 4.70 EHP 8.

 
 
 
 
 
 
DATA(ld_iv_returnable) = ' '.
 
 
 
 
 
 
 
 
 
 
 
 


Search for further information about these or an SAP related objects



Comments on this SAP object

What made you want to lookup this SAP object? Please tell us what you were looking for and anything you would like to be included on this page!