Ansicht
Dokumentation

BDC_BDOC_CREATE - Generates a BDoc Type from complex structure

BDC_BDOC_CREATE - Generates a BDoc Type from complex structure

Vendor Master (General Section)   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.
SAP E-Book

Functionality

This function module generates BDocs Types in the BDoc Repository. After the function returns, the BDoc is created in Edit Mode and can be activated using BDC_BDOC_ACTIVATE.

Parameters:

TRANSP_REQUEST

P_FORCE_GEN = 'X' will enforce overwriting of existing activated BDoc. Edited BDocs must not be overwritten.

RETURN filled with an error message if an exception is raised.

BDOC: A structure describing the BDoc:

BDOC_NAME,,unique name of the BDoc, must be filled

BDOC_GNAME,,unique generation name of BDoc, max. 14 chars, can be filled or left empty

X_WRITE,,,,'X' for Write BDoc

BDOC_TYPE,,STD=Standard, SPT=Special QRY, BLK=Bulk. Use STD as default. Must be filled.

PARAMS,,,,Parameters for dynamic where clauses. If there are no, leave it empty.

SEGMENTS ,,

PARAMS-PARAM_NAME,,Unique name of the parameter (must)

PARAMS-DATAELEMENT,,data element of the parameter (must)

SEGMENT-SEGMENT_NAME,,Unique name of the segment (must)

SEGMENT-SEGGEN_NAME,,Unique generation name for the segment. Leave it empty, if you are unsure

SEGMENT-SEG_ORDER,,,,Order (1..n) for the segments. If empty, it's filled automatically in given order

SEGMENT-PAR_SEGNAME,,Name of the parent segment

SEGMENT-MAP_TABLES,,,,Mapped tables. If empty, map to table with SEGMENT_NAME is done

SEGMENT-FIELDS,,,,Fields. If empty, 1:1 mapping to all mapped tables is done.

MAP_TABLES-TABNAME,,,,Name of table (must). Does not need to be unique.

MAP_TABLES-TAB_ALIAS,,,,unique alias name of table (must).

MAP_TABLES-FLG_UPDATE,,Update table (set 'X' only once per segment) . If empty, it's set if only 1 table exists.

MAP_TABLES-WHR_CLAUSES,,Where clauses, can be empty

MAP_TABLES-JOIN_CONDS,,Join between the several mapped tables of a segment. Can be empty.

WHR_CLAUSES-WHR_CLAUSE,,String describing the where-clause (must)

WHR_CLAUSES-WHR_ORDER,,Order of where-clauses. If empty, ordered automatically by given order

WHR_CLAUSES-WHR_OP,,Operator between where-clauses (normally only 'AND' or 'OR')

WHR_CLAUSES-PARAM,,,,Used parameter for dynmic where-clause, empty for static where-clause

WHR_CLAUSES-FLG_MAND,,Flag telling wether where-clause is mandatory.

JOIN_CONDS-JOIN_COND,,String describing the join condition (must)

JOIN_CONDS-DEST_ALIAS,,Alias of the other table of the join condition.

JOIN_CONDS-J_ORDER,,,,Order of join. If empty, ordered automatically by given order

FIELDS-FIELDNAME,,,,Unique fieldname (must)

FIELDS-FIELD_POS,,,,Position of field (1..n), ordered automatically by given order, if empty.

FIELDS-DATAELEMENT,,,,data element of field (must)

FIELDS-FLG_KEY,,,,,,'X' for key. Only once per segment (+MANDT field). I

,,,,,,,,,,If empty, it's fetched from DDIC (for table where FLG_UPDATE = X)

FIELDS-FLG_PKEY,,,,'X' for parent key. Only once per child segment. If empty, fetched from DDIC

,,,,,,,,,,if field with same name and data element as in father table exists.

FIELDS-FLG_R3KEY,,,,Field is key in OLTP system. Cannot be derived automatically.

FIELDS-FLG_R3FLD,,,,Field is transported to OLTP system. Set to 'X' if R3KEY is set.

FIELDS-SORTNUM,,,,Sort criterium for mobile application (1..n). Normally empty.

FIELDS-FLG_ASC,,,,,,'X' = Ascending sort order, ''=Descending sort order (default).

FIELDS-MAP_ALIAS,,,,Alias of mapped table. Could be empty if only one alias exists.

FIELDS-MAPFIELD,,,,Mapped field. If empty, 1:1 mapping is done if only one alias exists.

------------------------------------

Some hints:

-> if the BDoc already exists and has to be overwritten, all GUIDs will be kept, so references to e.g. Replications Objects are not destroyed.

Example

Notes

Further information





Parameters

BDOC
DEVCLASS
EV_TRANSP_REQUEST
P_FORCE_GEN
TRANSP_REQUEST
T_RETURN

Exceptions

DEFINITION_ERROR
NOTHING_CHANGED
REFERENCE_ERROR
REPOSITORY_ERROR
UPDATE_ERROR

Function Group

BDC_MOD

CL_GUI_FRONTEND_SERVICES - Frontend Services   ROGBILLS - Synchronize billing plans  
This documentation is copyright by SAP AG.

Length: 4738 Date: 20240523 Time: 172524     sap01-206 ( 55 ms )