SAP Function Modules

BBP_PC_GOODS_MOVEMENT SAP Function module - P-Card Posting Statements







BBP_PC_GOODS_MOVEMENT is a standard SAP function module available within R/3 SAP systems depending on your version and release level. Below is the pattern details for this FM showing its interface including any import and export parameters, exceptions etc as well as any documentation contributions (Comments) specific to the object.

See here to view full function module documentation and code listing, simply by entering the name BBP_PC_GOODS_MOVEMENT into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: BBP_PC
Released Date: Not Released
Processing type: Update is started immediately, no restart possible (Immediate start, No restart)
update module no restart settings


Pattern for FM BBP_PC_GOODS_MOVEMENT - BBP PC GOODS MOVEMENT





CALL FUNCTION 'BBP_PC_GOODS_MOVEMENT' "P-Card Posting Statements
  EXPORTING
    pcard_doc =                 " bbppcdocnr    P-Card statement number
    fisc_year =                 " gjahr         P-Card statement fiscal year
    pc_line =                   " bbppclin      P-Card statement line
    pc_pos =                    " bbp_pcpos
  TABLES
    pcmod =                     " bbp_pcmod     P-card statement modified data
*   pctax =                     " bbp_pctax     Einkäuferkarte: Steuerdaten
*   pclog =                     " bbp_pclog     logistische Daten
*   return =                    " bapiret1
  EXCEPTIONS
    ERROR = 1                   "
    .  "  BBP_PC_GOODS_MOVEMENT

ABAP code example for Function Module BBP_PC_GOODS_MOVEMENT





The ABAP code below is a full code listing to execute function module BBP_PC_GOODS_MOVEMENT including all data declarations. The code uses 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 original method of declaring data variables up front. 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).

DATA:
it_pcmod  TYPE STANDARD TABLE OF BBP_PCMOD,"TABLES PARAM
wa_pcmod  LIKE LINE OF it_pcmod ,
it_pctax  TYPE STANDARD TABLE OF BBP_PCTAX,"TABLES PARAM
wa_pctax  LIKE LINE OF it_pctax ,
it_pclog  TYPE STANDARD TABLE OF BBP_PCLOG,"TABLES PARAM
wa_pclog  LIKE LINE OF it_pclog ,
it_return  TYPE STANDARD TABLE OF BAPIRET1,"TABLES PARAM
wa_return  LIKE LINE OF it_return .

DATA(ld_pcard_doc) = 'Check type of data required'.
DATA(ld_fisc_year) = 'Check type of data required'.
DATA(ld_pc_line) = 'Check type of data required'.
DATA(ld_pc_pos) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pcmod to it_pcmod.

"populate fields of struture and append to itab
append wa_pctax to it_pctax.

"populate fields of struture and append to itab
append wa_pclog to it_pclog.

"populate fields of struture and append to itab
append wa_return to it_return. . CALL FUNCTION 'BBP_PC_GOODS_MOVEMENT' EXPORTING pcard_doc = ld_pcard_doc fisc_year = ld_fisc_year pc_line = ld_pc_line pc_pos = ld_pc_pos TABLES pcmod = it_pcmod * pctax = it_pctax * pclog = it_pclog * return = it_return EXCEPTIONS ERROR = 1 . " BBP_PC_GOODS_MOVEMENT
IF SY-SUBRC EQ 0. "All OK ELSEIF SY-SUBRC EQ 1. "Exception "Add code for exception here ENDIF.







ABAP code to compare 7.40 inline data declaration with original syntax

The below ABAP code uses the older none in-line data declarations. This allows you to see the coding differences/benefits of the later inline syntax. It may also be useful if you are using an older version of SAP as some of the newer syntax above, such as the @DATA is not available until 4.70 EHP 8.

DATA:
ld_pcard_doc  TYPE BBPPCDOCNR ,
it_pcmod  TYPE STANDARD TABLE OF BBP_PCMOD ,
wa_pcmod  LIKE LINE OF it_pcmod,
ld_fisc_year  TYPE GJAHR ,
it_pctax  TYPE STANDARD TABLE OF BBP_PCTAX ,
wa_pctax  LIKE LINE OF it_pctax,
ld_pc_line  TYPE BBPPCLIN ,
it_pclog  TYPE STANDARD TABLE OF BBP_PCLOG ,
wa_pclog  LIKE LINE OF it_pclog,
ld_pc_pos  TYPE BBP_PCPOS ,
it_return  TYPE STANDARD TABLE OF BAPIRET1 ,
wa_return  LIKE LINE OF it_return.

ld_pcard_doc = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pcmod to it_pcmod.
ld_fisc_year = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pctax to it_pctax.
ld_pc_line = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pclog to it_pclog.
ld_pc_pos = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_return to it_return.

Contribute (Add Comments)

Please help keep this info upto date and use the comments section below to add useful hints, tips and information specific to this SAP function. This will then be available for you and other users to easily find by simply searching on the object name BBP_PC_GOODS_MOVEMENT or its description.