SAP ISH_N2_DOCUMENT_BASE Function Module for









ISH_N2_DOCUMENT_BASE is a standard ish n2 document base SAP function module available within SAP R/3 or S/4 Hana systems, depending on your version and release level. It is used to perform a specific ABAP function and below is the pattern details, 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 ish n2 document base FM, simply by entering the name ISH_N2_DOCUMENT_BASE into the relevant SAP transaction such as SE37 or SE38.

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



Function ISH_N2_DOCUMENT_BASE 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 'ISH_N2_DOCUMENT_BASE'"
EXPORTING
* SS_MODE = ' ' "
* SS_RAISE_BATCH = "
* SS_TCODE = ' ' "Transaction Code
* SS_VCODE = ' ' "
* SS_DOC_ANZ = 1 "
* SS_DOC_POS = 1 "
* I_COMMIT = 'X' "
* I_DATA = ' ' "
* I_ARCH = ' ' "
* I_DKTXT = "IS-H*MED: Description of document

IMPORTING
SS_UPDATE = "
SS_NEXT_STATUS_FRKNZ = "
SS_NEXT_STATUS_FOLGE = "
SS_ERROR_COUNT = "
E_USE = "

CHANGING
* SS_DRAW = "
* SS_TDWS = "
* SS_TDWST = "
* SS_CMD = "Command Structure

TABLES
SS_NDOC = "
* SS_MESG = "Table of Messages

EXCEPTIONS
NO_DOCUMENT = 1 NO_AUTH = 2 NO_ENQUEUE = 3 WRONG_FUNCTION = 4
.




Customer Function user exits

Below is a list of CUSTOMER FUNCTION exit user exits that are available within this program and maybe relevant for this FM.
EXIT_SAPLN230_001 IS-H*MED: User exit before creating a document
EXIT_SAPLN230_002 IS-H*MED: User Exit before Editing a Document
EXIT_SAPLN230_003 IS-H*MED: User Exit After Editing a Document
EXIT_SAPLN230_005 IS-H*MED: User Exit for Processing Documents
EXIT_SAPLN230_006 IS-H*MED: User Exit for Processing Documents
EXIT_SAPLN230_007 IS-H*MED: User Exit for Processing Documents
EXIT_SAPLN230_008 IS-H*MED: User-Exit for Pre-setting the Doc. Management Data
EXIT_SAPLN230_USF IS-H*MED: User Exit for Processing Documents

IMPORTING Parameters details for ISH_N2_DOCUMENT_BASE

SS_MODE -

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

SS_RAISE_BATCH -

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

SS_TCODE - Transaction Code

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

SS_VCODE -

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

SS_DOC_ANZ -

Data type: SY-TABIX
Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)

SS_DOC_POS -

Data type: SY-TABIX
Default: 1
Optional: Yes
Call by Reference: No ( called with pass by value option)

I_COMMIT -

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

I_DATA -

Data type: RN200-TEXT255
Default: SPACE
Optional: Yes
Call by Reference: Yes

I_ARCH -

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

I_DKTXT - IS-H*MED: Description of document

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

EXPORTING Parameters details for ISH_N2_DOCUMENT_BASE

SS_UPDATE -

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

SS_NEXT_STATUS_FRKNZ -

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

SS_NEXT_STATUS_FOLGE -

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

SS_ERROR_COUNT -

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

E_USE -

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

CHANGING Parameters details for ISH_N2_DOCUMENT_BASE

SS_DRAW -

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

SS_TDWS -

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

SS_TDWST -

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

SS_CMD - Command Structure

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

TABLES Parameters details for ISH_N2_DOCUMENT_BASE

SS_NDOC -

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

SS_MESG - Table of Messages

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

EXCEPTIONS details

NO_DOCUMENT -

Data type:
Optional: No
Call by Reference: Yes

NO_AUTH - No authorization

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

NO_ENQUEUE - Cannot lock document

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

WRONG_FUNCTION -

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

Copy and paste ABAP code example for ISH_N2_DOCUMENT_BASE 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_ss_draw  TYPE DRAW, "   
lv_ss_mode  TYPE SY-TCODE, "   SPACE
lt_ss_ndoc  TYPE STANDARD TABLE OF NDOC, "   
lv_ss_update  TYPE SY-TCODE, "   
lv_no_document  TYPE SY, "   
lv_ss_raise_batch  TYPE ISH_ON_OFF, "   
lv_no_auth  TYPE ISH_ON_OFF, "   
lt_ss_mesg  TYPE STANDARD TABLE OF MESG, "   
lv_ss_tdws  TYPE TDWS, "   
lv_ss_tcode  TYPE SY-TCODE, "   SPACE
lv_ss_next_status_frknz  TYPE TDWS-FRKNZ, "   
lv_ss_tdwst  TYPE TDWST, "   
lv_ss_vcode  TYPE SY-TCODE, "   SPACE
lv_no_enqueue  TYPE SY, "   
lv_ss_next_status_folge  TYPE SY-TVAR1, "   
lv_ss_cmd  TYPE N2CMD, "   
lv_ss_doc_anz  TYPE SY-TABIX, "   1
lv_ss_error_count  TYPE SY-TABIX, "   
lv_wrong_function  TYPE SY, "   
lv_e_use  TYPE SY-TCODE, "   
lv_ss_doc_pos  TYPE SY-TABIX, "   1
lv_i_commit  TYPE RN200-FLAG, "   'X'
lv_i_data  TYPE RN200-TEXT255, "   SPACE
lv_i_arch  TYPE RN200, "   SPACE
lv_i_dktxt  TYPE N2_DKTXT. "   

  CALL FUNCTION 'ISH_N2_DOCUMENT_BASE'  "
    EXPORTING
         SS_MODE = lv_ss_mode
         SS_RAISE_BATCH = lv_ss_raise_batch
         SS_TCODE = lv_ss_tcode
         SS_VCODE = lv_ss_vcode
         SS_DOC_ANZ = lv_ss_doc_anz
         SS_DOC_POS = lv_ss_doc_pos
         I_COMMIT = lv_i_commit
         I_DATA = lv_i_data
         I_ARCH = lv_i_arch
         I_DKTXT = lv_i_dktxt
    IMPORTING
         SS_UPDATE = lv_ss_update
         SS_NEXT_STATUS_FRKNZ = lv_ss_next_status_frknz
         SS_NEXT_STATUS_FOLGE = lv_ss_next_status_folge
         SS_ERROR_COUNT = lv_ss_error_count
         E_USE = lv_e_use
    CHANGING
         SS_DRAW = lv_ss_draw
         SS_TDWS = lv_ss_tdws
         SS_TDWST = lv_ss_tdwst
         SS_CMD = lv_ss_cmd
    TABLES
         SS_NDOC = lt_ss_ndoc
         SS_MESG = lt_ss_mesg
    EXCEPTIONS
        NO_DOCUMENT = 1
        NO_AUTH = 2
        NO_ENQUEUE = 3
        WRONG_FUNCTION = 4
. " ISH_N2_DOCUMENT_BASE




ABAP code using 7.40 inline data declarations to call FM ISH_N2_DOCUMENT_BASE

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 TCODE FROM SY INTO @DATA(ld_ss_mode).
DATA(ld_ss_mode) = ' '.
 
 
"SELECT single TCODE FROM SY INTO @DATA(ld_ss_update).
 
 
 
 
 
 
"SELECT single TCODE FROM SY INTO @DATA(ld_ss_tcode).
DATA(ld_ss_tcode) = ' '.
 
"SELECT single FRKNZ FROM TDWS INTO @DATA(ld_ss_next_status_frknz).
 
 
"SELECT single TCODE FROM SY INTO @DATA(ld_ss_vcode).
DATA(ld_ss_vcode) = ' '.
 
 
"SELECT single TVAR1 FROM SY INTO @DATA(ld_ss_next_status_folge).
 
 
"SELECT single TABIX FROM SY INTO @DATA(ld_ss_doc_anz).
DATA(ld_ss_doc_anz) = 1.
 
"SELECT single TABIX FROM SY INTO @DATA(ld_ss_error_count).
 
 
"SELECT single TCODE FROM SY INTO @DATA(ld_e_use).
 
"SELECT single TABIX FROM SY INTO @DATA(ld_ss_doc_pos).
DATA(ld_ss_doc_pos) = 1.
 
"SELECT single FLAG FROM RN200 INTO @DATA(ld_i_commit).
DATA(ld_i_commit) = 'X'.
 
"SELECT single TEXT255 FROM RN200 INTO @DATA(ld_i_data).
DATA(ld_i_data) = ' '.
 
DATA(ld_i_arch) = ' '.
 
 


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!