SAP Function WB2_EXPENSE_SINGLE_CREATE - Simple Creation of an expense document via function module

Parameter Reference Type Length Default Optional Text
I_BUSINESS_STEP WB2_STEP C 4 X
I_BUSINESS_STEP_FROM WB2_STEP C 4 X
I_COMMIT C C 0 'X' X Commit work is executed
I_COPY_FROM_WBELN WBELN C 10 X Number of the referencedocument
I_NEW_POSTING_TYPE WB2_EXPENSE_POSTING_TYPE C 1 X Posting Type
I_REF_DOCUMENT WB2_DOCUMENT C 18 Number of the leading document
I_REF_DOC_TYPE WB2_DOC_TYPE C 2 'Q' X Documenttype of the leading document
I_REF_GJAHR GJAHR N 4 X Fiscal year
I_TEW_MODE WB2_MODE C 4 X
I_TEW_TYPE WB2_TEW_TYPE C 4 X
I_WORKAREA WB2_WORKAREA_EXT u 211 External Workarea of the expense document to be created

Parameter Reference Length Optional Text
ET_KOMLFK KOMLFK 2036 X Comm. Structure: Vendor Billing Doc. Header
IT_TRANS_KOMLFP WB2_CALC_RESULT_DISPLAY 79 X

Exception Text
CREATION_ERROR

Functionality
Using this function module expense document can be created within theframework of Global Trade and be linked with an existing leadingdocumen t. The expense document can be created with reference toplanned expense s (Conditions) from the Trading-Contract or withreference to an existing expense document in the document flow as well.

Further information
For further information the documentation of the expense handling(Globa l Trade) and the documentation of the parameters of thisfunction module can be used.

Description
If an expense document is to be created with reference to an existingdocument the number of the document refered has to be filled here.

Description
In the case that a condition of the Trading-Contract (planned expenses)is to be copied and the posting type shall be changed, the new postingtype can be specified here.

Description
The documentnumber of the leading document to that the expense documentshall be linked has to be specified here.

Description
The documenttype of the leading document to that the expense documentis to be linked has to be specified here. (i.e. 'Q' forTrading-Contract )

Description
In this structure the data of the expense document to be created haveto be specified. The following condition do exist:
Creation without reference: In this case the expense class, theaccounti ng type, the posting type, the partnerkey, the VAT code, thecurrency and the value have to be specified at minimum.
Creation with reference to a expense condition of the Trading-Contract:If a expense condition does exist in the Trading-Contract it is foundautomaticly and used as a reference. In this case the expense class,the posting type, the account type and the VAT code have to bespecified at minimum. The partnerkey has only to be filled if notspecified in the condition.
Creation with reference to an existing expense document: In this casenothing has to be specified in this structure.