SAP Function Modules

MASTERIDOC_CREATE_COND_A SAP Function module







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

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


Pattern for FM MASTERIDOC_CREATE_COND_A - MASTERIDOC CREATE COND A





CALL FUNCTION 'MASTERIDOC_CREATE_COND_A' "
  EXPORTING
    pi_mestyp =                 " tbdme-mestyp
*   pi_logsys = SPACE           " tbdls-logsys
*   pi_direkt = SPACE           "
*   pi_konh_complete = SPACE    "
*   pi_protocoll = 'X'          "
*   without_cutoff = SPACE      " xfeld
  IMPORTING
    created_comm_idocs =        " sy-tabix
  TABLES
    pit_conditions =            " vkkacondit
*   te_idoc_control =           " edidc
  EXCEPTIONS
    IDOC_COULD_NOT_BE_CREATED = 1  "
    .  "  MASTERIDOC_CREATE_COND_A

ABAP code example for Function Module MASTERIDOC_CREATE_COND_A





The ABAP code below is a full code listing to execute function module MASTERIDOC_CREATE_COND_A 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_created_comm_idocs  TYPE SY-TABIX ,
it_pit_conditions  TYPE STANDARD TABLE OF VKKACONDIT,"TABLES PARAM
wa_pit_conditions  LIKE LINE OF it_pit_conditions ,
it_te_idoc_control  TYPE STANDARD TABLE OF EDIDC,"TABLES PARAM
wa_te_idoc_control  LIKE LINE OF it_te_idoc_control .


SELECT single MESTYP
FROM TBDME
INTO @DATA(ld_pi_mestyp).


SELECT single LOGSYS
FROM TBDLS
INTO @DATA(ld_pi_logsys).

DATA(ld_pi_direkt) = 'some text here'.
DATA(ld_pi_konh_complete) = 'some text here'.
DATA(ld_pi_protocoll) = 'some text here'.
DATA(ld_without_cutoff) = 'Check type of data required'.

"populate fields of struture and append to itab
append wa_pit_conditions to it_pit_conditions.

"populate fields of struture and append to itab
append wa_te_idoc_control to it_te_idoc_control. . CALL FUNCTION 'MASTERIDOC_CREATE_COND_A' EXPORTING pi_mestyp = ld_pi_mestyp * pi_logsys = ld_pi_logsys * pi_direkt = ld_pi_direkt * pi_konh_complete = ld_pi_konh_complete * pi_protocoll = ld_pi_protocoll * without_cutoff = ld_without_cutoff IMPORTING created_comm_idocs = ld_created_comm_idocs TABLES pit_conditions = it_pit_conditions * te_idoc_control = it_te_idoc_control EXCEPTIONS IDOC_COULD_NOT_BE_CREATED = 1 . " MASTERIDOC_CREATE_COND_A
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_created_comm_idocs  TYPE SY-TABIX ,
ld_pi_mestyp  TYPE TBDME-MESTYP ,
it_pit_conditions  TYPE STANDARD TABLE OF VKKACONDIT ,
wa_pit_conditions  LIKE LINE OF it_pit_conditions,
ld_pi_logsys  TYPE TBDLS-LOGSYS ,
it_te_idoc_control  TYPE STANDARD TABLE OF EDIDC ,
wa_te_idoc_control  LIKE LINE OF it_te_idoc_control,
ld_pi_direkt  TYPE STRING ,
ld_pi_konh_complete  TYPE STRING ,
ld_pi_protocoll  TYPE STRING ,
ld_without_cutoff  TYPE XFELD .


SELECT single MESTYP
FROM TBDME
INTO ld_pi_mestyp.


"populate fields of struture and append to itab
append wa_pit_conditions to it_pit_conditions.

SELECT single LOGSYS
FROM TBDLS
INTO ld_pi_logsys.


"populate fields of struture and append to itab
append wa_te_idoc_control to it_te_idoc_control.
ld_pi_direkt = 'some text here'.
ld_pi_konh_complete = 'some text here'.
ld_pi_protocoll = 'some text here'.
ld_without_cutoff = '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 MASTERIDOC_CREATE_COND_A or its description.