SAP GET_PS_OBJECTNUMBER Function Module for NOTRANSL: Lesen aller CO-relevanten Objekte zu einem Projekt









GET_PS_OBJECTNUMBER is a standard get ps objectnumber SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used for NOTRANSL: Lesen aller CO-relevanten Objekte zu einem Projekt 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 get ps objectnumber FM, simply by entering the name GET_PS_OBJECTNUMBER into the relevant SAP transaction such as SE37 or SE38.

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



Function GET_PS_OBJECTNUMBER 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 'GET_PS_OBJECTNUMBER'"NOTRANSL: Lesen aller CO-relevanten Objekte zu einem Projekt
EXPORTING
* I_AUFNR = ' ' "
* I_WITH_COMPONENTS = ' ' "
* NO_BUFFER = ' ' "Read directly from database
* FLG_RECHINFO = ' ' "
* FLG_REFRESH = 'X' "
* FLG_VRG_TMP = ' ' "
* FLG_TMPOBJS = ' ' "
* VSNMR_IMP = "
* I_NPLNR = ' ' "
* I_ONLY_DEF_OBJECTS = ' ' "Read only networks for project definition
* I_PRONR = "
* I_PSPNR = "
* I_SHOW_PLANTYPE = ' ' "Read object indicators (orders for project)
* I_WITH_HIERARCHY = ' ' "WBS element incl. subordinate elements
* I_WITH_NETWORK = ' ' "WBS element or definition incl. assigned networks
* I_WITH_ORDERS = ' ' "WBS element incl. orders for project

IMPORTING
E_PRPS = "

TABLES
T_OBJECTS = "Table of all selected CO object numbers
* RECH_TAB = "
* PRPS_TAB = "
* HIER_IMP = "
* T_RESBD = "

EXCEPTIONS
PSP_HIERARCHY_ERROR = 1 PSP_NOT_FOUND = 2 WRONG_INPUT = 3 WRONG_ORDER_CATEGORY = 4
.



IMPORTING Parameters details for GET_PS_OBJECTNUMBER

I_AUFNR -

Data type: AUFK-AUFNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WITH_COMPONENTS -

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

NO_BUFFER - Read directly from database

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_RECHINFO -

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_REFRESH -

Data type: RCWBS-SEL01
Default: 'X'
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_VRG_TMP -

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

FLG_TMPOBJS -

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

VSNMR_IMP -

Data type: VSKOPF-VSNMR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_NPLNR -

Data type: AUFK-AUFNR
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_ONLY_DEF_OBJECTS - Read only networks for project definition

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PRONR -

Data type: PROJ-PSPNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_PSPNR -

Data type: PRPS-PSPNR
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_SHOW_PLANTYPE - Read object indicators (orders for project)

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WITH_HIERARCHY - WBS element incl. subordinate elements

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WITH_NETWORK - WBS element or definition incl. assigned networks

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_WITH_ORDERS - WBS element incl. orders for project

Data type: RCWBS-SEL01
Default: SPACE
Optional: Yes
Call by Reference: No ( called with pass by value option)

EXPORTING Parameters details for GET_PS_OBJECTNUMBER

E_PRPS -

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

TABLES Parameters details for GET_PS_OBJECTNUMBER

T_OBJECTS - Table of all selected CO object numbers

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

RECH_TAB -

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

PRPS_TAB -

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

HIER_IMP -

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

T_RESBD -

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

EXCEPTIONS details

PSP_HIERARCHY_ERROR - Error when reading WBS hierarchy

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

PSP_NOT_FOUND - WBS element does not exist

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

WRONG_INPUT - Neither definition, WBS, network nor order

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

WRONG_ORDER_CATEGORY - No CO, PP or PM order

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

Copy and paste ABAP code example for GET_PS_OBJECTNUMBER 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_e_prps  TYPE PRPS, "   
lv_i_aufnr  TYPE AUFK-AUFNR, "   SPACE
lt_t_objects  TYPE STANDARD TABLE OF OBJLIST_PS, "   
lv_psp_hierarchy_error  TYPE OBJLIST_PS, "   
lv_i_with_components  TYPE RCWBS-SEL01, "   SPACE
lv_no_buffer  TYPE RCWBS-SEL01, "   SPACE
lv_flg_rechinfo  TYPE RCWBS-SEL01, "   SPACE
lv_flg_refresh  TYPE RCWBS-SEL01, "   'X'
lv_flg_vrg_tmp  TYPE RCWBS-SEL01, "   SPACE
lv_flg_tmpobjs  TYPE RCWBS-SEL01, "   SPACE
lv_vsnmr_imp  TYPE VSKOPF-VSNMR, "   
lv_i_nplnr  TYPE AUFK-AUFNR, "   SPACE
lt_rech_tab  TYPE STANDARD TABLE OF IONRE, "   
lv_psp_not_found  TYPE IONRE, "   
lt_prps_tab  TYPE STANDARD TABLE OF RCJ_PSPNR2, "   
lv_wrong_input  TYPE RCJ_PSPNR2, "   
lv_i_only_def_objects  TYPE RCWBS-SEL01, "   SPACE
lv_i_pronr  TYPE PROJ-PSPNR, "   
lt_hier_imp  TYPE STANDARD TABLE OF RPHIERA, "   
lv_wrong_order_category  TYPE RPHIERA, "   
lv_i_pspnr  TYPE PRPS-PSPNR, "   
lt_t_resbd  TYPE STANDARD TABLE OF RESBD, "   
lv_i_show_plantype  TYPE RCWBS-SEL01, "   SPACE
lv_i_with_hierarchy  TYPE RCWBS-SEL01, "   SPACE
lv_i_with_network  TYPE RCWBS-SEL01, "   SPACE
lv_i_with_orders  TYPE RCWBS-SEL01. "   SPACE

  CALL FUNCTION 'GET_PS_OBJECTNUMBER'  "NOTRANSL: Lesen aller CO-relevanten Objekte zu einem Projekt
    EXPORTING
         I_AUFNR = lv_i_aufnr
         I_WITH_COMPONENTS = lv_i_with_components
         NO_BUFFER = lv_no_buffer
         FLG_RECHINFO = lv_flg_rechinfo
         FLG_REFRESH = lv_flg_refresh
         FLG_VRG_TMP = lv_flg_vrg_tmp
         FLG_TMPOBJS = lv_flg_tmpobjs
         VSNMR_IMP = lv_vsnmr_imp
         I_NPLNR = lv_i_nplnr
         I_ONLY_DEF_OBJECTS = lv_i_only_def_objects
         I_PRONR = lv_i_pronr
         I_PSPNR = lv_i_pspnr
         I_SHOW_PLANTYPE = lv_i_show_plantype
         I_WITH_HIERARCHY = lv_i_with_hierarchy
         I_WITH_NETWORK = lv_i_with_network
         I_WITH_ORDERS = lv_i_with_orders
    IMPORTING
         E_PRPS = lv_e_prps
    TABLES
         T_OBJECTS = lt_t_objects
         RECH_TAB = lt_rech_tab
         PRPS_TAB = lt_prps_tab
         HIER_IMP = lt_hier_imp
         T_RESBD = lt_t_resbd
    EXCEPTIONS
        PSP_HIERARCHY_ERROR = 1
        PSP_NOT_FOUND = 2
        WRONG_INPUT = 3
        WRONG_ORDER_CATEGORY = 4
. " GET_PS_OBJECTNUMBER




ABAP code using 7.40 inline data declarations to call FM GET_PS_OBJECTNUMBER

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.

 
"SELECT single AUFNR FROM AUFK INTO @DATA(ld_i_aufnr).
DATA(ld_i_aufnr) = ' '.
 
 
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_i_with_components).
DATA(ld_i_with_components) = ' '.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_no_buffer).
DATA(ld_no_buffer) = ' '.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_flg_rechinfo).
DATA(ld_flg_rechinfo) = ' '.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_flg_refresh).
DATA(ld_flg_refresh) = 'X'.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_flg_vrg_tmp).
DATA(ld_flg_vrg_tmp) = ' '.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_flg_tmpobjs).
DATA(ld_flg_tmpobjs) = ' '.
 
"SELECT single VSNMR FROM VSKOPF INTO @DATA(ld_vsnmr_imp).
 
"SELECT single AUFNR FROM AUFK INTO @DATA(ld_i_nplnr).
DATA(ld_i_nplnr) = ' '.
 
 
 
 
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_i_only_def_objects).
DATA(ld_i_only_def_objects) = ' '.
 
"SELECT single PSPNR FROM PROJ INTO @DATA(ld_i_pronr).
 
 
 
"SELECT single PSPNR FROM PRPS INTO @DATA(ld_i_pspnr).
 
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_i_show_plantype).
DATA(ld_i_show_plantype) = ' '.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_i_with_hierarchy).
DATA(ld_i_with_hierarchy) = ' '.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_i_with_network).
DATA(ld_i_with_network) = ' '.
 
"SELECT single SEL01 FROM RCWBS INTO @DATA(ld_i_with_orders).
DATA(ld_i_with_orders) = ' '.
 


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!