SAP Function Modules

SCWN_NOTE_CREATE_FROM_CINST SAP Function module







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

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


Pattern for FM SCWN_NOTE_CREATE_FROM_CINST - SCWN NOTE CREATE FROM CINST





CALL FUNCTION 'SCWN_NOTE_CREATE_FROM_CINST' "
  EXPORTING
    is_cikey =                  " cwbcikeyvs
*   iv_mode = 'D'               " char1
*   iv_display_instruction = SPACE  " boole_d
*   it_object_data_bin =        " cwbci_t_objdelta
*   ir_parent_corr =            " cl_cwb_correction_instruction
  TABLES
    tt_cwbciobj =               " bcwbn_ciobj_smodi_key_list
*   tt_cwbcidata =              " bcwbn_cinst_deltas
    tr_delta =                  " cwb_deltas
*   tt_container =              " cwbdata
  EXCEPTIONS
    ERROR = 1                   "
    .  "  SCWN_NOTE_CREATE_FROM_CINST

ABAP code example for Function Module SCWN_NOTE_CREATE_FROM_CINST





The ABAP code below is a full code listing to execute function module SCWN_NOTE_CREATE_FROM_CINST 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_tt_cwbciobj  TYPE STANDARD TABLE OF BCWBN_CIOBJ_SMODI_KEY_LIST,"TABLES PARAM
wa_tt_cwbciobj  LIKE LINE OF it_tt_cwbciobj ,
it_tt_cwbcidata  TYPE STANDARD TABLE OF BCWBN_CINST_DELTAS,"TABLES PARAM
wa_tt_cwbcidata  LIKE LINE OF it_tt_cwbcidata ,
it_tr_delta  TYPE STANDARD TABLE OF CWB_DELTAS,"TABLES PARAM
wa_tr_delta  LIKE LINE OF it_tr_delta ,
it_tt_container  TYPE STANDARD TABLE OF CWBDATA,"TABLES PARAM
wa_tt_container  LIKE LINE OF it_tt_container .

DATA(ld_is_cikey) = 'Check type of data required'.
DATA(ld_iv_mode) = 'Check type of data required'.
DATA(ld_iv_display_instruction) = 'Check type of data required'.
DATA(ld_it_object_data_bin) = 'Check type of data required'.
DATA(ld_ir_parent_corr) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tt_cwbciobj to it_tt_cwbciobj.

"populate fields of struture and append to itab
append wa_tt_cwbcidata to it_tt_cwbcidata.

"populate fields of struture and append to itab
append wa_tr_delta to it_tr_delta.

"populate fields of struture and append to itab
append wa_tt_container to it_tt_container. . CALL FUNCTION 'SCWN_NOTE_CREATE_FROM_CINST' EXPORTING is_cikey = ld_is_cikey * iv_mode = ld_iv_mode * iv_display_instruction = ld_iv_display_instruction * it_object_data_bin = ld_it_object_data_bin * ir_parent_corr = ld_ir_parent_corr TABLES tt_cwbciobj = it_tt_cwbciobj * tt_cwbcidata = it_tt_cwbcidata tr_delta = it_tr_delta * tt_container = it_tt_container EXCEPTIONS ERROR = 1 . " SCWN_NOTE_CREATE_FROM_CINST
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_is_cikey  TYPE CWBCIKEYVS ,
it_tt_cwbciobj  TYPE STANDARD TABLE OF BCWBN_CIOBJ_SMODI_KEY_LIST ,
wa_tt_cwbciobj  LIKE LINE OF it_tt_cwbciobj,
ld_iv_mode  TYPE CHAR1 ,
it_tt_cwbcidata  TYPE STANDARD TABLE OF BCWBN_CINST_DELTAS ,
wa_tt_cwbcidata  LIKE LINE OF it_tt_cwbcidata,
ld_iv_display_instruction  TYPE BOOLE_D ,
it_tr_delta  TYPE STANDARD TABLE OF CWB_DELTAS ,
wa_tr_delta  LIKE LINE OF it_tr_delta,
ld_it_object_data_bin  TYPE CWBCI_T_OBJDELTA ,
it_tt_container  TYPE STANDARD TABLE OF CWBDATA ,
wa_tt_container  LIKE LINE OF it_tt_container,
ld_ir_parent_corr  TYPE CL_CWB_CORRECTION_INSTRUCTION .

ld_is_cikey = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tt_cwbciobj to it_tt_cwbciobj.
ld_iv_mode = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tt_cwbcidata to it_tt_cwbcidata.
ld_iv_display_instruction = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tr_delta to it_tr_delta.
ld_it_object_data_bin = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_tt_container to it_tt_container.
ld_ir_parent_corr = 'Check type of data required'.

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