SAP Function Modules

PIA_CSO_BAPI_SDOC_ORIG_SET_GET SAP Function module - Original Document for Copying







PIA_CSO_BAPI_SDOC_ORIG_SET_GET 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 PIA_CSO_BAPI_SDOC_ORIG_SET_GET into the relevant SAP transaction such as SE37 or SE80.

Associated Function Group: WSSO
Released Date: Not Released
Processing type: Normal fucntion module
Normal function module settings


Pattern for FM PIA_CSO_BAPI_SDOC_ORIG_SET_GET - PIA CSO BAPI SDOC ORIG SET GET





CALL FUNCTION 'PIA_CSO_BAPI_SDOC_ORIG_SET_GET' "Original Document for Copying
* EXPORTING
*   pi_mode_refresh =           " wiso_hndl-xfield  Checkbox
*   pi_mode_set =               " wiso_hndl-xfield  Checkbox
*   pi_mode_get =               " wiso_hndl-xfield  Checkbox
  IMPORTING
    pe_head =                   " wiso_head     SAP Retail Store: IAC Consumer Order Subscreen Header Data
    pe_ship =                   " wiso_ship     Store WB: Consumer Order, Shipping Header Data
    pe_billhd =                 " wiso_billhd   SAP Retail Store Consumer Order: Billing Document Header
* TABLES
*   pi_t_item =                 " wiso_item     SAP Retail Store: IAC Consumer Order. Subscr. Item Display
*   pe_t_item =                 " wiso_item     SAP Retail Store: IAC Consumer Order. Subscr. Item Display
*   pi_t_billit =               " wiso_billit   SAP Retail Store Consumer Order: Billing Document Items
*   pe_t_billit =               " wiso_billit   SAP Retail Store Consumer Order: Billing Document Items
    .  "  PIA_CSO_BAPI_SDOC_ORIG_SET_GET

ABAP code example for Function Module PIA_CSO_BAPI_SDOC_ORIG_SET_GET





The ABAP code below is a full code listing to execute function module PIA_CSO_BAPI_SDOC_ORIG_SET_GET 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:
ld_pe_head  TYPE WISO_HEAD ,
ld_pe_ship  TYPE WISO_SHIP ,
ld_pe_billhd  TYPE WISO_BILLHD ,
it_pi_t_item  TYPE STANDARD TABLE OF WISO_ITEM,"TABLES PARAM
wa_pi_t_item  LIKE LINE OF it_pi_t_item ,
it_pe_t_item  TYPE STANDARD TABLE OF WISO_ITEM,"TABLES PARAM
wa_pe_t_item  LIKE LINE OF it_pe_t_item ,
it_pi_t_billit  TYPE STANDARD TABLE OF WISO_BILLIT,"TABLES PARAM
wa_pi_t_billit  LIKE LINE OF it_pi_t_billit ,
it_pe_t_billit  TYPE STANDARD TABLE OF WISO_BILLIT,"TABLES PARAM
wa_pe_t_billit  LIKE LINE OF it_pe_t_billit .


DATA(ld_pi_mode_refresh) = some text here

DATA(ld_pi_mode_set) = some text here

DATA(ld_pi_mode_get) = some text here

"populate fields of struture and append to itab
append wa_pi_t_item to it_pi_t_item.

"populate fields of struture and append to itab
append wa_pe_t_item to it_pe_t_item.

"populate fields of struture and append to itab
append wa_pi_t_billit to it_pi_t_billit.

"populate fields of struture and append to itab
append wa_pe_t_billit to it_pe_t_billit. . CALL FUNCTION 'PIA_CSO_BAPI_SDOC_ORIG_SET_GET' * EXPORTING * pi_mode_refresh = ld_pi_mode_refresh * pi_mode_set = ld_pi_mode_set * pi_mode_get = ld_pi_mode_get IMPORTING pe_head = ld_pe_head pe_ship = ld_pe_ship pe_billhd = ld_pe_billhd * TABLES * pi_t_item = it_pi_t_item * pe_t_item = it_pe_t_item * pi_t_billit = it_pi_t_billit * pe_t_billit = it_pe_t_billit . " PIA_CSO_BAPI_SDOC_ORIG_SET_GET
IF SY-SUBRC EQ 0. "All OK 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_pe_head  TYPE WISO_HEAD ,
ld_pi_mode_refresh  TYPE WISO_HNDL-XFIELD ,
it_pi_t_item  TYPE STANDARD TABLE OF WISO_ITEM ,
wa_pi_t_item  LIKE LINE OF it_pi_t_item,
ld_pe_ship  TYPE WISO_SHIP ,
ld_pi_mode_set  TYPE WISO_HNDL-XFIELD ,
it_pe_t_item  TYPE STANDARD TABLE OF WISO_ITEM ,
wa_pe_t_item  LIKE LINE OF it_pe_t_item,
ld_pe_billhd  TYPE WISO_BILLHD ,
ld_pi_mode_get  TYPE WISO_HNDL-XFIELD ,
it_pi_t_billit  TYPE STANDARD TABLE OF WISO_BILLIT ,
wa_pi_t_billit  LIKE LINE OF it_pi_t_billit,
it_pe_t_billit  TYPE STANDARD TABLE OF WISO_BILLIT ,
wa_pe_t_billit  LIKE LINE OF it_pe_t_billit.


ld_pi_mode_refresh = some text here

"populate fields of struture and append to itab
append wa_pi_t_item to it_pi_t_item.

ld_pi_mode_set = some text here

"populate fields of struture and append to itab
append wa_pe_t_item to it_pe_t_item.

ld_pi_mode_get = some text here

"populate fields of struture and append to itab
append wa_pi_t_billit to it_pi_t_billit.

"populate fields of struture and append to itab
append wa_pe_t_billit to it_pe_t_billit.

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 PIA_CSO_BAPI_SDOC_ORIG_SET_GET or its description.